@birdapi/velinstyle 0.8.0 → 0.9.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 (313) hide show
  1. package/README.de.md +135 -246
  2. package/README.md +134 -245
  3. package/cli/blueprints/onboarding.html +2 -2
  4. package/cli/cli-manifest.json +97 -0
  5. package/cli/docgen/extract-a11y.js +89 -0
  6. package/cli/docgen/extract-attributes.js +95 -0
  7. package/cli/docgen/extract-cli.js +50 -0
  8. package/cli/docgen/extract-components.js +175 -0
  9. package/cli/docgen/extract-meta.js +32 -0
  10. package/cli/docgen/extract-rules.js +76 -0
  11. package/cli/docgen/extract-tokens.js +79 -0
  12. package/cli/docgen/extract-utilities.js +75 -0
  13. package/cli/docgen/markdown.js +43 -0
  14. package/cli/docs-generate.js +196 -0
  15. package/cli/index.js +121 -5
  16. package/cli/meta.js +97 -0
  17. package/cli/perf-audit.js +174 -0
  18. package/cli/pii-scanner.js +134 -0
  19. package/cli/scanner-rules-data.js +62 -0
  20. package/cli/scanner.js +68 -1
  21. package/cli/search-index.js +163 -0
  22. package/cli/tokens-build.js +21 -1
  23. package/cli/tokens-validate.js +69 -0
  24. package/components/a11y-entry.js +42 -0
  25. package/components/a11y-utils.js +71 -0
  26. package/components/focus-manager.js +45 -8
  27. package/components/index.js +22 -12
  28. package/components/runtime/component-loaders.js +43 -0
  29. package/components/runtime/index.js +77 -0
  30. package/components/runtime-entry.js +10 -0
  31. package/components/sanitize.js +135 -54
  32. package/components/velin-accordion.js +12 -0
  33. package/components/velin-bottom-nav.js +19 -0
  34. package/components/velin-carousel.js +2 -2
  35. package/components/velin-code-block.js +142 -0
  36. package/components/velin-command.js +15 -0
  37. package/components/velin-copy.js +18 -5
  38. package/components/velin-counter.js +3 -0
  39. package/components/velin-dialog.js +9 -1
  40. package/components/velin-email.js +94 -0
  41. package/components/velin-icon.js +65 -22
  42. package/components/velin-lightbox.js +8 -3
  43. package/components/velin-live-dot.js +5 -0
  44. package/components/velin-modal.js +6 -3
  45. package/components/velin-popover.js +34 -2
  46. package/components/velin-reveal.js +7 -65
  47. package/components/velin-scroll-top.js +1 -1
  48. package/components/velin-search.js +267 -0
  49. package/components/velin-secure-field.js +99 -0
  50. package/components/velin-sparkline.js +27 -7
  51. package/components/{velin-stepper-wc.js → velin-stepper.js} +37 -8
  52. package/components/velin-theme-toggle.js +12 -5
  53. package/components/velin-toast.js +4 -0
  54. package/components/{velin-tooltip-wc.js → velin-tooltip.js} +22 -3
  55. package/core/a11y/component-contracts.json +221 -0
  56. package/core/attributes/index.js +6 -0
  57. package/core/attributes/registry.js +268 -0
  58. package/core/highlight/highlight.js +114 -0
  59. package/core/highlight/index.js +29 -0
  60. package/core/highlight/languages/_utils.js +52 -0
  61. package/core/highlight/languages/blade.js +16 -0
  62. package/core/highlight/languages/css.js +26 -0
  63. package/core/highlight/languages/html.js +17 -0
  64. package/core/highlight/languages/js.js +58 -0
  65. package/core/highlight/languages/json.js +14 -0
  66. package/core/highlight/languages/markdown.js +16 -0
  67. package/core/highlight/languages/php.js +39 -0
  68. package/core/highlight/languages/plain.js +7 -0
  69. package/core/highlight/languages/shell.js +33 -0
  70. package/core/highlight/languages/sql.js +20 -0
  71. package/core/highlight/languages/typescript.js +28 -0
  72. package/core/highlight/observe.js +53 -0
  73. package/core/highlight/registry.js +107 -0
  74. package/core/highlight/render.js +35 -0
  75. package/core/highlight/types.js +28 -0
  76. package/core/meta/build.js +293 -0
  77. package/core/meta/index.js +17 -0
  78. package/core/meta/schema.js +49 -0
  79. package/core/motion/effects.js +54 -0
  80. package/core/motion/index.js +76 -0
  81. package/core/motion/scheduler.js +72 -0
  82. package/core/motion/scroll.js +32 -0
  83. package/core/motion/stagger.js +24 -0
  84. package/core/search/docs-url.js +96 -0
  85. package/core/search/engine.js +139 -0
  86. package/core/search/highlight.js +48 -0
  87. package/core/search/index.js +126 -0
  88. package/core/search/providers.js +36 -0
  89. package/core/search/types.js +61 -0
  90. package/core/search/worker-client.js +56 -0
  91. package/core/search/worker.js +20 -0
  92. package/dist/chunks/a11y-utils-IRC7LOPF.js +16 -0
  93. package/dist/chunks/attributes-3BZLI7XF.js +364 -0
  94. package/dist/chunks/attributes-4N5JP4CG.js +364 -0
  95. package/dist/chunks/attributes-5Q2WXGRC.js +374 -0
  96. package/dist/chunks/attributes-AIR7SVLK.js +364 -0
  97. package/dist/chunks/attributes-BGRN5XZO.js +364 -0
  98. package/dist/chunks/attributes-BVSQAYLR.js +364 -0
  99. package/dist/chunks/attributes-CDYFUY7Y.js +364 -0
  100. package/dist/chunks/attributes-JMYJZBPE.js +364 -0
  101. package/dist/chunks/attributes-R5JY3X4O.js +374 -0
  102. package/dist/chunks/attributes-STYCS3O5.js +391 -0
  103. package/dist/chunks/attributes-TNSPQTHX.js +374 -0
  104. package/dist/chunks/attributes-TPANLMLF.js +391 -0
  105. package/dist/chunks/blade-LIQLVKZQ.js +19 -0
  106. package/dist/chunks/browser-MRKYZPEH.js +1149 -0
  107. package/dist/chunks/chunk-2354NEBP.js +109 -0
  108. package/dist/chunks/chunk-2VNA7G7S.js +109 -0
  109. package/dist/chunks/chunk-42VVPW6N.js +132 -0
  110. package/dist/chunks/chunk-7FFAMRFV.js +44 -0
  111. package/dist/chunks/chunk-7MCGPHVC.js +69 -0
  112. package/dist/chunks/chunk-AQLRJSGG.js +109 -0
  113. package/dist/chunks/chunk-EWPSDMQT.js +109 -0
  114. package/dist/chunks/chunk-F7OLHTGX.js +22 -0
  115. package/dist/chunks/chunk-J472ERN2.js +242 -0
  116. package/dist/chunks/chunk-LA7264K4.js +85 -0
  117. package/dist/chunks/chunk-M5CHQVP6.js +61 -0
  118. package/dist/chunks/chunk-MKZP2TBH.js +89 -0
  119. package/dist/chunks/chunk-QTJJ3DPO.js +109 -0
  120. package/dist/chunks/chunk-RDE3QE7Z.js +89 -0
  121. package/dist/chunks/chunk-RSMRR27R.js +109 -0
  122. package/dist/chunks/chunk-RZQVWFHW.js +109 -0
  123. package/dist/chunks/chunk-SRL6EWHP.js +109 -0
  124. package/dist/chunks/chunk-U4XHMZ7D.js +109 -0
  125. package/dist/chunks/chunk-V5YIUA6G.js +109 -0
  126. package/dist/chunks/chunk-XIET2VSZ.js +109 -0
  127. package/dist/chunks/chunk-XYLJ2GCB.js +205 -0
  128. package/dist/chunks/chunk-Z4JYQ2XX.js +51 -0
  129. package/dist/chunks/chunk-ZPSPKUYD.js +109 -0
  130. package/dist/chunks/css-MQ5YU77P.js +28 -0
  131. package/dist/chunks/highlight-GJHHV4KM.js +37 -0
  132. package/dist/chunks/highlight-XTHRKBA3.js +37 -0
  133. package/dist/chunks/html-ZODC4DLQ.js +20 -0
  134. package/dist/chunks/js-MNSNYTJU.js +7 -0
  135. package/dist/chunks/json-VEM2HFH3.js +17 -0
  136. package/dist/chunks/markdown-E7OPGS3S.js +19 -0
  137. package/dist/chunks/php-MLL7T3LT.js +41 -0
  138. package/dist/chunks/plain-LJJDC5TN.js +8 -0
  139. package/dist/chunks/runtime-entry.js +14 -0
  140. package/dist/chunks/shell-QTRK4U4E.js +35 -0
  141. package/dist/chunks/sql-PPWLHGJ2.js +23 -0
  142. package/dist/chunks/typescript-JT3CCYWL.js +30 -0
  143. package/dist/chunks/velin-accordion-FBIPAEXG.js +105 -0
  144. package/dist/chunks/velin-accordion-QAQO7BI7.js +117 -0
  145. package/dist/chunks/velin-announcer-PVTXXCWR.js +33 -0
  146. package/dist/chunks/velin-bottom-nav-2N2TYWOF.js +86 -0
  147. package/dist/chunks/velin-bottom-nav-7GEMPIM6.js +86 -0
  148. package/dist/chunks/velin-bottom-nav-CTU6FFZV.js +101 -0
  149. package/dist/chunks/velin-bottom-nav-N3DFQR66.js +86 -0
  150. package/dist/chunks/velin-carousel-Y5VCOABZ.js +213 -0
  151. package/dist/chunks/velin-carousel-ZTBANFQQ.js +213 -0
  152. package/dist/chunks/velin-code-block-ASUBTAQV.js +119 -0
  153. package/dist/chunks/velin-code-block-CIAURDRJ.js +132 -0
  154. package/dist/chunks/velin-code-block-TSUKPY4C.js +123 -0
  155. package/dist/chunks/velin-code-block-Y6CM726Q.js +119 -0
  156. package/dist/chunks/velin-collapse-5XYBUIID.js +80 -0
  157. package/dist/chunks/velin-combobox-2KDTCQ7N.js +155 -0
  158. package/dist/chunks/velin-combobox-NXS4QB4R.js +155 -0
  159. package/dist/chunks/velin-combobox-UGA56HP3.js +155 -0
  160. package/dist/chunks/velin-command-CKDNO4BW.js +148 -0
  161. package/dist/chunks/velin-command-M7RNHUPR.js +136 -0
  162. package/dist/chunks/velin-command-ONKO2A3J.js +136 -0
  163. package/dist/chunks/velin-command-TMLSRGIU.js +136 -0
  164. package/dist/chunks/velin-copy-G2TZ5YBB.js +81 -0
  165. package/dist/chunks/velin-copy-NYDBOKXT.js +81 -0
  166. package/dist/chunks/velin-copy-T5KDTDXP.js +81 -0
  167. package/dist/chunks/velin-countdown-4ZVDGK4R.js +101 -0
  168. package/dist/chunks/velin-countdown-5XSTN3BH.js +101 -0
  169. package/dist/chunks/velin-countdown-7AIY66CU.js +101 -0
  170. package/dist/chunks/velin-counter-ISCTEAHI.js +118 -0
  171. package/dist/chunks/velin-counter-L5FYJF7A.js +121 -0
  172. package/dist/chunks/velin-dialog-D2GUHSCD.js +144 -0
  173. package/dist/chunks/velin-dialog-ELFOZIXZ.js +152 -0
  174. package/dist/chunks/velin-dialog-GTTZI564.js +147 -0
  175. package/dist/chunks/velin-dialog-IJLFDXAJ.js +144 -0
  176. package/dist/chunks/velin-dialog-TNS3WXMB.js +144 -0
  177. package/dist/chunks/velin-drawer-BE6TYN3H.js +130 -0
  178. package/dist/chunks/velin-drawer-DLL2GLT6.js +130 -0
  179. package/dist/chunks/velin-drawer-MJS6WCF7.js +130 -0
  180. package/dist/chunks/velin-dropdown-PLUIFA5M.js +172 -0
  181. package/dist/chunks/velin-email-N5B5ZYTE.js +90 -0
  182. package/dist/chunks/velin-email-NTM6DG3V.js +90 -0
  183. package/dist/chunks/velin-email-RBX6ZR4S.js +90 -0
  184. package/dist/chunks/velin-haptic-4QQTM3RK.js +50 -0
  185. package/dist/chunks/velin-icon-7M76DOPB.js +164 -0
  186. package/dist/chunks/velin-icon-KZO3IEHG.js +164 -0
  187. package/dist/chunks/velin-icon-WTFPG2DD.js +191 -0
  188. package/dist/chunks/velin-icon-ZTSKUOVN.js +193 -0
  189. package/dist/chunks/velin-lightbox-6E7CAATP.js +149 -0
  190. package/dist/chunks/velin-lightbox-I75U6JF4.js +140 -0
  191. package/dist/chunks/velin-lightbox-QOTB4PRL.js +140 -0
  192. package/dist/chunks/velin-lightbox-UCD6N7HF.js +140 -0
  193. package/dist/chunks/velin-live-dot-RJHX2DGY.js +74 -0
  194. package/dist/chunks/velin-live-dot-XHUZCIDZ.js +67 -0
  195. package/dist/chunks/velin-menubar-I426AED2.js +86 -0
  196. package/dist/chunks/velin-menubar-J66JXRWW.js +86 -0
  197. package/dist/chunks/velin-menubar-SFEXJE56.js +86 -0
  198. package/dist/chunks/velin-modal-2HOBXE6F.js +176 -0
  199. package/dist/chunks/velin-modal-5HYNNNUI.js +176 -0
  200. package/dist/chunks/velin-modal-AEOTZ67O.js +177 -0
  201. package/dist/chunks/velin-modal-GLI2XZZB.js +176 -0
  202. package/dist/chunks/velin-persist-DFPL3QP4.js +110 -0
  203. package/dist/chunks/velin-popover-EXINRIGJ.js +145 -0
  204. package/dist/chunks/velin-popover-HQW6Q2Y6.js +172 -0
  205. package/dist/chunks/velin-popover-OXX7MRZ6.js +145 -0
  206. package/dist/chunks/velin-popover-T72HK3DF.js +151 -0
  207. package/dist/chunks/velin-popover-YKCCROJG.js +145 -0
  208. package/dist/chunks/velin-progress-ring-E4YRLZHH.js +66 -0
  209. package/dist/chunks/velin-rating-6CDBI6DG.js +91 -0
  210. package/dist/chunks/velin-rating-N4DI2XNL.js +91 -0
  211. package/dist/chunks/velin-rating-XRQJV4LO.js +91 -0
  212. package/dist/chunks/velin-scroll-top-F2FCZNYD.js +58 -0
  213. package/dist/chunks/velin-scroll-top-OHYVVHHY.js +58 -0
  214. package/dist/chunks/velin-scrollspy-OKCT4FDV.js +50 -0
  215. package/dist/chunks/velin-search-2XRQFBCS.js +556 -0
  216. package/dist/chunks/velin-search-4YHJWYSS.js +556 -0
  217. package/dist/chunks/velin-search-7B4KJ6TX.js +557 -0
  218. package/dist/chunks/velin-search-LWHY23Q5.js +474 -0
  219. package/dist/chunks/velin-secure-field-6PV7RZDJ.js +95 -0
  220. package/dist/chunks/velin-secure-field-H7FSBUJW.js +95 -0
  221. package/dist/chunks/velin-secure-field-OFNAXCDP.js +95 -0
  222. package/dist/chunks/velin-segmented-control-EKL4E3BL.js +109 -0
  223. package/dist/chunks/velin-segmented-control-GYD5BIXQ.js +109 -0
  224. package/dist/chunks/velin-segmented-control-PQX6LKOJ.js +109 -0
  225. package/dist/chunks/velin-sheet-3OGI4HD7.js +119 -0
  226. package/dist/chunks/velin-sheet-OUK6572T.js +119 -0
  227. package/dist/chunks/velin-sheet-R2Y67X6H.js +119 -0
  228. package/dist/chunks/velin-sparkline-GVEANJVW.js +184 -0
  229. package/dist/chunks/velin-sparkline-KDA3GQAN.js +162 -0
  230. package/dist/chunks/velin-sparkline-XVTFC6GE.js +181 -0
  231. package/dist/chunks/velin-stepper-2ZIHLKGM.js +141 -0
  232. package/dist/chunks/velin-stepper-7ECRUYHD.js +148 -0
  233. package/dist/chunks/velin-stepper-FYEUEWE6.js +141 -0
  234. package/dist/chunks/velin-stepper-X54WGHDG.js +141 -0
  235. package/dist/chunks/velin-stepper-wc-QU3KRVQR.js +133 -0
  236. package/dist/chunks/velin-tabs-5UQ5ZVMV.js +138 -0
  237. package/dist/chunks/velin-theme-toggle-32J2CBNC.js +291 -0
  238. package/dist/chunks/velin-theme-toggle-BNNS7WLV.js +285 -0
  239. package/dist/chunks/velin-theme-toggle-NO7V4TWI.js +285 -0
  240. package/dist/chunks/velin-theme-toggle-QELCJM2Q.js +291 -0
  241. package/dist/chunks/velin-toast-OMMOA2DK.js +109 -0
  242. package/dist/chunks/velin-toast-RCZ4CSUC.js +109 -0
  243. package/dist/chunks/velin-toast-RSF2IHT3.js +113 -0
  244. package/dist/chunks/velin-toast-WEUBTJG6.js +109 -0
  245. package/dist/chunks/velin-tooltip-664IOHZA.js +112 -0
  246. package/dist/chunks/velin-tooltip-BDHGRTQB.js +112 -0
  247. package/dist/chunks/velin-tooltip-HVUOKNVX.js +112 -0
  248. package/dist/chunks/velin-tooltip-wc-LXDVT6DE.js +103 -0
  249. package/dist/chunks/worker-client-R6DBYPFT.js +46 -0
  250. package/dist/llms.test.txt +40 -0
  251. package/dist/llms.txt +40 -0
  252. package/dist/search-index.json +1773 -0
  253. package/dist/search-index.test.json +1773 -0
  254. package/dist/themes/brutalist.min.css +1 -1
  255. package/dist/themes/midnight.min.css +1 -1
  256. package/dist/themes/pastel.min.css +1 -1
  257. package/dist/themes/retro.min.css +1 -1
  258. package/dist/themes/sunset.min.css +1 -1
  259. package/dist/velin-agent.json +684 -0
  260. package/dist/velin-agent.test.json +684 -0
  261. package/dist/velinstyle-components.iife.js +7715 -3515
  262. package/dist/velinstyle-components.js +7087 -2859
  263. package/dist/velinstyle-components.min.js +196 -109
  264. package/dist/velinstyle.css +604 -65
  265. package/dist/velinstyle.d.ts +54 -0
  266. package/dist/velinstyle.min.css +1 -1
  267. package/examples/search-index.schema.json +33 -0
  268. package/package.json +56 -10
  269. package/src/a11y/authentication.css +37 -0
  270. package/src/a11y/consistent-help.css +22 -0
  271. package/src/a11y/dragging-alternatives.css +30 -0
  272. package/src/a11y/focus-appearance.css +20 -0
  273. package/src/a11y/high-contrast-aaa.css +16 -26
  274. package/src/a11y/skip-link.css +3 -1
  275. package/src/a11y/sr-only.css +1 -1
  276. package/src/base/reset.css +0 -36
  277. package/src/base/wc-placeholder.css +102 -0
  278. package/src/components/attributes.css +42 -0
  279. package/src/components/highlight.css +182 -0
  280. package/src/components/input-group.css +1 -2
  281. package/src/components/nav.css +2 -3
  282. package/src/components/search.css +95 -0
  283. package/src/components/stepper.css +2 -4
  284. package/src/components/timeline.css +1 -2
  285. package/src/components/tooltip.css +2 -4
  286. package/src/layout/container.css +5 -5
  287. package/src/layout/grid.css +8 -8
  288. package/src/layout/patterns.css +5 -5
  289. package/src/themes/brutalist.css +2 -11
  290. package/src/themes/corporate.css +0 -9
  291. package/src/themes/earth.css +0 -9
  292. package/src/themes/forest.css +0 -9
  293. package/src/themes/midnight.css +1 -10
  294. package/src/themes/neon.css +0 -9
  295. package/src/themes/nordic.css +0 -9
  296. package/src/themes/ocean.css +0 -9
  297. package/src/themes/pastel.css +1 -10
  298. package/src/themes/retro.css +2 -11
  299. package/src/themes/sharp.css +0 -7
  300. package/src/themes/soft.css +0 -7
  301. package/src/themes/sunset.css +1 -10
  302. package/src/tokens/color.css +45 -46
  303. package/src/tokens/fonts.css +10 -0
  304. package/src/tokens/typography.css +4 -5
  305. package/src/utilities/animation.css +2 -2
  306. package/src/utilities/display.css +3 -3
  307. package/src/utilities/divide.css +2 -6
  308. package/src/utilities/responsive.css +4 -4
  309. package/src/utilities/safe-area.css +1 -1
  310. package/src/utilities/scroll-animation.css +34 -0
  311. package/src/utilities/spacing.css +17 -8
  312. package/src/utilities/text.css +4 -1
  313. package/src/velinstyle.css +9 -0
@@ -1,4 +1,6 @@
1
- var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"summary","details"].join(", ");function je(r){if(r.hasAttribute("disabled")||r.getAttribute("aria-hidden")==="true"||r.closest("[inert]"))return!1;let e=r.ownerDocument.defaultView?.getComputedStyle(r);return e&&(e.visibility==="hidden"||e.display==="none")?!1:r.getClientRects().length>0}function _(r){return[...r.querySelectorAll(Pe)].filter(je)}function v(r,e){if(e.key!=="Tab")return;let t=_(r);if(t.length===0)return;let i=t[0],s=t[t.length-1],o=r.getRootNode().activeElement;e.shiftKey&&o===i?(e.preventDefault(),s.focus()):!e.shiftKey&&o===s&&(e.preventDefault(),i.focus())}function b(r,e,t){let i=e.indexOf(t.target);if(i===-1)return;let s;switch(t.key){case"ArrowDown":case"ArrowRight":t.preventDefault(),s=(i+1)%e.length;break;case"ArrowUp":case"ArrowLeft":t.preventDefault(),s=(i-1+e.length)%e.length;break;case"Home":t.preventDefault(),s=0;break;case"End":t.preventDefault(),s=e.length-1;break;default:return}e.forEach((o,n)=>{o.setAttribute("tabindex",n===s?"0":"-1")}),e[s].focus()}function g(){return document.activeElement}function y(r){r&&typeof r.focus=="function"&&r.focus()}var q=[];function A(r){q=[];for(let e of document.body.children)e===r||e.contains(r)||e.hasAttribute("inert")||(e.setAttribute("inert",""),q.push(e))}function E(){for(let r of q)r.removeAttribute("inert");q=[]}var Ye={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ve=/[&<>"']/g,Xe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,Ue=new Set(["http:","https:","data:","mailto:","tel:"]),ke=/^data:text\/html/i;function a(r){return typeof r!="string"?"":r.replace(Ve,e=>Ye[e])}function ve(r){return typeof r!="string"?"":r.replace(Xe,"")}function We(r){return a(ve(r))}function be(r){if(typeof r!="string")return"";let e=r.trim();if(/^\s*javascript:/i.test(e)||/^\s*vbscript:/i.test(e)||ke.test(e))return"";try{let t=new URL(e,typeof location<"u"?location.href:"https://example.invalid/");return!Ue.has(t.protocol)||t.protocol==="data:"&&ke.test(e)?"":e}catch{return""}}var I=null;function Ae(){return I||(typeof window<"u"&&window.trustedTypes?.createPolicy&&(I=window.trustedTypes.createPolicy("velinstyle",{createHTML:r=>a(r)})),I)}function Ge(r){let e=Ae(),t=a(ve(r));return e?.createHTML?e.createHTML(t):t}var Ze=`
1
+ var vl=Object.defineProperty;var u=(i,e)=>()=>(i&&(e=i(i=0)),e);var v=(i,e)=>{for(var t in e)vl(i,t,{get:e[t],enumerable:!0})};function gl(i){if(i.hasAttribute("disabled")||i.getAttribute("aria-hidden")==="true"||i.closest("[inert]"))return!1;let e=i.ownerDocument.defaultView?.getComputedStyle(i);return e&&(e.visibility==="hidden"||e.display==="none")?!1:i.getClientRects().length>0}function ae(i){return[...i.querySelectorAll(bl)].filter(gl)}function G(i,e){if(e.key!=="Tab")return;let t=ae(i);if(t.length===0)return;let r=t[0],n=t[t.length-1],o=i.getRootNode().activeElement;e.shiftKey&&o===r?(e.preventDefault(),n.focus()):!e.shiftKey&&o===n&&(e.preventDefault(),r.focus())}function Y(i,e,t){let r=e.indexOf(t.target);if(r===-1)return;let n;switch(t.key){case"ArrowDown":case"ArrowRight":t.preventDefault(),n=(r+1)%e.length;break;case"ArrowUp":case"ArrowLeft":t.preventDefault(),n=(r-1+e.length)%e.length;break;case"Home":t.preventDefault(),n=0;break;case"End":t.preventDefault(),n=e.length-1;break;default:return}e.forEach((o,a)=>{o.setAttribute("tabindex",a===n?"0":"-1")}),e[n].focus()}function Z(){return document.activeElement}function J(i){i&&typeof i.focus=="function"&&i.focus()}function yl(){let i=new Set;for(let e of Ne)for(let t of e.siblings)i.add(t);return i}function Q(i){let e=i instanceof HTMLElement?i:null;if(!e)return;let t=new Set;for(let r of document.body.children)r===e||r.contains(e)||r.hasAttribute("inert")||(r.setAttribute("inert",""),t.add(r));Ne.push({host:e,siblings:t}),it===0&&(nr=document.body.style.overflow,document.body.style.overflow="hidden"),it+=1}function ee(i){let e=-1;if(i instanceof HTMLElement?e=Ne.findLastIndex(n=>n.host===i):Ne.length&&(e=Ne.length-1),e===-1)return;let{siblings:t}=Ne.splice(e,1)[0],r=yl();for(let n of t)r.has(n)||n.removeAttribute("inert");it=Math.max(0,it-1),it===0&&(document.body.style.overflow=nr,nr="")}var bl,Ne,it,nr,j=u(()=>{bl=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"summary","details"].join(", ");Ne=[],it=0,nr=""});function io(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function _l(i){if(Array.isArray(i))return i}function xl(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,o,a,c=[],d=!0,m=!1;try{if(o=(t=t.call(i)).next,e!==0)for(;!(d=(r=o.call(t)).done)&&(c.push(r.value),c.length!==e);d=!0);}catch(b){m=!0,n=b}finally{try{if(!d&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw n}}return c}}function Al(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wl(i,e){return _l(i)||xl(i,e)||El(i,e)||Al()}function El(i,e){if(i){if(typeof i=="string")return io(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?io(i,e):void 0}}function I(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return dr(i,e,r)}}function Ol(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ur(i,t)}}function y(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nt;if(ro&&ro(i,null),!q(e))return i;let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){let o=t(n);o!==n&&(kl(e)||(e[r]=o),n=o)}i[n]=!0}return i}function Dl(i){for(let e=0;e<i.length;e++)T(i,e)||(i[e]=null);return i}function K(i){let e=Pe(null);for(let r of vo(i)){var t=wl(r,2);let n=t[0],o=t[1];T(i,n)&&(q(o)?e[n]=Dl(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=K(o):e[n]=o)}return e}function Nl(i){switch(typeof i){case"string":return i;case"number":return Ml(i);case"boolean":return Il(i);case"bigint":return ao?ao(i):"0";case"symbol":return lo?lo(i):"Symbol()";case"undefined":return rt(i);case"function":case"object":{if(i===null)return rt(i);let e=i,t=Se(e,"toString");if(typeof t=="function"){let r=t(e);return typeof r=="string"?r:rt(r)}return rt(i)}default:return rt(i)}}function Se(i,e){for(;i!==null;){let r=Tl(i,e);if(r){if(r.get)return I(r.get);if(typeof r.value=="function")return I(r.value)}i=Sl(i)}function t(){return null}return t}function Hl(i){try{return z(i,""),!0}catch{return!1}}function go(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yl(),e=f=>go(f);if(e.version="3.4.5",e.removed=[],!i||!i.document||i.document.nodeType!==Fe.document||!i.Element)return e.isSupported=!1,e;let t=i.document,r=t,n=r.currentScript,o=i.DocumentFragment,a=i.HTMLTemplateElement,c=i.Node,d=i.Element,m=i.NodeFilter,b=i.NamedNodeMap,_=b===void 0?i.NamedNodeMap||i.MozNamedAttrMap:b,g=i.HTMLFormElement,F=i.DOMParser,w=i.trustedTypes,A=d.prototype,E=Se(A,"cloneNode"),re=Se(A,"remove"),de=Se(A,"nextSibling"),Cn=Se(A,"childNodes"),ne=Se(A,"parentNode"),Et=c&&c.prototype?Se(c.prototype,"nodeType"):null;if(typeof a=="function"){let f=t.createElement("template");f.content&&f.content.ownerDocument&&(t=f.content.ownerDocument)}let H,we="",ue=t,Bi=ue.implementation,Rn=ue.createNodeIterator,il=ue.createDocumentFragment,rl=ue.getElementsByTagName,nl=r.importNode,P=fo();e.isSupported=typeof vo=="function"&&typeof ne=="function"&&Bi&&Bi.createHTMLDocument!==void 0;let kt=Fl,St=Pl,Tt=ql,ol=Ul,sl=Bl,al=jl,Mn=Kl,ll=Gl,In=mo,D=null,On=y({},[...co,...sr,...ar,...lr,...uo]),$=null,Dn=y({},[...ho,...cr,...po,...Ht]),L=Object.seal(Pe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Je=null,Lt=null,ve=Object.seal(Pe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Nn=!0,ji=!0,Hn=!1,$n=!0,be=!1,Qe=!0,Ee=!1,Ki=!1,Wi=!1,Me=!1,Ct=!1,Rt=!1,zn=!0,Fn=!1,Pn="user-content-",Gi=!0,et=!1,Ie={},oe=null,Yi=y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qn=null,Un=y({},["audio","video","img","source","image","track"]),Vi=null,Bn=y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Mt="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",se="http://www.w3.org/1999/xhtml",Oe=se,Xi=!1,Zi=null,cl=y({},[Mt,It,se],or),Ji=y({},["mi","mo","mn","ms","mtext"]),Qi=y({},["annotation-xml"]),dl=y({},["title","style","font","a","script"]),tt=null,ul=["application/xhtml+xml","text/html"],hl="text/html",O=null,De=null,pl=t.createElement("form"),jn=function(s){return s instanceof RegExp||s instanceof Function},er=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(De&&De===s)return;(!s||typeof s!="object")&&(s={}),s=K(s),tt=ul.indexOf(s.PARSER_MEDIA_TYPE)===-1?hl:s.PARSER_MEDIA_TYPE,O=tt==="application/xhtml+xml"?or:nt,D=T(s,"ALLOWED_TAGS")&&q(s.ALLOWED_TAGS)?y({},s.ALLOWED_TAGS,O):On,$=T(s,"ALLOWED_ATTR")&&q(s.ALLOWED_ATTR)?y({},s.ALLOWED_ATTR,O):Dn,Zi=T(s,"ALLOWED_NAMESPACES")&&q(s.ALLOWED_NAMESPACES)?y({},s.ALLOWED_NAMESPACES,or):cl,Vi=T(s,"ADD_URI_SAFE_ATTR")&&q(s.ADD_URI_SAFE_ATTR)?y(K(Bn),s.ADD_URI_SAFE_ATTR,O):Bn,qn=T(s,"ADD_DATA_URI_TAGS")&&q(s.ADD_DATA_URI_TAGS)?y(K(Un),s.ADD_DATA_URI_TAGS,O):Un,oe=T(s,"FORBID_CONTENTS")&&q(s.FORBID_CONTENTS)?y({},s.FORBID_CONTENTS,O):Yi,Je=T(s,"FORBID_TAGS")&&q(s.FORBID_TAGS)?y({},s.FORBID_TAGS,O):K({}),Lt=T(s,"FORBID_ATTR")&&q(s.FORBID_ATTR)?y({},s.FORBID_ATTR,O):K({}),Ie=T(s,"USE_PROFILES")?s.USE_PROFILES&&typeof s.USE_PROFILES=="object"?K(s.USE_PROFILES):s.USE_PROFILES:!1,Nn=s.ALLOW_ARIA_ATTR!==!1,ji=s.ALLOW_DATA_ATTR!==!1,Hn=s.ALLOW_UNKNOWN_PROTOCOLS||!1,$n=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,be=s.SAFE_FOR_TEMPLATES||!1,Qe=s.SAFE_FOR_XML!==!1,Ee=s.WHOLE_DOCUMENT||!1,Me=s.RETURN_DOM||!1,Ct=s.RETURN_DOM_FRAGMENT||!1,Rt=s.RETURN_TRUSTED_TYPE||!1,Wi=s.FORCE_BODY||!1,zn=s.SANITIZE_DOM!==!1,Fn=s.SANITIZE_NAMED_PROPS||!1,Gi=s.KEEP_CONTENT!==!1,et=s.IN_PLACE||!1,In=Hl(s.ALLOWED_URI_REGEXP)?s.ALLOWED_URI_REGEXP:mo,Oe=typeof s.NAMESPACE=="string"?s.NAMESPACE:se,Ji=T(s,"MATHML_TEXT_INTEGRATION_POINTS")&&s.MATHML_TEXT_INTEGRATION_POINTS&&typeof s.MATHML_TEXT_INTEGRATION_POINTS=="object"?K(s.MATHML_TEXT_INTEGRATION_POINTS):y({},["mi","mo","mn","ms","mtext"]),Qi=T(s,"HTML_INTEGRATION_POINTS")&&s.HTML_INTEGRATION_POINTS&&typeof s.HTML_INTEGRATION_POINTS=="object"?K(s.HTML_INTEGRATION_POINTS):y({},["annotation-xml"]);let l=T(s,"CUSTOM_ELEMENT_HANDLING")&&s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING=="object"?K(s.CUSTOM_ELEMENT_HANDLING):Pe(null);if(L=Pe(null),T(l,"tagNameCheck")&&jn(l.tagNameCheck)&&(L.tagNameCheck=l.tagNameCheck),T(l,"attributeNameCheck")&&jn(l.attributeNameCheck)&&(L.attributeNameCheck=l.attributeNameCheck),T(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),be&&(ji=!1),Ct&&(Me=!0),Ie&&(D=y({},uo),$=Pe(null),Ie.html===!0&&(y(D,co),y($,ho)),Ie.svg===!0&&(y(D,sr),y($,cr),y($,Ht)),Ie.svgFilters===!0&&(y(D,ar),y($,cr),y($,Ht)),Ie.mathMl===!0&&(y(D,lr),y($,po),y($,Ht))),ve.tagCheck=null,ve.attributeCheck=null,T(s,"ADD_TAGS")&&(typeof s.ADD_TAGS=="function"?ve.tagCheck=s.ADD_TAGS:q(s.ADD_TAGS)&&(D===On&&(D=K(D)),y(D,s.ADD_TAGS,O))),T(s,"ADD_ATTR")&&(typeof s.ADD_ATTR=="function"?ve.attributeCheck=s.ADD_ATTR:q(s.ADD_ATTR)&&($===Dn&&($=K($)),y($,s.ADD_ATTR,O))),T(s,"ADD_URI_SAFE_ATTR")&&q(s.ADD_URI_SAFE_ATTR)&&y(Vi,s.ADD_URI_SAFE_ATTR,O),T(s,"FORBID_CONTENTS")&&q(s.FORBID_CONTENTS)&&(oe===Yi&&(oe=K(oe)),y(oe,s.FORBID_CONTENTS,O)),T(s,"ADD_FORBID_CONTENTS")&&q(s.ADD_FORBID_CONTENTS)&&(oe===Yi&&(oe=K(oe)),y(oe,s.ADD_FORBID_CONTENTS,O)),Gi&&(D["#text"]=!0),Ee&&y(D,["html","head","body"]),D.table&&(y(D,["tbody"]),delete Je.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=s.TRUSTED_TYPES_POLICY,we=H.createHTML("")}else H===void 0&&(H=Vl(w,n)),H!==null&&typeof we=="string"&&(we=H.createHTML(""));U&&U(s),De=s},Kn=y({},[...sr,...ar,...$l]),Wn=y({},[...lr,...zl]),ml=function(s){let l=ne(s);(!l||!l.tagName)&&(l={namespaceURI:Oe,tagName:"template"});let h=nt(s.tagName),x=nt(l.tagName);return Zi[s.namespaceURI]?s.namespaceURI===It?l.namespaceURI===se?h==="svg":l.namespaceURI===Mt?h==="svg"&&(x==="annotation-xml"||Ji[x]):!!Kn[h]:s.namespaceURI===Mt?l.namespaceURI===se?h==="math":l.namespaceURI===It?h==="math"&&Qi[x]:!!Wn[h]:s.namespaceURI===se?l.namespaceURI===It&&!Qi[x]||l.namespaceURI===Mt&&!Ji[x]?!1:!Wn[h]&&(dl[h]||!Kn[h]):!!(tt==="application/xhtml+xml"&&Zi[s.namespaceURI]):!1},X=function(s){$e(e.removed,{element:s});try{ne(s).removeChild(s)}catch{re(s)}},ke=function(s,l){try{$e(e.removed,{attribute:l.getAttributeNode(s),from:l})}catch{$e(e.removed,{attribute:null,from:l})}if(l.removeAttribute(s),s==="is")if(Me||Ct)try{X(l)}catch{}else try{l.setAttribute(s,"")}catch{}},Gn=function(s){let l=null,h=null;if(Wi)s="<remove></remove>"+s;else{let M=oo(s,/^[\r\n\t ]+/);h=M&&M[0]}tt==="application/xhtml+xml"&&Oe===se&&(s='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+s+"</body></html>");let x=H?H.createHTML(s):s;if(Oe===se)try{l=new F().parseFromString(x,tt)}catch{}if(!l||!l.documentElement){l=Bi.createDocument(Oe,"template",null);try{l.documentElement.innerHTML=Xi?we:x}catch{}}let R=l.body||l.documentElement;return s&&h&&R.insertBefore(t.createTextNode(h),R.childNodes[0]||null),Oe===se?rl.call(l,Ee?"html":"body")[0]:Ee?l.documentElement:R},Yn=function(s){return Rn.call(s.ownerDocument||s,s,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Vn=function(s){s.normalize();let l=Rn.call(s.ownerDocument||s,s,m.SHOW_TEXT|m.SHOW_COMMENT|m.SHOW_CDATA_SECTION|m.SHOW_PROCESSING_INSTRUCTION,null),h=l.nextNode();for(;h;){let x=h.data;He([kt,St,Tt],R=>{x=ze(x,R," ")}),h.data=x,h=l.nextNode()}},tr=function(s){return s instanceof g&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof _)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},Ot=function(s){if(!Et||typeof s!="object"||s===null)return!1;try{return typeof Et(s)=="number"}catch{return!1}};function he(f,s,l){He(f,h=>{h.call(e,s,l,De)})}let Xn=function(s){let l=null;if(he(P.beforeSanitizeElements,s,null),tr(s))return X(s),!0;let h=O(s.nodeName);if(he(P.uponSanitizeElement,s,{tagName:h,allowedTags:D}),Qe&&s.hasChildNodes()&&!Ot(s.firstElementChild)&&z(/<[/\w!]/g,s.innerHTML)&&z(/<[/\w!]/g,s.textContent)||Qe&&s.namespaceURI===se&&h==="style"&&Ot(s.firstElementChild)||s.nodeType===Fe.progressingInstruction||Qe&&s.nodeType===Fe.comment&&z(/<[/\w]/g,s.data))return X(s),!0;if(Je[h]||!(ve.tagCheck instanceof Function&&ve.tagCheck(h))&&!D[h]){if(!Je[h]&&Jn(h)&&(L.tagNameCheck instanceof RegExp&&z(L.tagNameCheck,h)||L.tagNameCheck instanceof Function&&L.tagNameCheck(h)))return!1;if(Gi&&!oe[h]){let x=ne(s)||s.parentNode,R=Cn(s)||s.childNodes;if(R&&x){let M=R.length;for(let B=M-1;B>=0;--B){let ge=E(R[B],!0);x.insertBefore(ge,de(s))}}}return X(s),!0}return s instanceof d&&!ml(s)||(h==="noscript"||h==="noembed"||h==="noframes")&&z(/<\/no(script|embed|frames)/i,s.innerHTML)?(X(s),!0):(be&&s.nodeType===Fe.text&&(l=s.textContent,He([kt,St,Tt],x=>{l=ze(l,x," ")}),s.textContent!==l&&($e(e.removed,{element:s.cloneNode()}),s.textContent=l)),he(P.afterSanitizeElements,s,null),!1)},Zn=function(s,l,h){if(Lt[l]||zn&&(l==="id"||l==="name")&&(h in t||h in pl))return!1;let x=$[l]||ve.attributeCheck instanceof Function&&ve.attributeCheck(l,s);if(!(ji&&!Lt[l]&&z(ol,l))){if(!(Nn&&z(sl,l))){if(!x||Lt[l]){if(!(Jn(s)&&(L.tagNameCheck instanceof RegExp&&z(L.tagNameCheck,s)||L.tagNameCheck instanceof Function&&L.tagNameCheck(s))&&(L.attributeNameCheck instanceof RegExp&&z(L.attributeNameCheck,l)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(l,s))||l==="is"&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&z(L.tagNameCheck,h)||L.tagNameCheck instanceof Function&&L.tagNameCheck(h))))return!1}else if(!Vi[l]){if(!z(In,ze(h,Mn,""))){if(!((l==="src"||l==="xlink:href"||l==="href")&&s!=="script"&&so(h,"data:")===0&&qn[s])){if(!(Hn&&!z(al,ze(h,Mn,"")))){if(h)return!1}}}}}}return!0},fl=y({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jn=function(s){return!fl[nt(s)]&&z(ll,s)},Qn=function(s){he(P.beforeSanitizeAttributes,s,null);let l=s.attributes;if(!l||tr(s))return;let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0},x=l.length;for(;x--;){let R=l[x],M=R.name,B=R.namespaceURI,ge=R.value,pe=O(M),rr=ge,N=M==="value"?rr:Rl(rr);if(h.attrName=pe,h.attrValue=N,h.keepAttr=!0,h.forceKeepAttr=void 0,he(P.uponSanitizeAttribute,s,h),N=h.attrValue,Fn&&(pe==="id"||pe==="name")&&so(N,Pn)!==0&&(ke(M,s),N=Pn+N),Qe&&z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,N)){ke(M,s);continue}if(pe==="attributename"&&oo(N,"href")){ke(M,s);continue}if(h.forceKeepAttr)continue;if(!h.keepAttr){ke(M,s);continue}if(!$n&&z(/\/>/i,N)){ke(M,s);continue}be&&He([kt,St,Tt],to=>{N=ze(N,to," ")});let eo=O(s.nodeName);if(!Zn(eo,pe,N)){ke(M,s);continue}if(H&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!B)switch(w.getAttributeType(eo,pe)){case"TrustedHTML":{N=H.createHTML(N);break}case"TrustedScriptURL":{N=H.createScriptURL(N);break}}if(N!==rr)try{B?s.setAttributeNS(B,M,N):s.setAttribute(M,N),tr(s)?X(s):no(e.removed)}catch{ke(M,s)}}he(P.afterSanitizeAttributes,s,null)},ir=function(s){let l=null,h=Yn(s);for(he(P.beforeSanitizeShadowDOM,s,null);l=h.nextNode();)he(P.uponSanitizeShadowNode,l,null),Xn(l),Qn(l),l.content instanceof o&&ir(l.content);he(P.afterSanitizeShadowDOM,s,null)},Dt=function(s){if(s.nodeType===Fe.element&&s.shadowRoot instanceof o){let x=s.shadowRoot;Dt(x),ir(x)}let l=s.childNodes;if(!l)return;let h=[];He(l,x=>{$e(h,x)});for(let x of h)Dt(x)};return e.sanitize=function(f){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=null,h=null,x=null,R=null;if(Xi=!f,Xi&&(f="<!-->"),typeof f!="string"&&!Ot(f)&&(f=Nl(f),typeof f!="string"))throw Nt("dirty is not a string, aborting");if(!e.isSupported)return f;if(Ki||er(s),e.removed=[],typeof f=="string"&&(et=!1),et){let ge=f.nodeName;if(typeof ge=="string"){let pe=O(ge);if(!D[pe]||Je[pe])throw Nt("root node is forbidden and cannot be sanitized in-place")}Dt(f)}else if(Ot(f))l=Gn("<!---->"),h=l.ownerDocument.importNode(f,!0),h.nodeType===Fe.element&&h.nodeName==="BODY"||h.nodeName==="HTML"?l=h:l.appendChild(h),Dt(h);else{if(!Me&&!be&&!Ee&&f.indexOf("<")===-1)return H&&Rt?H.createHTML(f):f;if(l=Gn(f),!l)return Me?null:Rt?we:""}l&&Wi&&X(l.firstChild);let M=Yn(et?f:l);for(;x=M.nextNode();)Xn(x),Qn(x),x.content instanceof o&&ir(x.content);if(et)return be&&Vn(f),f;if(Me){if(be&&Vn(l),Ct)for(R=il.call(l.ownerDocument);l.firstChild;)R.appendChild(l.firstChild);else R=l;return($.shadowroot||$.shadowrootmode)&&(R=nl.call(r,R,!0)),R}let B=Ee?l.outerHTML:l.innerHTML;return Ee&&D["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&z(Wl,l.ownerDocument.doctype.name)&&(B="<!DOCTYPE "+l.ownerDocument.doctype.name+`>
3
+ `+B),be&&He([kt,St,Tt],ge=>{B=ze(B,ge," ")}),H&&Rt?H.createHTML(B):B},e.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};er(f),Ki=!0},e.clearConfig=function(){De=null,Ki=!1},e.isValidAttribute=function(f,s,l){De||er({});let h=O(f),x=O(s);return Zn(h,x,l)},e.addHook=function(f,s){typeof s=="function"&&$e(P[f],s)},e.removeHook=function(f,s){if(s!==void 0){let l=Ll(P[f],s);return l===-1?void 0:Cl(P[f],l,1)[0]}return no(P[f])},e.removeHooks=function(f){P[f]=[]},e.removeAllHooks=function(){P=fo()},e}var vo,ro,kl,Sl,Tl,U,V,Pe,bo,dr,ur,He,Ll,no,$e,Cl,q,nt,or,oo,ze,so,Rl,Ml,Il,ao,lo,T,rt,z,Nt,co,sr,ar,$l,lr,zl,uo,ho,cr,po,Ht,Fl,Pl,ql,Ul,Bl,mo,jl,Kl,Wl,Gl,Fe,Yl,Vl,fo,C,yo=u(()=>{vo=Object.entries,ro=Object.setPrototypeOf,kl=Object.isFrozen,Sl=Object.getPrototypeOf,Tl=Object.getOwnPropertyDescriptor,U=Object.freeze,V=Object.seal,Pe=Object.create,bo=typeof Reflect<"u"&&Reflect,dr=bo.apply,ur=bo.construct;U||(U=function(e){return e});V||(V=function(e){return e});dr||(dr=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return e.apply(t,n)});ur||(ur=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});He=I(Array.prototype.forEach),Ll=I(Array.prototype.lastIndexOf),no=I(Array.prototype.pop),$e=I(Array.prototype.push),Cl=I(Array.prototype.splice),q=Array.isArray,nt=I(String.prototype.toLowerCase),or=I(String.prototype.toString),oo=I(String.prototype.match),ze=I(String.prototype.replace),so=I(String.prototype.indexOf),Rl=I(String.prototype.trim),Ml=I(Number.prototype.toString),Il=I(Boolean.prototype.toString),ao=typeof BigInt>"u"?null:I(BigInt.prototype.toString),lo=typeof Symbol>"u"?null:I(Symbol.prototype.toString),T=I(Object.prototype.hasOwnProperty),rt=I(Object.prototype.toString),z=I(RegExp.prototype.test),Nt=Ol(TypeError);co=U(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),sr=U(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ar=U(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$l=U(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lr=U(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zl=U(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uo=U(["#text"]),ho=U(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),cr=U(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),po=U(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ht=U(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fl=V(/{{[\w\W]*|^[\w\W]*}}/g),Pl=V(/<%[\w\W]*|^[\w\W]*%>/g),ql=V(/\${[\w\W]*/g),Ul=V(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bl=V(/^aria-[\-\w]+$/),mo=V(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jl=V(/^(?:\w+script|data):/i),Kl=V(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wl=V(/^html$/i),Gl=V(/^[a-z][.\w]*(-[.\w]+)+$/i),Fe={element:1,text:3,progressingInstruction:7,comment:8,document:9},Yl=function(){return typeof window>"u"?null:window},Vl=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},fo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};C=go()});var _o={};v(_o,{addHook:()=>Ql,clearConfig:()=>nc,clearWindow:()=>lc,default:()=>Xl,isSupported:()=>Jl,isValidAttribute:()=>oc,removeAllHooks:()=>ic,removeHook:()=>ec,removeHooks:()=>tc,removed:()=>ac,sanitize:()=>Zl,setConfig:()=>rc,version:()=>sc});function lc(){}var Xl,Zl,Jl,Ql,ec,tc,ic,rc,nc,oc,sc,ac,xo=u(()=>{yo();Xl=C,Zl=C.sanitize.bind(C),Jl=C.isSupported,Ql=C.addHook.bind(C),ec=C.removeHook.bind(C),tc=C.removeHooks.bind(C),ic=C.removeAllHooks.bind(C),rc=C.setConfig.bind(C),nc=C.clearConfig.bind(C),oc=C.isValidAttribute.bind(C),sc=C.version,ac=C.removed});function p(i){return typeof i!="string"?"":i.replace(dc,e=>cc[e])}function hr(i){return typeof i!="string"?"":i.replace(uc,"")}function me(i){return p(hr(i))}function Te(i,e){if(typeof i!="string")return"";let t=i.trim();if(!t||/^\s*javascript:/i.test(t)||/^\s*vbscript:/i.test(t)||pc.test(t)||/^data:/i.test(t)&&!Ao.test(t))return"";try{let r=new URL(t,e||(typeof location<"u"?location.href:"https://example.invalid/"));return!hc.has(r.protocol)||r.protocol==="data:"&&!Ao.test(r.href)?"":r.href}catch{return t.startsWith("#")||t.startsWith("/")?t:""}}function wo(i,e){if(typeof i!="string")return"#";let t=i.trim();return t?t.startsWith("#")||t.startsWith("/")&&!t.startsWith("//")?t:/^https?:\/\//i.test(t)?Te(t,e)||"#":/^\s*javascript:/i.test(t)||/^\s*vbscript:/i.test(t)?"#":t:"#"}function Eo(i){let e=String(i||"text").toLowerCase();return mc.has(e)?e:"text"}async function fc(){if(ot)return ot;try{let i=await Promise.resolve().then(()=>(xo(),_o));ot=i.default||i}catch{ot=null}return ot}async function ko(i){if(typeof i!="string")return"";let e=await fc();return e?.sanitize?e.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:vc,ADD_ATTR:bc,FORBID_TAGS:["script","foreignObject","iframe","object","embed"],FORBID_ATTR:["onload","onerror","onclick","onmouseover"]}):i.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/\s+on\w+\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/<foreignObject[\s\S]*?<\/foreignObject>/gi,"")}function So(){return $t||(typeof window<"u"&&window.trustedTypes?.createPolicy&&($t=window.trustedTypes.createPolicy("velinstyle",{createHTML:i=>p(i)})),$t)}function gc(i){let e=So(),t=p(hr(i));return e?.createHTML?e.createHTML(t):t}var cc,dc,uc,hc,pc,Ao,mc,ot,vc,bc,$t,k=u(()=>{cc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},dc=/[&<>"']/g,uc=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,hc=new Set(["http:","https:","data:","mailto:","tel:"]),pc=/^data:(?:text\/html|image\/svg\+xml|application\/xml)/i,Ao=/^data:image\/(png|jpeg|jpg|gif|webp|avif);base64,/i,mc=new Set(["text","password","email","search","tel","url","number"]);ot=null;vc=["svg","g","path","circle","rect","line","polyline","polygon","ellipse","defs","use","symbol","title","desc","clipPath","mask","linearGradient","radialGradient","stop","pattern","text","tspan"],bc=["viewBox","xmlns","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin","d","cx","cy","r","rx","ry","x","y","width","height","x1","y1","x2","y2","points","transform","opacity","class","id","href","xlink:href","aria-hidden","aria-label","aria-labelledby","role","focusable","clip-path","mask","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","patternUnits","patternContentUnits","preserveAspectRatio"];$t=null});var Lo={};v(Lo,{default:()=>To});var yc,zt,To,pr=u(()=>{j();k();yc=`
2
4
  :host {
3
5
  display: contents;
4
6
  }
@@ -80,19 +82,19 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
80
82
  @media (prefers-reduced-motion: reduce) {
81
83
  .overlay, .dialog { transition: none; }
82
84
  }
83
- `,F=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._previouslyFocused=null,this._onKeydown=this._onKeydown.bind(this)}connectedCallback(){let e=this.getAttribute("title")||"",t=a(e);this.shadowRoot.innerHTML=`
84
- <style>${Ze}</style>
85
+ `,zt=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._previouslyFocused=null,this._onKeydown=this._onKeydown.bind(this)}connectedCallback(){let e=(this.getAttribute("title")||"").trim(),t=p(e),r=e?'aria-labelledby="velin-modal-title"':`aria-label="${p(this.getAttribute("aria-label")||"Dialog")}"`;this.shadowRoot.innerHTML=`
86
+ <style>${yc}</style>
85
87
  <div class="overlay" part="overlay">
86
- <div class="dialog" role="dialog" aria-modal="true" aria-labelledby="velin-modal-title" part="dialog">
88
+ <div class="dialog" role="dialog" aria-modal="true" ${r} part="dialog">
87
89
  <div class="header" part="header">
88
- <h2 class="title" id="velin-modal-title">${t}</h2>
90
+ <h2 class="title" id="velin-modal-title"${e?"":' class="velin-sr-only"'}>${t||"Dialog"}</h2>
89
91
  <button class="close-btn" aria-label="Close" part="close">&#215;</button>
90
92
  </div>
91
93
  <div class="body" part="body"><slot></slot></div>
92
94
  <div class="footer" part="footer"><slot name="footer"></slot></div>
93
95
  </div>
94
96
  </div>
95
- `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",i=>{i.target===i.currentTarget&&this.close()})}attributeChangedCallback(e,t,i){e==="open"&&(i!==null?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._previouslyFocused=g(),A(this),document.addEventListener("keydown",this._onKeydown),document.body.style.overflow="hidden",requestAnimationFrame(()=>{let e=_(this.shadowRoot);e.length>0&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKeydown),document.body.style.overflow="",E(),y(this._previouslyFocused)}_onKeydown(e){if(e.key==="Escape"){this.close();return}v(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKeydown),document.body.style.overflow=""}};customElements.define("velin-modal",F);var Je=F;var Qe=`
97
+ `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",n=>{n.target===n.currentTarget&&this.close()})}attributeChangedCallback(e,t,r){e==="open"&&(r!==null?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._previouslyFocused=Z(),Q(this),document.addEventListener("keydown",this._onKeydown),document.body.style.overflow="hidden",requestAnimationFrame(()=>{let e=ae(this.shadowRoot);e.length>0&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKeydown),document.body.style.overflow="",ee(),J(this._previouslyFocused)}_onKeydown(e){if(e.key==="Escape"){this.close();return}G(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKeydown),document.body.style.overflow=""}};customElements.define("velin-modal",zt);To=zt});var Ro={};v(Ro,{default:()=>Co});var _c,Ft,Co,mr=u(()=>{j();_c=`
96
98
  :host {
97
99
  display: inline-block;
98
100
  position: relative;
@@ -142,13 +144,13 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
142
144
  @media (prefers-reduced-motion: reduce) {
143
145
  .menu { transition: none; }
144
146
  }
145
- `,z=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onDocClick=this._onDocClick.bind(this),this._onKeydown=this._onKeydown.bind(this),this._typeahead="",this._typeaheadTimer=null}connectedCallback(){let e=this.getAttribute("align")||"start";this.shadowRoot.innerHTML=`
146
- <style>${Qe}</style>
147
+ `,Ft=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onDocClick=this._onDocClick.bind(this),this._onKeydown=this._onKeydown.bind(this),this._typeahead="",this._typeaheadTimer=null}connectedCallback(){let e=this.getAttribute("align")||"start";this.shadowRoot.innerHTML=`
148
+ <style>${_c}</style>
147
149
  <slot name="trigger"></slot>
148
150
  <div class="menu ${e==="end"?"menu-end":""}" role="menu" part="menu">
149
151
  <slot></slot>
150
152
  </div>
151
- `;let t=this.shadowRoot.querySelector('slot[name="trigger"]'),i=this.shadowRoot.querySelector("slot:not([name])");t.addEventListener("click",()=>this.toggle()),t.addEventListener("slotchange",()=>{let s=t.assignedElements()[0];if(s){s.setAttribute("aria-haspopup","menu"),s.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false");let o=this._menuId||(this._menuId=`velin-dropdown-menu-${Math.random().toString(36).slice(2,9)}`);s.setAttribute("aria-controls",o),this.shadowRoot.querySelector(".menu")?.setAttribute("id",o)}}),i?.addEventListener("slotchange",()=>this._normalizeMenuItems()),this._normalizeMenuItems(),this.addEventListener("keydown",this._onKeydown)}_normalizeMenuItems(){this._getMenuItems().forEach((t,i)=>{t.hasAttribute("role")||t.setAttribute("role","menuitem"),t.setAttribute("tabindex",i===0?"0":"-1")})}toggle(){this.hasAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","true"),document.addEventListener("click",this._onDocClick,!0),requestAnimationFrame(()=>{let t=this._getMenuItems();t.length>0&&t[0].focus()})}close(){this.removeAttribute("open");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","false"),document.removeEventListener("click",this._onDocClick,!0),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_getMenuItems(){let e=this.shadowRoot.querySelector("slot:not([name])");return e?e.assignedElements().filter(t=>!t.hasAttribute("disabled")):[]}_onDocClick(e){this.contains(e.target)||this.close()}_onKeydown(e){if(e.key==="Escape"){this.close();let i=this.querySelector('[slot="trigger"]');i&&i.focus();return}let t=this._getMenuItems();if(t.length!==0){if(e.key.length===1&&/[a-z0-9]/i.test(e.key)){clearTimeout(this._typeaheadTimer),this._typeahead+=e.key.toLowerCase(),this._typeaheadTimer=setTimeout(()=>{this._typeahead=""},500);let i=t.find(s=>(s.textContent?.trim().toLowerCase()||"").startsWith(this._typeahead));i&&(e.preventDefault(),t.forEach(s=>s.setAttribute("tabindex",s===i?"0":"-1")),i.focus());return}b(this,t,e)}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-dropdown",z);var et=z;var tt=`
153
+ `;let t=this.shadowRoot.querySelector('slot[name="trigger"]'),r=this.shadowRoot.querySelector("slot:not([name])");t.addEventListener("click",()=>this.toggle()),t.addEventListener("slotchange",()=>{let n=t.assignedElements()[0];if(n){n.setAttribute("aria-haspopup","menu"),n.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false");let o=this._menuId||(this._menuId=`velin-dropdown-menu-${Math.random().toString(36).slice(2,9)}`);n.setAttribute("aria-controls",o),this.shadowRoot.querySelector(".menu")?.setAttribute("id",o)}}),r?.addEventListener("slotchange",()=>this._normalizeMenuItems()),this._normalizeMenuItems(),this.addEventListener("keydown",this._onKeydown)}_normalizeMenuItems(){this._getMenuItems().forEach((t,r)=>{t.hasAttribute("role")||t.setAttribute("role","menuitem"),t.setAttribute("tabindex",r===0?"0":"-1")})}toggle(){this.hasAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","true"),document.addEventListener("click",this._onDocClick,!0),requestAnimationFrame(()=>{let t=this._getMenuItems();t.length>0&&t[0].focus()})}close(){this.removeAttribute("open");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","false"),document.removeEventListener("click",this._onDocClick,!0),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_getMenuItems(){let e=this.shadowRoot.querySelector("slot:not([name])");return e?e.assignedElements().filter(t=>!t.hasAttribute("disabled")):[]}_onDocClick(e){this.contains(e.target)||this.close()}_onKeydown(e){if(e.key==="Escape"){this.close();let r=this.querySelector('[slot="trigger"]');r&&r.focus();return}let t=this._getMenuItems();if(t.length!==0){if(e.key.length===1&&/[a-z0-9]/i.test(e.key)){clearTimeout(this._typeaheadTimer),this._typeahead+=e.key.toLowerCase(),this._typeaheadTimer=setTimeout(()=>{this._typeahead=""},500);let r=t.find(n=>(n.textContent?.trim().toLowerCase()||"").startsWith(this._typeahead));r&&(e.preventDefault(),t.forEach(n=>n.setAttribute("tabindex",n===r?"0":"-1")),r.focus());return}Y(this,t,e)}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-dropdown",Ft);Co=Ft});var Io={};v(Io,{default:()=>Mo});var xc,Pt,Mo,fr=u(()=>{xc=`
152
154
  :host {
153
155
  display: block;
154
156
  border: 1px solid var(--velin-color-border, #ddd);
@@ -176,10 +178,22 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
176
178
  ::slotted(details > summary::-webkit-details-marker) {
177
179
  display: none;
178
180
  }
179
- `,H=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onToggle=this._onToggle.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`
180
- <style>${tt}</style>
181
+ ::slotted(details[open] > summary) {
182
+ background: var(--velin-color-primary-subtle, #eff6ff);
183
+ color: var(--velin-color-primary, #2563eb);
184
+ }
185
+ ::slotted(details > :not(summary)) {
186
+ padding: var(--velin-space-4, 1rem) var(--velin-space-5, 1.25rem);
187
+ background: var(--velin-color-bg-subtle, #f8fafc);
188
+ color: var(--velin-color-text-muted, #64748b);
189
+ font-size: var(--velin-text-sm, 0.875rem);
190
+ line-height: 1.6;
191
+ border-block-start: 1px solid var(--velin-color-border, #e2e8f0);
192
+ }
193
+ `,Pt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onToggle=this._onToggle.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`
194
+ <style>${xc}</style>
181
195
  <slot></slot>
182
- `,this._exclusive=this.hasAttribute("exclusive"),this._wireDetails(),this.addEventListener("toggle",this._onToggle,!0),this.addEventListener("keydown",this._onKeydown.bind(this))}_wireDetails(){let e=0;for(let t of this.querySelectorAll("details")){let i=t.querySelector("summary"),s=t.querySelector(":scope > :not(summary)"),o=s?.id||`velin-accordion-panel-${++e}`;s&&!s.id&&(s.id=o),i&&s&&i.setAttribute("aria-controls",o)}}_onToggle(e){if(!this._exclusive)return;let t=e.target;if(!t.open)return;[...this.querySelectorAll("details")].forEach(s=>{s!==t&&s.open&&(s.open=!1)})}_onKeydown(e){let t=[...this.querySelectorAll("summary")],i=t.indexOf(e.target);if(i===-1)return;let s;switch(e.key){case"ArrowDown":e.preventDefault(),s=(i+1)%t.length;break;case"ArrowUp":e.preventDefault(),s=(i-1+t.length)%t.length;break;case"Home":e.preventDefault(),s=0;break;case"End":e.preventDefault(),s=t.length-1;break;default:return}t[s].focus()}disconnectedCallback(){this.removeEventListener("toggle",this._onToggle,!0)}};customElements.define("velin-accordion",H);var it=H;var st=`
196
+ `,this._exclusive=this.hasAttribute("exclusive"),this._wireDetails(),this.addEventListener("toggle",this._onToggle,!0),this.addEventListener("keydown",this._onKeydown.bind(this))}_wireDetails(){let e=0;for(let t of this.querySelectorAll("details")){let r=t.querySelector("summary"),n=t.querySelector(":scope > :not(summary)"),o=n?.id||`velin-accordion-panel-${++e}`;n&&!n.id&&(n.id=o),r&&n&&r.setAttribute("aria-controls",o)}}_onToggle(e){if(!this._exclusive)return;let t=e.target;if(!t.open)return;[...this.querySelectorAll("details")].forEach(n=>{n!==t&&n.open&&(n.open=!1)})}_onKeydown(e){let t=[...this.querySelectorAll("summary")],r=t.indexOf(e.target);if(r===-1)return;let n;switch(e.key){case"ArrowDown":e.preventDefault(),n=(r+1)%t.length;break;case"ArrowUp":e.preventDefault(),n=(r-1+t.length)%t.length;break;case"Home":e.preventDefault(),n=0;break;case"End":e.preventDefault(),n=t.length-1;break;default:return}t[n].focus()}disconnectedCallback(){this.removeEventListener("toggle",this._onToggle,!0)}};customElements.define("velin-accordion",Pt);Mo=Pt});var Do={};v(Do,{default:()=>Oo});var Ac,qt,Oo,vr=u(()=>{j();Ac=`
183
197
  :host {
184
198
  display: block;
185
199
  }
@@ -221,15 +235,15 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
221
235
  ::slotted([role="tabpanel"][hidden]) {
222
236
  display: none;
223
237
  }
224
- `,D=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onTabClick=this._onTabClick.bind(this),this._onKeydown=this._onKeydown.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`
225
- <style>${st}</style>
238
+ `,qt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onTabClick=this._onTabClick.bind(this),this._onKeydown=this._onKeydown.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`
239
+ <style>${Ac}</style>
226
240
  <div class="tablist" role="tablist" part="tablist">
227
241
  <slot name="tab"></slot>
228
242
  </div>
229
243
  <div class="panels" part="panels">
230
244
  <slot name="panel"></slot>
231
245
  </div>
232
- `,this.addEventListener("click",this._onTabClick),this.addEventListener("keydown",this._onKeydown),requestAnimationFrame(()=>this._initTabs())}_initTabs(){let e=this._getTabs(),t=this._getPanels();e.forEach((s,o)=>{s.setAttribute("role","tab"),s.setAttribute("slot","tab"),s.id||(s.id=`velin-tab-${o}`);let n=t[o];n&&(n.setAttribute("role","tabpanel"),n.setAttribute("slot","panel"),n.id||(n.id=`velin-panel-${o}`),s.setAttribute("aria-controls",n.id),n.setAttribute("aria-labelledby",s.id))});let i=e.find(s=>s.getAttribute("aria-selected")==="true")||e[0];i&&this._selectTab(i)}_getTabs(){return[...this.querySelectorAll('[role="tab"], [slot="tab"]')]}_getPanels(){return[...this.querySelectorAll('[role="tabpanel"], [slot="panel"]')]}_onTabClick(e){let t=e.target.closest('[role="tab"]');t&&this.contains(t)&&this._selectTab(t)}_selectTab(e){let t=this._getTabs(),i=this._getPanels();t.forEach((s,o)=>{let n=s===e;s.setAttribute("aria-selected",String(n)),s.setAttribute("tabindex",n?"0":"-1"),i[o]&&(i[o].hidden=!n)}),this.dispatchEvent(new CustomEvent("velin-tab-change",{bubbles:!0,detail:{tab:e}}))}_onKeydown(e){let t=this._getTabs();if(t.includes(e.target)&&(b(this,t,e),e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Home"||e.key==="End")){let i=t.find(s=>s.getAttribute("tabindex")==="0");i&&this._selectTab(i)}}disconnectedCallback(){this.removeEventListener("click",this._onTabClick),this.removeEventListener("keydown",this._onKeydown)}};customElements.define("velin-tabs",D);var rt=D;var ot=`
246
+ `,this.addEventListener("click",this._onTabClick),this.addEventListener("keydown",this._onKeydown),requestAnimationFrame(()=>this._initTabs())}_initTabs(){let e=this._getTabs(),t=this._getPanels();e.forEach((n,o)=>{n.setAttribute("role","tab"),n.setAttribute("slot","tab"),n.id||(n.id=`velin-tab-${o}`);let a=t[o];a&&(a.setAttribute("role","tabpanel"),a.setAttribute("slot","panel"),a.id||(a.id=`velin-panel-${o}`),n.setAttribute("aria-controls",a.id),a.setAttribute("aria-labelledby",n.id))});let r=e.find(n=>n.getAttribute("aria-selected")==="true")||e[0];r&&this._selectTab(r)}_getTabs(){return[...this.querySelectorAll('[role="tab"], [slot="tab"]')]}_getPanels(){return[...this.querySelectorAll('[role="tabpanel"], [slot="panel"]')]}_onTabClick(e){let t=e.target.closest('[role="tab"]');t&&this.contains(t)&&this._selectTab(t)}_selectTab(e){let t=this._getTabs(),r=this._getPanels();t.forEach((n,o)=>{let a=n===e;n.setAttribute("aria-selected",String(a)),n.setAttribute("tabindex",a?"0":"-1"),r[o]&&(r[o].hidden=!a)}),this.dispatchEvent(new CustomEvent("velin-tab-change",{bubbles:!0,detail:{tab:e}}))}_onKeydown(e){let t=this._getTabs();if(t.includes(e.target)&&(Y(this,t,e),e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Home"||e.key==="End")){let r=t.find(n=>n.getAttribute("tabindex")==="0");r&&this._selectTab(r)}}disconnectedCallback(){this.removeEventListener("click",this._onTabClick),this.removeEventListener("keydown",this._onKeydown)}};customElements.define("velin-tabs",qt);Oo=qt});var Ho={};v(Ho,{default:()=>No});var wc,Ut,No,br=u(()=>{k();wc=`
233
247
  :host {
234
248
  position: fixed;
235
249
  z-index: var(--velin-z-toast, 600);
@@ -291,10 +305,10 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
291
305
  @media (prefers-reduced-motion: reduce) {
292
306
  .toast, .toast--out { animation: none; }
293
307
  }
294
- `,K=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._container=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${ot}</style>`,this._container=this.shadowRoot,this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-atomic","true")}show({message:e,type:t="info",duration:i=5e3}={}){let s=document.createElement("div");return s.className=`toast toast--${t}`,s.innerHTML=`
295
- <div class="toast-content">${a(e)}</div>
308
+ `,Ut=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._container=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${wc}</style>`,this._container=this.shadowRoot,this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-atomic","true")}show({message:e,type:t="info",duration:r=5e3}={}){let n=t==="error"||t==="danger";this.setAttribute("role",n?"alert":"status"),this.setAttribute("aria-live",n?"assertive":"polite");let o=document.createElement("div");return o.className=`toast toast--${t}`,o.setAttribute("role",n?"alert":"status"),o.innerHTML=`
309
+ <div class="toast-content">${p(e)}</div>
296
310
  <button class="toast-close" aria-label="Close">&#215;</button>
297
- `,s.querySelector(".toast-close").addEventListener("click",()=>{this._dismiss(s)}),this._container.appendChild(s),i>0&&setTimeout(()=>this._dismiss(s),i),s}_dismiss(e){!e||!e.parentNode||(e.classList.add("toast--out"),e.addEventListener("animationend",()=>e.remove(),{once:!0}),setTimeout(()=>e.remove(),300))}};customElements.define("velin-toast",K);var nt=K;var N={lucide:"https://unpkg.com/lucide-static@latest/icons/{name}.svg",heroicons:"https://unpkg.com/heroicons@2/24/outline/{name}.svg",bootstrap:"https://unpkg.com/bootstrap-icons@latest/icons/{name}.svg",material:"https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/{name}/default/24px.svg",fontawesome:"https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/{name}.svg"},Ee={fontawesome:{regular:"https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/regular/{name}.svg",solid:"https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/{name}.svg",brands:"https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/brands/{name}.svg"},heroicons:{outline:"https://unpkg.com/heroicons@2/24/outline/{name}.svg",solid:"https://unpkg.com/heroicons@2/24/solid/{name}.svg",mini:"https://unpkg.com/heroicons@2/20/solid/{name}.svg"}};function at(r,e){let t=Ee[r];return e&&t?.[e]?t[e]:N[r]}var fe=new Map,O=class extends HTMLElement{static get observedAttributes(){return["name","size","label","provider","variant","sprite"]}constructor(){super(),this._rendered=!1}connectedCallback(){this._render()}attributeChangedCallback(){this._rendered&&this._render()}_render(){let e=this.getAttribute("name"),t=this.getAttribute("size")||"24",i=this.getAttribute("label"),s=this.getAttribute("provider"),o=this.getAttribute("variant");if(!e){this.innerHTML="";return}if(s&&(N[s]||Ee[s])){this._renderFromCDN(e,t,i,s,o);return}this._renderFromSprite(e,t,i)}_renderFromSprite(e,t,i){let s="http://www.w3.org/2000/svg",o=document.createElementNS(s,"svg");o.setAttribute("width",t),o.setAttribute("height",t),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),this._applyStyle(o),this._applyA11y(o,i);let n=document.createElementNS(s,"use"),c=this.getAttribute("sprite"),l=document.getElementById(e),d=l&&l.tagName&&l.tagName.toLowerCase()==="symbol",u;c===""||c==null&&d?u=`#${e}`:u=`${c||"velin-icons.svg"}#${e}`,n.setAttribute("href",u),o.appendChild(n),this.innerHTML="",this.appendChild(o),this._rendered=!0}async _renderFromCDN(e,t,i,s,o){let n=`${s}:${o||"default"}:${e}`;if(fe.has(n)){this._injectSVG(fe.get(n),t,i);return}let c=at(s,o);if(!c){this._renderFromSprite(e,t,i);return}let l=c.replace("{name}",e);try{let d=await fetch(l);if(!d.ok)throw new Error(`${d.status}`);let u=await d.text();if(!u.includes("<svg"))throw new Error("Not SVG");fe.set(n,u),this._injectSVG(u,t,i)}catch{this._renderFromSprite(e,t,i)}}_injectSVG(e,t,i){let n=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg");if(!n){this.innerHTML="";return}n.setAttribute("width",t),n.setAttribute("height",t),n.getAttribute("viewBox")||n.setAttribute("viewBox","0 0 24 24"),this._applyStyle(n),this._applyA11y(n,i),this.innerHTML="",this.appendChild(document.importNode(n,!0)),this._rendered=!0}_applyStyle(e){e.style.display="inline-block",e.style.verticalAlign="middle",e.style.flexShrink="0"}_applyA11y(e,t){t?(e.setAttribute("role","img"),e.setAttribute("aria-label",t)):e.setAttribute("aria-hidden","true")}static get providers(){return Object.keys(N)}static registerProvider(e,t){N[e]=t}};customElements.define("velin-icon",O);var lt=O;var ct=`
311
+ `,o.querySelector(".toast-close").addEventListener("click",()=>{this._dismiss(o)}),this._container.appendChild(o),r>0&&setTimeout(()=>this._dismiss(o),r),o}_dismiss(e){!e||!e.parentNode||(e.classList.add("toast--out"),e.addEventListener("animationend",()=>e.remove(),{once:!0}),setTimeout(()=>e.remove(),300))}};customElements.define("velin-toast",Ut);No=Ut});var zo={};v(zo,{default:()=>$o});function Ec(i,e){let t=jt[i];return e&&t?.[e]?t[e]:Bt[i]}var Bt,jt,gr,Kt,$o,yr=u(()=>{k();Bt={lucide:"https://unpkg.com/lucide-static@latest/icons/{name}.svg",heroicons:"https://unpkg.com/heroicons@2/24/outline/{name}.svg",bootstrap:"https://unpkg.com/bootstrap-icons@latest/icons/{name}.svg",material:"https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/{name}/default/24px.svg",fontawesome:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/svgs/solid/{name}.svg"},jt={fontawesome:{regular:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/svgs/regular/{name}.svg",solid:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/svgs/solid/{name}.svg",brands:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/svgs/brands/{name}.svg"},heroicons:{outline:"https://unpkg.com/heroicons@2/24/outline/{name}.svg",solid:"https://unpkg.com/heroicons@2/24/solid/{name}.svg",mini:"https://unpkg.com/heroicons@2/20/solid/{name}.svg"}};gr=new Map,Kt=class extends HTMLElement{static get observedAttributes(){return["name","size","label","provider","variant","sprite"]}constructor(){super(),this._rendered=!1}connectedCallback(){this._render()}attributeChangedCallback(){this._rendered&&this._render()}_render(){let e=this.getAttribute("name"),t=this.getAttribute("size")||"24",r=this._resolveA11y(),n=this.getAttribute("provider"),o=this.getAttribute("variant");if(!e){this.innerHTML="";return}if(n&&(Bt[n]||jt[n])){this._renderFromCDN(e,t,r,n,o);return}this._renderFromSprite(e,t,r)}_resolveA11y(){let e=(this.getAttribute("label")||this.getAttribute("aria-label")||"").trim();return e?{label:e,hidden:!1}:{label:"",hidden:this.getAttribute("aria-hidden")!=="false"}}_renderFromSprite(e,t,r){let n="http://www.w3.org/2000/svg",o=document.createElementNS(n,"svg");o.setAttribute("width",t),o.setAttribute("height",t),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),this._applyStyle(o);let a=document.createElementNS(n,"use"),c=this.getAttribute("sprite"),d=document.getElementById(e),m=d&&d.tagName&&d.tagName.toLowerCase()==="symbol",b;c===""||c==null&&m?b=`#${e}`:b=`${Te(c||"/dist/velin-icons.svg")||"/dist/velin-icons.svg"}#${e}`,a.setAttribute("href",b),o.appendChild(a),this._applyA11y(o,r),this.innerHTML="",this.appendChild(o),this._rendered=!0}async _renderFromCDN(e,t,r,n,o){let a=`${n}:${o||"default"}:${e}`;if(gr.has(a)){this._injectSVG(gr.get(a),t,r);return}let c=Ec(n,o);if(!c){this._renderFromSprite(e,t,r);return}let d=Te(c.replace("{name}",e));if(!d){this._renderFromSprite(e,t,r);return}try{let m=await fetch(d);if(!m.ok)throw new Error(`${m.status}`);let b=await m.text();if(!b.includes("<svg"))throw new Error("Not SVG");let _=await ko(b);gr.set(a,_),this._injectSVG(_,t,r)}catch{this._renderFromSprite(e,t,r)}}_stripForeignA11y(e){e.removeAttribute("role"),e.removeAttribute("aria-label"),e.removeAttribute("aria-labelledby"),e.removeAttribute("aria-hidden"),e.querySelector("title")?.remove(),e.querySelector("desc")?.remove()}_injectSVG(e,t,r){let a=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg");if(!a){this.innerHTML="";return}this._stripForeignA11y(a),a.setAttribute("width",t),a.setAttribute("height",t),a.getAttribute("viewBox")||a.setAttribute("viewBox","0 0 24 24"),this._applyStyle(a),this._applyA11y(a,r),this.innerHTML="",this.appendChild(document.importNode(a,!0)),this._rendered=!0}_applyStyle(e){e.style.display="inline-block",e.style.verticalAlign="middle",e.style.flexShrink="0"}_applyA11y(e,t){let{label:r,hidden:n}=t,o=e.querySelector("use");r?(e.setAttribute("role","img"),e.setAttribute("aria-label",r),e.removeAttribute("aria-hidden"),e.removeAttribute("focusable"),o&&o.removeAttribute("aria-hidden")):n&&(e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),e.setAttribute("focusable","false"),e.removeAttribute("aria-label"),o&&(o.setAttribute("aria-hidden","true"),o.setAttribute("focusable","false")))}static get providers(){return Object.keys(Bt)}static registerProvider(e,t,r){Bt[e]=t,r&&jt[e]&&Object.assign(jt[e],r)}};customElements.define("velin-icon",Kt);$o=Kt});var Po={};v(Po,{default:()=>Fo});var kc,Wt,Fo,_r=u(()=>{j();k();kc=`
298
312
  :host { display: contents; }
299
313
  .overlay {
300
314
  position: fixed;
@@ -339,17 +353,17 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
339
353
  .close-btn:hover { background: var(--velin-color-surface-dim, #eee); color: var(--velin-color-text, #111); }
340
354
  .body { flex: 1; padding: var(--velin-space-5, 1.25rem); overflow-y: auto; }
341
355
  @media (prefers-reduced-motion: reduce) { .overlay, .drawer { transition: none; } }
342
- `,B=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this)}connectedCallback(){let e=this.getAttribute("title")||"",t=a(e),i="velin-drawer-title";this.shadowRoot.innerHTML=`
343
- <style>${ct}</style>
356
+ `,Wt=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this)}connectedCallback(){let e=this.getAttribute("title")||"",t=p(e),r="velin-drawer-title";this.shadowRoot.innerHTML=`
357
+ <style>${kc}</style>
344
358
  <div class="overlay" part="overlay"></div>
345
- <div class="drawer" role="dialog" aria-modal="true" aria-labelledby="${i}" part="drawer">
359
+ <div class="drawer" role="dialog" aria-modal="true" aria-labelledby="${r}" part="drawer">
346
360
  <div class="header" part="header">
347
- <h2 class="title" id="${i}">${t}</h2>
361
+ <h2 class="title" id="${r}">${t}</h2>
348
362
  <button class="close-btn" aria-label="Close" part="close">&#215;</button>
349
363
  </div>
350
364
  <div class="body" part="body"><slot></slot></div>
351
365
  </div>
352
- `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close())}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._prev=g(),A(this),document.addEventListener("keydown",this._onKey),document.body.style.overflow="hidden",requestAnimationFrame(()=>{let e=_(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow="",E(),y(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}v(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow=""}};customElements.define("velin-drawer",B);var dt=B;var ut=[{slug:"",label:"Default (Light)"},{slug:"dark",label:"Dark"},{slug:"brutalist",label:"Brutalist"},{slug:"corporate",label:"Corporate"},{slug:"earth",label:"Earth"},{slug:"forest",label:"Forest"},{slug:"midnight",label:"Midnight"},{slug:"neon",label:"Neon"},{slug:"nordic",label:"Nordic"},{slug:"ocean",label:"Ocean"},{slug:"pastel",label:"Pastel"},{slug:"retro",label:"Retro"},{slug:"sharp",label:"Sharp"},{slug:"soft",label:"Soft"},{slug:"sunset",label:"Sunset"}],ht=new Set(["","dark"]),ge=new Set;function pt(r,e){if(!r||ht.has(r)||ge.has(r))return;if(document.querySelector(`link[data-velin-theme-css="${r}"]`)){ge.add(r);return}let i=document.createElement("link");i.rel="stylesheet",i.href=`${e.replace(/\/$/,"")}/${r}.min.css`,i.setAttribute("data-velin-theme-css",r),document.head.appendChild(i),ge.add(r)}var mt=`
366
+ `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close())}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._prev=Z(),Q(this),document.addEventListener("keydown",this._onKey),document.body.style.overflow="hidden",requestAnimationFrame(()=>{let e=ae(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow="",ee(),J(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}G(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow=""}};customElements.define("velin-drawer",Wt);Fo=Wt});var Uo={};v(Uo,{default:()=>qo});function Lc(i,e){if(!i||Tc.has(i)||xr.has(i))return;if(document.querySelector(`link[data-velin-theme-css="${i}"]`)){xr.add(i);return}let r=document.createElement("link");r.rel="stylesheet",r.href=`${e.replace(/\/$/,"")}/${i}.min.css`,r.setAttribute("data-velin-theme-css",i),document.head.appendChild(r),xr.add(i)}var Sc,Tc,xr,Cc,Gt,qo,Ar=u(()=>{Sc=[{slug:"",label:"Default (Light)"},{slug:"dark",label:"Dark"},{slug:"brutalist",label:"Brutalist"},{slug:"corporate",label:"Corporate"},{slug:"earth",label:"Earth"},{slug:"forest",label:"Forest"},{slug:"midnight",label:"Midnight"},{slug:"neon",label:"Neon"},{slug:"nordic",label:"Nordic"},{slug:"ocean",label:"Ocean"},{slug:"pastel",label:"Pastel"},{slug:"retro",label:"Retro"},{slug:"sharp",label:"Sharp"},{slug:"soft",label:"Soft"},{slug:"sunset",label:"Sunset"}],Tc=new Set(["","dark"]),xr=new Set;Cc=`
353
367
  :host { display: inline-flex; position: relative; }
354
368
  .group {
355
369
  display: inline-flex; align-items: stretch;
@@ -428,35 +442,35 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
428
442
  background: currentColor;
429
443
  border: 1px solid var(--velin-color-border, #ddd);
430
444
  }
431
- `,P=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onDocClick=this._onDocClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`
432
- <style>${mt}</style>
445
+ `,Gt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onDocClick=this._onDocClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`
446
+ <style>${Cc}</style>
433
447
  <div class="group" part="group">
434
- <button class="toggle" part="button" aria-label="Toggle dark mode">
435
- <svg class="sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
448
+ <button class="toggle" part="button" aria-label="Toggle dark mode" aria-pressed="false">
449
+ <svg class="sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false">
436
450
  <circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/>
437
451
  <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
438
452
  <line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/>
439
453
  <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
440
454
  </svg>
441
- <svg class="moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
455
+ <svg class="moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false">
442
456
  <path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/>
443
457
  </svg>
444
458
  </button>
445
459
  <button class="picker" part="picker" aria-label="Choose theme" aria-haspopup="menu" aria-expanded="false">
446
- <svg class="chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
460
+ <svg class="chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
447
461
  <polyline points="6 9 12 15 18 9"/>
448
462
  </svg>
449
463
  </button>
450
464
  </div>
451
- <ul class="menu" role="menu" hidden></ul>
452
- `,this._target=document.querySelector(this.getAttribute("target")||"html"),this._themesBase=this.getAttribute("themes-base")||"dist/themes",this._menu=this.shadowRoot.querySelector(".menu"),this._toggleBtn=this.shadowRoot.querySelector(".toggle"),this._pickerBtn=this.shadowRoot.querySelector(".picker"),this._renderMenu(),this._initPreference(),this._toggleBtn.addEventListener("click",()=>this._toggleDarkMode()),this._pickerBtn.addEventListener("click",t=>{t.stopPropagation(),this._toggleMenu()}),document.addEventListener("click",this._onDocClick),this.shadowRoot.addEventListener("keydown",this._onKeyDown),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>this._applyFromPreference()),window.addEventListener("storage",t=>{t.key==="velin-theme"&&this._readStorage()})}disconnectedCallback(){document.removeEventListener("click",this._onDocClick)}_renderMenu(){this._menu.innerHTML=ut.map(e=>`
465
+ <ul class="menu" role="menu" aria-label="Theme selection" hidden></ul>
466
+ `,this._target=document.querySelector(this.getAttribute("target")||"html"),this._themesBase=this.getAttribute("themes-base")||"dist/themes",this._menu=this.shadowRoot.querySelector(".menu"),this._toggleBtn=this.shadowRoot.querySelector(".toggle"),this._pickerBtn=this.shadowRoot.querySelector(".picker"),this._renderMenu(),this._initPreference(),this._syncTogglePressed(),this._toggleBtn.addEventListener("click",()=>this._toggleDarkMode()),this._pickerBtn.addEventListener("click",t=>{t.stopPropagation(),this._toggleMenu()}),document.addEventListener("click",this._onDocClick),this.shadowRoot.addEventListener("keydown",this._onKeyDown),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>this._applyFromPreference()),window.addEventListener("storage",t=>{t.key==="velin-theme"&&this._readStorage()})}disconnectedCallback(){document.removeEventListener("click",this._onDocClick)}_renderMenu(){this._menu.innerHTML=Sc.map(e=>`
453
467
  <li role="none">
454
468
  <button type="button" role="menuitem" data-theme="${e.slug}">
455
469
  <span class="swatch" aria-hidden="true" data-theme-swatch="${e.slug}"></span>
456
470
  ${e.label}
457
471
  </button>
458
472
  </li>
459
- `).join(""),this._menu.removeAttribute("hidden"),this._menu.querySelectorAll("button[data-theme]").forEach(e=>{e.addEventListener("click",()=>{let t=e.getAttribute("data-theme");this._applyTheme(t,{persist:!0}),this._closeMenu()})})}_toggleMenu(){this.hasAttribute("menu-open")?this._closeMenu():this._openMenu()}_openMenu(){this.setAttribute("menu-open",""),this._pickerBtn.setAttribute("aria-expanded","true"),this._highlightActive();let e=this._menu.querySelector("button[data-theme]");e&&e.focus()}_closeMenu(){this.removeAttribute("menu-open"),this._pickerBtn.setAttribute("aria-expanded","false")}_onDocClick(e){this.hasAttribute("menu-open")&&(e.composedPath().includes(this)||this._closeMenu())}_onKeyDown(e){if(this.hasAttribute("menu-open")){if(e.key==="Escape"){e.preventDefault(),this._closeMenu(),this._pickerBtn.focus();return}if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault();let t=Array.from(this._menu.querySelectorAll("button[data-theme]")),i=t.indexOf(this.shadowRoot.activeElement);(e.key==="ArrowDown"?t[(i+1)%t.length]:t[(i-1+t.length)%t.length])?.focus()}}}_highlightActive(){let e=this._currentSlug();this._menu.querySelectorAll("button[data-theme]").forEach(t=>{t.getAttribute("data-theme")===e?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")})}_currentSlug(){if(!this._target)return"";let e=this._target.getAttribute("data-velin-theme");return!e||e==="light"?"":e}_initPreference(){let e=localStorage.getItem("velin-theme");if(e){this._applyTheme(e,{persist:!1});return}this._applyFromPreference()}_readStorage(){let e=localStorage.getItem("velin-theme");this._applyTheme(e||"",{persist:!1})}_applyFromPreference(){if(localStorage.getItem("velin-theme"))return;let e=window.matchMedia("(prefers-color-scheme: dark)").matches;this._applyTheme(e?"dark":"",{persist:!1})}_applyTheme(e,{persist:t}){let i=!e||e==="light"?"":e;this._target&&(i?(this._target.setAttribute("data-velin-theme",i),this.setAttribute("theme",i==="dark"?"dark":i),pt(i,this._themesBase)):(this._target.removeAttribute("data-velin-theme"),this.removeAttribute("theme")),t&&(i?localStorage.setItem("velin-theme",i):localStorage.removeItem("velin-theme")),this._highlightActive(),this.dispatchEvent(new CustomEvent("velin-theme-change",{bubbles:!0,detail:{theme:i||"light",dark:i==="dark",slug:i}})))}_toggleDarkMode(){let t=this._currentSlug()==="dark"?"":"dark";this._applyTheme(t,{persist:!0})}};customElements.define("velin-theme-toggle",P);var vt=P;var bt=`
473
+ `).join(""),this._menu.removeAttribute("hidden"),this._menu.querySelectorAll("button[data-theme]").forEach(e=>{e.addEventListener("click",()=>{let t=e.getAttribute("data-theme");this._applyTheme(t,{persist:!0}),this._closeMenu()})})}_toggleMenu(){this.hasAttribute("menu-open")?this._closeMenu():this._openMenu()}_openMenu(){this.setAttribute("menu-open",""),this._pickerBtn.setAttribute("aria-expanded","true"),this._highlightActive();let e=this._menu.querySelector("button[data-theme]");e&&e.focus()}_closeMenu(){this.removeAttribute("menu-open"),this._pickerBtn.setAttribute("aria-expanded","false")}_onDocClick(e){this.hasAttribute("menu-open")&&(e.composedPath().includes(this)||this._closeMenu())}_onKeyDown(e){if(this.hasAttribute("menu-open")){if(e.key==="Escape"){e.preventDefault(),this._closeMenu(),this._pickerBtn.focus();return}if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault();let t=Array.from(this._menu.querySelectorAll("button[data-theme]")),r=t.indexOf(this.shadowRoot.activeElement);(e.key==="ArrowDown"?t[(r+1)%t.length]:t[(r-1+t.length)%t.length])?.focus()}}}_highlightActive(){let e=this._currentSlug();this._menu.querySelectorAll("button[data-theme]").forEach(t=>{t.getAttribute("data-theme")===e?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")})}_currentSlug(){if(!this._target)return"";let e=this._target.getAttribute("data-velin-theme");return!e||e==="light"?"":e}_initPreference(){let e=localStorage.getItem("velin-theme");if(e){this._applyTheme(e,{persist:!1});return}this._applyFromPreference()}_readStorage(){let e=localStorage.getItem("velin-theme");this._applyTheme(e||"",{persist:!1})}_applyFromPreference(){if(localStorage.getItem("velin-theme"))return;let e=window.matchMedia("(prefers-color-scheme: dark)").matches;this._applyTheme(e?"dark":"",{persist:!1})}_applyTheme(e,{persist:t}){let r=!e||e==="light"?"":e;this._target&&(r?(this._target.setAttribute("data-velin-theme",r),this.setAttribute("theme",r==="dark"?"dark":r),Lc(r,this._themesBase)):(this._target.removeAttribute("data-velin-theme"),this.removeAttribute("theme")),t&&(r?localStorage.setItem("velin-theme",r):localStorage.removeItem("velin-theme")),this._highlightActive(),this.dispatchEvent(new CustomEvent("velin-theme-change",{bubbles:!0,detail:{theme:r||"light",dark:r==="dark",slug:r}})))}_syncTogglePressed(){let e=this._currentSlug()==="dark";this._toggleBtn?.setAttribute("aria-pressed",e?"true":"false")}_toggleDarkMode(){let t=this._currentSlug()==="dark"?"":"dark";this._applyTheme(t,{persist:!0}),this._syncTogglePressed()}};customElements.define("velin-theme-toggle",Gt);qo=Gt});var jo={};v(jo,{default:()=>Bo});var Rc,Mc,Yt,Bo,wr=u(()=>{k();j();Rc=`
460
474
  :host { position: relative; display: inline-block; }
461
475
  .popover {
462
476
  position: absolute; z-index: var(--velin-z-dropdown, 200);
@@ -481,14 +495,14 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
481
495
  border-bottom: 1px solid var(--velin-color-border, #ddd);
482
496
  }
483
497
  @media (prefers-reduced-motion: reduce) { .popover { transition: none; } }
484
- `,ft=0,j=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._popoverId=`velin-popover-${++ft}`,this._onOutside=this._onOutside.bind(this),this._onKey=this._onKey.bind(this),this._prevFocus=null,this._isDialog=!1}connectedCallback(){let e=this.getAttribute("placement")||"bottom",t=this.getAttribute("trigger")||"click",i=this.getAttribute("title")||"",s=t==="hover"?"tooltip":"dialog";this._isDialog=s==="dialog",this.shadowRoot.innerHTML=`
485
- <style>${bt}</style>
498
+ `,Mc=0,Yt=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._popoverId=`velin-popover-${++Mc}`,this._onOutside=this._onOutside.bind(this),this._onKey=this._onKey.bind(this),this._prevFocus=null,this._isDialog=!1}connectedCallback(){let e=this.getAttribute("placement")||"bottom",t=this.getAttribute("trigger")||"click",r=this.getAttribute("title")||"",n=t==="hover"?"tooltip":"dialog";this._isDialog=n==="dialog";let o=r?`${this._popoverId}-title`:"";this.shadowRoot.innerHTML=`
499
+ <style>${Rc}</style>
486
500
  <slot name="trigger"></slot>
487
- <div class="popover popover--${e}" id="${this._popoverId}" role="${s}" part="popover">
488
- ${i?`<div class="popover__title" part="title">${a(i)}</div>`:""}
501
+ <div class="popover popover--${e}" id="${this._popoverId}" role="${n}" part="popover"${o?` aria-labelledby="${o}"`:""}>
502
+ ${r?`<div class="popover__title" id="${o}" part="title">${p(r)}</div>`:""}
489
503
  <slot></slot>
490
504
  </div>
491
- `,this.shadowRoot.querySelector('slot[name="trigger"]').addEventListener("slotchange",()=>this._wireTrigger(t)),this._wireTrigger(t)}_wireTrigger(e){let t=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];if(!t)return;let i=e==="hover";t.setAttribute("aria-haspopup",i?"true":"dialog"),t.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false"),this._isDialog&&t.setAttribute("aria-controls",this._popoverId),e==="click"?t.onclick=()=>this.toggle():e==="hover"?(this.onmouseenter=()=>this.open(),this.onmouseleave=()=>this.close(),this.onfocusin=()=>this.open(),this.onfocusout=s=>{this.contains(s.relatedTarget)||this.close()}):e==="focus"&&(t.onfocusin=()=>this.open(),t.onfocusout=()=>this.close())}open(){this.setAttribute("open","");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","true"),document.addEventListener("click",this._onOutside,!0),document.addEventListener("keydown",this._onKey),this._isDialog&&(this._prevFocus=g(),requestAnimationFrame(()=>{let t=_(this.shadowRoot.querySelector(".popover"));t.length?t[0].focus():this.shadowRoot.querySelector(".popover")?.focus()}))}close(){this.removeAttribute("open");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","false"),document.removeEventListener("click",this._onOutside,!0),document.removeEventListener("keydown",this._onKey),this._isDialog&&this._prevFocus&&(y(this._prevFocus),this._prevFocus=null)}toggle(){this.hasAttribute("open")?this.close():this.open()}_onOutside(e){this.contains(e.target)||this.close()}_onKey(e){if(e.key==="Escape"){this.close();let t=this.querySelector('[slot="trigger"]');t&&t.focus();return}this._isDialog&&this.hasAttribute("open")&&v(this.shadowRoot.querySelector(".popover"),e)}disconnectedCallback(){document.removeEventListener("click",this._onOutside,!0),document.removeEventListener("keydown",this._onKey)}};customElements.define("velin-popover",j);var gt=j;var yt=`
505
+ `;let a=this.shadowRoot.querySelector(".popover");if(!r&&a){let d=this.getAttribute("aria-label")||(n==="tooltip"?"Tooltip":"Popover");a.setAttribute("aria-label",d)}this.shadowRoot.querySelector('slot[name="trigger"]').addEventListener("slotchange",()=>this._wireTrigger(t)),this._wireTrigger(t)}_ensureTriggerInteractive(e){let t=e.tagName;t!=="BUTTON"&&t!=="A"&&e.getAttribute("role")!=="button"&&(e.setAttribute("role","button"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"))}_onTriggerKey(e){if(e.key==="Escape"){this.close();return}(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.toggle())}_wireTrigger(e){let t=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];if(!t)return;this._ensureTriggerInteractive(t);let r=e==="hover";t.setAttribute("aria-haspopup",r?"true":"dialog"),t.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false"),this._isDialog&&t.setAttribute("aria-controls",this._popoverId),t.removeEventListener("keydown",this._onTriggerKeyBound),this._onTriggerKeyBound=this._onTriggerKeyBound||this._onTriggerKey.bind(this),t.addEventListener("keydown",this._onTriggerKeyBound),e==="click"?t.onclick=()=>this.toggle():e==="hover"?(this.onmouseenter=()=>this.open(),this.onmouseleave=()=>this.close(),this.onfocusin=()=>this.open(),this.onfocusout=n=>{this.contains(n.relatedTarget)||this.close()}):e==="focus"&&(t.onfocusin=()=>this.open(),t.onfocusout=()=>this.close())}open(){this.setAttribute("open","");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","true"),document.addEventListener("click",this._onOutside,!0),document.addEventListener("keydown",this._onKey),this._isDialog&&(this._prevFocus=Z(),requestAnimationFrame(()=>{let t=ae(this.shadowRoot.querySelector(".popover"));t.length?t[0].focus():this.shadowRoot.querySelector(".popover")?.focus()}))}close(){this.removeAttribute("open");let e=this.querySelector('[slot="trigger"]');e&&e.setAttribute("aria-expanded","false"),document.removeEventListener("click",this._onOutside,!0),document.removeEventListener("keydown",this._onKey),this._isDialog&&this._prevFocus&&(J(this._prevFocus),this._prevFocus=null)}toggle(){this.hasAttribute("open")?this.close():this.open()}_onOutside(e){this.contains(e.target)||this.close()}_onKey(e){if(e.key==="Escape"){this.close();let t=this.querySelector('[slot="trigger"]');t&&t.focus();return}this._isDialog&&this.hasAttribute("open")&&G(this.shadowRoot.querySelector(".popover"),e)}disconnectedCallback(){document.removeEventListener("click",this._onOutside,!0),document.removeEventListener("keydown",this._onKey)}};customElements.define("velin-popover",Yt);Bo=Yt});var Wo={};v(Wo,{default:()=>Ko});var Ic,Vt,Ko,Er=u(()=>{k();Ic=`
492
506
  :host { display: inline-flex; }
493
507
  button {
494
508
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
@@ -508,18 +522,18 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
508
522
  button[data-copied] .copy-icon { display: none; }
509
523
  button[data-copied] .check { display: block; }
510
524
  @media (prefers-reduced-motion: reduce) { button { transition: none; } }
511
- `,Y=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let e=this.getAttribute("label")||"";this.shadowRoot.innerHTML=`
512
- <style>${yt}</style>
525
+ `,Vt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let e=p(this.getAttribute("label")||"");this.shadowRoot.innerHTML=`
526
+ <style>${Ic}</style>
513
527
  <button part="button" aria-label="Copy">
514
- <svg class="copy-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
528
+ <svg class="copy-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
515
529
  <rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/>
516
530
  </svg>
517
- <svg class="check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
531
+ <svg class="check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
518
532
  <polyline points="20 6 9 17 4 12"/>
519
533
  </svg>
520
534
  ${e?`<span>${e}</span>`:""}
521
535
  </button>
522
- `,this.shadowRoot.querySelector("button").addEventListener("click",()=>this._copy())}async _copy(){let e=this.getAttribute("value")||"";if(!e)return;try{await navigator.clipboard.writeText(e)}catch{let i=document.createElement("textarea");i.value=e,i.style.cssText="position:fixed;opacity:0",document.body.appendChild(i),i.select(),document.execCommand("copy"),i.remove()}let t=this.shadowRoot.querySelector("button");t.setAttribute("data-copied",""),t.setAttribute("aria-label","Copied"),this.dispatchEvent(new CustomEvent("velin-copied",{bubbles:!0,detail:{value:e}})),setTimeout(()=>{t.removeAttribute("data-copied"),t.setAttribute("aria-label","Copy")},2e3)}};customElements.define("velin-copy",Y);var _t=Y;var xt=`
536
+ `,this.shadowRoot.querySelector("button").addEventListener("click",()=>this._copy())}_getCopyText(){return this.getAttribute("value")||this.getAttribute("text")||this.dataset.source||""}async _copy(){let e=this._getCopyText();if(!e)return;try{await navigator.clipboard.writeText(e)}catch{let r=document.createElement("textarea");r.value=e,r.style.cssText="position:fixed;opacity:0",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}let t=this.shadowRoot.querySelector("button");t.setAttribute("data-copied",""),t.setAttribute("aria-label","Copied"),this.dispatchEvent(new CustomEvent("velin-copied",{bubbles:!0,detail:{value:e}})),setTimeout(()=>{t.removeAttribute("data-copied"),t.setAttribute("aria-label","Copy")},2e3)}};customElements.get("velin-copy")||customElements.define("velin-copy",Vt);Ko=Vt});var Yo={};v(Yo,{default:()=>Go});var Oc,Xt,Go,kr=u(()=>{Oc=`
523
537
  :host { position: fixed; inset-block-end: var(--velin-scroll-top-bottom, var(--velin-space-4, 1rem)); inset-inline-end: var(--velin-scroll-top-end, var(--velin-space-4, 1rem)); z-index: var(--velin-z-fixed, 300); }
524
538
  button {
525
539
  display: inline-flex; align-items: center; justify-content: center;
@@ -535,14 +549,14 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
535
549
  :host([visible]) button { opacity: 1; visibility: visible; transform: translateY(0); }
536
550
  svg { width: 1.25rem; height: 1.25rem; }
537
551
  @media (prefers-reduced-motion: reduce) { button { transition: none; } }
538
- `,V=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onScroll=this._onScroll.bind(this)}connectedCallback(){let e=parseInt(this.getAttribute("threshold")||"300",10);this._threshold=e,this.shadowRoot.innerHTML=`
539
- <style>${xt}</style>
552
+ `,Xt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onScroll=this._onScroll.bind(this)}connectedCallback(){let e=parseInt(this.getAttribute("threshold")||"300",10);this._threshold=e,this.shadowRoot.innerHTML=`
553
+ <style>${Oc}</style>
540
554
  <button part="button" aria-label="Scroll to top">
541
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
555
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
542
556
  <line x1="12" y1="19" x2="12" y2="5"/><polyline points="5 12 12 5 19 12"/>
543
557
  </svg>
544
558
  </button>
545
- `,this.shadowRoot.querySelector("button").addEventListener("click",()=>{let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:t?"auto":"smooth"})}),window.addEventListener("scroll",this._onScroll,{passive:!0}),this._onScroll()}_onScroll(){window.scrollY>this._threshold?this.setAttribute("visible",""):this.removeAttribute("visible")}disconnectedCallback(){window.removeEventListener("scroll",this._onScroll)}};customElements.define("velin-scroll-top",V);var wt=V;var kt=`
559
+ `,this.shadowRoot.querySelector("button").addEventListener("click",()=>{let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:t?"auto":"smooth"})}),window.addEventListener("scroll",this._onScroll,{passive:!0}),this._onScroll()}_onScroll(){window.scrollY>this._threshold?this.setAttribute("visible",""):this.removeAttribute("visible")}disconnectedCallback(){window.removeEventListener("scroll",this._onScroll)}};customElements.define("velin-scroll-top",Xt);Go=Xt});var Xo={};v(Xo,{default:()=>Vo});var Dc,Zt,Vo,Sr=u(()=>{Dc=`
546
560
  :host { display: block; position: relative; overflow: hidden; }
547
561
  .track {
548
562
  display: flex; transition: transform 400ms ease;
@@ -593,19 +607,19 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
593
607
  .dot[aria-current="true"]::before { background: var(--velin-color-primary, #2563eb); transform: scale(1.3); }
594
608
  .dot:focus-visible { outline: 2px solid var(--velin-color-focus, #2563eb); outline-offset: 2px; }
595
609
  @media (prefers-reduced-motion: reduce) { .track { transition: none; } }
596
- `,X=class extends HTMLElement{static get observedAttributes(){return["autoplay","interval"]}constructor(){super(),this.attachShadow({mode:"open"}),this._index=0,this._timer=null,this._startX=0,this._autoplayPaused=!1}connectedCallback(){this.shadowRoot.innerHTML=`
597
- <style>${kt}</style>
610
+ `,Zt=class extends HTMLElement{static get observedAttributes(){return["autoplay","interval"]}constructor(){super(),this.attachShadow({mode:"open"}),this._index=0,this._timer=null,this._startX=0,this._autoplayPaused=!1}connectedCallback(){this.shadowRoot.innerHTML=`
611
+ <style>${Dc}</style>
598
612
  <div class="track" role="group" aria-roledescription="carousel" part="track"><slot></slot></div>
599
613
  <div class="controls" part="controls">
600
614
  <button class="prev" aria-label="Previous slide" part="prev">
601
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>
615
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false"><polyline points="15 18 9 12 15 6"/></svg>
602
616
  </button>
603
617
  <button class="next" aria-label="Next slide" part="next">
604
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 6 15 12 9 18"/></svg>
618
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false"><polyline points="9 6 15 12 9 18"/></svg>
605
619
  </button>
606
620
  </div>
607
621
  <div class="indicators" role="group" aria-label="Slide indicators" part="indicators"></div>
608
- `,this.shadowRoot.querySelector(".prev").addEventListener("click",()=>this.prev()),this.shadowRoot.querySelector(".next").addEventListener("click",()=>this.next());let e=this.shadowRoot.querySelector(".track");e.addEventListener("touchstart",i=>{this._startX=i.touches[0].clientX},{passive:!0}),e.addEventListener("touchend",i=>{let s=this._startX-i.changedTouches[0].clientX;Math.abs(s)>50&&(s>0?this.next():this.prev())}),this.addEventListener("mouseenter",()=>this._pause()),this.addEventListener("mouseleave",()=>this._resume()),this.addEventListener("focusin",()=>this._pause()),this.addEventListener("focusout",()=>this._resume()),this.addEventListener("keydown",i=>{i.key==="ArrowLeft"?(this.prev(),i.preventDefault()):i.key==="ArrowRight"?(this.next(),i.preventDefault()):i.key==="Home"?(this.goTo(0),i.preventDefault()):i.key==="End"&&(this.goTo(this._count-1),i.preventDefault())}),this.hasAttribute("role")||this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>{this._buildDots(),this._update()}),this.hasAttribute("autoplay")&&this._startAutoplay()}get _slides(){return this.shadowRoot.querySelector("slot").assignedElements()}get _count(){return this._slides.length}prev(){this._index=(this._index-1+this._count)%this._count,this._update(),this._emit()}next(){this._index=(this._index+1)%this._count,this._update(),this._emit()}goTo(e){this._index=Math.max(0,Math.min(e,this._count-1)),this._update(),this._emit()}_update(){let e=this.shadowRoot.querySelector(".track");e.style.transform=`translateX(-${this._index*100}%)`,this._slides.forEach((t,i)=>{t.setAttribute("aria-hidden",i!==this._index?"true":"false"),t.inert=i!==this._index,t.setAttribute("aria-roledescription","slide"),t.setAttribute("aria-label",`Slide ${i+1} of ${this._count}`)}),this.shadowRoot.querySelectorAll(".dot").forEach((t,i)=>{t.setAttribute("aria-current",i===this._index?"true":"false")})}_buildDots(){let e=this.shadowRoot.querySelector(".indicators");if(e.innerHTML="",this._slides.forEach((t,i)=>{let s=document.createElement("button");s.type="button",s.className="dot",s.setAttribute("aria-label",`Go to slide ${i+1}`),s.addEventListener("click",()=>this.goTo(i)),e.appendChild(s)}),this.hasAttribute("autoplay")){let t=document.createElement("button");t.type="button",t.className="pause-btn",t.setAttribute("aria-pressed","false"),t.setAttribute("aria-label","Pause automatic slide show"),t.textContent="Pause",t.addEventListener("click",()=>this._toggleAutoplayPause(t)),e.appendChild(t)}this._update()}_toggleAutoplayPause(e){this._autoplayPaused=!this._autoplayPaused,this._autoplayPaused?(this._pause(),e.setAttribute("aria-pressed","true"),e.setAttribute("aria-label","Resume automatic slide show"),e.textContent="Play"):(this._resume(),e.setAttribute("aria-pressed","false"),e.setAttribute("aria-label","Pause automatic slide show"),e.textContent="Pause")}_emit(){this.dispatchEvent(new CustomEvent("velin-slide-change",{bubbles:!0,detail:{index:this._index}}))}_startAutoplay(){let e=parseInt(this.getAttribute("interval")||"5000",10);this._timer=setInterval(()=>this.next(),e)}_pause(){this._timer&&(clearInterval(this._timer),this._timer=null)}_resume(){this.hasAttribute("autoplay")&&!this._timer&&!this._autoplayPaused&&this._startAutoplay()}disconnectedCallback(){this._pause()}};customElements.define("velin-carousel",X);var At=X;var Et=`
622
+ `,this.shadowRoot.querySelector(".prev").addEventListener("click",()=>this.prev()),this.shadowRoot.querySelector(".next").addEventListener("click",()=>this.next());let e=this.shadowRoot.querySelector(".track");e.addEventListener("touchstart",r=>{this._startX=r.touches[0].clientX},{passive:!0}),e.addEventListener("touchend",r=>{let n=this._startX-r.changedTouches[0].clientX;Math.abs(n)>50&&(n>0?this.next():this.prev())}),this.addEventListener("mouseenter",()=>this._pause()),this.addEventListener("mouseleave",()=>this._resume()),this.addEventListener("focusin",()=>this._pause()),this.addEventListener("focusout",()=>this._resume()),this.addEventListener("keydown",r=>{r.key==="ArrowLeft"?(this.prev(),r.preventDefault()):r.key==="ArrowRight"?(this.next(),r.preventDefault()):r.key==="Home"?(this.goTo(0),r.preventDefault()):r.key==="End"&&(this.goTo(this._count-1),r.preventDefault())}),this.hasAttribute("role")||this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>{this._buildDots(),this._update()}),this.hasAttribute("autoplay")&&this._startAutoplay()}get _slides(){return this.shadowRoot.querySelector("slot").assignedElements()}get _count(){return this._slides.length}prev(){this._index=(this._index-1+this._count)%this._count,this._update(),this._emit()}next(){this._index=(this._index+1)%this._count,this._update(),this._emit()}goTo(e){this._index=Math.max(0,Math.min(e,this._count-1)),this._update(),this._emit()}_update(){let e=this.shadowRoot.querySelector(".track");e.style.transform=`translateX(-${this._index*100}%)`,this._slides.forEach((t,r)=>{t.setAttribute("aria-hidden",r!==this._index?"true":"false"),t.inert=r!==this._index,t.setAttribute("aria-roledescription","slide"),t.setAttribute("aria-label",`Slide ${r+1} of ${this._count}`)}),this.shadowRoot.querySelectorAll(".dot").forEach((t,r)=>{t.setAttribute("aria-current",r===this._index?"true":"false")})}_buildDots(){let e=this.shadowRoot.querySelector(".indicators");if(e.innerHTML="",this._slides.forEach((t,r)=>{let n=document.createElement("button");n.type="button",n.className="dot",n.setAttribute("aria-label",`Go to slide ${r+1}`),n.addEventListener("click",()=>this.goTo(r)),e.appendChild(n)}),this.hasAttribute("autoplay")){let t=document.createElement("button");t.type="button",t.className="pause-btn",t.setAttribute("aria-pressed","false"),t.setAttribute("aria-label","Pause automatic slide show"),t.textContent="Pause",t.addEventListener("click",()=>this._toggleAutoplayPause(t)),e.appendChild(t)}this._update()}_toggleAutoplayPause(e){this._autoplayPaused=!this._autoplayPaused,this._autoplayPaused?(this._pause(),e.setAttribute("aria-pressed","true"),e.setAttribute("aria-label","Resume automatic slide show"),e.textContent="Play"):(this._resume(),e.setAttribute("aria-pressed","false"),e.setAttribute("aria-label","Pause automatic slide show"),e.textContent="Pause")}_emit(){this.dispatchEvent(new CustomEvent("velin-slide-change",{bubbles:!0,detail:{index:this._index}}))}_startAutoplay(){let e=parseInt(this.getAttribute("interval")||"5000",10);this._timer=setInterval(()=>this.next(),e)}_pause(){this._timer&&(clearInterval(this._timer),this._timer=null)}_resume(){this.hasAttribute("autoplay")&&!this._timer&&!this._autoplayPaused&&this._startAutoplay()}disconnectedCallback(){this._pause()}};customElements.define("velin-carousel",Zt);Vo=Zt});var Jo={};v(Jo,{default:()=>Zo});function $c(i){let e=i.tagName;return e==="BUTTON"||e==="A"&&i.hasAttribute("href")||i.getAttribute("role")==="button"}var Nc,Hc,Jt,Zo,Tr=u(()=>{Nc=`
609
623
  :host { display: block; }
610
624
  .content {
611
625
  overflow: hidden;
@@ -616,7 +630,7 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
616
630
  :host([open]) .content { grid-template-rows: 1fr; }
617
631
  .inner { min-height: 0; }
618
632
  @media (prefers-reduced-motion: reduce) { .content { transition: none; } }
619
- `,St=0;function Lt(r){let e=r.tagName;return e==="BUTTON"||e==="A"&&r.hasAttribute("href")||r.getAttribute("role")==="button"}var U=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._contentId=`velin-collapse-panel-${++St}`,this._onTriggerKey=this._onTriggerKey.bind(this)}connectedCallback(){let e=this._contentId;this.shadowRoot.innerHTML="<style>"+Et+'</style><slot name="trigger"></slot><div class="content" id="'+e+'" part="content"><div class="inner"><slot></slot></div></div>',this.shadowRoot.querySelector('slot[name="trigger"]').addEventListener("slotchange",()=>this._wireTrigger()),this._wireTrigger()}_wireTrigger(){let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];e&&(Lt(e)||(e.setAttribute("role","button"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")),e.setAttribute("aria-controls",this._contentId),e.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false"),e.removeEventListener("click",this._onClick),e.removeEventListener("keydown",this._onTriggerKey),this._onClick=()=>this.toggle(),e.addEventListener("click",this._onClick),e.addEventListener("keydown",this._onTriggerKey))}_onTriggerKey(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.toggle())}attributeChangedCallback(e){if(e==="open"){let t=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];t&&t.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false")}}toggle(){this.hasAttribute("open")?this.close():this.open()}open(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("velin-open",{bubbles:!0}))}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}};customElements.define("velin-collapse",U);var Ct=U;var W=class extends HTMLElement{constructor(){super(),this._observer=null,this._activeId=null}connectedCallback(){let e=this.getAttribute("target")||"section[id]",t=this.getAttribute("nav")||"a",i=this.getAttribute("root-margin")||"-20% 0px -60% 0px",s=document.querySelectorAll(e);s.length&&(this._observer=new IntersectionObserver(o=>{for(let n of o)n.isIntersecting&&this._activate(n.target.id,t)},{rootMargin:i,threshold:0}),s.forEach(o=>this._observer.observe(o)))}_activate(e,t){if(this._activeId===e)return;this._activeId=e,this.querySelectorAll(t).forEach(s=>{s.getAttribute("href")===`#${e}`?(s.classList.add("velin-doc-sidebar__link--active"),s.setAttribute("aria-current","true")):(s.classList.remove("velin-doc-sidebar__link--active"),s.removeAttribute("aria-current"))}),this.dispatchEvent(new CustomEvent("velin-spy-change",{bubbles:!0,detail:{id:e}}))}disconnectedCallback(){this._observer&&this._observer.disconnect()}};customElements.define("velin-scrollspy",W);var Tt=W;var Mt=`
633
+ `,Hc=0;Jt=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._contentId=`velin-collapse-panel-${++Hc}`,this._onTriggerKey=this._onTriggerKey.bind(this)}connectedCallback(){let e=this._contentId;this.shadowRoot.innerHTML="<style>"+Nc+'</style><slot name="trigger"></slot><div class="content" id="'+e+'" part="content"><div class="inner"><slot></slot></div></div>',this.shadowRoot.querySelector('slot[name="trigger"]').addEventListener("slotchange",()=>this._wireTrigger()),this._wireTrigger()}_wireTrigger(){let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];e&&($c(e)||(e.setAttribute("role","button"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")),e.setAttribute("aria-controls",this._contentId),e.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false"),e.removeEventListener("click",this._onClick),e.removeEventListener("keydown",this._onTriggerKey),this._onClick=()=>this.toggle(),e.addEventListener("click",this._onClick),e.addEventListener("keydown",this._onTriggerKey))}_onTriggerKey(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.toggle())}attributeChangedCallback(e){if(e==="open"){let t=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];t&&t.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false")}}toggle(){this.hasAttribute("open")?this.close():this.open()}open(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("velin-open",{bubbles:!0}))}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}};customElements.define("velin-collapse",Jt);Zo=Jt});var es={};v(es,{default:()=>Qo});var Qt,Qo,Lr=u(()=>{Qt=class extends HTMLElement{constructor(){super(),this._observer=null,this._activeId=null}connectedCallback(){let e=this.getAttribute("target")||"section[id]",t=this.getAttribute("nav")||"a",r=this.getAttribute("root-margin")||"-20% 0px -60% 0px",n=document.querySelectorAll(e);n.length&&(this._observer=new IntersectionObserver(o=>{for(let a of o)a.isIntersecting&&this._activate(a.target.id,t)},{rootMargin:r,threshold:0}),n.forEach(o=>this._observer.observe(o)))}_activate(e,t){if(this._activeId===e)return;this._activeId=e,this.querySelectorAll(t).forEach(n=>{n.getAttribute("href")===`#${e}`?(n.classList.add("velin-doc-sidebar__link--active"),n.setAttribute("aria-current","true")):(n.classList.remove("velin-doc-sidebar__link--active"),n.removeAttribute("aria-current"))}),this.dispatchEvent(new CustomEvent("velin-spy-change",{bubbles:!0,detail:{id:e}}))}disconnectedCallback(){this._observer&&this._observer.disconnect()}};customElements.define("velin-scrollspy",Qt);Qo=Qt});var Cr={};v(Cr,{VelinTooltip:()=>qe,VelinTooltipWC:()=>st,default:()=>ts});var zc,Fc,qe,st,ts,ei=u(()=>{k();zc=`
620
634
  :host { position: relative; display: inline-block; }
621
635
  .tip {
622
636
  position: absolute; z-index: var(--velin-z-tooltip, 700);
@@ -635,11 +649,11 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
635
649
  .tip[data-placement="start"] { right: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
636
650
  .tip[data-placement="end"] { left: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
637
651
  @media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
638
- `,Rt=0,G=class extends HTMLElement{static get observedAttributes(){return["content","placement"]}constructor(){super(),this.attachShadow({mode:"open"}),this._tipId=`velin-tooltip-${++Rt}`}connectedCallback(){let e=this.getAttribute("placement")||"top",t="div";this.shadowRoot.innerHTML=`
639
- <style>${Mt}</style>
652
+ `,Fc=0,qe=class extends HTMLElement{static get observedAttributes(){return["content","placement"]}constructor(){super(),this.attachShadow({mode:"open"}),this._tipId=`velin-tooltip-${++Fc}`}connectedCallback(){let e=this.getAttribute("placement")||"top",t="div";this.shadowRoot.innerHTML=`
653
+ <style>${zc}</style>
640
654
  <slot></slot>
641
- <${t} class="tip" id="${this._tipId}" role="tooltip" data-placement="${a(e)}" part="tip">${a(this.getAttribute("content")||"")}</${t}>
642
- `,this.addEventListener("mouseenter",()=>this._show()),this.addEventListener("mouseleave",()=>this._hide()),this.addEventListener("focusin",()=>this._show()),this.addEventListener("focusout",()=>this._hide()),this.addEventListener("keydown",s=>{s.key==="Escape"&&this._hide()}),this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>this._linkTrigger()),this._linkTrigger()}_linkTrigger(){let e=this.shadowRoot.querySelector("slot")?.assignedElements()[0];e&&(this.hasAttribute("visible")?e.setAttribute("aria-describedby",this._tipId):e.removeAttribute("aria-describedby"))}_show(){this.setAttribute("visible","");let e=this.shadowRoot.querySelector("slot")?.assignedElements()[0];e&&e.setAttribute("aria-describedby",this._tipId),this._flip()}_hide(){this.removeAttribute("visible");let e=this.shadowRoot.querySelector("slot")?.assignedElements()[0];e&&e.removeAttribute("aria-describedby")}_flip(){let e=this.shadowRoot.querySelector(".tip");if(!e)return;let t=e.getBoundingClientRect(),i=this.getAttribute("placement")||"top";i==="top"&&t.top<0?e.setAttribute("data-placement","bottom"):i==="bottom"&&t.bottom>window.innerHeight?e.setAttribute("data-placement","top"):e.setAttribute("data-placement",i)}attributeChangedCallback(e,t,i){let s=this.shadowRoot?.querySelector(".tip");s&&(e==="content"&&(s.textContent=i),e==="placement"&&s.setAttribute("data-placement",i))}};customElements.define("velin-tooltip-wc",G);var $t=G;var qt=`
655
+ <${t} class="tip" id="${this._tipId}" role="tooltip" data-placement="${p(e)}" part="tip">${p(this.getAttribute("content")||"")}</${t}>
656
+ `,this.addEventListener("mouseenter",()=>this._show()),this.addEventListener("mouseleave",()=>this._hide()),this.addEventListener("focusin",()=>this._show()),this.addEventListener("focusout",()=>this._hide()),this.addEventListener("keydown",n=>{n.key==="Escape"&&this._hide()}),this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>this._linkTrigger()),this._linkTrigger()}_linkTrigger(){let e=this.shadowRoot.querySelector("slot")?.assignedElements()[0];e&&(this.hasAttribute("visible")?e.setAttribute("aria-describedby",this._tipId):e.removeAttribute("aria-describedby"))}_show(){this.setAttribute("visible","");let e=this.shadowRoot.querySelector("slot")?.assignedElements()[0];e&&e.setAttribute("aria-describedby",this._tipId),this._flip()}_hide(){this.removeAttribute("visible");let e=this.shadowRoot.querySelector("slot")?.assignedElements()[0];e&&e.removeAttribute("aria-describedby")}_flip(){let e=this.shadowRoot.querySelector(".tip");if(!e)return;let t=e.getBoundingClientRect(),r=this.getAttribute("placement")||"top";r==="top"&&t.top<0?e.setAttribute("data-placement","bottom"):r==="bottom"&&t.bottom>window.innerHeight?e.setAttribute("data-placement","top"):e.setAttribute("data-placement",r)}attributeChangedCallback(e,t,r){let n=this.shadowRoot?.querySelector(".tip");n&&(e==="content"&&(n.textContent=r),e==="placement"&&n.setAttribute("data-placement",r))}},st=class i extends qe{static _warned=!1;connectedCallback(){!i._warned&&typeof console<"u"&&console.warn&&(i._warned=!0,console.warn("[velinstyle] <velin-tooltip-wc> is deprecated; use <velin-tooltip> instead.")),super.connectedCallback()}};customElements.get("velin-tooltip")||customElements.define("velin-tooltip",qe);customElements.get("velin-tooltip-wc")||customElements.define("velin-tooltip-wc",st);ts=qe});var is={};v(is,{announce:()=>at,ensureAriaLabel:()=>qc,getAnnouncer:()=>Ue,liveDotLabel:()=>Rr,respectReducedMotion:()=>Uc,syncExpanded:()=>Pc});function Ue(){return typeof document>"u"?null:(Le?.isConnected||(Le=document.querySelector("velin-announcer"),Le||(Le=document.createElement("velin-announcer"),document.body.appendChild(Le))),Le)}function at(i,e="polite"){let t=Ue();!t||typeof t.announce!="function"||t.announce(i,{assertive:e==="assertive"})}function Pc(i,e){if(!i||!e)return;let t=i.getAttribute("aria-expanded")==="true";e.hidden=!t,e.id&&i.setAttribute("aria-controls",e.id)}function qc(i,e){!i||!e||i.getAttribute("aria-label")?.trim()||i.setAttribute("aria-label",e)}function Uc(i,e){typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches&&e?e():i()}function Rr(i){return{live:"Live",idle:"Idle",error:"Error",offline:"Offline",connecting:"Connecting"}[String(i||"live").toLowerCase()]||i||"Live"}var Le,Be=u(()=>{});var ns={};v(ns,{default:()=>rs});var Bc,ti,rs,Mr=u(()=>{j();Be();k();Bc=`
643
657
  :host { display: contents; }
644
658
  .overlay {
645
659
  position: fixed; inset: 0; z-index: var(--velin-z-modal, 500);
@@ -678,17 +692,17 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
678
692
  .nav--prev { left: 0.5rem; }
679
693
  .nav--next { right: 0.5rem; }
680
694
  }
681
- `,Z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._index=0,this._items=[],this._previousFocus=null,this._onTrapKey=e=>{e.key==="Tab"&&v(this.shadowRoot,e)}}connectedCallback(){this.shadowRoot.innerHTML=`
682
- <style>${qt}</style>
695
+ `,ti=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._index=0,this._items=[],this._previousFocus=null,this._onTrapKey=e=>{e.key==="Tab"&&G(this.shadowRoot,e)}}connectedCallback(){this.shadowRoot.innerHTML=`
696
+ <style>${Bc}</style>
683
697
  <slot></slot>
684
698
  <div class="overlay" role="dialog" aria-modal="true" aria-label="Image lightbox" aria-roledescription="lightbox" part="overlay">
685
699
  <button class="nav nav--prev" aria-label="Previous">&#8249;</button>
686
700
  <div class="content" part="content"></div>
687
701
  <button class="nav nav--next" aria-label="Next">&#8250;</button>
688
702
  <button class="close" aria-label="Close">&times;</button>
689
- <div class="counter" part="counter"></div>
703
+ <div class="counter" part="counter" aria-live="polite" aria-atomic="true"></div>
690
704
  </div>
691
- `;let e=this.shadowRoot.querySelector("slot");e.addEventListener("slotchange",()=>{this._items=e.assignedElements().filter(t=>t.tagName==="IMG"||t.tagName==="VIDEO"||t.dataset.velinLightbox),this._items.forEach((t,i)=>{t.style.cursor="pointer",t.addEventListener("click",()=>this.open(i))})}),this.shadowRoot.querySelector(".close").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".nav--prev").addEventListener("click",()=>this._prev()),this.shadowRoot.querySelector(".nav--next").addEventListener("click",()=>this._next()),this.shadowRoot.querySelector(".overlay").addEventListener("click",t=>{t.target.classList.contains("overlay")&&this.close()}),this.shadowRoot.querySelector(".overlay").addEventListener("keydown",t=>{t.key==="Escape"&&this.close(),t.key==="ArrowLeft"&&this._prev(),t.key==="ArrowRight"&&this._next()})}open(e=0){this._previousFocus=document.activeElement,this._index=e,this.setAttribute("open",""),this._render(),document.body.style.overflow="hidden";let t=this.shadowRoot.querySelector(".overlay");t.removeEventListener("keydown",this._onTrapKey),t.addEventListener("keydown",this._onTrapKey),this.shadowRoot.querySelector(".close").focus()}close(){this.removeAttribute("open"),document.body.style.overflow="",this._previousFocus&&(this._previousFocus.focus(),this._previousFocus=null),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_prev(){this._index=(this._index-1+this._items.length)%this._items.length,this._render()}_next(){this._index=(this._index+1)%this._items.length,this._render()}_render(){let e=this.shadowRoot.querySelector(".content"),t=this._items[this._index];if(!t)return;let i=be(t.dataset.velinLightbox||t.src),s=a(t.alt||"");t.tagName==="VIDEO"?e.innerHTML=`<video src="${a(i)}" controls autoplay></video>`:e.innerHTML=`<img src="${a(i)}" alt="${s}">`;let o=this.shadowRoot.querySelector(".counter");o.textContent=`${this._index+1} / ${this._items.length}`}};customElements.define("velin-lightbox",Z);var It=Z;var Ft=`
705
+ `;let e=this.shadowRoot.querySelector("slot");e.addEventListener("slotchange",()=>{this._items=e.assignedElements().filter(t=>t.tagName==="IMG"||t.tagName==="VIDEO"||t.dataset.velinLightbox),this._items.forEach((t,r)=>{t.style.cursor="pointer",t.addEventListener("click",()=>this.open(r))})}),this.shadowRoot.querySelector(".close").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".nav--prev").addEventListener("click",()=>this._prev()),this.shadowRoot.querySelector(".nav--next").addEventListener("click",()=>this._next()),this.shadowRoot.querySelector(".overlay").addEventListener("click",t=>{t.target.classList.contains("overlay")&&this.close()}),this.shadowRoot.querySelector(".overlay").addEventListener("keydown",t=>{t.key==="Escape"&&this.close(),t.key==="ArrowLeft"&&this._prev(),t.key==="ArrowRight"&&this._next()})}open(e=0){this._previousFocus=document.activeElement,this._index=e,this.setAttribute("open",""),Q(this),this._render(),document.body.style.overflow="hidden";let t=this.shadowRoot.querySelector(".overlay");t.removeEventListener("keydown",this._onTrapKey),t.addEventListener("keydown",this._onTrapKey),this.shadowRoot.querySelector(".close").focus()}close(){this.removeAttribute("open"),ee(),document.body.style.overflow="",this._previousFocus&&(this._previousFocus.focus(),this._previousFocus=null),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_prev(){this._index=(this._index-1+this._items.length)%this._items.length,this._render()}_next(){this._index=(this._index+1)%this._items.length,this._render()}_render(){let e=this.shadowRoot.querySelector(".content"),t=this._items[this._index];if(!t)return;let r=Te(t.dataset.velinLightbox||t.src),n=p(t.alt||"");t.tagName==="VIDEO"?e.innerHTML=`<video src="${p(r)}" controls autoplay></video>`:e.innerHTML=`<img src="${p(r)}" alt="${n}">`;let o=this.shadowRoot.querySelector(".counter"),a=`${this._index+1} / ${this._items.length}`;o.textContent=a,at(`Slide ${a}`,"polite")}};customElements.define("velin-lightbox",ti);rs=ti});var Ir={};v(Ir,{VelinStepper:()=>je,VelinStepperWC:()=>lt,default:()=>os});var jc,je,lt,os,ii=u(()=>{k();jc=`
692
706
  :host { display: block; }
693
707
  .steps {
694
708
  display: flex; gap: var(--velin-space-2, 0.5rem);
@@ -737,11 +751,15 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
737
751
  .panels ::slotted(*) { display: none; }
738
752
  .panels ::slotted([data-active]) { display: block; }
739
753
  @media (prefers-reduced-motion: reduce) { .step__marker { transition: none; } }
740
- `,J=class extends HTMLElement{static get observedAttributes(){return["active"]}constructor(){super(),this.attachShadow({mode:"open"}),this._current=0}connectedCallback(){this._current=parseInt(this.getAttribute("active")||"0",10),this._buildSteps()}_buildSteps(){let t=(this.getAttribute("labels")||"").split(",").map(i=>i.trim()).map((i,s)=>{let o=s<this._current?"completed":s===this._current?"active":"",n=s<this._current?"&#10003;":s+1,c=s===this._current?' aria-current="step"':"";return`<div class="step ${o}" role="listitem"${c}><span class="step__marker" aria-hidden="true">${n}</span><span class="step__label">${a(i)}</span></div>`}).join("");this.shadowRoot.innerHTML=`
741
- <style>${Ft}</style>
742
- <div class="steps" role="list" aria-label="Progress" part="steps">${t}</div>
754
+ .velin-sr-only {
755
+ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
756
+ overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
757
+ }
758
+ `,je=class extends HTMLElement{static get observedAttributes(){return["active","aria-label","labels"]}constructor(){super(),this.attachShadow({mode:"open"}),this._current=0}connectedCallback(){this._current=parseInt(this.getAttribute("active")||"0",10),this._buildSteps()}_buildSteps(){let e=(this.getAttribute("labels")||"").split(",").map(n=>n.trim()),t=this.getAttribute("aria-label")||"Progress",r=e.map((n,o)=>{let a=o<this._current?"completed":o===this._current?"active":"",c=o<this._current?"completed":o===this._current?"current step":"upcoming",d=o<this._current?'<span class="velin-sr-only">Completed</span><span aria-hidden="true">&#10003;</span>':`<span aria-hidden="true">${o+1}</span>`,m=o===this._current?' aria-current="step"':"",b=n?`${n}, ${c}`:`Step ${o+1}, ${c}`;return`<div class="step ${a}" role="listitem" aria-label="${p(b)}"${m}><span class="step__marker">${d}</span><span class="step__label">${p(n)}</span></div>`}).join("");this.shadowRoot.innerHTML=`
759
+ <style>${jc}</style>
760
+ <div class="steps" role="list" aria-label="${p(t)}" part="steps">${r}</div>
743
761
  <div class="panels" part="panels"><slot></slot></div>
744
- `,this._updatePanels()}_updatePanels(){(this.shadowRoot.querySelector("slot")?.assignedElements()||[]).forEach((t,i)=>{i===this._current?t.setAttribute("data-active",""):t.removeAttribute("data-active")})}next(){let e=(this.getAttribute("labels")||"").split(",");this._current<e.length-1&&(this._current++,this.setAttribute("active",this._current),this._buildSteps(),this.dispatchEvent(new CustomEvent("velin-step-change",{bubbles:!0,detail:{step:this._current}})))}prev(){this._current>0&&(this._current--,this.setAttribute("active",this._current),this._buildSteps(),this.dispatchEvent(new CustomEvent("velin-step-change",{bubbles:!0,detail:{step:this._current}})))}goTo(e){this._current=e,this.setAttribute("active",this._current),this._buildSteps(),this.dispatchEvent(new CustomEvent("velin-step-change",{bubbles:!0,detail:{step:this._current}}))}attributeChangedCallback(e,t,i){e==="active"&&t!==null&&t!==i&&(this._current=parseInt(i,10),this._buildSteps())}};customElements.define("velin-stepper-wc",J);var zt=J;var Ht=`
762
+ `}_updatePanels(){(this.shadowRoot.querySelector("slot")?.assignedElements()||[]).forEach((t,r)=>{r===this._current?t.setAttribute("data-active",""):t.removeAttribute("data-active")})}next(){let e=(this.getAttribute("labels")||"").split(",");this._current<e.length-1&&(this._current++,this.setAttribute("active",this._current),this._buildSteps(),this.dispatchEvent(new CustomEvent("velin-step-change",{bubbles:!0,detail:{step:this._current}})))}prev(){this._current>0&&(this._current--,this.setAttribute("active",this._current),this._buildSteps(),this.dispatchEvent(new CustomEvent("velin-step-change",{bubbles:!0,detail:{step:this._current}})))}goTo(e){this._current=e,this.setAttribute("active",this._current),this._buildSteps(),this.dispatchEvent(new CustomEvent("velin-step-change",{bubbles:!0,detail:{step:this._current}}))}attributeChangedCallback(e,t,r){e==="active"&&t!==null&&t!==r&&(this._current=parseInt(r,10),this._buildSteps())}},lt=class i extends je{static _warned=!1;connectedCallback(){!i._warned&&typeof console<"u"&&console.warn&&(i._warned=!0,console.warn("[velinstyle] <velin-stepper-wc> is deprecated; use <velin-stepper> instead.")),super.connectedCallback()}};customElements.get("velin-stepper")||customElements.define("velin-stepper",je);customElements.get("velin-stepper-wc")||customElements.define("velin-stepper-wc",lt);os=je});var as={};v(as,{default:()=>ss});var Kc,ri,ss,Or=u(()=>{k();Kc=`
745
763
  :host { display: contents; }
746
764
  dialog {
747
765
  border: none; border-radius: var(--velin-radius-lg, 0.75rem);
@@ -798,12 +816,12 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
798
816
  color: var(--velin-color-text, #1a1a2e);
799
817
  }
800
818
  .input:focus { outline: 3px solid var(--velin-color-focus, #2563eb); outline-offset: 0; border-color: var(--velin-color-primary, #2563eb); }
801
- `,Q=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._resolve=null,this._previousFocus=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Ht}</style><dialog part="dialog"></dialog>`}alert(e,{title:t="Alert",confirmText:i="OK"}={}){return this._show("alert",e,{title:t,confirmText:i})}confirm(e,{title:t="Confirm",confirmText:i="Confirm",cancelText:s="Cancel",danger:o=!1}={}){return this._show("confirm",e,{title:t,confirmText:i,cancelText:s,danger:o})}prompt(e,{title:t="Input",confirmText:i="Submit",cancelText:s="Cancel",placeholder:o="",defaultValue:n=""}={}){return this._show("prompt",e,{title:t,confirmText:i,cancelText:s,placeholder:o,defaultValue:n})}_show(e,t,i){let s=this.shadowRoot.querySelector("dialog");this._previousFocus=document.activeElement;let o=a(i.title),n=a(t),c=a(i.confirmText),l=a(i.cancelText||""),d=a(i.placeholder||""),u=a(i.defaultValue||""),f=e==="alert"?`<button class="btn btn--primary" data-action="confirm">${c}</button>`:`<button class="btn" data-action="cancel">${l}</button>
802
- <button class="btn ${i.danger?"btn--danger":"btn--primary"}" data-action="confirm">${c}</button>`,w=e==="prompt"?`<input class="input" placeholder="${d}" value="${u}" part="input">`:"";if(s.innerHTML=`
803
- <div class="header"><h3 class="title">${o}</h3><button class="close" aria-label="Close">&times;</button></div>
804
- <div class="body"><p>${n}</p>${w}</div>
805
- <div class="footer">${f}</div>
806
- `,s.showModal(),e!=="prompt"){let k=s.querySelector("[data-action]");k&&k.focus()}return new Promise(k=>{if(this._resolve=k,s.querySelector(".close").addEventListener("click",()=>this._dismiss(e,!1,s)),s.querySelectorAll("[data-action]").forEach(h=>{h.addEventListener("click",()=>this._dismiss(e,h.dataset.action==="confirm",s))}),s.addEventListener("cancel",h=>{h.preventDefault(),this._dismiss(e,!1,s)}),e==="prompt"){let h=s.querySelector(".input");h.focus(),h.addEventListener("keydown",C=>{C.key==="Enter"&&this._dismiss(e,!0,s)})}})}_dismiss(e,t,i){if(!this._resolve)return;let s;e==="alert"?s=!0:e==="confirm"?s=t:s=t?i.querySelector(".input")?.value??"":null,i.close(),this._previousFocus&&(this._previousFocus.focus(),this._previousFocus=null),this._resolve(s),this._resolve=null,this.dispatchEvent(new CustomEvent("velin-dialog-close",{bubbles:!0,detail:{value:s}}))}};customElements.define("velin-dialog",Q);var Dt=Q;var Kt=`
819
+ `,ri=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._resolve=null,this._previousFocus=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Kc}</style><dialog part="dialog"></dialog>`;let e=this.shadowRoot.querySelector("dialog");e&&e.setAttribute("aria-label",this.getAttribute("aria-label")||"Dialog")}alert(e,{title:t="Alert",confirmText:r="OK"}={}){return this._show("alert",e,{title:t,confirmText:r})}confirm(e,{title:t="Confirm",confirmText:r="Confirm",cancelText:n="Cancel",danger:o=!1}={}){return this._show("confirm",e,{title:t,confirmText:r,cancelText:n,danger:o})}prompt(e,{title:t="Input",confirmText:r="Submit",cancelText:n="Cancel",placeholder:o="",defaultValue:a=""}={}){return this._show("prompt",e,{title:t,confirmText:r,cancelText:n,placeholder:o,defaultValue:a})}_show(e,t,r){let n=this.shadowRoot.querySelector("dialog");this._previousFocus=document.activeElement;let o=p(r.title),a=p(t),c=p(r.confirmText),d=p(r.cancelText||""),m=p(r.placeholder||""),b=p(r.defaultValue||""),_=e==="alert"?`<button class="btn btn--primary" data-action="confirm">${c}</button>`:`<button class="btn" data-action="cancel">${d}</button>
820
+ <button class="btn ${r.danger?"btn--danger":"btn--primary"}" data-action="confirm">${c}</button>`,g=e==="prompt"?`<input class="input" placeholder="${m}" value="${b}" part="input">`:"",F=`velin-dialog-title-${Math.random().toString(36).slice(2,9)}`;if(n.innerHTML=`
821
+ <div class="header"><h3 class="title" id="${F}">${o}</h3><button class="close" aria-label="Close">&times;</button></div>
822
+ <div class="body"><p>${a}</p>${g}</div>
823
+ <div class="footer">${_}</div>
824
+ `,n.setAttribute("aria-modal","true"),n.removeAttribute("aria-label"),n.setAttribute("aria-labelledby",F),n.showModal(),e!=="prompt"){let w=n.querySelector("[data-action]");w&&w.focus()}return new Promise(w=>{if(this._resolve=w,n.querySelector(".close").addEventListener("click",()=>this._dismiss(e,!1,n)),n.querySelectorAll("[data-action]").forEach(A=>{A.addEventListener("click",()=>this._dismiss(e,A.dataset.action==="confirm",n))}),n.addEventListener("cancel",A=>{A.preventDefault(),this._dismiss(e,!1,n)}),e==="prompt"){let A=n.querySelector(".input");A.focus(),A.addEventListener("keydown",E=>{E.key==="Enter"&&this._dismiss(e,!0,n)})}})}_dismiss(e,t,r){if(!this._resolve)return;let n;e==="alert"?n=!0:e==="confirm"?n=t:n=t?r.querySelector(".input")?.value??"":null,r.close(),this._previousFocus&&(this._previousFocus.focus(),this._previousFocus=null),this._resolve(n),this._resolve=null,this.dispatchEvent(new CustomEvent("velin-dialog-close",{bubbles:!0,detail:{value:n}}))}};customElements.define("velin-dialog",ri);ss=ri});var cs={};v(cs,{default:()=>ls});var Wc,ni,ls,Dr=u(()=>{k();Wc=`
807
825
  :host { display: inline-flex; font-variant-numeric: tabular-nums; }
808
826
  .wrap { display: inline-flex; gap: var(--velin-space-3, 0.75rem); align-items: flex-start; }
809
827
  .segment {
@@ -833,7 +851,7 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
833
851
  :host([size="sm"]) .value { font-size: var(--velin-text-xl, 1.25rem); }
834
852
  :host([size="sm"]) .segment { min-width: 2.5rem; }
835
853
  :host([size="lg"]) .value { font-size: var(--velin-text-5xl, 3.052rem); }
836
- `,ee=class extends HTMLElement{static get observedAttributes(){return["datetime"]}constructor(){super(),this.attachShadow({mode:"open"}),this._timer=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Kt}</style><div class="wrap"></div>`,this._wrap=this.shadowRoot.querySelector(".wrap"),this.setAttribute("role","timer"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-atomic","true"),this._start()}_start(){this._update(),this._timer=setInterval(()=>this._update(),1e3)}_update(){let e=new Date(this.getAttribute("datetime")).getTime(),t=Date.now(),i=Math.max(0,e-t),s=Math.floor(i/864e5),o=Math.floor(i%864e5/36e5),n=Math.floor(i%36e5/6e4),c=Math.floor(i%6e4/1e3),l=p=>String(p).padStart(2,"0"),d=this.getAttribute("show-days")!=="false",u=a(this.getAttribute("label-days")||"Days"),f=a(this.getAttribute("label-hours")||"Hours"),w=a(this.getAttribute("label-minutes")||"Min"),k=a(this.getAttribute("label-seconds")||"Sec"),h="";d&&(h+=`<div class="segment" part="days"><span class="value">${l(s)}</span><span class="label">${u}</span></div><span class="separator">:</span>`),h+=`<div class="segment" part="hours"><span class="value">${l(o)}</span><span class="label">${f}</span></div><span class="separator">:</span>`,h+=`<div class="segment" part="minutes"><span class="value">${l(n)}</span><span class="label">${w}</span></div><span class="separator">:</span>`,h+=`<div class="segment" part="seconds"><span class="value">${l(c)}</span><span class="label">${k}</span></div>`,this._wrap&&(this._wrap.innerHTML=h);let C=`${s} days, ${o} hours, ${n} minutes, ${c} seconds remaining`;this.setAttribute("aria-label",C),i<=0&&(clearInterval(this._timer),this.dispatchEvent(new CustomEvent("velin-countdown-end",{bubbles:!0})))}disconnectedCallback(){this._timer&&clearInterval(this._timer)}attributeChangedCallback(){this._timer&&(clearInterval(this._timer),this._start())}};customElements.define("velin-countdown",ee);var Nt=ee;var Ot=`
854
+ `,ni=class extends HTMLElement{static get observedAttributes(){return["datetime"]}constructor(){super(),this.attachShadow({mode:"open"}),this._timer=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Wc}</style><div class="wrap"></div>`,this._wrap=this.shadowRoot.querySelector(".wrap"),this.setAttribute("role","timer"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-atomic","true"),this._start()}_start(){this._update(),this._timer=setInterval(()=>this._update(),1e3)}_update(){let e=new Date(this.getAttribute("datetime")).getTime(),t=Date.now(),r=Math.max(0,e-t),n=Math.floor(r/864e5),o=Math.floor(r%864e5/36e5),a=Math.floor(r%36e5/6e4),c=Math.floor(r%6e4/1e3),d=E=>String(E).padStart(2,"0"),m=this.getAttribute("show-days")!=="false",b=p(this.getAttribute("label-days")||"Days"),_=p(this.getAttribute("label-hours")||"Hours"),g=p(this.getAttribute("label-minutes")||"Min"),F=p(this.getAttribute("label-seconds")||"Sec"),w="";m&&(w+=`<div class="segment" part="days"><span class="value">${d(n)}</span><span class="label">${b}</span></div><span class="separator">:</span>`),w+=`<div class="segment" part="hours"><span class="value">${d(o)}</span><span class="label">${_}</span></div><span class="separator">:</span>`,w+=`<div class="segment" part="minutes"><span class="value">${d(a)}</span><span class="label">${g}</span></div><span class="separator">:</span>`,w+=`<div class="segment" part="seconds"><span class="value">${d(c)}</span><span class="label">${F}</span></div>`,this._wrap&&(this._wrap.innerHTML=w);let A=`${n} days, ${o} hours, ${a} minutes, ${c} seconds remaining`;this.setAttribute("aria-label",A),r<=0&&(clearInterval(this._timer),this.dispatchEvent(new CustomEvent("velin-countdown-end",{bubbles:!0})))}disconnectedCallback(){this._timer&&clearInterval(this._timer)}attributeChangedCallback(){this._timer&&(clearInterval(this._timer),this._start())}};customElements.define("velin-countdown",ni);ls=ni});var us={};v(us,{default:()=>ds});var Gc,oi,ds,Nr=u(()=>{Gc=`
837
855
  :host { display: inline-flex; align-items: center; justify-content: center; }
838
856
  svg { transform: rotate(-90deg); }
839
857
  .track { fill: none; stroke: var(--velin-color-border, #e5e5e5); }
@@ -851,16 +869,16 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
851
869
  }
852
870
  :host { position: relative; }
853
871
  @media (prefers-reduced-motion: reduce) { .fill { transition: none; } }
854
- `,te=class extends HTMLElement{static get observedAttributes(){return["value","size","stroke","color"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this._render()}_render(){let e=Math.min(100,Math.max(0,parseInt(this.getAttribute("value")||"0",10))),t=parseInt(this.getAttribute("size")||"120",10),i=parseInt(this.getAttribute("stroke")||"8",10),s=(t-i)/2,o=2*Math.PI*s,n=o-e/100*o,c=this.getAttribute("color"),l=c?`stroke: var(--velin-color-${c}, ${c});`:"",d=this.getAttribute("label")!=="false";this.shadowRoot.innerHTML=`
855
- <style>${Ot}</style>
872
+ `,oi=class extends HTMLElement{static get observedAttributes(){return["value","size","stroke","color"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this._render()}_render(){let e=Math.min(100,Math.max(0,parseInt(this.getAttribute("value")||"0",10))),t=parseInt(this.getAttribute("size")||"120",10),r=parseInt(this.getAttribute("stroke")||"8",10),n=(t-r)/2,o=2*Math.PI*n,a=o-e/100*o,c=this.getAttribute("color"),d=c?`stroke: var(--velin-color-${c}, ${c});`:"",m=this.getAttribute("label")!=="false";this.shadowRoot.innerHTML=`
873
+ <style>${Gc}</style>
856
874
  <svg width="${t}" height="${t}" viewBox="0 0 ${t} ${t}" part="svg" role="progressbar" aria-valuenow="${e}" aria-valuemin="0" aria-valuemax="100">
857
- <circle class="track" cx="${t/2}" cy="${t/2}" r="${s}" stroke-width="${i}" />
858
- <circle class="fill" cx="${t/2}" cy="${t/2}" r="${s}" stroke-width="${i}"
859
- stroke-dasharray="${o}" stroke-dashoffset="${n}"
860
- style="${l}" part="fill" />
875
+ <circle class="track" cx="${t/2}" cy="${t/2}" r="${n}" stroke-width="${r}" />
876
+ <circle class="fill" cx="${t/2}" cy="${t/2}" r="${n}" stroke-width="${r}"
877
+ stroke-dasharray="${o}" stroke-dashoffset="${a}"
878
+ style="${d}" part="fill" />
861
879
  </svg>
862
- ${d?`<span class="label" part="label">${e}%</span>`:""}
863
- `,this.setAttribute("role","progressbar"),this.setAttribute("aria-valuenow",e),this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","100"),this.setAttribute("aria-label",this.getAttribute("aria-label")||`${e}%`)}attributeChangedCallback(){this._render()}};customElements.define("velin-progress-ring",te);var Bt=te;var Pt=/^[a-zA-Z0-9_-]{1,64}$/;var ie=class extends HTMLElement{static get observedAttributes(){return["key","storage"]}constructor(){super(),this._debounceTimer=null,this._onInput=this._onInput.bind(this),this._onSubmit=this._onSubmit.bind(this),this._onReset=this._onReset.bind(this)}get storageKey(){let e=this.getAttribute("key")||"default";return`velin-persist-${Pt.test(e)?e:"default"}`}get _storage(){return this.getAttribute("storage")==="session"?sessionStorage:localStorage}connectedCallback(){this.style.display="contents",this.addEventListener("input",this._onInput),this.addEventListener("change",this._onInput),this.addEventListener("submit",this._onSubmit),this.addEventListener("reset",this._onReset),requestAnimationFrame(()=>this._restore())}disconnectedCallback(){this.removeEventListener("input",this._onInput),this.removeEventListener("change",this._onInput),this.removeEventListener("submit",this._onSubmit),this.removeEventListener("reset",this._onReset),this._debounceTimer&&clearTimeout(this._debounceTimer)}_onInput(){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._save(),300)}_onSubmit(e){this.clear()}_onReset(){requestAnimationFrame(()=>this.clear())}_getFields(){return this.querySelectorAll("input[name], textarea[name], select[name]")}_save(){let e={};this._getFields().forEach(t=>{let i=t.name;i&&(t.type==="password"||t.type==="file"||(t.type==="checkbox"?e[i]=t.checked:t.type==="radio"?t.checked&&(e[i]=t.value):e[i]=t.value))});try{let t=JSON.stringify(e);if(t.length>65536)return;this._storage.setItem(this.storageKey,t)}catch(t){(t.name==="QuotaExceededError"||t.code===22)&&this.dispatchEvent(new CustomEvent("velin-persist-error",{bubbles:!0,detail:{error:"quota"}}))}}_restore(){let e;try{let t=this._storage.getItem(this.storageKey);if(!t||t.length>65536||(e=JSON.parse(t),typeof e!="object"||e===null))return}catch{return}this._getFields().forEach(t=>{let i=t.name;i in e&&(t.type==="checkbox"?t.checked=!!e[i]:t.type==="radio"?t.checked=t.value===e[i]:t.value=e[i])}),this.dispatchEvent(new CustomEvent("velin-persist-restore",{bubbles:!0,detail:{data:e}}))}clear(){try{this._storage.removeItem(this.storageKey)}catch{}this.dispatchEvent(new CustomEvent("velin-persist-clear",{bubbles:!0}))}};customElements.define("velin-persist",ie);var jt=ie;var Yt=`
880
+ ${m?`<span class="label" part="label">${e}%</span>`:""}
881
+ `,this.setAttribute("role","progressbar"),this.setAttribute("aria-valuenow",e),this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","100"),this.setAttribute("aria-label",this.getAttribute("aria-label")||`${e}%`)}attributeChangedCallback(){this._render()}};customElements.define("velin-progress-ring",oi);ds=oi});var ps={};v(ps,{default:()=>hs});var Yc,si,hs,Hr=u(()=>{Yc=/^[a-zA-Z0-9_-]{1,64}$/,si=class extends HTMLElement{static get observedAttributes(){return["key","storage"]}constructor(){super(),this._debounceTimer=null,this._onInput=this._onInput.bind(this),this._onSubmit=this._onSubmit.bind(this),this._onReset=this._onReset.bind(this)}get storageKey(){let e=this.getAttribute("key")||"default";return`velin-persist-${Yc.test(e)?e:"default"}`}get _storage(){return this.getAttribute("storage")==="session"?sessionStorage:localStorage}connectedCallback(){this.style.display="contents",this.addEventListener("input",this._onInput),this.addEventListener("change",this._onInput),this.addEventListener("submit",this._onSubmit),this.addEventListener("reset",this._onReset),requestAnimationFrame(()=>this._restore())}disconnectedCallback(){this.removeEventListener("input",this._onInput),this.removeEventListener("change",this._onInput),this.removeEventListener("submit",this._onSubmit),this.removeEventListener("reset",this._onReset),this._debounceTimer&&clearTimeout(this._debounceTimer)}_onInput(){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._save(),300)}_onSubmit(e){this.clear()}_onReset(){requestAnimationFrame(()=>this.clear())}_getFields(){return this.querySelectorAll("input[name], textarea[name], select[name]")}_save(){let e={};this._getFields().forEach(t=>{let r=t.name;r&&(t.type==="password"||t.type==="file"||(t.type==="checkbox"?e[r]=t.checked:t.type==="radio"?t.checked&&(e[r]=t.value):e[r]=t.value))});try{let t=JSON.stringify(e);if(t.length>65536)return;this._storage.setItem(this.storageKey,t)}catch(t){(t.name==="QuotaExceededError"||t.code===22)&&this.dispatchEvent(new CustomEvent("velin-persist-error",{bubbles:!0,detail:{error:"quota"}}))}}_restore(){let e;try{let t=this._storage.getItem(this.storageKey);if(!t||t.length>65536||(e=JSON.parse(t),typeof e!="object"||e===null))return}catch{return}this._getFields().forEach(t=>{let r=t.name;r in e&&(t.type==="checkbox"?t.checked=!!e[r]:t.type==="radio"?t.checked=t.value===e[r]:t.value=e[r])}),this.dispatchEvent(new CustomEvent("velin-persist-restore",{bubbles:!0,detail:{data:e}}))}clear(){try{this._storage.removeItem(this.storageKey)}catch{}this.dispatchEvent(new CustomEvent("velin-persist-clear",{bubbles:!0}))}};customElements.define("velin-persist",si);hs=si});var fs={};v(fs,{default:()=>ms});var Vc,ai,ms,$r=u(()=>{j();k();Vc=`
864
882
  :host { display: inline-block; position: relative; }
865
883
  .listbox {
866
884
  position: absolute; z-index: var(--velin-z-dropdown, 100);
@@ -885,11 +903,11 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
885
903
  ::slotted([role="option"][aria-selected="true"]) {
886
904
  background: var(--velin-color-surface-dim, #eee);
887
905
  }
888
- `,se=class extends HTMLElement{static get observedAttributes(){return["open","aria-label"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onDocClick=this._onDocClick.bind(this),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=`velin-combobox-list-${Math.random().toString(36).slice(2,9)}`;this._listId=e;let t=a(this.getAttribute("aria-label")||"Options");this.shadowRoot.innerHTML=`
889
- <style>${Yt}</style>
906
+ `,ai=class extends HTMLElement{static get observedAttributes(){return["open","aria-label"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onDocClick=this._onDocClick.bind(this),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=`velin-combobox-list-${Math.random().toString(36).slice(2,9)}`;this._listId=e;let t=p(this.getAttribute("aria-label")||"Options");this.shadowRoot.innerHTML=`
907
+ <style>${Vc}</style>
890
908
  <slot name="trigger"></slot>
891
909
  <div class="listbox" id="${e}" role="listbox" aria-label="${t}" part="listbox"><slot></slot></div>
892
- `,this.shadowRoot.querySelector('slot[name="trigger"]').addEventListener("slotchange",()=>this._wireTrigger()),this.shadowRoot.querySelector("slot:not([name])")?.addEventListener("slotchange",()=>this._wireOptions()),this._wireTrigger(),this._wireOptions(),this.addEventListener("keydown",this._onKey)}_wireTrigger(){let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];if(!e)return;e.setAttribute("role","combobox"),e.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false"),e.setAttribute("aria-controls",this._listId),e.setAttribute("aria-autocomplete","list"),e.id||(e.id=`velin-combobox-trigger-${Math.random().toString(36).slice(2,9)}`);let t=this.shadowRoot.querySelector(".listbox");t&&t.setAttribute("aria-labelledby",e.id),e.dataset.velinComboWired||(e.dataset.velinComboWired="1",e.addEventListener("click",()=>this.toggle()),e.addEventListener("keydown",i=>{(i.key==="ArrowDown"||i.key==="Enter")&&(i.preventDefault(),this.open())}))}_wireOptions(){this._getOptions().forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected",t.hasAttribute("selected")?"true":"false"),t.setAttribute("tabindex",i===0?"0":"-1")})}_getOptions(){let e=this.shadowRoot.querySelector("slot:not([name])");return e?e.assignedElements().filter(t=>!t.hidden):[]}toggle(){this.hasAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];e&&e.setAttribute("aria-expanded","true"),document.addEventListener("click",this._onDocClick,!0),requestAnimationFrame(()=>{let t=this._getOptions();t.length&&t[0].focus()})}close(){this.removeAttribute("open");let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];e&&(e.setAttribute("aria-expanded","false"),e.focus()),document.removeEventListener("click",this._onDocClick,!0),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_onDocClick(e){this.contains(e.target)||this.close()}_onKey(e){if(!this.hasAttribute("open"))return;if(e.key==="Escape"){this.close();return}let t=this._getOptions();t.length&&(b(this,t,e),e.key==="Enter"&&t.includes(e.target)&&(this._selectOption(e.target),this.close()))}_selectOption(e){this._getOptions().forEach(i=>i.setAttribute("aria-selected",i===e?"true":"false"));let t=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];t&&"value"in t&&(t.value=e.textContent?.trim()||""),this.dispatchEvent(new CustomEvent("velin-select",{bubbles:!0,detail:{option:e}}))}attributeChangedCallback(e){if(e==="open"&&this._wireTrigger(),e==="aria-label"){let t=this.shadowRoot?.querySelector(".listbox");t&&t.setAttribute("aria-label",a(this.getAttribute("aria-label")||"Options"))}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-combobox",se);var Vt=se;var Xt=`
910
+ `,this.shadowRoot.querySelector('slot[name="trigger"]').addEventListener("slotchange",()=>this._wireTrigger()),this.shadowRoot.querySelector("slot:not([name])")?.addEventListener("slotchange",()=>this._wireOptions()),this._wireTrigger(),this._wireOptions(),this.addEventListener("keydown",this._onKey)}_wireTrigger(){let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];if(!e)return;e.setAttribute("role","combobox"),e.setAttribute("aria-expanded",this.hasAttribute("open")?"true":"false"),e.setAttribute("aria-controls",this._listId),e.setAttribute("aria-autocomplete","list"),e.id||(e.id=`velin-combobox-trigger-${Math.random().toString(36).slice(2,9)}`);let t=this.shadowRoot.querySelector(".listbox");t&&t.setAttribute("aria-labelledby",e.id),e.dataset.velinComboWired||(e.dataset.velinComboWired="1",e.addEventListener("click",()=>this.toggle()),e.addEventListener("keydown",r=>{(r.key==="ArrowDown"||r.key==="Enter")&&(r.preventDefault(),this.open())}))}_wireOptions(){this._getOptions().forEach((t,r)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected",t.hasAttribute("selected")?"true":"false"),t.setAttribute("tabindex",r===0?"0":"-1")})}_getOptions(){let e=this.shadowRoot.querySelector("slot:not([name])");return e?e.assignedElements().filter(t=>!t.hidden):[]}toggle(){this.hasAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];e&&e.setAttribute("aria-expanded","true"),document.addEventListener("click",this._onDocClick,!0),requestAnimationFrame(()=>{let t=this._getOptions();t.length&&t[0].focus()})}close(){this.removeAttribute("open");let e=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];e&&(e.setAttribute("aria-expanded","false"),e.focus()),document.removeEventListener("click",this._onDocClick,!0),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_onDocClick(e){this.contains(e.target)||this.close()}_onKey(e){if(!this.hasAttribute("open"))return;if(e.key==="Escape"){this.close();return}let t=this._getOptions();t.length&&(Y(this,t,e),e.key==="Enter"&&t.includes(e.target)&&(this._selectOption(e.target),this.close()))}_selectOption(e){this._getOptions().forEach(r=>r.setAttribute("aria-selected",r===e?"true":"false"));let t=this.shadowRoot.querySelector('slot[name="trigger"]')?.assignedElements()[0];t&&"value"in t&&(t.value=e.textContent?.trim()||""),this.dispatchEvent(new CustomEvent("velin-select",{bubbles:!0,detail:{option:e}}))}attributeChangedCallback(e){if(e==="open"&&this._wireTrigger(),e==="aria-label"){let t=this.shadowRoot?.querySelector(".listbox");t&&t.setAttribute("aria-label",p(this.getAttribute("aria-label")||"Options"))}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-combobox",ai);ms=ai});var bs={};v(bs,{default:()=>vs});var Xc,li,vs,zr=u(()=>{k();Xc=`
893
911
  :host { display: block; }
894
912
  nav {
895
913
  display: flex;
@@ -919,10 +937,10 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
919
937
  color: var(--velin-color-primary, #2563eb);
920
938
  font-weight: var(--velin-weight-semibold, 600);
921
939
  }
922
- `,re=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onSlot=this._onSlot.bind(this)}connectedCallback(){let e=a(this.getAttribute("aria-label")||"Bottom navigation");this.shadowRoot.innerHTML=`
923
- <style>${Xt}</style>
940
+ `,li=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onSlot=this._onSlot.bind(this)}connectedCallback(){let e=p(this.getAttribute("aria-label")||"Bottom navigation");this.shadowRoot.innerHTML=`
941
+ <style>${Xc}</style>
924
942
  <nav role="navigation" aria-label="${e}"><slot></slot></nav>
925
- `,this.shadowRoot.querySelector("slot").addEventListener("slotchange",this._onSlot),this._onSlot()}_onSlot(){this._syncCurrent()}_syncCurrent(){let e=this.shadowRoot?.querySelector("slot");if(!e)return;let t=this.getAttribute("current");e.assignedElements().forEach(i=>{i.hasAttribute("current")||t&&(i.dataset.nav===t||i.getAttribute("data-nav")===t)?(i.setAttribute("current",""),i.setAttribute("aria-current","page")):(i.removeAttribute("current"),i.removeAttribute("aria-current"))})}static get observedAttributes(){return["aria-label","current"]}attributeChangedCallback(e){if(e==="aria-label"){let t=this.shadowRoot?.querySelector("nav");t&&t.setAttribute("aria-label",a(this.getAttribute("aria-label")||"Bottom navigation"))}e==="current"&&this._syncCurrent()}};customElements.define("velin-bottom-nav",re);var Ut=re;var x=`
943
+ `,this.shadowRoot.querySelector("slot").addEventListener("slotchange",this._onSlot),this._onSlot()}_onSlot(){this._syncCurrent(),this._syncSlotLabels()}_syncSlotLabels(){let e=this.shadowRoot?.querySelector("slot");e&&e.assignedElements().forEach(t=>{if(!t.textContent?.replace(/\s+/g," ").trim()&&!t.getAttribute("aria-label")){let n=t.getAttribute("data-nav")||t.getAttribute("title")||t.getAttribute("aria-labelledby");n&&t.setAttribute("aria-label",n)}t.tagName==="A"&&!t.getAttribute("href")&&t.setAttribute("role","button")})}_syncCurrent(){let e=this.shadowRoot?.querySelector("slot");if(!e)return;let t=this.getAttribute("current");e.assignedElements().forEach(r=>{r.hasAttribute("current")||t&&(r.dataset.nav===t||r.getAttribute("data-nav")===t)?(r.setAttribute("current",""),r.setAttribute("aria-current","page")):(r.removeAttribute("current"),r.removeAttribute("aria-current"))})}static get observedAttributes(){return["aria-label","current"]}attributeChangedCallback(e){if(e==="aria-label"){let t=this.shadowRoot?.querySelector("nav");t&&t.setAttribute("aria-label",p(this.getAttribute("aria-label")||"Bottom navigation"))}e==="current"&&this._syncCurrent()}};customElements.define("velin-bottom-nav",li);vs=li});var le,Ke=u(()=>{le=`
926
944
  :host { display: block; }
927
945
  button, [role="button"] {
928
946
  min-inline-size: 2.75rem;
@@ -938,8 +956,8 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
938
956
  border: 1px solid ButtonText;
939
957
  }
940
958
  }
941
- `;var Wt=`
942
- ${x}
959
+ `});var ys={};v(ys,{default:()=>gs});var Zc,ci,gs,Fr=u(()=>{j();k();Ke();Zc=`
960
+ ${le}
943
961
  :host { display: contents; }
944
962
  .overlay {
945
963
  position: fixed; inset: 0; z-index: var(--velin-z-overlay, 400);
@@ -969,8 +987,8 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
969
987
  .title { font-size: var(--velin-text-lg, 1.25rem); font-weight: 600; margin: 0; }
970
988
  .body { flex: 1; overflow-y: auto; padding: var(--velin-space-5, 1.25rem); }
971
989
  @media (prefers-reduced-motion: reduce) { .overlay, .sheet { transition: none; } }
972
- `,oe=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this)}connectedCallback(){let e=a(this.getAttribute("title")||this.getAttribute("label")||""),t="velin-sheet-title";this.shadowRoot.innerHTML=`
973
- <style>${Wt}</style>
990
+ `,ci=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this)}connectedCallback(){let e=p(this.getAttribute("title")||this.getAttribute("label")||""),t="velin-sheet-title";this.shadowRoot.innerHTML=`
991
+ <style>${Zc}</style>
974
992
  <div class="overlay" part="overlay"></div>
975
993
  <div class="sheet" role="dialog" aria-modal="true" aria-labelledby="${t}" part="sheet">
976
994
  <div class="header" part="header">
@@ -979,8 +997,8 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
979
997
  </div>
980
998
  <div class="body" part="body"><slot></slot></div>
981
999
  </div>
982
- `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close()),this.hasAttribute("open")&&this._open()}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._prev=g(),A(this),document.addEventListener("keydown",this._onKey),document.body.style.overflow="hidden",requestAnimationFrame(()=>{let e=_(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow="",E(),y(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}v(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow=""}};customElements.define("velin-sheet",oe);var Gt=oe;var Zt=`
983
- ${x}
1000
+ `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close()),this.hasAttribute("open")&&this._open()}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._prev=Z(),Q(this),document.addEventListener("keydown",this._onKey),document.body.style.overflow="hidden",requestAnimationFrame(()=>{let e=ae(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow="",ee(),J(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}G(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),document.body.style.overflow=""}};customElements.define("velin-sheet",ci);gs=ci});var xs={};v(xs,{default:()=>_s});var Jc,di,_s,Pr=u(()=>{j();k();Ke();Jc=`
1001
+ ${le}
984
1002
  :host { display: block; }
985
1003
  .group {
986
1004
  display: inline-flex;
@@ -1006,11 +1024,11 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
1006
1024
  font-weight: var(--velin-weight-semibold, 600);
1007
1025
  box-shadow: var(--velin-shadow-sm, 0 1px 2px rgba(0,0,0,0.06));
1008
1026
  }
1009
- `,ne=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onClick=this._onClick.bind(this),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=a(this.getAttribute("aria-label")||"Segmented control");this.shadowRoot.innerHTML=`
1010
- <style>${Zt}</style>
1027
+ `,di=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onClick=this._onClick.bind(this),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=p(this.getAttribute("aria-label")||"Segmented control");this.shadowRoot.innerHTML=`
1028
+ <style>${Jc}</style>
1011
1029
  <div class="group" role="group" aria-label="${e}"><slot></slot></div>
1012
- `,this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKey),this.shadowRoot.querySelector("slot")?.addEventListener("slotchange",()=>this._init()),this._init()}_getButtons(){let e=this.shadowRoot.querySelector("slot");return e?e.assignedElements().filter(t=>t.tagName==="BUTTON"):[]}_init(){let e=this._getButtons(),t=e.find(i=>i.hasAttribute("selected"))||e[0];e.forEach((i,s)=>{i.setAttribute("aria-pressed",i===t?"true":"false"),i.setAttribute("tabindex",i===t?"0":"-1")})}_onClick(e){let t=e.target.closest("button");!t||!this.contains(t)||this._select(t)}_select(e){this._getButtons().forEach(t=>{t.setAttribute("aria-pressed",t===e?"true":"false"),t.setAttribute("tabindex",t===e?"0":"-1")}),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:e.value||e.textContent?.trim()}}))}_onKey(e){let t=this._getButtons();if(t.includes(e.target)&&(b(this,t,e),["ArrowLeft","ArrowRight","Home","End"].includes(e.key))){let i=t.find(s=>s.getAttribute("tabindex")==="0");i&&this._select(i)}}static get observedAttributes(){return["aria-label"]}attributeChangedCallback(e){if(e==="aria-label"){let t=this.shadowRoot?.querySelector(".group");t&&t.setAttribute("aria-label",a(this.getAttribute("aria-label")||"Segmented control"))}}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-segmented-control",ne);var Jt=ne;var Qt=`
1013
- ${x}
1030
+ `,this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKey),this.shadowRoot.querySelector("slot")?.addEventListener("slotchange",()=>this._init()),this._init()}_getButtons(){let e=this.shadowRoot.querySelector("slot");return e?e.assignedElements().filter(t=>t.tagName==="BUTTON"):[]}_init(){let e=this._getButtons(),t=e.find(r=>r.hasAttribute("selected"))||e[0];e.forEach((r,n)=>{r.setAttribute("aria-pressed",r===t?"true":"false"),r.setAttribute("tabindex",r===t?"0":"-1")})}_onClick(e){let t=e.target.closest("button");!t||!this.contains(t)||this._select(t)}_select(e){this._getButtons().forEach(t=>{t.setAttribute("aria-pressed",t===e?"true":"false"),t.setAttribute("tabindex",t===e?"0":"-1")}),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:e.value||e.textContent?.trim()}}))}_onKey(e){let t=this._getButtons();if(t.includes(e.target)&&(Y(this,t,e),["ArrowLeft","ArrowRight","Home","End"].includes(e.key))){let r=t.find(n=>n.getAttribute("tabindex")==="0");r&&this._select(r)}}static get observedAttributes(){return["aria-label"]}attributeChangedCallback(e){if(e==="aria-label"){let t=this.shadowRoot?.querySelector(".group");t&&t.setAttribute("aria-label",p(this.getAttribute("aria-label")||"Segmented control"))}}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-segmented-control",di);_s=di});var Es={};v(Es,{default:()=>ws});var Qc,As,ui,ws,qr=u(()=>{j();k();Ke();Qc=`
1031
+ ${le}
1014
1032
  :host { display: inline-block; }
1015
1033
  .stars { display: inline-flex; gap: var(--velin-space-1, 0.25rem); }
1016
1034
  button {
@@ -1019,8 +1037,8 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
1019
1037
  color: var(--velin-color-border, #ccc);
1020
1038
  }
1021
1039
  button[aria-checked="true"] { color: var(--velin-color-warning, #f59e0b); }
1022
- `,Se=5,ae=class extends HTMLElement{static get observedAttributes(){return["value"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onClick=this._onClick.bind(this),this._onKey=this._onKey.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Qt}</style><div class="stars" role="radiogroup"></div>`,this._render(),this.shadowRoot.querySelector(".stars").addEventListener("click",this._onClick),this.shadowRoot.querySelector(".stars").addEventListener("keydown",this._onKey)}_value(){let e=parseInt(this.getAttribute("value")||"0",10);return Math.min(Se,Math.max(0,Number.isNaN(e)?0:e))}_render(){let e=this.shadowRoot.querySelector(".stars"),t=this._value(),i=a(this.getAttribute("aria-label")||"Rating");e.setAttribute("aria-label",i),e.innerHTML="";for(let s=1;s<=Se;s++){let o=document.createElement("button");o.type="button",o.setAttribute("role","radio"),o.setAttribute("aria-checked",s<=t?"true":"false"),o.setAttribute("aria-label",a(`${s} star${s>1?"s":""}`)),o.setAttribute("tabindex",s===(t||1)?"0":"-1"),o.dataset.value=String(s),o.textContent=s<=t?"\u2605":"\u2606",e.appendChild(o)}}_getButtons(){return[...this.shadowRoot.querySelectorAll('button[role="radio"]')]}_onClick(e){let t=e.target.closest("button");t&&this._setValue(parseInt(t.dataset.value,10))}_onKey(e){let t=this._getButtons();if(t.includes(e.target)&&(b(this,t,e),["ArrowLeft","ArrowRight","Home","End"].includes(e.key))){let i=t.find(s=>s.getAttribute("tabindex")==="0");i&&this._setValue(parseInt(i.dataset.value,10))}}_setValue(e){this.setAttribute("value",String(e)),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:e}}))}attributeChangedCallback(e){e==="value"&&this.shadowRoot?.querySelector(".stars")&&this._render()}};customElements.define("velin-rating",ae);var ei=ae;var ti=`
1023
- ${x}
1040
+ `,As=5,ui=class extends HTMLElement{static get observedAttributes(){return["value"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onClick=this._onClick.bind(this),this._onKey=this._onKey.bind(this)}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Qc}</style><div class="stars" role="radiogroup"></div>`,this._render(),this.shadowRoot.querySelector(".stars").addEventListener("click",this._onClick),this.shadowRoot.querySelector(".stars").addEventListener("keydown",this._onKey)}_value(){let e=parseInt(this.getAttribute("value")||"0",10);return Math.min(As,Math.max(0,Number.isNaN(e)?0:e))}_render(){let e=this.shadowRoot.querySelector(".stars"),t=this._value(),r=p(this.getAttribute("aria-label")||"Rating");e.setAttribute("aria-label",r),e.innerHTML="";for(let n=1;n<=As;n++){let o=document.createElement("button");o.type="button",o.setAttribute("role","radio"),o.setAttribute("aria-checked",n<=t?"true":"false"),o.setAttribute("aria-label",p(`${n} star${n>1?"s":""}`)),o.setAttribute("tabindex",n===(t||1)?"0":"-1"),o.dataset.value=String(n),o.textContent=n<=t?"\u2605":"\u2606",e.appendChild(o)}}_getButtons(){return[...this.shadowRoot.querySelectorAll('button[role="radio"]')]}_onClick(e){let t=e.target.closest("button");t&&this._setValue(parseInt(t.dataset.value,10))}_onKey(e){let t=this._getButtons();if(t.includes(e.target)&&(Y(this,t,e),["ArrowLeft","ArrowRight","Home","End"].includes(e.key))){let r=t.find(n=>n.getAttribute("tabindex")==="0");r&&this._setValue(parseInt(r.dataset.value,10))}}_setValue(e){this.setAttribute("value",String(e)),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:e}}))}attributeChangedCallback(e){e==="value"&&this.shadowRoot?.querySelector(".stars")&&this._render()}};customElements.define("velin-rating",ui);ws=ui});var Ss={};v(Ss,{default:()=>ks});var ed,hi,ks,Ur=u(()=>{j();k();Ke();ed=`
1041
+ ${le}
1024
1042
  :host { display: block; }
1025
1043
  .menubar {
1026
1044
  display: flex;
@@ -1044,11 +1062,11 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
1044
1062
  ::slotted([role="menuitem"]:hover) {
1045
1063
  background: var(--velin-color-surface-dim, #eee);
1046
1064
  }
1047
- `,le=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=a(this.getAttribute("aria-label")||"Menu bar");this.shadowRoot.innerHTML=`
1048
- <style>${ti}</style>
1065
+ `,hi=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=p(this.getAttribute("aria-label")||"Menu bar");this.shadowRoot.innerHTML=`
1066
+ <style>${ed}</style>
1049
1067
  <div class="menubar" role="menubar" aria-label="${e}"><slot></slot></div>
1050
- `,this.addEventListener("keydown",this._onKey),this.shadowRoot.querySelector("slot")?.addEventListener("slotchange",()=>this._init()),this._init()}_getItems(){let e=this.shadowRoot.querySelector("slot");return e?e.assignedElements().filter(t=>!t.hasAttribute("disabled")):[]}_init(){this._getItems().forEach((t,i)=>{t.hasAttribute("role")||t.setAttribute("role","menuitem"),t.setAttribute("tabindex",i===0?"0":"-1")})}_onKey(e){let t=this._getItems();t.includes(e.target)&&b(this,t,e)}static get observedAttributes(){return["aria-label"]}attributeChangedCallback(e){if(e==="aria-label"){let t=this.shadowRoot?.querySelector(".menubar");t&&t.setAttribute("aria-label",a(this.getAttribute("aria-label")||"Menu bar"))}}disconnectedCallback(){this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-menubar",le);var ii=le;var si=`
1051
- ${x}
1068
+ `,this.addEventListener("keydown",this._onKey),this.shadowRoot.querySelector("slot")?.addEventListener("slotchange",()=>this._init()),this._init()}_getItems(){let e=this.shadowRoot.querySelector("slot");return e?e.assignedElements().filter(t=>!t.hasAttribute("disabled")):[]}_init(){this._getItems().forEach((t,r)=>{t.hasAttribute("role")||t.setAttribute("role","menuitem"),t.setAttribute("tabindex",r===0?"0":"-1")})}_onKey(e){let t=this._getItems();t.includes(e.target)&&Y(this,t,e)}static get observedAttributes(){return["aria-label"]}attributeChangedCallback(e){if(e==="aria-label"){let t=this.shadowRoot?.querySelector(".menubar");t&&t.setAttribute("aria-label",p(this.getAttribute("aria-label")||"Menu bar"))}}disconnectedCallback(){this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-menubar",hi);ks=hi});var Ls={};v(Ls,{default:()=>Ts});var td,pi,Ts,Br=u(()=>{j();k();Ke();td=`
1069
+ ${le}
1052
1070
  :host { display: contents; }
1053
1071
  .overlay {
1054
1072
  position: fixed; inset: 0; z-index: var(--velin-z-modal, 500);
@@ -1086,17 +1104,45 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
1086
1104
  ::slotted(button:focus-visible) {
1087
1105
  background: var(--velin-color-surface-dim, #eee);
1088
1106
  }
1089
- `,ce=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this),this._onInput=this._onInput.bind(this)}connectedCallback(){let e=a(this.getAttribute("placeholder")||"Search commands\u2026");this.shadowRoot.innerHTML=`
1090
- <style>${si}</style>
1107
+ `,pi=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this),this._onInput=this._onInput.bind(this)}connectedCallback(){let e=p(this.getAttribute("placeholder")||"Search commands\u2026");this.shadowRoot.innerHTML=`
1108
+ <style>${td}</style>
1091
1109
  <div class="overlay" part="overlay">
1092
1110
  <div class="panel" role="dialog" aria-modal="true" aria-label="Command palette" part="panel">
1093
1111
  <input class="search" type="search" autocomplete="off" placeholder="${e}" aria-label="Search" part="search" />
1094
1112
  <div class="results" part="results"><slot></slot></div>
1095
1113
  </div>
1096
1114
  </div>
1097
- `,this.shadowRoot.querySelector(".search").addEventListener("input",this._onInput),this.shadowRoot.querySelector("slot")?.addEventListener("slotchange",()=>this._filter("")),this._filter("")}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._prev=g(),A(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{this.shadowRoot.querySelector(".search")?.focus(),this._filter("")})}_close(){document.removeEventListener("keydown",this._onKey),E(),y(this._prev);let e=this.shadowRoot.querySelector(".search");e&&(e.value=""),this._filter("")}_onInput(e){this._filter(e.target.value)}_filter(e){let t=e.trim().toLowerCase();this.shadowRoot.querySelector("slot")?.assignedElements().forEach(s=>{let o=s.textContent?.trim().toLowerCase()||"",n=!t||o.includes(t);s.hidden=!n})}_onKey(e){if(e.key==="Escape"){this.close();return}v(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey)}};customElements.define("velin-command",ce);var ri=ce;var oi=`
1115
+ `,this.shadowRoot.querySelector(".search").addEventListener("input",this._onInput),this.shadowRoot.querySelector("slot")?.addEventListener("slotchange",()=>this._filter("")),this._filter("")}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_open(){this._prev=Z(),Q(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{this.shadowRoot.querySelector(".search")?.focus(),this._filter("")})}_close(){document.removeEventListener("keydown",this._onKey),ee(),J(this._prev);let e=this.shadowRoot.querySelector(".search");e&&(e.value=""),this._filter("")}_onInput(e){this._filter(e.target.value)}_filter(e){let t=e.trim().toLowerCase();this.shadowRoot.querySelector("slot")?.assignedElements().forEach(n=>{let o=n.textContent?.trim().toLowerCase()||"",a=!t||o.includes(t);n.hidden=!a})}_visibleItems(){return this.shadowRoot.querySelector("slot")?.assignedElements().filter(t=>t.tagName==="BUTTON"&&!t.hidden)||[]}_onKey(e){if(e.key==="Escape"){this.close();return}let t=this._visibleItems();if(t.length&&(e.key==="ArrowDown"||e.key==="ArrowUp")){e.preventDefault();let r=t.indexOf(document.activeElement);(e.key==="ArrowDown"?t[(r+1)%t.length]:t[(r<=0?t.length:r)-1])?.focus();return}G(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey)}};customElements.define("velin-command",pi);Ts=pi});var Rs={};v(Rs,{default:()=>Cs});var id,mi,Cs,jr=u(()=>{id=`
1098
1116
  :host { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
1099
- `,de=class extends HTMLElement{connectedCallback(){this.shadowRoot||this.attachShadow({mode:"open"});let e=this.getAttribute("polite")==="false"?"assertive":"polite";this.shadowRoot.innerHTML="<style>"+oi+'</style><div role="status" aria-live="'+e+'" aria-atomic="true" part="region"></div>',this._region=this.shadowRoot.querySelector('[role="status"]')}announce(e,{assertive:t=!1}={}){this._region||this.connectedCallback(),this._region.setAttribute("aria-live",t?"assertive":"polite"),this._region.textContent="",requestAnimationFrame(()=>{this._region.textContent=typeof e=="string"?e:""})}static announceGlobal(e,t){let i=document.querySelector("velin-announcer");i||(i=document.createElement("velin-announcer"),document.body.appendChild(i)),i.announce(e,t)}};customElements.define("velin-announcer",de);var ni=de;var L="http://www.w3.org/2000/svg";function ai(r){if(!r)return[];let e=String(r).trim();if(e.startsWith("["))try{let t=JSON.parse(e);return Array.isArray(t)?t.map(Number).filter(i=>Number.isFinite(i)):[]}catch{return[]}return e.split(/[\s,]+/).map(t=>Number.parseFloat(t)).filter(t=>Number.isFinite(t))}function li(r,e,t,i,s){let o=r.length;if(o===0)return[];if(o===1)return[[0,t/2],[e,t/2]];let n=Math.max(s-i,1e-6),c=e/(o-1);return r.map((l,d)=>{let u=d*c,f=t-(l-i)/n*t;return[u,f]})}function Le(r){return r.length?r.map(([e,t],i)=>`${i===0?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "):""}function ci(r,e){if(!r.length)return"";let t=Le(r),i=r[r.length-1][0],s=r[0][0];return`${t} L${i.toFixed(2)},${e} L${s.toFixed(2)},${e} Z`}var ue=class extends HTMLElement{static get observedAttributes(){return["values","width","height","min","max","area","glow","animate","label"]}constructor(){super(),this._values=[],this._gradientId=`velin-spark-grad-${Math.random().toString(36).slice(2,8)}`}connectedCallback(){this._render()}attributeChangedCallback(){this.isConnected&&this._render()}get values(){return this._values.slice()}set values(e){Array.isArray(e)&&(this._values=e.filter(t=>Number.isFinite(Number(t))).map(Number),this.setAttribute("values",this._values.join(",")))}update(e){Array.isArray(e)&&(this._values=e.filter(t=>Number.isFinite(Number(t))).map(Number),this._render({tick:!0}))}_render({tick:e=!1}={}){let t=Number.parseFloat(this.getAttribute("width"))||320,i=Number.parseFloat(this.getAttribute("height"))||96,s=this._values.length?this._values:ai(this.getAttribute("values"));if(this._values=s,!s.length){this.innerHTML="";return}let o=Number.parseFloat(this.getAttribute("min")),n=Number.parseFloat(this.getAttribute("max")),c=Number.isFinite(o)?o:Math.min(...s),l=Number.isFinite(n)?n:Math.max(...s),d=this.hasAttribute("area")&&this.getAttribute("area")!=="false",u=this.hasAttribute("glow")&&this.getAttribute("glow")!=="false",f=(this.getAttribute("animate")||"draw").toLowerCase(),w=this.getAttribute("label"),k=li(s,t,i,c,l),h=Le(k),C=d?ci(k,i):"";this.innerHTML="";let p=document.createElementNS(L,"svg");if(p.setAttribute("viewBox",`0 0 ${t} ${i}`),p.setAttribute("preserveAspectRatio","none"),p.style.display="block",p.style.width="100%",p.style.height="100%",w?(p.setAttribute("role","img"),p.setAttribute("aria-label",w)):p.setAttribute("aria-hidden","true"),d){let R=document.createElementNS(L,"defs"),S=document.createElementNS(L,"linearGradient");S.setAttribute("id",this._gradientId),S.setAttribute("x1","0"),S.setAttribute("x2","0"),S.setAttribute("y1","0"),S.setAttribute("y2","1"),[["0%","currentColor","0.35"],["100%","currentColor","0"]].forEach(([Ne,Oe,Be])=>{let $=document.createElementNS(L,"stop");$.setAttribute("offset",Ne),$.setAttribute("stop-color",Oe),$.setAttribute("stop-opacity",Be),S.appendChild($)}),R.appendChild(S),p.appendChild(R);let T=document.createElementNS(L,"path");T.setAttribute("d",C),T.setAttribute("fill",`url(#${this._gradientId})`),T.setAttribute("stroke","none"),T.classList.add("velin-chart-area"),p.appendChild(T)}let m=document.createElementNS(L,"path");if(m.setAttribute("d",h),m.setAttribute("fill","none"),m.setAttribute("stroke","currentColor"),m.setAttribute("stroke-width","2"),m.setAttribute("stroke-linecap","round"),m.setAttribute("stroke-linejoin","round"),m.setAttribute("vector-effect","non-scaling-stroke"),p.appendChild(m),u&&p.classList.add("velin-chart-glow"),this.appendChild(p),f!=="none"){let R=typeof m.getTotalLength=="function"&&m.getTotalLength()||t;m.style.setProperty("--velin-chart-len",R.toFixed(2)),m.classList.add("velin-chart-line")}else m.style.strokeDasharray="",m.style.strokeDashoffset="";e&&(this.classList.remove("velin-spark-tick"),this.offsetWidth,this.classList.add("velin-spark-tick"))}};typeof customElements<"u"&&!customElements.get("velin-sparkline")&&customElements.define("velin-sparkline",ue);var di=ue;var ui=r=>r===1?1:1-Math.pow(2,-10*r);function hi(r){let e=(r.getAttribute("format")||"number").toLowerCase(),t=r.getAttribute("locale")||void 0,i=r.getAttribute("decimals"),s=i!=null?Math.max(0,Number.parseInt(i,10)||0):null,o={};s!=null&&(o.minimumFractionDigits=s,o.maximumFractionDigits=s),e==="currency"?(o.style="currency",o.currency=r.getAttribute("currency")||"EUR"):e==="percent"&&(o.style="percent");try{return new Intl.NumberFormat(t,o)}catch{return new Intl.NumberFormat(void 0,o)}}var he=class extends HTMLElement{static get observedAttributes(){return["from","to","duration","decimals","prefix","suffix","format","currency","locale"]}constructor(){super(),this._rafId=0,this._started=!1,this._observer=null}connectedCallback(){this._render(this._fromValue()),this.getAttribute("autostart")!=="false"&&this._scheduleStart()}disconnectedCallback(){cancelAnimationFrame(this._rafId),this._observer?.disconnect()}attributeChangedCallback(e){this.isConnected&&(e==="to"||e==="from"?this.start():this._render(this._lastValue??this._toValue()))}_fromValue(){return Number.parseFloat(this.getAttribute("from"))||0}_toValue(){return Number.parseFloat(this.getAttribute("to"))||0}_duration(){return Math.max(0,Number.parseFloat(this.getAttribute("duration"))||900)}_scheduleStart(){if(!this._started){if(typeof IntersectionObserver>"u"){this.start();return}this._observer=new IntersectionObserver(e=>{for(let t of e)if(t.isIntersecting){this.start(),this._observer.disconnect(),this._observer=null;break}},{threshold:.2}),this._observer.observe(this)}}start(){cancelAnimationFrame(this._rafId),this._started=!0;let e=this._fromValue(),t=this._toValue(),i=this._duration();if(typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||i===0){this._render(t);return}let o=performance.now(),n=c=>{let l=Math.min(1,(c-o)/i),d=e+(t-e)*ui(l);this._render(d),l<1&&(this._rafId=requestAnimationFrame(n))};this._rafId=requestAnimationFrame(n)}reset(){cancelAnimationFrame(this._rafId),this._started=!1,this._render(this._fromValue())}_render(e){this._lastValue=e;let t=hi(this),i=this.getAttribute("prefix")||"",s=this.getAttribute("suffix")||"";this.textContent=`${i}${t.format(e)}${s}`}};typeof customElements<"u"&&!customElements.get("velin-counter")&&customElements.define("velin-counter",he);var pi=he;var Ce={live:"var(--velin-color-success, oklch(60% 0.16 145))",paused:"var(--velin-color-text-muted, oklch(60% 0.02 240))",warning:"var(--velin-color-warning, oklch(75% 0.16 80))",error:"var(--velin-color-danger, oklch(60% 0.2 25))",muted:"var(--velin-color-border, oklch(85% 0.01 240))"},mi=`
1117
+ `,mi=class extends HTMLElement{connectedCallback(){this.shadowRoot||this.attachShadow({mode:"open"});let e=this.getAttribute("polite")==="false"?"assertive":"polite";this.shadowRoot.innerHTML="<style>"+id+'</style><div role="status" aria-live="'+e+'" aria-atomic="true" part="region"></div>',this._region=this.shadowRoot.querySelector('[role="status"]')}announce(e,{assertive:t=!1}={}){this._region||this.connectedCallback(),this._region.setAttribute("aria-live",t?"assertive":"polite"),this._region.textContent="",requestAnimationFrame(()=>{this._region.textContent=typeof e=="string"?e:""})}static announceGlobal(e,t){let r=document.querySelector("velin-announcer");r||(r=document.createElement("velin-announcer"),document.body.appendChild(r)),r.announce(e,t)}};customElements.define("velin-announcer",mi);Cs=mi});var Os={};v(Os,{default:()=>Is});function rd(i,e){if(!i)return"";if(e==="rot13")return i.replace(/[a-zA-Z]/g,t=>{let r=t<="Z"?65:97;return String.fromCharCode((t.charCodeAt(0)-r+13)%26+r)});try{return atob(i)}catch{return i}}var Ms,fi,Is,vi=u(()=>{k();Ms=`
1118
+ :host { display: inline; }
1119
+ button {
1120
+ font: inherit;
1121
+ color: var(--velin-color-primary, #4338ca);
1122
+ background: none;
1123
+ border: none;
1124
+ padding: 0;
1125
+ cursor: pointer;
1126
+ text-decoration: underline;
1127
+ text-underline-offset: 0.15em;
1128
+ min-height: 2.75rem;
1129
+ min-width: 2.75rem;
1130
+ }
1131
+ button:focus-visible {
1132
+ outline: 3px solid var(--velin-color-focus, #2563eb);
1133
+ outline-offset: 2px;
1134
+ border-radius: 2px;
1135
+ }
1136
+ .revealed { text-decoration: none; user-select: text; }
1137
+ `;fi=class extends HTMLElement{static get observedAttributes(){return["value","obfuscate","label"]}constructor(){super(),this.attachShadow({mode:"open"}),this._revealed=!1}connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}get email(){let e=this.getAttribute("obfuscate")||"",t=this.getAttribute("value")||"";return e?rd(t,e):t}render(){let e=this.getAttribute("label")||"Show email address",t=this.email,r=p(t);if(this._revealed){this.shadowRoot.innerHTML=`
1138
+ <style>${Ms}</style>
1139
+ <span class="revealed" part="email"><a href="mailto:${me(t)}">${r}</a></span>
1140
+ `;return}this.shadowRoot.innerHTML=`
1141
+ <style>${Ms}</style>
1142
+ <button type="button" part="reveal" aria-label="${me(e)}">${p(e)}</button>
1143
+ `,this.shadowRoot.querySelector("button").addEventListener("click",()=>{this._revealed=!0,this.render(),this.dispatchEvent(new CustomEvent("velin-email-reveal",{bubbles:!0,detail:{email:t}}))})}};customElements.get("velin-email")||customElements.define("velin-email",fi);Is=fi});function te(i,e){let t=[],r=0;for(;r<i.length;){let n=!1;for(let{type:o,re:a}of e){a.lastIndex=r;let c=a.exec(i);if(c&&c.index===r){t.push({type:o,value:c[0]}),r+=c[0].length,n=!0;break}}if(!n){let o=t[t.length-1];o?.type==="plain"?o.value+=i[r]:t.push({type:"plain",value:i[r]}),r+=1}}return t}function ye(i,e,t){let r=[...t,{type:"keyword",re:new RegExp(`\\b(${Object.keys(e).join("|")})\\b`,"y")},{type:"identifier",re:/\b[A-Za-z_$][\w$]*\b/y}];return te(i,r)}var ce=u(()=>{});var Kr={};v(Kr,{default:()=>We});function We(i){return ye(i,nd,od)}var nd,od,ct=u(()=>{ce();nd={const:1,let:1,var:1,function:1,return:1,if:1,else:1,for:1,while:1,do:1,switch:1,case:1,break:1,continue:1,new:1,class:1,extends:1,import:1,export:1,from:1,default:1,async:1,await:1,try:1,catch:1,finally:1,throw:1,typeof:1,instanceof:1,in:1,of:1,true:1,false:1,null:1,undefined:1,void:1,this:1},od=[{type:"comment",re:/\/\/[^\n]*/y},{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'(?:\\.|[^'\\])*'/y},{type:"string",re:/`(?:\\.|[^`\\])*`/y},{type:"number",re:/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/y},{type:"operator",re:/[+\-*/%=<>!&|^~?:]+/y},{type:"punctuation",re:/[{}[\]();,.]/y}]});var Wr={};v(Wr,{default:()=>Ds});function Ds(i){return We(i).map(e=>e.type==="identifier"&&sd.has(e.value)?{type:"keyword",value:e.value}:e)}var sd,Gr=u(()=>{ct();sd=new Set(["type","interface","enum","implements","declare","namespace","readonly","public","private","protected","abstract","as","satisfies","keyof"])});var bi={};v(bi,{default:()=>Ns});function Ns(i){return te(i,ad)}var ad,gi=u(()=>{ce();ad=[{type:"comment",re:/<!--[\s\S]*?-->/y},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'(?:\\.|[^'\\])*'/y},{type:"tag",re:/<\/?[\w-]+/y},{type:"punctuation",re:/[<>/=]/y},{type:"attr-name",re:/\s[\w-]+(?==)/y},{type:"attr-value",re:/=(?:"[^"]*"|'[^']*'|[^\s>]+)/y}]});var $s={};v($s,{default:()=>Hs});function Hs(i){return ye(i,ld,cd)}var ld,cd,zs=u(()=>{ce();ld={important:1,inherit:1,initial:1,unset:1,revert:1},cd=[{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'(?:\\.|[^'\\])*'/y},{type:"number",re:/#[\da-fA-F]{3,8}\b|\b\d+(?:\.\d+)?(?:%|[a-z]+)?\b/y},{type:"tag",re:/\.[\w-]+|#[\w-]+/y},{type:"attr-name",re:/[\w-]+(?=\s*:)/y},{type:"punctuation",re:/[{}:;,()]/y},{type:"operator",re:/[+\-*/>~]/y}]});var Ps={};v(Ps,{default:()=>Fs});function Fs(i){return te(i,dd)}var dd,qs=u(()=>{ce();dd=[{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"number",re:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/y},{type:"keyword",re:/\b(true|false|null)\b/y},{type:"punctuation",re:/[{}[\]:,]/y}]});var Yr={};v(Yr,{default:()=>Us});function Us(i){return te(i,ud)}var ud,Vr=u(()=>{ce();ud=[{type:"comment",re:/<!--[\s\S]*?-->/y},{type:"string",re:/```[\s\S]*?```/y},{type:"string",re:/`[^`\n]+`/y},{type:"keyword",re:/#{1,6}\s[^\n]+/y},{type:"tag",re:/\[[^\]]+\]\([^)]+\)/y},{type:"operator",re:/[*_~]/y}]});var yi={};v(yi,{default:()=>Bs});function Bs(i){return ye(i,hd,pd)}var hd,pd,_i=u(()=>{ce();hd={if:1,then:1,else:1,fi:1,for:1,do:1,done:1,while:1,case:1,esac:1,function:1,return:1,export:1,local:1},pd=[{type:"comment",re:/#[^\n]*/y},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'[^']*'/y},{type:"number",re:/\b\d+\b/y},{type:"operator",re:/[|&<>]/y},{type:"punctuation",re:/[();]/y}]});var Ks={};v(Ks,{default:()=>js});function js(i){return te(i,md)}var md,Ws=u(()=>{ce();md=[{type:"comment",re:/--[^\n]*/y},{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/'(?:''|[^'])*'/y},{type:"number",re:/\b\d+(?:\.\d+)?\b/y},{type:"keyword",re:/\b(?:SELECT|FROM|WHERE|INSERT|INTO|VALUES|UPDATE|SET|DELETE|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|CREATE|TABLE|INDEX)\b/yi},{type:"operator",re:/[=<>!]+|,/y},{type:"punctuation",re:/[();]/y}]});var dt={};v(dt,{default:()=>Gs});function Gs(i){return i?[{type:"plain",value:i}]:[]}var ut=u(()=>{});var Vs={};v(Vs,{default:()=>Ys});function Ys(i){return ye(i,fd,vd)}var fd,vd,Xs=u(()=>{ce();fd={function:1,return:1,if:1,else:1,elseif:1,foreach:1,while:1,class:1,new:1,public:1,private:1,protected:1,static:1,namespace:1,use:1,true:1,false:1,null:1},vd=[{type:"comment",re:/\/\/[^\n]*/y},{type:"comment",re:/#[^\n]*/y},{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'(?:\\.|[^'\\])*'/y},{type:"number",re:/\b\d+(?:\.\d+)?\b/y},{type:"operator",re:/=>|\+\+|--|===|!==|==|!=|<=|>=|->|\?\?|[=+\-*/%.<>!&|^~?:]/y},{type:"punctuation",re:/[{}[\]();,.]/y}]});var Js={};v(Js,{default:()=>Zs});function Zs(i){return te(i,bd)}var bd,Qs=u(()=>{ce();bd=[{type:"comment",re:/{{--[\s\S]*?--}}/y},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'(?:\\.|[^'\\])*'/y},{type:"keyword",re:/@(?:vite|csrf|auth|guest|section|endsection|yield|extends|include|push|endpush|stack|once|endonce|forelse|empty|endempty|can|endcan|cannot|endcannot)\b/y},{type:"operator",re:/{{|}}|{!!|!!}|@[{}]/y},{type:"punctuation",re:/[()[\],]/y}]});function fe(i){let e=(i||"").trim().toLowerCase();return e?e.startsWith("language-")?fe(e.slice(9)):{javascript:"js",jsx:"js",typescript:"ts",tsx:"ts",markup:"html",xml:"html",svg:"html",bash:"shell",sh:"shell",zsh:"shell",md:"markdown",plaintext:"text","plain-text":"text",yml:"text",yaml:"text",toml:"text",ini:"text",php8:"php"}[e]||e:""}function Ye(i,e){Ge.set(fe(i),e)}function ht(i){return Ge.get(fe(i))}async function _e(i){let e=fe(i);if(!e)return;if(Ge.has(e))return Ge.get(e);if(xi.has(e))return xi.get(e);let t=ea[e];if(!t)return;let r=t().then(n=>{let o=n.default;return Ge.set(e,o),xi.delete(e),o});return xi.set(e,r),r}function Ai(){return[...new Set([...Ge.keys(),...Object.keys(ea)])]}var Ge,xi,ea,wi=u(()=>{ct();Ge=new Map,xi=new Map,ea={js:()=>Promise.resolve().then(()=>(ct(),Kr)),javascript:()=>Promise.resolve().then(()=>(ct(),Kr)),ts:()=>Promise.resolve().then(()=>(Gr(),Wr)),typescript:()=>Promise.resolve().then(()=>(Gr(),Wr)),html:()=>Promise.resolve().then(()=>(gi(),bi)),xml:()=>Promise.resolve().then(()=>(gi(),bi)),css:()=>Promise.resolve().then(()=>(zs(),$s)),json:()=>Promise.resolve().then(()=>(qs(),Ps)),md:()=>Promise.resolve().then(()=>(Vr(),Yr)),markdown:()=>Promise.resolve().then(()=>(Vr(),Yr)),shell:()=>Promise.resolve().then(()=>(_i(),yi)),bash:()=>Promise.resolve().then(()=>(_i(),yi)),sh:()=>Promise.resolve().then(()=>(_i(),yi)),sql:()=>Promise.resolve().then(()=>(Ws(),Ks)),text:()=>Promise.resolve().then(()=>(ut(),dt)),plain:()=>Promise.resolve().then(()=>(ut(),dt)),txt:()=>Promise.resolve().then(()=>(ut(),dt)),markup:()=>Promise.resolve().then(()=>(gi(),bi)),console:()=>Promise.resolve().then(()=>(ut(),dt)),php:()=>Promise.resolve().then(()=>(Xs(),Vs)),blade:()=>Promise.resolve().then(()=>(Qs(),Js))};Ye("js",We)});function Xr(i){return i.replace(/[&<>"]/g,e=>gd[e]||e)}function Ei(i){return i.map(e=>{let t=e.type==="plain"?"":e.type;return`<span class="${t?`velin-token velin-token--${t}`:"velin-token"}">${Xr(e.value)}</span>`}).join("")}function ki(i,e){i.innerHTML=Ei(e),i.classList.add("velin-syntax-ready"),i.closest("pre")?.classList.add("velin-syntax-ready"),i.closest(".velin-code-block")?.classList.add("velin-syntax-ready")}var gd,Zr=u(()=>{gd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}});function Jr(i){let e=i.tagName==="PRE"?i:i.closest("pre"),t=i.tagName==="CODE"?i:e?.querySelector("code")||i,r=e||t,n=r.getAttribute("language")||r.getAttribute("data-language")||r.getAttribute("velin-code")||"";if(n&&n!=="true")return fe(n);let a=(t?.className||"").match(/\blanguage-([\w-]+)\b/i);return a?fe(a[1]):""}function Si(i){let t=(i.tagName==="CODE"?i:i.querySelector("code"))||i;if(t.dataset.velinSource!=null)return t.dataset.velinSource;let r=t.innerHTML;if(r&&/&lt;|&gt;|&amp;/.test(r)){let n=document.createElement("textarea");if(n.innerHTML=r.replace(/<br\s*\/?>/gi,`
1144
+ `),n.value)return n.value}return t.textContent||""}async function ie(i,e={}){if(i.dataset.velinHighlighted==="1")return;let t=i.tagName==="PRE"?i:i.closest("pre")||i,r=i.tagName==="CODE"?i:t.querySelector("code")||document.createElement("code");if(!t.querySelector("code")&&r!==i){let c=Si(t);r.textContent=c,t.textContent="",t.appendChild(r)}r.dataset.velinSource||(r.dataset.velinSource=r.textContent||"");let n=e.language||Jr(t);if(!n)return;t.classList.add("velin-syntax-pending"),r.classList.add("velin-syntax-pending");let o=e.lexer||ht(n);o||(o=await _e(n)),o||(o=ht("text")||await _e("text"));let a=r.dataset.velinSource||Si(r)||"";if(!o){r.textContent=a,t.classList.remove("velin-syntax-pending"),r.classList.remove("velin-syntax-pending"),t.classList.add("velin-syntax-ready"),r.classList.add("velin-syntax-ready");return}try{let c=o(a);ki(r,c),r.dataset.velinHighlighted="1",t.dataset.velinHighlighted="1"}catch(c){console.warn("[velin-highlight]",n,c),r.textContent=a}t.classList.remove("velin-syntax-pending"),r.classList.remove("velin-syntax-pending"),t.classList.add("velin-syntax-ready"),r.classList.add("velin-syntax-ready")}async function pt(i=document){let e=i.querySelectorAll('pre[velin-code], pre[data-language], pre code[class*="language-"], [velin-code-block] pre, .velin-doc-example__code pre');await Promise.all([...e].map(t=>ie(t)))}var Ti=u(()=>{wi();Zr()});function tn(i){Qr.add(i),en||(en=requestAnimationFrame(()=>{en=0;let e=[...Qr];Qr.clear(),e.forEach(t=>t())}))}function yd(i={}){return typeof IntersectionObserver>"u"?null:(Ce||(Ce=new IntersectionObserver(e=>{for(let t of e){if(!t.isIntersecting)continue;let r=rn.get(t.target);r&&tn(()=>r(t.target)),t.target.dataset.velinOnce!=="false"&&Ce.unobserve(t.target)}},{threshold:i.threshold??.1,rootMargin:i.rootMargin??"0px 0px -40px 0px"})),Ce)}function mt(i,e,t={}){let r=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,n=i.closest('[data-velin-motion="off"]')||i.dataset.velinMotion==="off";if(r||n)return tn(()=>e(i,!0)),()=>{};let o=yd(t);return o?(rn.set(i,e),o.observe(i),()=>{rn.delete(i),o.unobserve(i)}):(tn(()=>e(i,!0)),()=>{})}function ta(){Ce&&(Ce.disconnect(),Ce=null)}var Qr,en,Ce,rn,nn=u(()=>{Qr=new Set,en=0;Ce=null,rn=new WeakMap});function xe(i=document,e={}){if(typeof document>"u")return()=>{};let t=e.selector||["pre[velin-code]","pre[language]","pre[data-language]",'pre code[class*="language-"]',"velin-code-block pre",".velin-doc-example__code pre"].join(","),r=i.querySelectorAll(t),n=[],o=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;for(let a of r){let c=a.tagName==="PRE"?a:a.closest("pre");if(!c||c.dataset.velinObserve==="1")continue;if(c.dataset.velinObserve="1",o||e.immediate){ie(c);continue}c.classList.add("velin-syntax-pending");let d=mt(c,async m=>{await ie(m)});n.push(d)}return()=>n.forEach(a=>a())}var ft,on=u(()=>{Ti();nn();ft=xe});var sn={};v(sn,{applyHighlight:()=>ki,escapeHtml:()=>Xr,getLanguage:()=>ht,getSourceText:()=>Si,highlightAll:()=>pt,highlightElement:()=>ie,initHighlight:()=>xe,lazyLoadLanguage:()=>_e,listLanguages:()=>Ai,normalizeLanguage:()=>fe,observeCodeBlocks:()=>ft,registerLanguage:()=>Ye,renderTokens:()=>Ei,resolveLanguage:()=>Jr,velinSyntax:()=>ia});var ia,vt=u(()=>{wi();Zr();Ti();on();Ti();on();wi();ia={highlightElement:ie,highlightAll:pt,initHighlight:xe,observeCodeBlocks:ft,registerLanguage:Ye,lazyLoadLanguage:_e,listLanguages:Ai}});var na={};v(na,{default:()=>ra});function _d(i){let e=new Set;if(!i)return e;for(let t of i.split(",")){let r=t.trim();if(r)if(r.includes("-")){let[n,o]=r.split("-").map(a=>parseInt(a,10));if(!Number.isNaN(n)&&!Number.isNaN(o))for(let a=Math.min(n,o);a<=Math.max(n,o);a+=1)e.add(a)}else{let n=parseInt(r,10);Number.isNaN(n)||e.add(n)}}return e}var Li,ra,an=u(()=>{vt();Li=class extends HTMLElement{static get observedAttributes(){return["language","highlight","line-numbers","collapsed"]}connectedCallback(){this._built||(this._built=!0,this.classList.add("velin-code-block"),this._render(),this._setupHighlight())}attributeChangedCallback(){this._built&&(this._render(),this._setupHighlight())}_render(){let e=this.getAttribute("language")||"",t=this.hasAttribute("line-numbers"),r=this.hasAttribute("collapsed"),n=_d(this.getAttribute("highlight")||""),o=this.textContent.trim();this.textContent="";let a=document.createElement("div");a.className="velin-code-block__toolbar",a.innerHTML="";let c=document.createElement("velin-copy");c.setAttribute("value",o),c.setAttribute("label","Copy"),a.appendChild(c);let d=`velin-code-panel-${Math.random().toString(36).slice(2,9)}`,m=document.createElement("div");if(m.id=d,m.className=t?"velin-code-block__gutter":"",r){let g=document.createElement("button");g.type="button",g.className="velin-btn velin-btn--sm velin-btn--ghost",g.textContent="Expand",g.setAttribute("aria-expanded","false"),g.setAttribute("aria-controls",d),g.setAttribute("aria-label","Expand code block"),g.addEventListener("click",()=>{this.hasAttribute("data-collapsed")?(this.removeAttribute("data-collapsed"),g.textContent="Collapse",g.setAttribute("aria-expanded","true"),g.setAttribute("aria-label","Collapse code block")):(this.setAttribute("data-collapsed",""),g.textContent="Expand",g.setAttribute("aria-expanded","false"),g.setAttribute("aria-label","Expand code block"))}),this.setAttribute("data-collapsed",""),a.appendChild(g)}if(t){let g=document.createElement("div");g.className="velin-code-block__line-numbers";let w=o.split(`
1145
+ `).length;g.textContent="";for(let A=0;A<w;A+=1){let E=A+1,re=document.createElement("span");n.has(E)&&(re.className="velin-code-block__line--highlight"),re.textContent=String(E),g.appendChild(re)}m.appendChild(g)}let b=document.createElement("pre");e&&(b.setAttribute("language",e),b.dataset.language=e);let _=document.createElement("code");e&&(_.className=`language-${e}`),_.textContent=o,b.appendChild(_),m.appendChild(b),this.appendChild(a),this.appendChild(m),this._pre=b}async _setupHighlight(){if(!this._pre)return;delete this._pre.dataset.velinHighlighted,delete this._pre.dataset.velinObserve,typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches?await ie(this._pre):xe(this,{root:this})}};customElements.define("velin-code-block",Li);ra=Li});var sa={};v(sa,{default:()=>oa});function Ad(i){let e=(i.getAttribute("format")||"number").toLowerCase(),t=i.getAttribute("locale")||void 0,r=i.getAttribute("decimals"),n=r!=null?Math.max(0,Number.parseInt(r,10)||0):null,o={};n!=null&&(o.minimumFractionDigits=n,o.maximumFractionDigits=n),e==="currency"?(o.style="currency",o.currency=i.getAttribute("currency")||"EUR"):e==="percent"&&(o.style="percent");try{return new Intl.NumberFormat(t,o)}catch{return new Intl.NumberFormat(void 0,o)}}var xd,Ci,oa,Ri=u(()=>{xd=i=>i===1?1:1-Math.pow(2,-10*i);Ci=class extends HTMLElement{static get observedAttributes(){return["from","to","duration","decimals","prefix","suffix","format","currency","locale"]}constructor(){super(),this._rafId=0,this._started=!1,this._observer=null}connectedCallback(){this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-atomic","true"),this._render(this._fromValue()),this.getAttribute("autostart")!=="false"&&this._scheduleStart()}disconnectedCallback(){cancelAnimationFrame(this._rafId),this._observer?.disconnect()}attributeChangedCallback(e){this.isConnected&&(e==="to"||e==="from"?this.start():this._render(this._lastValue??this._toValue()))}_fromValue(){return Number.parseFloat(this.getAttribute("from"))||0}_toValue(){return Number.parseFloat(this.getAttribute("to"))||0}_duration(){return Math.max(0,Number.parseFloat(this.getAttribute("duration"))||900)}_scheduleStart(){if(!this._started){if(typeof IntersectionObserver>"u"){this.start();return}this._observer=new IntersectionObserver(e=>{for(let t of e)if(t.isIntersecting){this.start(),this._observer.disconnect(),this._observer=null;break}},{threshold:.2}),this._observer.observe(this)}}start(){cancelAnimationFrame(this._rafId),this._started=!0;let e=this._fromValue(),t=this._toValue(),r=this._duration();if(typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||r===0){this._render(t);return}let o=performance.now(),a=c=>{let d=Math.min(1,(c-o)/r),m=e+(t-e)*xd(d);this._render(m),d<1&&(this._rafId=requestAnimationFrame(a))};this._rafId=requestAnimationFrame(a)}reset(){cancelAnimationFrame(this._rafId),this._started=!1,this._render(this._fromValue())}_render(e){this._lastValue=e;let t=Ad(this),r=this.getAttribute("prefix")||"",n=this.getAttribute("suffix")||"";this.textContent=`${r}${t.format(e)}${n}`}};typeof customElements<"u"&&!customElements.get("velin-counter")&&customElements.define("velin-counter",Ci);oa=Ci});var ca={};v(ca,{default:()=>la});var aa,wd,Ed,Mi,la,Ii=u(()=>{Be();aa={live:"var(--velin-color-success, oklch(60% 0.16 145))",paused:"var(--velin-color-text-muted, oklch(60% 0.02 240))",warning:"var(--velin-color-warning, oklch(75% 0.16 80))",error:"var(--velin-color-danger, oklch(60% 0.2 25))",muted:"var(--velin-color-border, oklch(85% 0.01 240))"},wd=`
1100
1146
  :host {
1101
1147
  display: inline-flex;
1102
1148
  align-items: center;
@@ -1117,12 +1163,53 @@ var Pe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([
1117
1163
  @media (prefers-reduced-motion: reduce) {
1118
1164
  .dot { animation: none !important; }
1119
1165
  }
1120
- `,vi=`
1166
+ `,Ed=`
1121
1167
  @keyframes velin-live-pulse {
1122
1168
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--velin-live-color) 65%, transparent); }
1123
1169
  70% { box-shadow: 0 0 0 0.6rem color-mix(in oklch, var(--velin-live-color) 0%, transparent); }
1124
1170
  100% { box-shadow: 0 0 0 0 transparent; }
1125
- }`,pe=class extends HTMLElement{static get observedAttributes(){return["status","pulse"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this._render()}attributeChangedCallback(){this.shadowRoot&&this._render()}_render(){let e=this.getAttribute("status")||"live",t=Ce[e]||Ce.live;this.style.setProperty("--velin-live-color",t),this.shadowRoot.innerHTML=`
1126
- <style>${mi}${vi}</style>
1171
+ }`,Mi=class extends HTMLElement{static get observedAttributes(){return["status","pulse"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this._render()}attributeChangedCallback(){this.shadowRoot&&this._render()}_render(){let e=this.getAttribute("status")||"live",t=aa[e]||aa.live,r=this.getAttribute("aria-label")||Rr(e);this.setAttribute("role","status"),this.setAttribute("aria-label",r),this.style.setProperty("--velin-live-color",t),this.shadowRoot.innerHTML=`
1172
+ <style>${wd}${Ed}</style>
1127
1173
  <span class="dot" aria-hidden="true"></span><slot></slot>
1128
- `}};typeof customElements<"u"&&!customElements.get("velin-live-dot")&&customElements.define("velin-live-dot",pe);var bi=pe;var fi={selector:".velin-animate-on-scroll",threshold:.1,rootMargin:"0px 0px -40px 0px",once:!0,visibleClass:"is-visible"},ye=new WeakMap;function Te(r={}){if(typeof document>"u")return()=>{};let e={...fi,...r},t=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=Array.from(document.querySelectorAll(e.selector));if(t||typeof IntersectionObserver>"u")return i.forEach(o=>o.classList.add(e.visibleClass)),()=>{};let s=new IntersectionObserver(o=>{for(let n of o)n.isIntersecting&&(n.target.classList.add(e.visibleClass),e.once&&s.unobserve(n.target))},{threshold:e.threshold,rootMargin:e.rootMargin});return i.forEach(o=>{ye.has(o)||(ye.set(o,s),s.observe(o))}),()=>{s.disconnect(),i.forEach(o=>ye.delete(o))}}if(typeof document<"u"){let r=()=>{document.documentElement&&document.documentElement.hasAttribute("data-velin-reveal-auto")&&Te()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r,{once:!0}):r()}var Me=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null,ze={duration:250,easing:"var(--velin-ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1))",itemSelector:":scope > *"};function _e(r,e){return Array.from(r.querySelectorAll(e))}function He(r,e,t={}){if(!r||typeof e!="function")return;let i={...ze,...t},s=Me&&Me.matches,o=_e(r,i.itemSelector),n=new Map;if(o.forEach(l=>{l.hidden||n.set(l,l.getBoundingClientRect())}),e(),s)return;_e(r,i.itemSelector).forEach(l=>{if(l.hidden)return;let d=n.get(l),u=l.getBoundingClientRect();if(!d){if(typeof l.animate!="function")return;l.animate([{opacity:0,transform:"scale(0.96)"},{opacity:1,transform:"scale(1)"}],{duration:i.duration,easing:i.easing,fill:"both"});return}let f=d.left-u.left,w=d.top-u.top;f===0&&w===0||typeof l.animate=="function"&&l.animate([{transform:`translate(${f}px, ${w}px)`},{transform:"translate(0, 0)"}],{duration:i.duration,easing:i.easing,fill:"both"})})}function De(r,e,t={}){if(!r||typeof e!="function")return;let i={...ze,...t};He(r,()=>{_e(r,i.itemSelector).forEach(s=>{s.hidden=!e(s)})},i)}function Re(r){return r?String(r).toLowerCase().split(/[\s,|]+/).map(e=>e.trim()).filter(Boolean):[]}function gi(r,e,t){return e.length?t==="all"?e.every(i=>r.includes(i)):e.some(i=>r.includes(i)):!0}function yi(r,e){return e?((r.getAttribute("data-tags")||"")+" "+(r.getAttribute("data-search")||"")+" "+(r.textContent||"")).toLowerCase().includes(e.toLowerCase()):!0}var xe=class{constructor(e){this.container=e,this.tag="",this.search="",this.matchMode=e.getAttribute("data-velin-filter-mode")==="all"?"all":"any",this.itemSelector=e.getAttribute("data-velin-filter-item")||":scope > *"}apply(){let e=Re(this.tag),t=this.search;De(this.container,i=>{let s=Re(i.getAttribute("data-tags"));return gi(s,e,this.matchMode)&&yi(i,t)},{itemSelector:this.itemSelector})}},$e=new WeakMap;function qe(r){let e=$e.get(r);return e||(e=new xe(r),$e.set(r,e)),e}function Ie(r){let e=r.getAttribute("data-velin-filter-target");if(!e)return null;try{return document.querySelector(e)}catch{return null}}function _i(r,e){r&&r.querySelectorAll("[data-velin-filter-value]").forEach(t=>{t===e?t.setAttribute("data-velin-filter-active",""):t.removeAttribute("data-velin-filter-active")})}function Fe(){if(typeof document>"u")return;document.addEventListener("click",e=>{let t=e.target.closest("[data-velin-filter-value]");if(!t)return;let i=Ie(t);if(!i)return;let s=t.closest("[data-velin-filter-group]")||t.parentElement;_i(s,t);let o=qe(i);o.tag=t.getAttribute("data-velin-filter-value")||"",(o.tag.toLowerCase()==="all"||o.tag==="*")&&(o.tag=""),o.apply()});let r=e=>{let t=e.target.closest("[data-velin-filter-input]");if(!t)return;let i=Ie(t);if(!i)return;let s=qe(i),o=t.value||(typeof t.getAttribute=="function"?t.getAttribute("value"):"");s.search=(o||"").trim(),s.apply()};document.addEventListener("input",r),document.addEventListener("change",r)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Fe,{once:!0}):Fe());var we={tap:[10],"double-tap":[10,50,10],success:[50],error:[100,30,100],warning:[30,20,30],long:[200]};function Ke(r){if(typeof navigator>"u"||!navigator.vibrate||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;let t=typeof r=="string"?we[r]||we.tap:r;navigator.vibrate(t)}function me(r){let e=r.getAttribute("haptic")||"tap";r.addEventListener("click",()=>Ke(e))}var M=class{constructor(){this._observer=null}start(e=document.body){e.querySelectorAll("[haptic]").forEach(me),this._observer=new MutationObserver(i=>{for(let s of i)for(let o of s.addedNodes)o.nodeType===1&&(o.hasAttribute?.("haptic")&&me(o),o.querySelectorAll?.("[haptic]").forEach(me))}),this._observer.observe(e,{childList:!0,subtree:!0})}stop(){this._observer?.disconnect()}};if(typeof document<"u"){let r=()=>{new M().start(document.body)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r):r()}export{we as HapticPatterns,it as VelinAccordion,ni as VelinAnnouncer,Ut as VelinBottomNav,At as VelinCarousel,Ct as VelinCollapse,Vt as VelinCombobox,ri as VelinCommand,_t as VelinCopy,Nt as VelinCountdown,pi as VelinCounter,Dt as VelinDialog,dt as VelinDrawer,et as VelinDropdown,M as VelinHapticObserver,lt as VelinIcon,It as VelinLightbox,bi as VelinLiveDot,ii as VelinMenubar,Je as VelinModal,jt as VelinPersist,gt as VelinPopover,Bt as VelinProgressRing,ei as VelinRating,wt as VelinScrollTop,Tt as VelinScrollspy,Jt as VelinSegmentedControl,Gt as VelinSheet,di as VelinSparkline,zt as VelinStepperWC,rt as VelinTabs,vt as VelinThemeToggle,nt as VelinToast,$t as VelinTooltipWC,me as applyHaptic,E as clearBackgroundInert,Ge as createSafeHTML,a as escapeHTML,We as escapeHTMLAttribute,De as filterList,He as flipReorder,_ as getFocusableElements,Ae as getTrustedPolicy,Te as initReveal,y as restoreFocus,b as rovingTabindex,be as sanitizeURL,g as saveFocus,A as setBackgroundInert,ve as stripControlChars,v as trapFocus,Ke as vibrate};
1174
+ `}};typeof customElements<"u"&&!customElements.get("velin-live-dot")&&customElements.define("velin-live-dot",Mi);la=Mi});function Oi(i){if(!i||typeof i!="object")return null;let e=i,t=String(e.id||e.url||e.title||"").trim(),r=String(e.title||"").trim(),n=String(e.url||"").trim();if(!t||!r)return null;let o=Array.isArray(e.keywords)?e.keywords.map(d=>String(d)):typeof e.keywords=="string"?e.keywords.split(/\s+/).filter(Boolean):[],a=bt.includes(e.category)?e.category:"docs";!e.category&&typeof e.url=="string"&&(e.url.includes("/components/")?a="components":e.url.includes("/cli/")||e.url.includes("/api/")?a="api":(e.url.includes("samples/")||e.url.includes("examples/"))&&(a="examples"));let c=n?wo(n):`#${t}`;return{id:t,title:r,excerpt:String(e.excerpt||e.section||"").slice(0,200),url:c,category:a,keywords:o,weight:typeof e.weight=="number"?e.weight:1}}var bt,ln,cn=u(()=>{k();bt=["docs","components","api","examples"],ln={components:1.25,api:1.15,docs:1,examples:.9}});function kd(i,e,t){let r=i.title.toLowerCase(),n=(i.excerpt||"").toLowerCase(),o=(i.keywords||[]).join(" ").toLowerCase(),a=(ln[i.category]||1)*(i.weight||1),c=0;if(r===e)c=100;else if(r.startsWith(e))c=70;else if(r.includes(e))c=50;else if(o.includes(e))c=35;else if(n.includes(e))c=25;else if(t>0&&Di(r,e,t))c=40;else if(t>0&&Di(o,e,t))c=28;else if(t>0&&Di(n,e,t))c=18;else if(da(r,e))c=22;else if(t>0){for(let d of r.split(/[^a-z0-9]+/))if(d.length>=3&&Di(d,e,t)){c=32;break}}return c>0?c*a:0}function da(i,e){let t=0;for(let r=0;r<i.length&&t<e.length;r++)i[r]===e[t]&&t++;return t===e.length}function Di(i,e,t){if(!i||!e)return!1;if(i.includes(e)||da(i,e))return!0;let r=Math.max(1,Math.floor(e.length*t*2));return Sd(i.slice(0,Math.min(i.length,e.length+8)),e)<=r}function Sd(i,e){let t=i.length,r=e.length;if(t===0)return r;if(r===0)return t;let n=new Uint16Array((r+1)*(t+1));for(let o=0;o<=r;o++)n[o]=o;for(let o=1;o<=t;o++){n[o*(r+1)]=o;for(let a=1;a<=r;a++){let c=i[o-1]===e[a-1]?0:1;n[o*(r+1)+a]=Math.min(n[(o-1)*(r+1)+a]+1,n[o*(r+1)+(a-1)]+1,n[(o-1)*(r+1)+(a-1)]+c)}}return n[t*(r+1)+r]}var gt,ua=u(()=>{cn();gt=class{constructor(){this._entries=[]}setEntries(e){this._entries=e.map(t=>Oi(t)).filter(Boolean)}addEntries(e){let t=e.map(n=>Oi(n)).filter(Boolean),r=new Set(this._entries.map(n=>n.id));for(let n of t)r.has(n.id)||(this._entries.push(n),r.add(n.id))}query(e,t={}){let r=String(e||"").trim().toLowerCase(),n=t.minChars??2,o=t.limit??12,a=t.fuzzy??.2,c=t.categories;if(r.length<n)return{results:[],groups:{}};let d=[];for(let _ of this._entries){if(c&&c.length&&!c.includes(_.category))continue;let g=kd(_,r,a);g>0&&d.push({entry:_,score:g})}d.sort((_,g)=>g.score-_.score);let m=d.slice(0,o).map(_=>({..._.entry,_score:_.score})),b={};for(let _ of m)b[_.category]||(b[_.category]=[]),b[_.category].push(_);return{results:m,groups:b}}}});function pa(i,e){if(!i||typeof e!="function")throw new Error("registerSearchProvider(id, fn) requires a non-empty id and function");ha.set(i,e)}async function dn(){let i=[];for(let e of ha.values()){let t=await e();Array.isArray(t)&&i.push(...t)}return i}var ha,un=u(()=>{ha=new Map});function Ni(i,e){let t=String(i||""),r=String(e||"").trim();if(!r||r.length<2)return yt(t);let n=t.toLowerCase(),o=r.toLowerCase(),a=n.indexOf(o),c=r.length;if(a===-1){if(a=Td(n,o),a===-1)return yt(t);c=Math.min(r.length,t.length-a)}return yt(t.slice(0,a))+'<mark class="velin-search-hit">'+yt(t.slice(a,a+c))+"</mark>"+yt(t.slice(a+c))}function yt(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Td(i,e){let t=0,r=-1;for(let n=0;n<i.length&&t<e.length;n++)i[n]===e[t]&&(t===0&&(r=n),t++);return t===e.length?r:-1}var ma=u(()=>{});function va(){if(typeof document>"u")return"https://example.invalid/docs/";let i=document.querySelector('script[src*="doc-search"]');if(i?.src){let r=new URL(i.src),n=r.pathname.indexOf(Ve);if(n!==-1)return r.origin+r.pathname.slice(0,n+Ve.length)}let e=window.location.pathname.replace(/\\/g,"/"),t=e.indexOf(Ve);return t>=0?new URL(e.slice(0,t+Ve.length),window.location.origin).href:new URL("./",window.location.href).href}function Ld(i){let e=i.indexOf("#");return e===-1?{path:i,hash:""}:{path:i.slice(0,e),hash:i.slice(e)}}function ba(i){let e=i.indexOf(Ve);if(e<0)return null;let t=i.slice(e+Ve.length),r=t.split("/").filter(Boolean);return r.length>=2&&fa.has(r[0])&&fa.has(r[1])&&r[0]!==r[1]?r.slice(1).join("/"):t}function Hi(i){if(!i||i==="#")return"";if(typeof window>"u")return i;let{path:e,hash:t}=Ld(i);if(!e)return t||"";let r=e;if(/^https?:\/\//i.test(e))try{r=ba(new URL(e).pathname)??e}catch{return""}try{let n=new URL(r||"",va());return n.href+(t&&!n.href.includes("#")?t:"")}catch{return""}}var Ve,fa,ga=u(()=>{Ve="/docs/",fa=new Set(["getting-started","extend","guides","utilities","components","forms","layout","content","customize","animations","about","helpers","generated","migration"])});var ya={};v(ya,{createSearchWorker:()=>Rd});function Rd(i){if(typeof Worker>"u")return null;let e=i||new URL("./worker.js",import.meta.url).href,t;try{t=new Worker(e,{type:"module"})}catch{return null}let r=new Map;t.onmessage=o=>{let{id:a,ok:c,result:d,error:m}=o.data||{},b=r.get(a);b&&(r.delete(a),c?b.resolve(d):b.reject(new Error(m||"Worker error")))},t.onerror=()=>{for(let o of r.values())o.reject(new Error("Worker failed"));r.clear()};function n(o,a){let c=++Cd;return new Promise((d,m)=>{r.set(c,{resolve:d,reject:m}),t.postMessage({id:c,type:o,payload:a})})}return{setEntries(o){return n("setEntries",{entries:o})},query(o,a){return n("query",{query:o,options:a})},terminate(){t.terminate()}}}var Cd,_a=u(()=>{Cd=0});function xa(i){return Array.isArray(i)?i:i&&Array.isArray(i.entries)?i.entries:[]}function pn(i={}){let e=new gt,t=i.worker===!0,r=null;async function n(){if(!t||r)return r;if(typeof Worker>"u")return null;let{createSearchWorker:o}=await Promise.resolve().then(()=>(_a(),ya));return r=o(i.workerUrl),r}return{engine:e,async loadIndex(o){let a=[];if(typeof o=="string"){let d=await fetch(o);a=xa(await d.json())}else Array.isArray(o)&&(a=o);e.setEntries(a);let c=await n();return c&&await c.setEntries(e._entries),a.length},async query(o,a){let c=await n();return c?c.query(o,a):e.query(o,a)},addEntries(o){e.addEntries(o),n().then(a=>a?.setEntries(e._entries))}}}var Ae,hn,Md,mn=u(()=>{ua();un();ma();un();cn();ga();Ae=new gt,hn=!1;Md={engine:Ae,async loadIndex(i){let e=[];if(typeof i=="string"){let r=await fetch(i);if(!r.ok)throw new Error(`Failed to load search index: ${r.status}`);e=xa(await r.json())}else Array.isArray(i)&&(e=i);Ae.setEntries(e);let t=await dn();return t.length&&Ae.addEntries(t),hn=!0,e.length},addEntries(i){Ae.addEntries(i)},async refreshProviders(){let i=await dn();return i.length&&Ae.addEntries(i),i.length},async query(i,e={}){return!hn&&Ae._entries.length===0&&await this.refreshProviders(),Ae.query(i,e)},isReady(){return hn||Ae._entries.length>0}}});var fn={};v(fn,{bindDeclarativeSearch:()=>wa,default:()=>Aa});function wa(i=document){i.querySelectorAll("[velin-search-input]").forEach(e=>{if(e.dataset.velinSearchBound)return;e.dataset.velinSearchBound="1";let t=e.closest("velin-search");if(!t){t=document.createElement("velin-search"),t.setAttribute("index",e.getAttribute("data-search-index")||"/search-index.json");let r=e.parentElement?.querySelector("[velin-search-results]");e.before(t),t.appendChild(e),r&&t.appendChild(r)}})}var Id,$i,Aa,_t=u(()=>{mn();k();Id={docs:"Documentation",components:"Components",api:"API",examples:"Examples"},$i=class extends HTMLElement{static get observedAttributes(){return["index","categories","min-chars","fuzzy","placeholder","debounce"]}constructor(){super(),this._search=pn(),this._debounceTimer=null,this._activeIndex=-1,this._flatResults=[],this._indexLoaded=!1,this._listId=`velin-search-listbox-${Math.random().toString(36).slice(2,9)}`,this._mounted=!1}connectedCallback(){this._mounted||(this._mounted=!0,this._ensureMarkup(),this._loadIndex(),this._bindEvents())}disconnectedCallback(){this._teardown?.(),this._mounted=!1}get indexUrl(){return this.getAttribute("index")||"/search-index.json"}get minChars(){return parseInt(this.getAttribute("min-chars")||"2",10)}get fuzzy(){let e=this.getAttribute("fuzzy");return e===null?.2:parseFloat(e)||0}get categories(){let e=this.getAttribute("categories");return e?e.split(",").map(t=>t.trim()).filter(t=>bt.includes(t)):null}get debounceMs(){return parseInt(this.getAttribute("debounce")||"120",10)}_ensureMarkup(){if(this.querySelector("[data-velin-search-input]"))return;let e=me(this.getAttribute("placeholder")||"Search\u2026"),t=me(this.getAttribute("aria-label")||"Search");this.innerHTML=`
1175
+ <div class="velin-search">
1176
+ <div class="velin-search__field">
1177
+ <input type="search" class="velin-search__input" data-velin-search-input
1178
+ placeholder="${e}" autocomplete="off" role="combobox" aria-expanded="false"
1179
+ aria-label="${t}" aria-controls="${this._listId}" aria-autocomplete="list" />
1180
+ </div>
1181
+ <div class="velin-search__status velin-visually-hidden" data-velin-search-status aria-live="polite" aria-atomic="true"></div>
1182
+ <div class="velin-search__results" data-velin-search-results role="listbox"
1183
+ id="${this._listId}" hidden></div>
1184
+ </div>
1185
+ `}_inputEl(){return this.querySelector("[data-velin-search-input]")}_resultsEl(){return this.querySelector("[data-velin-search-results]")}async _loadIndex(){try{await this._search.loadIndex(this.indexUrl),this._indexLoaded=!0}catch{this._indexLoaded=!1}}_bindEvents(){let e=this._inputEl(),t=this._resultsEl();if(!e||!t)return;e.addEventListener("input",()=>{clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._runQuery(e.value),this.debounceMs)}),e.addEventListener("focus",()=>{e.value.trim().length>=this.minChars&&this._runQuery(e.value)}),e.addEventListener("keydown",n=>this._onKeydown(n,e,t));let r=n=>{this.contains(n.target)||this._hide(t,e)};document.addEventListener("click",r),this._teardown=()=>{document.removeEventListener("click",r),clearTimeout(this._debounceTimer)}}async _runQuery(e){let t=this._inputEl(),r=this._resultsEl();if(!t||!r)return;let n=e.trim();if(n.length<this.minChars){this._hide(r,t);return}this._indexLoaded||await this._loadIndex();let{groups:o}=this._search.query(n,{minChars:this.minChars,fuzzy:this.fuzzy,categories:this.categories||void 0,limit:12});this._activeIndex=-1,this._renderResults(r,t,n,o),this._flatResults.length?(r.hidden=!1,r.classList.add("velin-search__results--open"),t.setAttribute("aria-expanded","true")):this._hide(r,t)}_renderResults(e,t,r,n){e.innerHTML="";let o=this.categories||[...bt];this._flatResults=[];let a=0;for(let d of o){let m=n[d];if(!m?.length)continue;let b=`${this._listId}-group-${d}`,_=document.createElement("div");_.setAttribute("role","group"),_.setAttribute("aria-labelledby",b);let g=document.createElement("div");g.className="velin-search__group-label",g.id=b,g.textContent=Id[d]||d,_.appendChild(g);for(let F of m){let w=document.createElement("a"),A=Hi(F.url);A&&(w.href=A),w.className="velin-search__item",w.setAttribute("role","option"),w.id=`velin-search-opt-${a}`,w.innerHTML=`<span class="velin-search__title">${Ni(F.title,r)}</span><span class="velin-search__excerpt">${Ni(F.excerpt||"",r)}</span>`,w.addEventListener("click",E=>{E.preventDefault(),A&&window.location.assign(A)},!0),w.addEventListener("mouseenter",()=>this._setActive(a,e,t)),_.appendChild(w),this._flatResults.push(F),a++}e.appendChild(_)}let c=this._statusEl();c&&(c.textContent=this._flatResults.length?`${this._flatResults.length} results`:"No results")}_statusEl(){return this.querySelector("[data-velin-search-status]")}_setActive(e,t,r){this._activeIndex=e,t.querySelectorAll(".velin-search__item").forEach((n,o)=>{n.classList.toggle("velin-search__item--active",o===e),o===e&&(r.setAttribute("aria-activedescendant",n.id),n.scrollIntoView({block:"nearest"}))})}_onKeydown(e,t,r){if(e.key==="Escape"){this._hide(r,t);return}if(this._flatResults.length){if(e.key==="ArrowDown"){e.preventDefault();let n=this._activeIndex<this._flatResults.length-1?this._activeIndex+1:0;this._setActive(n,r,t)}else if(e.key==="ArrowUp"){e.preventDefault();let n=this._activeIndex>0?this._activeIndex-1:this._flatResults.length-1;this._setActive(n,r,t)}else if(e.key==="Enter"){let n=this._activeIndex>=0?this._flatResults[this._activeIndex]:this._flatResults[0],o=n?.url?Hi(n.url):"";o&&(e.preventDefault(),window.location.assign(o))}}}_hide(e,t){e.hidden=!0,e.classList.remove("velin-search__results--open"),t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),this._activeIndex=-1}},Aa=$i;typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("velin-search")&&customElements.define("velin-search",$i)});var Ea={};v(Ea,{default:()=>Nd});async function Dd(i,e){if(e!=="aes-gcm"||!globalThis.crypto?.subtle)return JSON.stringify({encoding:"base64",payload:btoa(unescape(encodeURIComponent(i)))});let t=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.generateKey({name:"AES-GCM",length:256},!1,["encrypt"]),n=new TextEncoder().encode(i),o=await crypto.subtle.encrypt({name:"AES-GCM",iv:t},r,n);return JSON.stringify({encoding:"aes-gcm",iv:Array.from(t),cipher:Array.from(new Uint8Array(o))})}var Od,zi,Nd,ka=u(()=>{k();Od=`
1186
+ :host { display: block; }
1187
+ label { display: block; font-size: var(--velin-text-sm); margin-block-end: var(--velin-space-1); }
1188
+ input {
1189
+ width: 100%;
1190
+ min-height: 2.75rem;
1191
+ padding: var(--velin-space-2) var(--velin-space-3);
1192
+ font: inherit;
1193
+ border: 1px solid var(--velin-color-border);
1194
+ border-radius: var(--velin-radius-md);
1195
+ }
1196
+ input:focus-visible {
1197
+ outline: 3px solid var(--velin-color-focus);
1198
+ outline-offset: 2px;
1199
+ }
1200
+ .velin-field-help {
1201
+ font-size: var(--velin-text-xs);
1202
+ color: var(--velin-color-text-muted);
1203
+ margin-block-start: var(--velin-space-1);
1204
+ }
1205
+ `;zi=class extends HTMLElement{static get observedAttributes(){return["type","name","label","mode","autocomplete"]}constructor(){super(),this.attachShadow({mode:"open"}),this._onChange=null}connectedCallback(){this._onChange||this.render()}disconnectedCallback(){let e=this.shadowRoot?.querySelector("input");e&&this._onChange&&e.removeEventListener("change",this._onChange),this._onChange=null}attributeChangedCallback(){this.isConnected&&this.render()}render(){let e=Eo(this.getAttribute("type")),t=this.getAttribute("name")||"secure",r=this.getAttribute("label")||"Secure field",n=me(this.getAttribute("autocomplete")||"off"),o=`velin-secure-${Math.random().toString(36).slice(2,9)}`,a=this.shadowRoot?.querySelector("input");a&&this._onChange&&a.removeEventListener("change",this._onChange),this.shadowRoot.innerHTML=`
1206
+ <style>${Od}</style>
1207
+ <label for="${o}">${p(r)}</label>
1208
+ <input id="${o}" type="${e}" autocomplete="${n}" part="input" />
1209
+ <p class="velin-field-help">Demo-only client encoding \u2014 use HTTPS and server-side crypto for real secrets.</p>
1210
+ `;let c=this.shadowRoot.querySelector("input");this._onChange=async()=>{let d=this.getAttribute("mode")||"aes-gcm",m=await Dd(c.value,d);this.dispatchEvent(new CustomEvent("velin-secure-submit",{bubbles:!0,detail:{name:t,payload:m}}))},c.addEventListener("change",this._onChange)}};customElements.get("velin-secure-field")||customElements.define("velin-secure-field",zi);Nd=zi});var La={};v(La,{default:()=>Ta});function Hd(i){if(!i)return[];let e=String(i).trim();if(e.startsWith("["))try{let t=JSON.parse(e);return Array.isArray(t)?t.map(Number).filter(r=>Number.isFinite(r)):[]}catch{return[]}return e.split(/[\s,]+/).map(t=>Number.parseFloat(t)).filter(t=>Number.isFinite(t))}function $d(i,e,t,r,n){let o=i.length;if(o===0)return[];if(o===1)return[[0,t/2],[e,t/2]];let a=Math.max(n-r,1e-6),c=e/(o-1);return i.map((d,m)=>{let b=m*c,_=t-(d-r)/a*t;return[b,_]})}function Sa(i){return i.length?i.map(([e,t],r)=>`${r===0?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "):""}function zd(i,e){if(!i.length)return"";let t=Sa(i),r=i[i.length-1][0],n=i[0][0];return`${t} L${r.toFixed(2)},${e} L${n.toFixed(2)},${e} Z`}var Xe,Fi,Ta,Pi=u(()=>{Xe="http://www.w3.org/2000/svg";Fi=class extends HTMLElement{static get observedAttributes(){return["values","width","height","min","max","area","glow","animate","label"]}constructor(){super(),this._values=[],this._gradientId=`velin-spark-grad-${Math.random().toString(36).slice(2,8)}`}connectedCallback(){this._render()}attributeChangedCallback(){this.isConnected&&this._render()}get values(){return this._values.slice()}set values(e){Array.isArray(e)&&(this._values=e.filter(t=>Number.isFinite(Number(t))).map(Number),this.setAttribute("values",this._values.join(",")))}update(e){Array.isArray(e)&&(this._values=e.filter(t=>Number.isFinite(Number(t))).map(Number),this._render({tick:!0}))}_render({tick:e=!1}={}){let t=Number.parseFloat(this.getAttribute("width"))||320,r=Number.parseFloat(this.getAttribute("height"))||96,n=this._values.length?this._values:Hd(this.getAttribute("values"));if(this._values=n,!n.length){this.innerHTML="";return}let o=Number.parseFloat(this.getAttribute("min")),a=Number.parseFloat(this.getAttribute("max")),c=Number.isFinite(o)?o:Math.min(...n),d=Number.isFinite(a)?a:Math.max(...n),m=this.hasAttribute("area")&&this.getAttribute("area")!=="false",b=this.hasAttribute("glow")&&this.getAttribute("glow")!=="false",_=(this.getAttribute("animate")||"draw").toLowerCase(),g=$d(n,t,r,c,d),F=Sa(g),w=m?zd(g,r):"";this.innerHTML="";let A=document.createElementNS(Xe,"svg");if(A.setAttribute("viewBox",`0 0 ${t} ${r}`),A.setAttribute("preserveAspectRatio","none"),A.style.display="block",A.style.width="100%",A.style.height="100%",this._applyA11y(A),m){let re=document.createElementNS(Xe,"defs"),de=document.createElementNS(Xe,"linearGradient");de.setAttribute("id",this._gradientId),de.setAttribute("x1","0"),de.setAttribute("x2","0"),de.setAttribute("y1","0"),de.setAttribute("y2","1"),[["0%","currentColor","0.35"],["100%","currentColor","0"]].forEach(([Et,H,we])=>{let ue=document.createElementNS(Xe,"stop");ue.setAttribute("offset",Et),ue.setAttribute("stop-color",H),ue.setAttribute("stop-opacity",we),de.appendChild(ue)}),re.appendChild(de),A.appendChild(re);let ne=document.createElementNS(Xe,"path");ne.setAttribute("d",w),ne.setAttribute("fill",`url(#${this._gradientId})`),ne.setAttribute("stroke","none"),ne.classList.add("velin-chart-area"),A.appendChild(ne)}let E=document.createElementNS(Xe,"path");if(E.setAttribute("d",F),E.setAttribute("fill","none"),E.setAttribute("stroke","currentColor"),E.setAttribute("stroke-width","2"),E.setAttribute("stroke-linecap","round"),E.setAttribute("stroke-linejoin","round"),E.setAttribute("vector-effect","non-scaling-stroke"),A.appendChild(E),b&&A.classList.add("velin-chart-glow"),this.appendChild(A),_!=="none"){let re=typeof E.getTotalLength=="function"&&E.getTotalLength()||t;E.style.setProperty("--velin-chart-len",re.toFixed(2)),E.classList.add("velin-chart-line")}else E.style.strokeDasharray="",E.style.strokeDashoffset="";e&&(this.classList.remove("velin-spark-tick"),this.offsetWidth,this.classList.add("velin-spark-tick"))}_applyA11y(e){let t=(this.getAttribute("label")||this.getAttribute("aria-label")||"").trim();if(t){e.setAttribute("role","img"),e.setAttribute("aria-label",t),e.removeAttribute("aria-hidden"),e.removeAttribute("aria-labelledby");return}let r=this.closest("figure")?.querySelector("figcaption");if(r?.textContent?.trim()){r.id||(r.id=`velin-sparkline-cap-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role","img"),e.setAttribute("aria-labelledby",r.id),e.removeAttribute("aria-hidden"),e.removeAttribute("aria-label");return}e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),e.setAttribute("focusable","false"),e.removeAttribute("aria-label"),e.removeAttribute("aria-labelledby")}};typeof customElements<"u"&&!customElements.get("velin-sparkline")&&customElements.define("velin-sparkline",Fi);Ta=Fi});var vn,Ca=u(()=>{vn={"velin-accordion":()=>Promise.resolve().then(()=>(fr(),Io)),"velin-announcer":()=>Promise.resolve().then(()=>(jr(),Rs)),"velin-bottom-nav":()=>Promise.resolve().then(()=>(zr(),bs)),"velin-carousel":()=>Promise.resolve().then(()=>(Sr(),Xo)),"velin-code-block":()=>Promise.resolve().then(()=>(an(),na)),"velin-collapse":()=>Promise.resolve().then(()=>(Tr(),Jo)),"velin-combobox":()=>Promise.resolve().then(()=>($r(),fs)),"velin-command":()=>Promise.resolve().then(()=>(Br(),Ls)),"velin-copy":()=>Promise.resolve().then(()=>(Er(),Wo)),"velin-countdown":()=>Promise.resolve().then(()=>(Dr(),cs)),"velin-counter":()=>Promise.resolve().then(()=>(Ri(),sa)),"velin-dialog":()=>Promise.resolve().then(()=>(Or(),as)),"velin-drawer":()=>Promise.resolve().then(()=>(_r(),Po)),"velin-dropdown":()=>Promise.resolve().then(()=>(mr(),Ro)),"velin-email":()=>Promise.resolve().then(()=>(vi(),Os)),"velin-icon":()=>Promise.resolve().then(()=>(yr(),zo)),"velin-lightbox":()=>Promise.resolve().then(()=>(Mr(),ns)),"velin-live-dot":()=>Promise.resolve().then(()=>(Ii(),ca)),"velin-menubar":()=>Promise.resolve().then(()=>(Ur(),Ss)),"velin-modal":()=>Promise.resolve().then(()=>(pr(),Lo)),"velin-persist":()=>Promise.resolve().then(()=>(Hr(),ps)),"velin-popover":()=>Promise.resolve().then(()=>(wr(),jo)),"velin-progress-ring":()=>Promise.resolve().then(()=>(Nr(),us)),"velin-rating":()=>Promise.resolve().then(()=>(qr(),Es)),"velin-scroll-top":()=>Promise.resolve().then(()=>(kr(),Yo)),"velin-scrollspy":()=>Promise.resolve().then(()=>(Lr(),es)),"velin-search":()=>Promise.resolve().then(()=>(_t(),fn)),"velin-secure-field":()=>Promise.resolve().then(()=>(ka(),Ea)),"velin-segmented-control":()=>Promise.resolve().then(()=>(Pr(),xs)),"velin-sheet":()=>Promise.resolve().then(()=>(Fr(),ys)),"velin-sparkline":()=>Promise.resolve().then(()=>(Pi(),La)),"velin-stepper":()=>Promise.resolve().then(()=>(ii(),Ir)),"velin-stepper-wc":()=>Promise.resolve().then(()=>(ii(),Ir)),"velin-tabs":()=>Promise.resolve().then(()=>(vr(),Do)),"velin-theme-toggle":()=>Promise.resolve().then(()=>(Ar(),Uo)),"velin-toast":()=>Promise.resolve().then(()=>(br(),Ho)),"velin-tooltip":()=>Promise.resolve().then(()=>(ei(),Cr)),"velin-tooltip-wc":()=>Promise.resolve().then(()=>(ei(),Cr))}});function Ma(i,e={}){let t=new Set;for(let[r,n]of Object.entries(e)){if(n==="false"||n==="off")continue;let o=Ra[r];if(o&&o.forEach(a=>t.add(a)),r==="slide"&&n&&n!=="true"&&n!==""){let a=`slide-${n}`;Ra[a]?.forEach(c=>t.add(c))}}return t.forEach(r=>i.classList.add(r)),!i.classList.contains("velin-animate-on-scroll")&&e.reveal!==void 0&&i.classList.add("velin-animate-on-scroll"),[...t]}function qi(i){i.classList.add(bn),i.dataset.velinVisible="true"}function Ia(){return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}var bn,Ra,Oa=u(()=>{bn="velin-in-view",Ra={reveal:["velin-animate-on-scroll"],fade:["velin-animate-on-scroll","velin-animate-on-scroll--fade"],slide:["velin-animate-on-scroll","velin-animate-on-scroll--slide-up"],"slide-up":["velin-animate-on-scroll","velin-animate-on-scroll--slide-up"],"slide-down":["velin-animate-on-scroll","velin-animate-on-scroll--slide-down"],"slide-left":["velin-animate-on-scroll","velin-animate-on-scroll--slide-left"],"slide-right":["velin-animate-on-scroll","velin-animate-on-scroll--slide-right"],scale:["velin-animate-on-scroll","velin-animate-on-scroll--scale"],parallax:["velin-parallax"],"parallax-slow":["velin-parallax","velin-parallax--slow"],hover:["velin-animate-hover"],"hover-lift":["velin-animate-hover"],flip:["velin-animate-scale-in"],blur:["velin-animate-fade-in"]}});function Fd(i,e="true"){let t=e==="true"||e===""?60:parseInt(e,10)||60;[...i.children].forEach((n,o)=>{n.style.setProperty("--velin-stagger-delay",`${o*t}ms`),n.classList.add("velin-stagger-item")}),i.classList.add("velin-stagger")}function Na(i=document){i.querySelectorAll(`[${Da}]`).forEach(e=>{e.dataset.velinStaggerDone||(e.dataset.velinStaggerDone="1",Fd(e,e.getAttribute(Da)||"true"))})}var Da,Ha=u(()=>{Da="velin-stagger"});function Pd(i,e={}){let t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,r=typeof i=="string"?document.querySelector(i):i;r&&(r.scrollIntoView({behavior:t||e.instant?"auto":"smooth",block:e.block||"start",inline:e.inline||"nearest"}),r.tabIndex<0&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}))}function $a(i=document){i.querySelectorAll("[velin-scroll]").forEach(e=>{e.dataset.velinScrollBound||(e.dataset.velinScrollBound="1",e.addEventListener("click",t=>{let r=e.getAttribute("href");if(!r||!r.startsWith("#"))return;let n=document.querySelector(r);n&&(t.preventDefault(),Pd(n))}))})}var za=u(()=>{});function Re(i={}){let e=i.root||(typeof document<"u"?document:null);if(!e)return()=>{};let t=i.selector||["[velin-reveal]","[velin-fade]","[velin-slide]","[velin-scale]","[velin-parallax]","[velin-hover]",".velin-animate-on-scroll"].join(","),r=e.querySelectorAll(t),n=Ia();for(let o of r){if(o.dataset.velinMotionInit)continue;o.dataset.velinMotionInit="1";let a={};for(let d of qd)o.hasAttribute(d)&&(a[d.replace("velin-","")]=o.getAttribute(d)||"true");if(Ma(o,a),n){qi(o);continue}let c=mt(o,d=>qi(d));gn.push(c)}return Na(e),$a(e),()=>{gn.forEach(o=>o()),gn=[],ta()}}function Fa(i={}){return Re({root:typeof document<"u"?document:null,selector:i.selector||".velin-animate-on-scroll"})}var qd,gn,Pa,yn=u(()=>{nn();Oa();Ha();za();qd=["velin-reveal","velin-fade","velin-slide","velin-scale","velin-parallax","velin-hover"],gn=[];Pa={init:Re,observe:mt,markVisible:qi,VISIBLE_CLASS:bn}});function S(i,e){Ze.set(i,e)}function Ua(i){return Ze.get(i)}function xt(i,e,t={}){i.setAttribute("data-velin-component",e);for(let[r,n]of Object.entries(t))n!=null&&i.setAttribute(r,n);return W(e)}function Ud(){S("velin-modal",{enhance(i){xt(i,"velin-modal",{open:i.getAttribute("velin-modal")||""})}}),S("velin-tabs",{enhance:i=>xt(i,"velin-tabs")}),S("velin-accordion",{enhance:i=>xt(i,"velin-accordion")}),S("velin-tooltip",{enhance(i){let e=i.getAttribute("velin-tooltip")||i.getAttribute("title")||"";if(e&&i.hasAttribute("title")&&i.removeAttribute("title"),i.tagName==="VELIN-TOOLTIP"||i.tagName==="VELIN-TOOLTIP-WC")return i.setAttribute("content",e),W("velin-tooltip");let t=document.createElement("velin-tooltip");t.setAttribute("content",e);let r=i.parentElement;return r&&(r.insertBefore(t,i),t.appendChild(i)),W("velin-tooltip")}}),S("velin-copy",{enhance(i){let e=i.getAttribute("velin-copy")||i.textContent?.trim()||"";if(!i.querySelector("velin-copy")){let t=document.createElement("velin-copy");if(t.setAttribute("value",e),i.tagName==="BUTTON")return t.append(...i.childNodes),i.replaceWith(t),W("velin-copy");i.appendChild(t)}return W("velin-copy")}}),S("velin-counter",{enhance(i){xt(i,"velin-counter",{value:i.getAttribute("velin-counter")||"0"})}}),S("velin-notify",{async enhance(i){await W("velin-toast"),i.addEventListener("click",()=>{let e=i.getAttribute("velin-notify")||i.textContent||"";document.dispatchEvent(new CustomEvent("velin-toast-show",{detail:{message:e,variant:i.dataset.variant||"info"}}))})}}),S("velin-theme",{enhance(i){let e=i.getAttribute("velin-theme")||"toggle";if(e==="toggle")return i.querySelector("velin-theme-toggle")||i.appendChild(document.createElement("velin-theme-toggle")),W("velin-theme-toggle");document.documentElement.setAttribute("data-velin-theme",e)}}),S("velin-scroll-top",{enhance(i){let e=i.getAttribute("velin-scroll-top"),t=e&&e!=="true"?e:"300";if(i.tagName==="VELIN-SCROLL-TOP")return e&&e!=="true"&&i.setAttribute("threshold",t),W("velin-scroll-top");let r=document.querySelector("velin-scroll-top");return r||(r=document.createElement("velin-scroll-top"),r.setAttribute("threshold",t),(i===document.body||i===document.documentElement?document.body:i).appendChild(r)),W("velin-scroll-top")}}),S("velin-progress",{enhance(i){if(i.hasAttribute("ring"))return xt(i,"velin-progress-ring");i.classList.add("velin-progress");let t=parseInt(i.getAttribute("velin-progress")||"0",10);i.setAttribute("role","progressbar"),i.setAttribute("aria-valuenow",String(t)),i.style.setProperty("--velin-progress",`${Math.min(100,t)}%`)}}),S("velin-search",{async enhance(i){if(i.tagName!=="VELIN-SEARCH"){let e=document.createElement("velin-search");e.setAttribute("index",i.getAttribute("data-search-index")||"/search-index.json"),i.replaceWith(e),e.appendChild(i)}return W("velin-search")}}),S("velin-lazy",{enhance(i){i.tagName==="IMG"&&(i.loading="lazy",i.decoding="async",(i.hasAttribute("velin-skeleton")||i.dataset.velinSkeleton)&&(i.classList.add("velin-skeleton","velin-skeleton--image"),i.addEventListener("load",()=>i.classList.remove("velin-skeleton","velin-skeleton--image"),{once:!0})))}}),S("velin-skeleton",{enhance(i){let e=i.getAttribute("velin-skeleton")||"text";i.classList.add("velin-skeleton",`velin-skeleton--${e}`),!(!!i.textContent?.trim()&&i.children.length>0)&&!i.textContent?.trim()&&i.setAttribute("aria-hidden","true")}}),S("velin-loading",{enhance(i){i.classList.add("velin-spinner"),i.setAttribute("aria-busy","true"),i.setAttribute("role","status"),i.getAttribute("aria-label")?.trim()||i.setAttribute("aria-label","Loading")}}),S("velin-grid",{enhance(i){let e=i.getAttribute("velin-grid")||"auto";i.classList.add("velin-grid"),e!=="auto"&&i.style.setProperty("--velin-grid-cols",e)}}),S("velin-anchor",{enhance(i){!i.id&&i.getAttribute("velin-anchor")&&(i.id=i.getAttribute("velin-anchor")),i.setAttribute("tabindex","-1")}}),S("velin-code",{async enhance(i){let e=i.getAttribute("velin-code")||i.getAttribute("language")||i.getAttribute("data-language")||"";if(i.classList.add("velin-code-block"),e&&e!=="true"&&(i.dataset.language=e,i.getAttribute("language")||i.setAttribute("language",e)),!i.querySelector("[data-velin-copy]")){let o=document.createElement("button");o.type="button",o.className="velin-code-block__copy velin-btn velin-btn--sm",o.textContent="Copy",o.setAttribute("data-velin-copy",""),o.setAttribute("velin-copy",i.querySelector("code")?.textContent||i.textContent||""),i.style.position="relative",i.appendChild(o)}await W("velin-copy");let{initHighlight:t,highlightElement:r}=await Promise.resolve().then(()=>(vt(),sn));i.getAttribute("data-velin-highlight")==="immediate"||typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches?await r(i):t(i,{root:i})}}),S("velin-quote",{enhance(i){(i.tagName==="BLOCKQUOTE"||i.tagName==="Q")&&i.classList.add("velin-quote")}}),S("velin-highlight",{enhance(i){i.classList.add("velin-highlight")}});for(let i of["velin-reveal","velin-fade","velin-slide","velin-scale","velin-parallax","velin-hover","velin-stagger","velin-scroll"])S(i,{enhance(){}})}async function _n(i=document){let e=[...Ze.keys()].map(r=>`[${r}]`).join(","),t=i.querySelectorAll(e);for(let r of t)if(!qa.has(r)){for(let n of Ze.keys()){if(!r.hasAttribute(n))continue;let o=Ze.get(n);o?.enhance&&await o.enhance(r)}qa.add(r)}if(Re({root:i}),typeof HTMLElement<"u"){let{bindDeclarativeSearch:r}=await Promise.resolve().then(()=>(_t(),fn));if(r(i),!document.querySelector("velin-announcer")){let{getAnnouncer:n}=await Promise.resolve().then(()=>(Be(),is));n()}}}function xn(){return[...Ze.keys()]}var Ze,qa,Ba=u(()=>{An();yn();Ze=new Map;Ud();qa=new WeakSet});var ja={};v(ja,{bootAttributes:()=>_n,getAttributeHandler:()=>Ua,listRegisteredAttributes:()=>xn,registerAttribute:()=>S});var wn=u(()=>{Ba()});var Ka={};v(Ka,{PATTERNS:()=>Ui,VelinHapticObserver:()=>wt,applyHaptic:()=>At,default:()=>Bd,vibrate:()=>En});function En(i){if(typeof navigator>"u"||!navigator.vibrate||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;let t=typeof i=="string"?Ui[i]||Ui.tap:i;navigator.vibrate(t)}function At(i){let e=i.getAttribute("haptic")||"tap";i.addEventListener("click",()=>En(e))}var Ui,wt,Bd,kn=u(()=>{Ui={tap:[10],"double-tap":[10,50,10],success:[50],error:[100,30,100],warning:[30,20,30],long:[200]};wt=class{constructor(){this._observer=null}start(e=document.body){e.querySelectorAll("[haptic]").forEach(At),this._observer=new MutationObserver(r=>{for(let n of r)for(let o of n.addedNodes)o.nodeType===1&&(o.hasAttribute?.("haptic")&&At(o),o.querySelectorAll?.("[haptic]").forEach(At))}),this._observer.observe(e,{childList:!0,subtree:!0})}stop(){this._observer?.disconnect()}},Bd=wt});function Kd(i){return typeof customElements>"u"?Promise.reject(new Error("customElements not available")):customElements.whenDefined(i)}async function W(i){let e=vn[i];if(!e)throw new Error(`Unknown Velin component: ${i}`);if(Sn.has(i))return Sn.get(i);let t=e().then(r=>{let n=r.default;return n&&!customElements.get(i)&&customElements.define(i,n),n});return Sn.set(i,t),t}async function Wa(i){return Promise.all(i.map(e=>W(e)))}function Wd(i){let e=new Set;i.querySelectorAll("[data-velin-component]").forEach(t=>{let r=t.getAttribute("data-velin-component");r&&e.add(r.startsWith("velin-")?r:`velin-${r}`)});for(let t of i.querySelectorAll("*")){let r=t.tagName?.toLowerCase();r&&jd.test(r)&&vn[r]&&e.add(r)}return e}async function Gd(i=document,e={}){let t=e.tags?.length?new Set(e.tags):Wd(i),r=Wa([...t]);if(e.attributes){let{bootAttributes:n}=await Promise.resolve().then(()=>(wn(),ja));await n(i)}if(e.highlight){let{initHighlight:n}=await Promise.resolve().then(()=>(vt(),sn));n(i)}if(e.haptic){let{VelinHapticObserver:n}=await Promise.resolve().then(()=>(kn(),Ka));new n().start(i instanceof Document?i.body:i)}return r}var Sn,jd,An=u(()=>{Ca();Sn=new Map,jd=/^velin-[a-z0-9-]+$/});pr();mr();fr();vr();br();yr();_r();Ar();wr();Er();kr();Sr();Tr();Lr();ei();Mr();ii();Or();Dr();Nr();Hr();$r();zr();Fr();Pr();qr();Ur();Br();jr();vi();An();Pi();Ri();Ii();an();_t();_t();yn();var Yd=Fa;if(typeof document<"u"){let i=()=>{document.documentElement?.hasAttribute("data-velin-reveal-auto")&&Re()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i,{once:!0}):i()}Be();Be();function Vd(i={}){if(typeof document>"u")return;let{announcer:e=!0,scrollPadding:t=!0,skipLink:r=!1}=i;if(e&&Ue(),t){let n=document.querySelector(".velin-nav, .velin-doc-header, .site-nav, [data-velin-fixed-nav]");if(n){let o=n.getBoundingClientRect().height;document.documentElement.style.setProperty("--velin-nav-height",`${Math.ceil(o)}px`),document.documentElement.classList.add("velin-scroll-pt-nav")}}if(r&&!document.querySelector(".velin-skip-link")&&document.getElementById("main")){let n=document.createElement("a");n.href="#main",n.className="velin-skip-link",n.textContent="Skip to main content",document.body.prepend(n)}}mn();wn();vt();var Ga=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null,Qa={duration:250,easing:"var(--velin-ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1))",itemSelector:":scope > *"};function Tn(i,e){return Array.from(i.querySelectorAll(e))}function el(i,e,t={}){if(!i||typeof e!="function")return;let r={...Qa,...t},n=Ga&&Ga.matches,o=Tn(i,r.itemSelector),a=new Map;if(o.forEach(d=>{d.hidden||a.set(d,d.getBoundingClientRect())}),e(),n)return;Tn(i,r.itemSelector).forEach(d=>{if(d.hidden)return;let m=a.get(d),b=d.getBoundingClientRect();if(!m){if(typeof d.animate!="function")return;d.animate([{opacity:0,transform:"scale(0.96)"},{opacity:1,transform:"scale(1)"}],{duration:r.duration,easing:r.easing,fill:"both"});return}let _=m.left-b.left,g=m.top-b.top;_===0&&g===0||typeof d.animate=="function"&&d.animate([{transform:`translate(${_}px, ${g}px)`},{transform:"translate(0, 0)"}],{duration:r.duration,easing:r.easing,fill:"both"})})}function tl(i,e,t={}){if(!i||typeof e!="function")return;let r={...Qa,...t};el(i,()=>{Tn(i,r.itemSelector).forEach(n=>{n.hidden=!e(n)})},r)}function Ya(i){return i?String(i).toLowerCase().split(/[\s,|]+/).map(e=>e.trim()).filter(Boolean):[]}function Xd(i,e,t){return e.length?t==="all"?e.every(r=>i.includes(r)):e.some(r=>i.includes(r)):!0}function Zd(i,e){return e?((i.getAttribute("data-tags")||"")+" "+(i.getAttribute("data-search")||"")+" "+(i.textContent||"")).toLowerCase().includes(e.toLowerCase()):!0}var Ln=class{constructor(e){this.container=e,this.tag="",this.search="",this.matchMode=e.getAttribute("data-velin-filter-mode")==="all"?"all":"any",this.itemSelector=e.getAttribute("data-velin-filter-item")||":scope > *"}apply(){let e=Ya(this.tag),t=this.search;tl(this.container,r=>{let n=Ya(r.getAttribute("data-tags"));return Xd(n,e,this.matchMode)&&Zd(r,t)},{itemSelector:this.itemSelector})}},Va=new WeakMap;function Xa(i){let e=Va.get(i);return e||(e=new Ln(i),Va.set(i,e)),e}function Za(i){let e=i.getAttribute("data-velin-filter-target");if(!e)return null;try{return document.querySelector(e)}catch{return null}}function Jd(i,e){i&&i.querySelectorAll("[data-velin-filter-value]").forEach(t=>{t===e?t.setAttribute("data-velin-filter-active",""):t.removeAttribute("data-velin-filter-active")})}function Ja(){if(typeof document>"u")return;document.addEventListener("click",e=>{let t=e.target.closest("[data-velin-filter-value]");if(!t)return;let r=Za(t);if(!r)return;let n=t.closest("[data-velin-filter-group]")||t.parentElement;Jd(n,t);let o=Xa(r);o.tag=t.getAttribute("data-velin-filter-value")||"",(o.tag.toLowerCase()==="all"||o.tag==="*")&&(o.tag=""),o.apply()});let i=e=>{let t=e.target.closest("[data-velin-filter-input]");if(!t)return;let r=Za(t);if(!r)return;let n=Xa(r),o=t.value||(typeof t.getAttribute=="function"?t.getAttribute("value"):"");n.search=(o||"").trim(),n.apply()};document.addEventListener("input",i),document.addEventListener("change",i)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ja,{once:!0}):Ja());k();kn();j();Pi();Ri();Ii();vi();export{Ui as HapticPatterns,Mo as VelinAccordion,Cs as VelinAnnouncer,vs as VelinBottomNav,Vo as VelinCarousel,ra as VelinCodeBlock,Zo as VelinCollapse,ms as VelinCombobox,Ts as VelinCommand,Ko as VelinCopy,ls as VelinCountdown,oa as VelinCounter,ss as VelinDialog,Fo as VelinDrawer,Co as VelinDropdown,Is as VelinEmail,wt as VelinHapticObserver,$o as VelinIcon,rs as VelinLightbox,la as VelinLiveDot,ks as VelinMenubar,To as VelinModal,hs as VelinPersist,Bo as VelinPopover,ds as VelinProgressRing,ws as VelinRating,Go as VelinScrollTop,Qo as VelinScrollspy,Aa as VelinSearch,_s as VelinSegmentedControl,gs as VelinSheet,Ta as VelinSparkline,os as VelinStepper,lt as VelinStepperWC,Oo as VelinTabs,qo as VelinThemeToggle,No as VelinToast,ts as VelinTooltip,st as VelinTooltipWC,at as announce,At as applyHaptic,wa as bindDeclarativeSearch,_n as bootAttributes,Gd as bootFromDOM,ee as clearBackgroundInert,gc as createSafeHTML,pn as createSearch,p as escapeHTML,me as escapeHTMLAttribute,tl as filterList,el as flipReorder,Ue as getAnnouncer,ae as getFocusableElements,So as getTrustedPolicy,pt as highlightAll,ie as highlightElement,Vd as initA11y,xe as initHighlight,Re as initMotion,Yd as initReveal,W as lazyDefine,_e as lazyLoadLanguage,xn as listRegisteredAttributes,ft as observeCodeBlocks,Wa as register,S as registerAttribute,Ye as registerLanguage,pa as registerSearchProvider,Ei as renderTokens,J as restoreFocus,Y as rovingTabindex,Te as sanitizeURL,Z as saveFocus,Q as setBackgroundInert,hr as stripControlChars,G as trapFocus,Pa as velinMotion,Md as velinSearch,ia as velinSyntax,En as vibrate,Kd as whenDefined};
1211
+ /*! Bundled license information:
1212
+
1213
+ dompurify/dist/purify.es.mjs:
1214
+ (*! @license DOMPurify 3.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.5/LICENSE *)
1215
+ */