@birdapi/velinstyle 1.2.2 → 1.3.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 (109) hide show
  1. package/README.de.md +18 -4
  2. package/README.md +42 -7
  3. package/cli/cli-manifest.json +441 -174
  4. package/cli/docgen/extract-cli.js +2 -1
  5. package/cli/docs-generate.js +9 -0
  6. package/cli/experience.js +173 -0
  7. package/cli/index.js +1294 -417
  8. package/cli/motion.js +738 -0
  9. package/cli/production/extract.js +46 -6
  10. package/cli/production/report.js +104 -14
  11. package/cli/production/run.js +44 -1
  12. package/cli/security.js +190 -0
  13. package/cli/skills.js +53 -10
  14. package/cli/transparency.js +140 -41
  15. package/cli/workflow.js +32 -17
  16. package/components/velin-theme-toggle.js +15 -1
  17. package/core/a11y/component-contracts.json +391 -274
  18. package/core/attributes/registry.js +1 -1
  19. package/core/motion/analyze.js +38 -0
  20. package/core/motion/blueprint.js +51 -0
  21. package/core/motion/composer.js +114 -0
  22. package/core/motion/data/registry.json +352 -0
  23. package/core/motion/effects.js +17 -1
  24. package/core/motion/index.js +112 -9
  25. package/core/motion/optimize.js +44 -0
  26. package/core/motion/policy.js +77 -0
  27. package/core/motion/registry.js +131 -0
  28. package/core/motion/review.js +59 -0
  29. package/core/motion/scan.js +150 -0
  30. package/core/motion/timeline.js +68 -0
  31. package/core/motion/transitions.js +49 -0
  32. package/core/motion/triggers.js +168 -0
  33. package/core/security/checks/fs.js +92 -0
  34. package/core/security/detect.js +35 -0
  35. package/core/security/engine.js +116 -0
  36. package/core/security/index.js +18 -0
  37. package/core/security/registry.js +85 -0
  38. package/core/security/report/report.js +113 -0
  39. package/core/security/rules/ci/index.js +146 -0
  40. package/core/security/rules/consumer/index.js +174 -0
  41. package/core/security/rules/deps/index.js +182 -0
  42. package/core/security/rules/index.js +24 -0
  43. package/core/security/rules/publish/index.js +230 -0
  44. package/core/security/rules/repo/index.js +143 -0
  45. package/core/security/rules/secrets/index.js +133 -0
  46. package/core/security/score/dependency-health.js +53 -0
  47. package/core/security/score/release-health.js +66 -0
  48. package/core/security/score/score.js +102 -0
  49. package/core/security/timeline/timeline.js +76 -0
  50. package/dist/chunks/attributes-HK7VIOLA.js +1080 -0
  51. package/dist/chunks/attributes-VRHHVNDO.js +1080 -0
  52. package/dist/chunks/chunk-MYKUI364.js +116 -0
  53. package/dist/chunks/chunk-NEVBPD5T.js +116 -0
  54. package/dist/chunks/runtime-entry.js +1 -1
  55. package/dist/chunks/velin-theme-toggle-J2NHC7IM.js +304 -0
  56. package/dist/llms.txt +2 -2
  57. package/dist/search-index.json +166 -2
  58. package/dist/velin-agent.json +156 -32
  59. package/dist/velinstyle-components.iife.js +862 -17
  60. package/dist/velinstyle-components.js +862 -17
  61. package/dist/velinstyle-components.min.js +126 -126
  62. package/dist/velinstyle.css +42 -7
  63. package/dist/velinstyle.min.css +1 -1
  64. package/package.json +158 -143
  65. package/packages/velinstyle-cli-core/package.json +11 -0
  66. package/packages/velinstyle-cli-core/src/config.js +84 -0
  67. package/packages/velinstyle-cli-core/src/contract.js +56 -0
  68. package/packages/velinstyle-cli-core/src/event-bus.js +50 -0
  69. package/packages/velinstyle-cli-core/src/index.js +18 -0
  70. package/packages/velinstyle-cli-core/src/lifecycle.js +33 -0
  71. package/packages/velinstyle-cli-core/src/runner.js +129 -0
  72. package/packages/velinstyle-cli-registry/data/commands.json +1216 -0
  73. package/packages/velinstyle-cli-registry/data/layouts.json +33 -0
  74. package/packages/velinstyle-cli-registry/data/widgets.json +35 -0
  75. package/packages/velinstyle-cli-registry/package.json +13 -0
  76. package/packages/velinstyle-cli-registry/src/index.js +88 -0
  77. package/packages/velinstyle-cli-renderer/package.json +8 -0
  78. package/packages/velinstyle-cli-renderer/src/index.js +286 -0
  79. package/packages/velinstyle-cli-theme/package.json +8 -0
  80. package/packages/velinstyle-cli-theme/src/index.js +84 -0
  81. package/packages/velinstyle-cli-ui/package.json +8 -0
  82. package/packages/velinstyle-cli-ui/src/index.js +34 -0
  83. package/packages/velinstyle-motion/README.md +81 -0
  84. package/packages/velinstyle-motion/package.json +37 -0
  85. package/packages/velinstyle-motion/src/ai/mini-prompt.js +119 -0
  86. package/packages/velinstyle-motion/src/ai/provider.js +59 -0
  87. package/packages/velinstyle-motion/src/ai/providers/pixverse-setup.js +402 -0
  88. package/packages/velinstyle-motion/src/ai/providers/pixverse.js +245 -0
  89. package/packages/velinstyle-motion/src/config.js +257 -0
  90. package/packages/velinstyle-motion/src/export/html-clip.js +141 -0
  91. package/packages/velinstyle-motion/src/index.js +304 -0
  92. package/packages/velinstyle-motion/src/jobs/cache.js +30 -0
  93. package/packages/velinstyle-motion/src/jobs/queue.js +69 -0
  94. package/packages/velinstyle-motion/src/jobs/usage.js +53 -0
  95. package/packages/velinstyle-motion/src/local/effects.js +139 -0
  96. package/packages/velinstyle-motion/src/local/engine.js +96 -0
  97. package/packages/velinstyle-motion/src/providers-catalog.js +44 -0
  98. package/packages/velinstyle-motion/src/registry/presets.js +25 -0
  99. package/packages/velinstyle-motion/src/registry/presets.json +85 -0
  100. package/packages/velinstyle-motion/src/ux/cost-gate.js +37 -0
  101. package/packages/velinstyle-motion/src/ux/pixverse-gate.js +153 -0
  102. package/packages/velinstyle-motion/src/ux/wizard.js +171 -0
  103. package/packages/velinstyle-motion/src/validate-image.js +91 -0
  104. package/packages/velinstyle-skills/catalog.json +1 -1
  105. package/packages/velinstyle-skills/registry.json +1 -142
  106. package/packages/velinstyle-skills/skills/velin-motion-reduced-safe/SKILL.md +1 -1
  107. package/packages/velinstyle-skills/skills/velin-motion-reveal-feedback/SKILL.md +1 -1
  108. package/src/tokens/motion.css +7 -0
  109. package/src/utilities/scroll-animation.css +66 -0
@@ -1,4 +1,4 @@
1
- var nd=Object.defineProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var v=(i,e)=>{for(var t in e)nd(i,t,{get:e[t],enumerable:!0})};function sd(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 be(i){return[...i.querySelectorAll(od)].filter(sd)}function te(i,e){if(e.key!=="Tab")return;let t=be(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 ie(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 le(){return document.activeElement}function ce(i){i&&typeof i.focus=="function"&&i.focus()}function ad(){let i=new Set;for(let e of Ve)for(let t of e.siblings)i.add(t);return i}function de(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));Ve.push({host:e,siblings:t}),pt===0&&(Ar=document.body.style.overflow,document.body.style.overflow="hidden"),pt+=1}function Y(i){let e=-1;if(i instanceof HTMLElement?e=Ve.findLastIndex(n=>n.host===i):Ve.length&&(e=Ve.length-1),e===-1)return;let{siblings:t}=Ve.splice(e,1)[0],r=ad();for(let n of t)r.has(n)||n.removeAttribute("inert");pt=Math.max(0,pt-1),pt===0&&(document.body.style.overflow=Ar,Ar="")}var od,Ve,pt,Ar,Z=h(()=>{od=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"summary","details"].join(", ");Ve=[],pt=0,Ar=""});var Yo={};v(Yo,{default:()=>Wo});var ld,Kt,Wo,Er=h(()=>{Z();ld=`
1
+ var $u=Object.defineProperty;var p=(i,e)=>()=>(i&&(e=i(i=0)),e);var g=(i,e)=>{for(var t in e)$u(i,t,{get:e[t],enumerable:!0})};function Fu(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 ge(i){return[...i.querySelectorAll(Pu)].filter(Fu)}function re(i,e){if(e.key!=="Tab")return;let t=ge(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 ne(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 ue(){return document.activeElement}function de(i){i&&typeof i.focus=="function"&&i.focus()}function qu(){let i=new Set;for(let e of et)for(let t of e.siblings)i.add(t);return i}function pe(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));et.push({host:e,siblings:t}),yt===0&&(Mr=document.body.style.overflow,document.body.style.overflow="hidden"),yt+=1}function W(i){let e=-1;if(i instanceof HTMLElement?e=et.findLastIndex(n=>n.host===i):et.length&&(e=et.length-1),e===-1)return;let{siblings:t}=et.splice(e,1)[0],r=qu();for(let n of t)r.has(n)||n.removeAttribute("inert");yt=Math.max(0,yt-1),yt===0&&(document.body.style.overflow=Mr,Mr="")}var Pu,et,yt,Mr,J=p(()=>{Pu=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"summary","details"].join(", ");et=[],yt=0,Mr=""});var cs={};g(cs,{default:()=>ls});var Hu,Xt,ls,Ir=p(()=>{J();Hu=`
2
2
  :host {
3
3
  display: contents;
4
4
  }
@@ -91,8 +91,8 @@ var nd=Object.defineProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var v=(i,e)=>{fo
91
91
  @media (prefers-reduced-motion: reduce) {
92
92
  .overlay, .dialog { transition: none; }
93
93
  }
94
- `,Kt=class extends HTMLElement{static get observedAttributes(){return["open","title"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._previouslyFocused=null,this._onKeydown=this._onKeydown.bind(this),this._onTitleSlot=this._onTitleSlot.bind(this)}connectedCallback(){this.shadowRoot.querySelector(".dialog")||(this.shadowRoot.innerHTML=`
95
- <style>${ld}</style>
94
+ `,Xt=class extends HTMLElement{static get observedAttributes(){return["open","title"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._previouslyFocused=null,this._onKeydown=this._onKeydown.bind(this),this._onTitleSlot=this._onTitleSlot.bind(this)}connectedCallback(){this.shadowRoot.querySelector(".dialog")||(this.shadowRoot.innerHTML=`
95
+ <style>${Hu}</style>
96
96
  <div class="overlay" part="overlay">
97
97
  <div class="dialog" role="dialog" aria-modal="true" part="dialog">
98
98
  <div class="header" part="header">
@@ -106,7 +106,7 @@ var nd=Object.defineProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var v=(i,e)=>{fo
106
106
  <div class="footer" part="footer"><slot name="footer"></slot></div>
107
107
  </div>
108
108
  </div>
109
- `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",e=>{e.target===e.currentTarget&&this.close()}),this.shadowRoot.querySelector('slot[name="title"]').addEventListener("slotchange",this._onTitleSlot),this._syncTitle())}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close()),e==="title"&&this._syncTitle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_syncTitle(){let e=this.shadowRoot?.querySelector(".title-fallback"),t=this.shadowRoot?.querySelector(".title"),r=this.shadowRoot?.querySelector('[role="dialog"]');if(!e||!t||!r)return;if(this._hasTitleSlot()){e.hidden=!0,t.classList.remove("sr-only");return}e.hidden=!1;let n=(this.getAttribute("title")||"").trim();e.textContent=n||"Dialog",t.classList.toggle("sr-only",!n),n?(r.setAttribute("aria-labelledby","velin-modal-title"),r.removeAttribute("aria-label")):(r.removeAttribute("aria-labelledby"),r.setAttribute("aria-label",this.getAttribute("aria-label")||"Dialog"))}_hasTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]');return e?e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent.trim():t.nodeType===Node.ELEMENT_NODE):!1}_onTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]'),t=this.shadowRoot?.querySelector('[role="dialog"]'),r=this.shadowRoot?.querySelector(".title"),n=this.shadowRoot?.querySelector(".title-fallback");if(!(!e||!t||!r||!n))if(this._hasTitleSlot()){n.hidden=!0,r.classList.remove("sr-only"),t.removeAttribute("aria-labelledby");let o=e.assignedNodes({flatten:!0}).map(a=>a.textContent||"").join(" ").trim();o&&t.setAttribute("aria-label",o)}else this._syncTitle()}_open(){this._previouslyFocused=le(),de(this),document.addEventListener("keydown",this._onKeydown),requestAnimationFrame(()=>{let e=be(this.shadowRoot);e.length>0&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKeydown),Y(this),ce(this._previouslyFocused)}_onKeydown(e){if(e.key==="Escape"){this.close();return}te(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKeydown),Y(this)}};customElements.define("velin-modal",Kt);Wo=Kt});var Vo={};v(Vo,{default:()=>Go});var cd,Wt,Go,Sr=h(()=>{Z();cd=`
109
+ `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",e=>{e.target===e.currentTarget&&this.close()}),this.shadowRoot.querySelector('slot[name="title"]').addEventListener("slotchange",this._onTitleSlot),this._syncTitle())}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close()),e==="title"&&this._syncTitle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_syncTitle(){let e=this.shadowRoot?.querySelector(".title-fallback"),t=this.shadowRoot?.querySelector(".title"),r=this.shadowRoot?.querySelector('[role="dialog"]');if(!e||!t||!r)return;if(this._hasTitleSlot()){e.hidden=!0,t.classList.remove("sr-only");return}e.hidden=!1;let n=(this.getAttribute("title")||"").trim();e.textContent=n||"Dialog",t.classList.toggle("sr-only",!n),n?(r.setAttribute("aria-labelledby","velin-modal-title"),r.removeAttribute("aria-label")):(r.removeAttribute("aria-labelledby"),r.setAttribute("aria-label",this.getAttribute("aria-label")||"Dialog"))}_hasTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]');return e?e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent.trim():t.nodeType===Node.ELEMENT_NODE):!1}_onTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]'),t=this.shadowRoot?.querySelector('[role="dialog"]'),r=this.shadowRoot?.querySelector(".title"),n=this.shadowRoot?.querySelector(".title-fallback");if(!(!e||!t||!r||!n))if(this._hasTitleSlot()){n.hidden=!0,r.classList.remove("sr-only"),t.removeAttribute("aria-labelledby");let o=e.assignedNodes({flatten:!0}).map(a=>a.textContent||"").join(" ").trim();o&&t.setAttribute("aria-label",o)}else this._syncTitle()}_open(){this._previouslyFocused=ue(),pe(this),document.addEventListener("keydown",this._onKeydown),requestAnimationFrame(()=>{let e=ge(this.shadowRoot);e.length>0&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKeydown),W(this),de(this._previouslyFocused)}_onKeydown(e){if(e.key==="Escape"){this.close();return}re(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKeydown),W(this)}};customElements.define("velin-modal",Xt);ls=Xt});var ds={};g(ds,{default:()=>us});var Bu,Zt,us,Dr=p(()=>{J();Bu=`
110
110
  :host {
111
111
  display: inline-block;
112
112
  position: relative;
@@ -156,13 +156,13 @@ var nd=Object.defineProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var v=(i,e)=>{fo
156
156
  @media (prefers-reduced-motion: reduce) {
157
157
  .menu { transition: none; }
158
158
  }
159
- `,Wt=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=`
160
- <style>${cd}</style>
159
+ `,Zt=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=`
160
+ <style>${Bu}</style>
161
161
  <slot name="trigger"></slot>
162
162
  <div class="menu ${e==="end"?"menu-end":""}" role="menu" part="menu">
163
163
  <slot></slot>
164
164
  </div>
165
- `;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}ie(this,t,e)}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-dropdown",Wt);Go=Wt});var Jo={};v(Jo,{default:()=>Zo});function hd(){if(typeof document>"u"||document.getElementById(Xo))return;let i=document.createElement("style");i.id=Xo,i.textContent=dd,document.head.appendChild(i)}var Xo,dd,ud,Yt,Zo,kr=h(()=>{Xo="velin-accordion-light-css",dd=`
165
+ `;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}ne(this,t,e)}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-dropdown",Zt);us=Zt});var ms={};g(ms,{default:()=>hs});function Ku(){if(typeof document>"u"||document.getElementById(ps))return;let i=document.createElement("style");i.id=ps,i.textContent=Uu,document.head.appendChild(i)}var ps,Uu,ju,Jt,hs,Or=p(()=>{ps="velin-accordion-light-css",Uu=`
166
166
  velin-accordion {
167
167
  display: block;
168
168
  border: 1px solid var(--velin-color-border, #ddd);
@@ -216,14 +216,14 @@ var nd=Object.defineProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var v=(i,e)=>{fo
216
216
  line-height: 1.6;
217
217
  border-block-start: 1px solid var(--velin-color-border, #e2e8f0);
218
218
  }
219
- `,ud=`
219
+ `,ju=`
220
220
  :host {
221
221
  display: block;
222
222
  }
223
- `;Yt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onToggle=this._onToggle.bind(this),this._onKeydown=this._onKeydown.bind(this)}connectedCallback(){hd(),this.shadowRoot.innerHTML=`
224
- <style>${ud}</style>
223
+ `;Jt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onToggle=this._onToggle.bind(this),this._onKeydown=this._onKeydown.bind(this)}connectedCallback(){Ku(),this.shadowRoot.innerHTML=`
224
+ <style>${ju}</style>
225
225
  <slot></slot>
226
- `,this._exclusive=this.hasAttribute("exclusive"),this._wireDetails(),this.addEventListener("toggle",this._onToggle,!0),this.addEventListener("keydown",this._onKeydown)}_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),r.setAttribute("aria-expanded",t.open?"true":"false")),r&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0")}}_onToggle(e){let t=e.target;if(!(t instanceof HTMLDetailsElement))return;let r=t.querySelector("summary");if(r&&r.setAttribute("aria-expanded",t.open?"true":"false"),!this._exclusive||!t.open)return;[...this.querySelectorAll("details")].forEach(o=>{o!==t&&o.open&&(o.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;case"Enter":case" ":return;default:return}t[n].focus()}disconnectedCallback(){this.removeEventListener("toggle",this._onToggle,!0),this.removeEventListener("keydown",this._onKeydown)}};customElements.define("velin-accordion",Yt);Zo=Yt});var es={};v(es,{default:()=>Qo});var pd,Gt,Qo,Tr=h(()=>{Z();pd=`
226
+ `,this._exclusive=this.hasAttribute("exclusive"),this._wireDetails(),this.addEventListener("toggle",this._onToggle,!0),this.addEventListener("keydown",this._onKeydown)}_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),r.setAttribute("aria-expanded",t.open?"true":"false")),r&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0")}}_onToggle(e){let t=e.target;if(!(t instanceof HTMLDetailsElement))return;let r=t.querySelector("summary");if(r&&r.setAttribute("aria-expanded",t.open?"true":"false"),!this._exclusive||!t.open)return;[...this.querySelectorAll("details")].forEach(o=>{o!==t&&o.open&&(o.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;case"Enter":case" ":return;default:return}t[n].focus()}disconnectedCallback(){this.removeEventListener("toggle",this._onToggle,!0),this.removeEventListener("keydown",this._onKeydown)}};customElements.define("velin-accordion",Jt);hs=Jt});var bs={};g(bs,{default:()=>fs});var Gu,Qt,fs,Nr=p(()=>{J();Gu=`
227
227
  :host {
228
228
  display: block;
229
229
  }
@@ -265,17 +265,17 @@ var nd=Object.defineProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var v=(i,e)=>{fo
265
265
  ::slotted([role="tabpanel"][hidden]) {
266
266
  display: none;
267
267
  }
268
- `,Gt=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=`
269
- <style>${pd}</style>
268
+ `,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=`
269
+ <style>${Gu}</style>
270
270
  <div class="tablist" role="tablist" part="tablist">
271
271
  <slot name="tab"></slot>
272
272
  </div>
273
273
  <div class="panels" part="panels">
274
274
  <slot name="panel"></slot>
275
275
  </div>
276
- `,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)&&(ie(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",Gt);Qo=Gt});function ts(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 md(i){if(Array.isArray(i))return i}function fd(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(_){m=!0,n=_}finally{try{if(!d&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw n}}return c}}function bd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
277
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vd(i,e){return md(i)||fd(i,e)||gd(i,e)||bd()}function gd(i,e){if(i){if(typeof i=="string")return ts(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)?ts(i,e):void 0}}function F(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 Td(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Nr(i,t)}}function E(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bt;if(is&&is(i,null),!Te(e))return i;let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){let o=t(n);o!==n&&(yd(e)||(e[r]=o),n=o)}i[n]=!0}return i}function Ld(i){for(let e=0;e<i.length;e++)P(i,e)||(i[e]=null);return i}function V(i){let e=Je(null);for(let r of bs(i)){var t=vd(r,2);let n=t[0],o=t[1];P(i,n)&&(Te(o)?e[n]=Ld(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=V(o):e[n]=o)}return e}function Cd(i){switch(typeof i){case"string":return i;case"number":return Sd(i);case"boolean":return kd(i);case"bigint":return ss?ss(i):"0";case"symbol":return as?as(i):"Symbol()";case"undefined":return ft(i);case"function":case"object":{if(i===null)return ft(i);let e=i,t=ve(e,"toString");if(typeof t=="function"){let r=t(e);return typeof r=="string"?r:ft(r)}return ft(i)}default:return ft(i)}}function ve(i,e){for(;i!==null;){let r=xd(i,e);if(r){if(r.get)return F(r.get);if(typeof r.value=="function")return F(r.value)}i=_d(i)}function t(){return null}return t}function Rd(i){try{return q(i,""),!0}catch{return!1}}function gs(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jd(),e=p=>gs(p);if(e.version="3.4.12",e.removed=[],!i||!i.document||i.document.nodeType!==re.document||!i.Element)return e.isSupported=!1,e;let t=i.document,r=t,n=r.currentScript;i.DocumentFragment;let o=i.HTMLTemplateElement,a=i.Node,c=i.Element,d=i.NodeFilter,m=i.NamedNodeMap;m===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;let _=i.DOMParser,f=i.trustedTypes,b=c.prototype,L=ve(b,"cloneNode"),S=ve(b,"remove"),A=ve(b,"nextSibling"),k=ve(b,"childNodes"),j=ve(b,"parentNode"),he=ve(b,"shadowRoot"),Ot=ve(b,"attributes"),z=a&&a.prototype?ve(a.prototype,"nodeType"):null,ne=a&&a.prototype?ve(a.prototype,"nodeName"):null;if(typeof o=="function"){let p=t.createElement("template");p.content&&p.content.ownerDocument&&(t=p.content.ownerDocument)}let K,ge="",xe,go=!1,ct=0,yo=function(){if(ct>0)throw $e('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Ue=function(s){yo(),ct++;try{return K.createHTML(s)}finally{ct--}},Rc=function(s){yo(),ct++;try{return K.createScriptURL(s)}finally{ct--}},Mc=function(){return go||(xe=Kd(f,n),go=!0),xe},zt=t,or=zt.implementation,_o=zt.createNodeIterator,Ic=zt.createDocumentFragment,Dc=zt.getElementsByTagName,Nc=r.importNode,M=fs();e.isSupported=typeof bs=="function"&&typeof j=="function"&&or&&or.createHTMLDocument!==void 0;let Oc=Dd,zc=Nd,$c=Od,Fc=zd,Hc=$d,qc=Fd,xo=Hd,Pc=Pd,wo=hs,I=null,Ao=E({},[...ls,...Cr,...Rr,...Mr,...cs]),D=null,Eo=E({},[...ds,...Ir,...us,...Vt]),N=Object.seal(Je(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}})),dt=null,So=null,we=Object.seal(Je(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ko=!0,sr=!0,To=!1,Lo=!0,Ae=!1,Ee=!0,Oe=!1,ar=!1,lr=null,cr=null,dr=!1,je=!1,$t=!1,Ft=!1,Co=!0,Ro=!1,Mo="user-content-",ur=!0,hr=!1,Ke={},pe=null,pr=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Io=null,Do=E({},["audio","video","img","source","image","track"]),mr=null,No=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ht="http://www.w3.org/1998/Math/MathML",qt="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml",We=me,fr=!1,br=null,Bc=E({},[Ht,qt,me],Lr),Oo=B(["mi","mo","mn","ms","mtext"]),vr=E({},Oo),zo=B(["annotation-xml"]),gr=E({},zo),Uc=E({},["title","style","font","a","script"]),ut=null,jc=["application/xhtml+xml","text/html"],Kc="text/html",R=null,Ye=null,Wc=t.createElement("form"),$o=function(s){return s instanceof RegExp||s instanceof Function},yr=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ye&&Ye===s)return;(!s||typeof s!="object")&&(s={}),s=V(s),ut=jc.indexOf(s.PARSER_MEDIA_TYPE)===-1?Kc:s.PARSER_MEDIA_TYPE,R=ut==="application/xhtml+xml"?Lr:bt,I=ke(s,"ALLOWED_TAGS",Ao,{transform:R}),D=ke(s,"ALLOWED_ATTR",Eo,{transform:R}),br=ke(s,"ALLOWED_NAMESPACES",Bc,{transform:Lr}),mr=ke(s,"ADD_URI_SAFE_ATTR",No,{transform:R,base:No}),Io=ke(s,"ADD_DATA_URI_TAGS",Do,{transform:R,base:Do}),pe=ke(s,"FORBID_CONTENTS",pr,{transform:R}),dt=ke(s,"FORBID_TAGS",V({}),{transform:R}),So=ke(s,"FORBID_ATTR",V({}),{transform:R}),Ke=P(s,"USE_PROFILES")?s.USE_PROFILES&&typeof s.USE_PROFILES=="object"?V(s.USE_PROFILES):s.USE_PROFILES:!1,ko=s.ALLOW_ARIA_ATTR!==!1,sr=s.ALLOW_DATA_ATTR!==!1,To=s.ALLOW_UNKNOWN_PROTOCOLS||!1,Lo=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ae=s.SAFE_FOR_TEMPLATES||!1,Ee=s.SAFE_FOR_XML!==!1,Oe=s.WHOLE_DOCUMENT||!1,je=s.RETURN_DOM||!1,$t=s.RETURN_DOM_FRAGMENT||!1,Ft=s.RETURN_TRUSTED_TYPE||!1,dr=s.FORCE_BODY||!1,Co=s.SANITIZE_DOM!==!1,Ro=s.SANITIZE_NAMED_PROPS||!1,ur=s.KEEP_CONTENT!==!1,hr=s.IN_PLACE||!1,wo=Rd(s.ALLOWED_URI_REGEXP)?s.ALLOWED_URI_REGEXP:hs,We=typeof s.NAMESPACE=="string"?s.NAMESPACE:me,vr=P(s,"MATHML_TEXT_INTEGRATION_POINTS")&&s.MATHML_TEXT_INTEGRATION_POINTS&&typeof s.MATHML_TEXT_INTEGRATION_POINTS=="object"?V(s.MATHML_TEXT_INTEGRATION_POINTS):E({},Oo),gr=P(s,"HTML_INTEGRATION_POINTS")&&s.HTML_INTEGRATION_POINTS&&typeof s.HTML_INTEGRATION_POINTS=="object"?V(s.HTML_INTEGRATION_POINTS):E({},zo);let l=P(s,"CUSTOM_ELEMENT_HANDLING")&&s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING=="object"?V(s.CUSTOM_ELEMENT_HANDLING):Je(null);if(N=Je(null),P(l,"tagNameCheck")&&$o(l.tagNameCheck)&&(N.tagNameCheck=l.tagNameCheck),P(l,"attributeNameCheck")&&$o(l.attributeNameCheck)&&(N.attributeNameCheck=l.attributeNameCheck),P(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(N.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),U(N),Ae&&(sr=!1),$t&&(je=!0),Ke&&(I=E({},cs),D=Je(null),Ke.html===!0&&(E(I,ls),E(D,ds)),Ke.svg===!0&&(E(I,Cr),E(D,Ir),E(D,Vt)),Ke.svgFilters===!0&&(E(I,Rr),E(D,Ir),E(D,Vt)),Ke.mathMl===!0&&(E(I,Mr),E(D,us),E(D,Vt))),we.tagCheck=null,we.attributeCheck=null,P(s,"ADD_TAGS")&&(typeof s.ADD_TAGS=="function"?we.tagCheck=s.ADD_TAGS:Te(s.ADD_TAGS)&&(I===Ao&&(I=V(I)),E(I,s.ADD_TAGS,R))),P(s,"ADD_ATTR")&&(typeof s.ADD_ATTR=="function"?we.attributeCheck=s.ADD_ATTR:Te(s.ADD_ATTR)&&(D===Eo&&(D=V(D)),E(D,s.ADD_ATTR,R))),P(s,"ADD_URI_SAFE_ATTR")&&Te(s.ADD_URI_SAFE_ATTR)&&E(mr,s.ADD_URI_SAFE_ATTR,R),P(s,"FORBID_CONTENTS")&&Te(s.FORBID_CONTENTS)&&(pe===pr&&(pe=V(pe)),E(pe,s.FORBID_CONTENTS,R)),P(s,"ADD_FORBID_CONTENTS")&&Te(s.ADD_FORBID_CONTENTS)&&(pe===pr&&(pe=V(pe)),E(pe,s.ADD_FORBID_CONTENTS,R)),ur&&(I["#text"]=!0),Oe&&E(I,["html","head","body"]),I.table&&(E(I,["tbody"]),delete dt.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw $e('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $e('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let u=K;K=s.TRUSTED_TYPES_POLICY;try{ge=Ue("")}catch(y){throw K=u,y}}else s.TRUSTED_TYPES_POLICY===null?(K=void 0,ge=""):(K===void 0&&(K=Mc()),K&&typeof ge=="string"&&(ge=Ue("")));B&&B(s),Ye=s},Fo=E({},[...Cr,...Rr,...Md]),Ho=E({},[...Mr,...Id]),Yc=function(s,l,u){return l.namespaceURI===me?s==="svg":l.namespaceURI===Ht?s==="svg"&&(u==="annotation-xml"||vr[u]):!!Fo[s]},Gc=function(s,l,u){return l.namespaceURI===me?s==="math":l.namespaceURI===qt?s==="math"&&gr[u]:!!Ho[s]},Vc=function(s,l,u){return l.namespaceURI===qt&&!gr[u]||l.namespaceURI===Ht&&!vr[u]?!1:!Ho[s]&&(Uc[s]||!Fo[s])},Xc=function(s){let l=j(s);(!l||!l.tagName)&&(l={namespaceURI:We,tagName:"template"});let u=bt(s.tagName),y=bt(l.tagName);return br[s.namespaceURI]?s.namespaceURI===qt?Yc(u,l,y):s.namespaceURI===Ht?Gc(u,l,y):s.namespaceURI===me?Vc(u,l,y):!!(ut==="application/xhtml+xml"&&br[s.namespaceURI]):!1},Se=function(s){Ze(e.removed,{element:s});try{j(s).removeChild(s)}catch{if(S(s),!j(s))throw $e("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Pt=function(s){_r(s);let l=k(s);if(l){let y=[];Xe(l,x=>{Ze(y,x)}),Xe(y,x=>{try{S(x)}catch{}})}let u=Ot(s);if(u)for(let y=u.length-1;y>=0;--y){let x=u[y],w=x&&x.name;if(typeof w=="string")try{s.removeAttribute(w)}catch{}}},ze=function(s,l){try{Ze(e.removed,{attribute:l.getAttributeNode(s),from:l})}catch{Ze(e.removed,{attribute:null,from:l})}if(l.removeAttribute(s),s==="is")if(je||$t)try{Se(l)}catch{}else try{l.setAttribute(s,"")}catch{}},Zc=function(s){let l=Ot(s);if(l)for(let u=l.length-1;u>=0;--u){let y=l[u],x=y&&y.name;if(!(typeof x!="string"||D[R(x)]))try{s.removeAttribute(x)}catch{}}},_r=function(s){let l=[s];for(;l.length>0;){let u=l.pop();(z?z(u):u.nodeType)===re.element&&Zc(u);let x=k(u);if(x)for(let w=x.length-1;w>=0;--w)l.push(x[w])}},Jc=function(s){if(!Ee)return;let l=[s];for(;l.length>0;){let u=l.pop(),y=z?z(u):u.nodeType;if(y===re.processingInstruction||y===re.comment&&q(ms,u.data)){try{S(u)}catch{}continue}if(y===re.element){let w=u,O=R(ne?ne(u):u.nodeName);try{w.hasAttribute&&w.hasAttribute("patchsrc")&&w.removeAttribute("patchsrc"),w.hasAttribute&&w.hasAttribute("for")&&O!=="label"&&O!=="output"&&w.removeAttribute("for")}catch{}}let x=k(u);if(x)for(let w=x.length-1;w>=0;--w)l.push(x[w])}},qo=function(s){let l=null,u=null;if(dr)s="<remove></remove>"+s;else{let w=ns(s,/^[\r\n\t ]+/);u=w&&w[0]}ut==="application/xhtml+xml"&&We===me&&(s='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+s+"</body></html>");let y=K?Ue(s):s;if(We===me)try{l=new _().parseFromString(y,ut)}catch{}if(!l||!l.documentElement){l=or.createDocument(We,"template",null);try{l.documentElement.innerHTML=fr?ge:y}catch{}}let x=l.body||l.documentElement;return s&&u&&x.insertBefore(t.createTextNode(u),x.childNodes[0]||null),We===me?Dc.call(l,Oe?"html":"body")[0]:Oe?l.documentElement:x},Po=function(s){return _o.call(s.ownerDocument||s,s,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Bt=function(s){return s=mt(s,Oc," "),s=mt(s,zc," "),s=mt(s,$c," "),s},xr=function(s){var l;s.normalize();let u=_o.call(s.ownerDocument||s,s,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null),y=u.nextNode();for(;y;)y.data=Bt(y.data),y=u.nextNode();let x=(l=s.querySelectorAll)===null||l===void 0?void 0:l.call(s,"template");x&&Xe(x,w=>{Ge(w.content)&&xr(w.content)})},Ut=function(s){let l=ne?ne(s):null;return typeof l!="string"||R(l)!=="form"?!1:typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||s.attributes!==Ot(s)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function"||s.nodeType!==z(s)||s.childNodes!==k(s)},Ge=function(s){if(!z||typeof s!="object"||s===null)return!1;try{return z(s)===re.documentFragment}catch{return!1}},ht=function(s){if(!z||typeof s!="object"||s===null)return!1;try{return typeof z(s)=="number"}catch{return!1}};function fe(p,s,l){p.length!==0&&Xe(p,u=>{u.call(e,s,l,Ye)})}let Qc=function(s,l){return!!(Ee&&s.hasChildNodes()&&!ht(s.firstElementChild)&&q(ps,s.textContent)&&q(ps,s.innerHTML)||Ee&&s.namespaceURI===me&&l==="style"&&ht(s.firstElementChild)||s.nodeType===re.processingInstruction||Ee&&s.nodeType===re.comment&&q(ms,s.data))},ed=function(s,l){if(!dt[l]&&jo(l)&&(N.tagNameCheck instanceof RegExp&&q(N.tagNameCheck,l)||N.tagNameCheck instanceof Function&&N.tagNameCheck(l)))return!1;if(ur&&!pe[l]){let u=j(s),y=k(s);if(y&&u){let x=y.length;for(let w=x-1;w>=0;--w){let O=hr?y[w]:L(y[w],!0);u.insertBefore(O,A(s))}}}return Se(s),!0},Bo=function(s,l){if(fe(M.beforeSanitizeElements,s,null),s!==l&&j(s)===null)return!0;if(Ut(s))return Se(s),!0;let u=R(ne?ne(s):s.nodeName);if(fe(M.uponSanitizeElement,s,{tagName:u,allowedTags:I}),s!==l&&j(s)===null)return!0;if(Qc(s,u))return Se(s),!0;if(dt[u]||!(we.tagCheck instanceof Function&&we.tagCheck(u))&&!I[u]){let x=ed(s,u);return x===!1&&fe(M.afterSanitizeElements,s,null),x}if((z?z(s):s.nodeType)===re.element&&!Xc(s)||(u==="noscript"||u==="noembed"||u==="noframes")&&q(Bd,s.innerHTML))return Se(s),!0;if(Ae&&s.nodeType===re.text){let x=Bt(s.textContent);s.textContent!==x&&(Ze(e.removed,{element:s.cloneNode()}),s.textContent=x)}return fe(M.afterSanitizeElements,s,null),!1},Uo=function(s,l,u){if(So[l]||Ee&&l==="patchsrc"||Ee&&l==="for"&&s!=="label"&&s!=="output"||Co&&(l==="id"||l==="name")&&(u in t||u in Wc))return!1;let y=D[l]||we.attributeCheck instanceof Function&&we.attributeCheck(l,s);if(!(sr&&q(Fc,l))){if(!(ko&&q(Hc,l))){if(y){if(!mr[l]){if(!q(wo,mt(u,xo,""))){if(!((l==="src"||l==="xlink:href"||l==="href")&&s!=="script"&&os(u,"data:")===0&&Io[s])){if(!(To&&!q(qc,mt(u,xo,"")))){if(u)return!1}}}}}else if(!(jo(s)&&(N.tagNameCheck instanceof RegExp&&q(N.tagNameCheck,s)||N.tagNameCheck instanceof Function&&N.tagNameCheck(s))&&(N.attributeNameCheck instanceof RegExp&&q(N.attributeNameCheck,l)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(l,s))||l==="is"&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&q(N.tagNameCheck,u)||N.tagNameCheck instanceof Function&&N.tagNameCheck(u))))return!1}}return!0},td=E({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),jo=function(s){return!td[bt(s)]&&q(Pc,s)},id=function(s,l,u,y){if(K&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!u)switch(f.getAttributeType(s,l)){case"TrustedHTML":return Ue(y);case"TrustedScriptURL":return Rc(y)}return y},rd=function(s,l,u,y){try{u?s.setAttributeNS(u,l,y):s.setAttribute(l,y),Ut(s)?Se(s):rs(e.removed)}catch{ze(l,s)}},Ko=function(s){fe(M.beforeSanitizeAttributes,s,null);let l=s.attributes;if(!l||Ut(s))return;let u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0},y=l.length,x=R(s.nodeName);for(;y--;){let w=l[y],O=w.name,W=w.namespaceURI,se=w.value,X=R(O),ae=se,G=O==="value"?ae:Ed(ae);if(u.attrName=X,u.attrValue=G,u.keepAttr=!0,u.forceKeepAttr=void 0,fe(M.uponSanitizeAttribute,s,u),G=u.attrValue,Ro&&(X==="id"||X==="name")&&os(G,Mo)!==0&&(ze(O,s),G=Mo+G),Ee&&q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,G)){ze(O,s);continue}if(X==="attributename"&&ns(G,"href")){ze(O,s);continue}if(!u.forceKeepAttr){if(!u.keepAttr){ze(O,s);continue}if(!Lo&&q(Ud,G)){ze(O,s);continue}if(Ae&&(G=Bt(G)),!Uo(x,X,G)){ze(O,s);continue}G=id(x,X,W,G),G!==ae&&rd(s,O,W,G)}}fe(M.afterSanitizeAttributes,s,null)},jt=function(s){let l=null,u=Po(s);for(fe(M.beforeSanitizeShadowDOM,s,null);l=u.nextNode();)if(fe(M.uponSanitizeShadowNode,l,null),Bo(l,s),Ko(l),Ge(l.content)&&jt(l.content),(z?z(l):l.nodeType)===re.element){let x=he(l);Ge(x)&&(wr(x),jt(x))}fe(M.afterSanitizeShadowDOM,s,null)},wr=function(s){let l=[{node:s,shadow:null}];for(;l.length>0;){let u=l.pop();if(u.shadow){jt(u.shadow);continue}let y=u.node,w=(z?z(y):y.nodeType)===re.element,O=k(y);if(O)for(let W=O.length-1;W>=0;--W)l.push({node:O[W],shadow:null});if(w){let W=ne?ne(y):null;if(typeof W=="string"&&R(W)==="template"){let se=y.content;Ge(se)&&l.push({node:se,shadow:null})}}if(w){let W=he(y);Ge(W)&&l.push({node:null,shadow:W},{node:W,shadow:null})}}};return e.sanitize=function(p){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=null,u=null,y=null,x=null;if(fr=!p,fr&&(p="<!-->"),typeof p!="string"&&!ht(p)&&(p=Cd(p),typeof p!="string"))throw $e("dirty is not a string, aborting");if(!e.isSupported)return p;ar?(I=lr,D=cr):yr(s),(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&(I=V(I)),M.uponSanitizeAttribute.length>0&&(D=V(D)),e.removed=[];let w=hr&&typeof p!="string"&&ht(p);if(w){Jc(p);let X=ne?ne(p):p.nodeName;if(typeof X=="string"){let ae=R(X);if(!I[ae]||dt[ae])throw Pt(p),$e("root node is forbidden and cannot be sanitized in-place")}if(Ut(p))throw Pt(p),$e("root node is clobbered and cannot be sanitized in-place");try{wr(p)}catch(ae){throw Pt(p),ae}}else if(ht(p))l=qo("<!---->"),u=l.ownerDocument.importNode(p,!0),u.nodeType===re.element&&u.nodeName==="BODY"||u.nodeName==="HTML"?l=u:l.appendChild(u),wr(u);else{if(!je&&!Ae&&!Oe&&p.indexOf("<")===-1)return K&&Ft?Ue(p):p;if(l=qo(p),!l)return je?null:Ft?ge:""}l&&dr&&Se(l.firstChild);let O=w?p:l,W=Po(O);try{for(;y=W.nextNode();)Bo(y,O),Ko(y),Ge(y.content)&&jt(y.content)}catch(X){throw w&&(Pt(p),Xe(e.removed,ae=>{ae.element&&_r(ae.element)})),X}if(w)return Xe(e.removed,X=>{X.element&&_r(X.element)}),Ae&&xr(p),p;if(je){if(Ae&&xr(l),$t)for(x=Ic.call(l.ownerDocument);l.firstChild;)x.appendChild(l.firstChild);else x=l;return(D.shadowroot||D.shadowrootmode)&&(x=Nc.call(r,x,!0)),x}let se=Oe?l.outerHTML:l.innerHTML;return Oe&&I["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&q(qd,l.ownerDocument.doctype.name)&&(se="<!DOCTYPE "+l.ownerDocument.doctype.name+`>
278
- `+se),Ae&&(se=Bt(se)),K&&Ft?Ue(se):se},e.setConfig=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yr(p),ar=!0,lr=I,cr=D},e.clearConfig=function(){Ye=null,ar=!1,lr=null,cr=null,K=xe,ge=""},e.isValidAttribute=function(p,s,l){Ye||yr({});let u=R(p),y=R(s);return Uo(u,y,l)},e.addHook=function(p,s){typeof s=="function"&&P(M,p)&&Ze(M[p],s)},e.removeHook=function(p,s){if(P(M,p)){if(s!==void 0){let l=wd(M[p],s);return l===-1?void 0:Ad(M[p],l,1)[0]}return rs(M[p])}},e.removeHooks=function(p){P(M,p)&&(M[p]=[])},e.removeAllHooks=function(){M=fs()},e}var bs,is,yd,_d,xd,B,U,Je,vs,Dr,Nr,Xe,wd,rs,Ze,Ad,Te,bt,Lr,ns,mt,os,Ed,Sd,kd,ss,as,P,ft,q,$e,ls,Cr,Rr,Md,Mr,Id,cs,ds,Ir,us,Vt,Dd,Nd,Od,zd,$d,hs,Fd,Hd,qd,Pd,ps,ms,Bd,Ud,re,jd,Kd,fs,ke,$,ys=h(()=>{bs=Object.entries,is=Object.setPrototypeOf,yd=Object.isFrozen,_d=Object.getPrototypeOf,xd=Object.getOwnPropertyDescriptor,B=Object.freeze,U=Object.seal,Je=Object.create,vs=typeof Reflect<"u"&&Reflect,Dr=vs.apply,Nr=vs.construct;B||(B=function(e){return e});U||(U=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)});Nr||(Nr=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)});Xe=F(Array.prototype.forEach),wd=F(Array.prototype.lastIndexOf),rs=F(Array.prototype.pop),Ze=F(Array.prototype.push),Ad=F(Array.prototype.splice),Te=Array.isArray,bt=F(String.prototype.toLowerCase),Lr=F(String.prototype.toString),ns=F(String.prototype.match),mt=F(String.prototype.replace),os=F(String.prototype.indexOf),Ed=F(String.prototype.trim),Sd=F(Number.prototype.toString),kd=F(Boolean.prototype.toString),ss=typeof BigInt>"u"?null:F(BigInt.prototype.toString),as=typeof Symbol>"u"?null:F(Symbol.prototype.toString),P=F(Object.prototype.hasOwnProperty),ft=F(Object.prototype.toString),q=F(RegExp.prototype.test),$e=Td(TypeError);ls=B(["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"]),Cr=B(["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"]),Rr=B(["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"]),Md=B(["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"]),Mr=B(["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"]),Id=B(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cs=B(["#text"]),ds=B(["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"]),Ir=B(["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","dominant-baseline","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-orientation","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"]),us=B(["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"]),Vt=B(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Dd=U(/{{[\w\W]*|^[\w\W]*}}/g),Nd=U(/<%[\w\W]*|^[\w\W]*%>/g),Od=U(/\${[\w\W]*/g),zd=U(/^data-[\-\w.\u00B7-\uFFFF]+$/),$d=U(/^aria-[\-\w]+$/),hs=U(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fd=U(/^(?:\w+script|data):/i),Hd=U(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qd=U(/^html$/i),Pd=U(/^[a-z][.\w]*(-[.\w]+)+$/i),ps=U(/<[/\w!]/g),ms=U(/<[/\w]/g),Bd=U(/<\/no(script|embed|frames)/i),Ud=U(/\/>/i),re={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},jd=function(){return typeof window>"u"?null:window},Kd=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}},fs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ke=function(e,t,r,n){return P(e,t)&&Te(e[t])?E(n.base?V(n.base):{},e[t],n.transform):r};$=gs()});var _s={};v(_s,{addHook:()=>Vd,clearConfig:()=>eu,clearWindow:()=>nu,default:()=>Wd,isSupported:()=>Gd,isValidAttribute:()=>tu,removeAllHooks:()=>Jd,removeHook:()=>Xd,removeHooks:()=>Zd,removed:()=>ru,sanitize:()=>Yd,setConfig:()=>Qd,version:()=>iu});function nu(){}var Wd,Yd,Gd,Vd,Xd,Zd,Jd,Qd,eu,tu,iu,ru,xs=h(()=>{ys();Wd=$,Yd=$.sanitize.bind($),Gd=$.isSupported,Vd=$.addHook.bind($),Xd=$.removeHook.bind($),Zd=$.removeHooks.bind($),Jd=$.removeAllHooks.bind($),Qd=$.setConfig.bind($),eu=$.clearConfig.bind($),tu=$.isValidAttribute.bind($),iu=$.version,ru=$.removed});function g(i){return typeof i!="string"?"":i.replace(su,e=>ou[e])}function Or(i){return typeof i!="string"?"":i.replace(au,"")}function ye(i){return g(Or(i))}function Fe(i,e){if(typeof i!="string")return"";let t=i.trim();if(!t||/^\s*javascript:/i.test(t)||/^\s*vbscript:/i.test(t)||cu.test(t)||/^data:/i.test(t)&&!ws.test(t))return"";try{let r=new URL(t,e||(typeof location<"u"?location.href:"https://example.invalid/"));return!lu.has(r.protocol)||r.protocol==="data:"&&!ws.test(r.href)?"":r.href}catch{return t.startsWith("#")||t.startsWith("/")?t:""}}function As(i,e){if(typeof i!="string")return"#";let t=i.trim();return t?t.startsWith("#")||t.startsWith("/")&&!t.startsWith("//")?t:/^https?:\/\//i.test(t)?Fe(t,e)||"#":/^\s*javascript:/i.test(t)||/^\s*vbscript:/i.test(t)?"#":t:"#"}function Es(i){let e=String(i||"text").toLowerCase();return du.has(e)?e:"text"}async function uu(){if(vt)return vt;try{let i=await Promise.resolve().then(()=>(xs(),_s));vt=i.default||i}catch{vt=null}return vt}async function Ss(i){if(typeof i!="string")return"";let e=await uu();return e?.sanitize?e.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:hu,ADD_ATTR:pu,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 ks(){return Xt||(typeof window<"u"&&window.trustedTypes?.createPolicy&&(Xt=window.trustedTypes.createPolicy("velinstyle",{createHTML:i=>g(i)})),Xt)}function mu(i){let e=ks(),t=g(Or(i));return e?.createHTML?e.createHTML(t):t}var ou,su,au,lu,cu,ws,du,vt,hu,pu,Xt,C=h(()=>{ou={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},su=/[&<>"']/g,au=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,lu=new Set(["http:","https:","data:","mailto:","tel:"]),cu=/^data:(?:text\/html|image\/svg\+xml|application\/xml)/i,ws=/^data:image\/(png|jpeg|jpg|gif|webp|avif);base64,/i,du=new Set(["text","password","email","search","tel","url","number"]);vt=null;hu=["svg","g","path","circle","rect","line","polyline","polygon","ellipse","defs","use","symbol","title","desc","clipPath","mask","linearGradient","radialGradient","stop","pattern","text","tspan"],pu=["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"];Xt=null});var Ls={};v(Ls,{default:()=>Ts});var fu,Zt,Ts,zr=h(()=>{C();fu=`
276
+ `,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)&&(ne(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);fs=Qt});function vs(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 Vu(i){if(Array.isArray(i))return i}function Wu(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,o,a,c=[],u=!0,h=!1;try{if(o=(t=t.call(i)).next,e!==0)for(;!(u=(r=o.call(t)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(b){h=!0,n=b}finally{try{if(!u&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(h)throw n}}return c}}function Yu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
277
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xu(i,e){return Vu(i)||Wu(i,e)||Zu(i,e)||Yu()}function Zu(i,e){if(i){if(typeof i=="string")return vs(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)?vs(i,e):void 0}}function P(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 Hr(i,e,r)}}function sd(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Br(i,t)}}function E(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xt;if(gs&&gs(i,null),!Me(e))return i;let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){let o=t(n);o!==n&&(Ju(e)||(e[r]=o),n=o)}i[n]=!0}return i}function ad(i){for(let e=0;e<i.length;e++)H(i,e)||(i[e]=null);return i}function X(i){let e=rt(null);for(let r of Is(i)){var t=Xu(r,2);let n=t[0],o=t[1];H(i,n)&&(Me(o)?e[n]=ad(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=X(o):e[n]=o)}return e}function ld(i){switch(typeof i){case"string":return i;case"number":return nd(i);case"boolean":return od(i);case"bigint":return xs?xs(i):"0";case"symbol":return As?As(i):"Symbol()";case"undefined":return wt(i);case"function":case"object":{if(i===null)return wt(i);let e=i,t=ye(e,"toString");if(typeof t=="function"){let r=t(e);return typeof r=="string"?r:wt(r)}return wt(i)}default:return wt(i)}}function ye(i,e){for(;i!==null;){let r=ed(i,e);if(r){if(r.get)return P(r.get);if(typeof r.value=="function")return P(r.value)}i=Qu(i)}function t(){return null}return t}function cd(i){try{return q(i,""),!0}catch{return!1}}function Os(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ad(),e=f=>Os(f);if(e.version="3.4.12",e.removed=[],!i||!i.document||i.document.nodeType!==oe.document||!i.Element)return e.isSupported=!1,e;let t=i.document,r=t,n=r.currentScript;i.DocumentFragment;let o=i.HTMLTemplateElement,a=i.Node,c=i.Element,u=i.NodeFilter,h=i.NamedNodeMap;h===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;let b=i.DOMParser,m=i.trustedTypes,v=c.prototype,T=ye(v,"cloneNode"),k=ye(v,"remove"),A=ye(v,"nextSibling"),S=ye(v,"childNodes"),K=ye(v,"parentNode"),me=ye(v,"shadowRoot"),qt=ye(v,"attributes"),z=a&&a.prototype?ye(a.prototype,"nodeType"):null,se=a&&a.prototype?ye(a.prototype,"nodeName"):null;if(typeof o=="function"){let f=t.createElement("template");f.content&&f.content.ownerDocument&&(t=f.content.ownerDocument)}let G,_e="",ke,Oo=!1,ft=0,No=function(){if(ft>0)throw Be('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},We=function(s){No(),ft++;try{return G.createHTML(s)}finally{ft--}},cu=function(s){No(),ft++;try{return G.createScriptURL(s)}finally{ft--}},uu=function(){return Oo||(ke=Ed(m,n),Oo=!0),ke},Ht=t,hr=Ht.implementation,zo=Ht.createNodeIterator,du=Ht.createDocumentFragment,pu=Ht.getElementsByTagName,hu=r.importNode,M=Ms();e.isSupported=typeof Is=="function"&&typeof K=="function"&&hr&&hr.createHTMLDocument!==void 0;let mu=pd,fu=hd,bu=md,vu=fd,gu=bd,yu=vd,$o=gd,_u=_d,Po=Cs,I=null,Fo=E({},[...Es,...$r,...Pr,...Fr,...ks]),D=null,qo=E({},[...Ss,...qr,...Ts,...ei]),O=Object.seal(rt(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}})),bt=null,Ho=null,Se=Object.seal(rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Bo=!0,mr=!0,Uo=!1,jo=!0,Te=!1,Ce=!0,qe=!1,fr=!1,br=null,vr=null,gr=!1,Ye=!1,Bt=!1,Ut=!1,Ko=!0,Go=!1,Vo="user-content-",yr=!0,_r=!1,Xe={},fe=null,wr=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Wo=null,Yo=E({},["audio","video","img","source","image","track"]),xr=null,Xo=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),jt="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml",Ze=be,Ar=!1,Er=null,wu=E({},[jt,Kt,be],zr),Zo=B(["mi","mo","mn","ms","mtext"]),kr=E({},Zo),Jo=B(["annotation-xml"]),Sr=E({},Jo),xu=E({},["title","style","font","a","script"]),vt=null,Au=["application/xhtml+xml","text/html"],Eu="text/html",R=null,Je=null,ku=t.createElement("form"),Qo=function(s){return s instanceof RegExp||s instanceof Function},Tr=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Je&&Je===s)return;(!s||typeof s!="object")&&(s={}),s=X(s),vt=Au.indexOf(s.PARSER_MEDIA_TYPE)===-1?Eu:s.PARSER_MEDIA_TYPE,R=vt==="application/xhtml+xml"?zr:xt,I=Re(s,"ALLOWED_TAGS",Fo,{transform:R}),D=Re(s,"ALLOWED_ATTR",qo,{transform:R}),Er=Re(s,"ALLOWED_NAMESPACES",wu,{transform:zr}),xr=Re(s,"ADD_URI_SAFE_ATTR",Xo,{transform:R,base:Xo}),Wo=Re(s,"ADD_DATA_URI_TAGS",Yo,{transform:R,base:Yo}),fe=Re(s,"FORBID_CONTENTS",wr,{transform:R}),bt=Re(s,"FORBID_TAGS",X({}),{transform:R}),Ho=Re(s,"FORBID_ATTR",X({}),{transform:R}),Xe=H(s,"USE_PROFILES")?s.USE_PROFILES&&typeof s.USE_PROFILES=="object"?X(s.USE_PROFILES):s.USE_PROFILES:!1,Bo=s.ALLOW_ARIA_ATTR!==!1,mr=s.ALLOW_DATA_ATTR!==!1,Uo=s.ALLOW_UNKNOWN_PROTOCOLS||!1,jo=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=s.SAFE_FOR_TEMPLATES||!1,Ce=s.SAFE_FOR_XML!==!1,qe=s.WHOLE_DOCUMENT||!1,Ye=s.RETURN_DOM||!1,Bt=s.RETURN_DOM_FRAGMENT||!1,Ut=s.RETURN_TRUSTED_TYPE||!1,gr=s.FORCE_BODY||!1,Ko=s.SANITIZE_DOM!==!1,Go=s.SANITIZE_NAMED_PROPS||!1,yr=s.KEEP_CONTENT!==!1,_r=s.IN_PLACE||!1,Po=cd(s.ALLOWED_URI_REGEXP)?s.ALLOWED_URI_REGEXP:Cs,Ze=typeof s.NAMESPACE=="string"?s.NAMESPACE:be,kr=H(s,"MATHML_TEXT_INTEGRATION_POINTS")&&s.MATHML_TEXT_INTEGRATION_POINTS&&typeof s.MATHML_TEXT_INTEGRATION_POINTS=="object"?X(s.MATHML_TEXT_INTEGRATION_POINTS):E({},Zo),Sr=H(s,"HTML_INTEGRATION_POINTS")&&s.HTML_INTEGRATION_POINTS&&typeof s.HTML_INTEGRATION_POINTS=="object"?X(s.HTML_INTEGRATION_POINTS):E({},Jo);let l=H(s,"CUSTOM_ELEMENT_HANDLING")&&s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING=="object"?X(s.CUSTOM_ELEMENT_HANDLING):rt(null);if(O=rt(null),H(l,"tagNameCheck")&&Qo(l.tagNameCheck)&&(O.tagNameCheck=l.tagNameCheck),H(l,"attributeNameCheck")&&Qo(l.attributeNameCheck)&&(O.attributeNameCheck=l.attributeNameCheck),H(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(O.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),U(O),Te&&(mr=!1),Bt&&(Ye=!0),Xe&&(I=E({},ks),D=rt(null),Xe.html===!0&&(E(I,Es),E(D,Ss)),Xe.svg===!0&&(E(I,$r),E(D,qr),E(D,ei)),Xe.svgFilters===!0&&(E(I,Pr),E(D,qr),E(D,ei)),Xe.mathMl===!0&&(E(I,Fr),E(D,Ts),E(D,ei))),Se.tagCheck=null,Se.attributeCheck=null,H(s,"ADD_TAGS")&&(typeof s.ADD_TAGS=="function"?Se.tagCheck=s.ADD_TAGS:Me(s.ADD_TAGS)&&(I===Fo&&(I=X(I)),E(I,s.ADD_TAGS,R))),H(s,"ADD_ATTR")&&(typeof s.ADD_ATTR=="function"?Se.attributeCheck=s.ADD_ATTR:Me(s.ADD_ATTR)&&(D===qo&&(D=X(D)),E(D,s.ADD_ATTR,R))),H(s,"ADD_URI_SAFE_ATTR")&&Me(s.ADD_URI_SAFE_ATTR)&&E(xr,s.ADD_URI_SAFE_ATTR,R),H(s,"FORBID_CONTENTS")&&Me(s.FORBID_CONTENTS)&&(fe===wr&&(fe=X(fe)),E(fe,s.FORBID_CONTENTS,R)),H(s,"ADD_FORBID_CONTENTS")&&Me(s.ADD_FORBID_CONTENTS)&&(fe===wr&&(fe=X(fe)),E(fe,s.ADD_FORBID_CONTENTS,R)),yr&&(I["#text"]=!0),qe&&E(I,["html","head","body"]),I.table&&(E(I,["tbody"]),delete bt.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw Be('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Be('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let d=G;G=s.TRUSTED_TYPES_POLICY;try{_e=We("")}catch(_){throw G=d,_}}else s.TRUSTED_TYPES_POLICY===null?(G=void 0,_e=""):(G===void 0&&(G=uu()),G&&typeof _e=="string"&&(_e=We("")));B&&B(s),Je=s},es=E({},[...$r,...Pr,...ud]),ts=E({},[...Fr,...dd]),Su=function(s,l,d){return l.namespaceURI===be?s==="svg":l.namespaceURI===jt?s==="svg"&&(d==="annotation-xml"||kr[d]):!!es[s]},Tu=function(s,l,d){return l.namespaceURI===be?s==="math":l.namespaceURI===Kt?s==="math"&&Sr[d]:!!ts[s]},Cu=function(s,l,d){return l.namespaceURI===Kt&&!Sr[d]||l.namespaceURI===jt&&!kr[d]?!1:!ts[s]&&(xu[s]||!es[s])},Lu=function(s){let l=K(s);(!l||!l.tagName)&&(l={namespaceURI:Ze,tagName:"template"});let d=xt(s.tagName),_=xt(l.tagName);return Er[s.namespaceURI]?s.namespaceURI===Kt?Su(d,l,_):s.namespaceURI===jt?Tu(d,l,_):s.namespaceURI===be?Cu(d,l,_):!!(vt==="application/xhtml+xml"&&Er[s.namespaceURI]):!1},Le=function(s){it(e.removed,{element:s});try{K(s).removeChild(s)}catch{if(k(s),!K(s))throw Be("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Gt=function(s){Cr(s);let l=S(s);if(l){let _=[];tt(l,w=>{it(_,w)}),tt(_,w=>{try{k(w)}catch{}})}let d=qt(s);if(d)for(let _=d.length-1;_>=0;--_){let w=d[_],x=w&&w.name;if(typeof x=="string")try{s.removeAttribute(x)}catch{}}},He=function(s,l){try{it(e.removed,{attribute:l.getAttributeNode(s),from:l})}catch{it(e.removed,{attribute:null,from:l})}if(l.removeAttribute(s),s==="is")if(Ye||Bt)try{Le(l)}catch{}else try{l.setAttribute(s,"")}catch{}},Ru=function(s){let l=qt(s);if(l)for(let d=l.length-1;d>=0;--d){let _=l[d],w=_&&_.name;if(!(typeof w!="string"||D[R(w)]))try{s.removeAttribute(w)}catch{}}},Cr=function(s){let l=[s];for(;l.length>0;){let d=l.pop();(z?z(d):d.nodeType)===oe.element&&Ru(d);let w=S(d);if(w)for(let x=w.length-1;x>=0;--x)l.push(w[x])}},Mu=function(s){if(!Ce)return;let l=[s];for(;l.length>0;){let d=l.pop(),_=z?z(d):d.nodeType;if(_===oe.processingInstruction||_===oe.comment&&q(Rs,d.data)){try{k(d)}catch{}continue}if(_===oe.element){let x=d,N=R(se?se(d):d.nodeName);try{x.hasAttribute&&x.hasAttribute("patchsrc")&&x.removeAttribute("patchsrc"),x.hasAttribute&&x.hasAttribute("for")&&N!=="label"&&N!=="output"&&x.removeAttribute("for")}catch{}}let w=S(d);if(w)for(let x=w.length-1;x>=0;--x)l.push(w[x])}},is=function(s){let l=null,d=null;if(gr)s="<remove></remove>"+s;else{let x=_s(s,/^[\r\n\t ]+/);d=x&&x[0]}vt==="application/xhtml+xml"&&Ze===be&&(s='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+s+"</body></html>");let _=G?We(s):s;if(Ze===be)try{l=new b().parseFromString(_,vt)}catch{}if(!l||!l.documentElement){l=hr.createDocument(Ze,"template",null);try{l.documentElement.innerHTML=Ar?_e:_}catch{}}let w=l.body||l.documentElement;return s&&d&&w.insertBefore(t.createTextNode(d),w.childNodes[0]||null),Ze===be?pu.call(l,qe?"html":"body")[0]:qe?l.documentElement:w},rs=function(s){return zo.call(s.ownerDocument||s,s,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Vt=function(s){return s=_t(s,mu," "),s=_t(s,fu," "),s=_t(s,bu," "),s},Lr=function(s){var l;s.normalize();let d=zo.call(s.ownerDocument||s,s,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),_=d.nextNode();for(;_;)_.data=Vt(_.data),_=d.nextNode();let w=(l=s.querySelectorAll)===null||l===void 0?void 0:l.call(s,"template");w&&tt(w,x=>{Qe(x.content)&&Lr(x.content)})},Wt=function(s){let l=se?se(s):null;return typeof l!="string"||R(l)!=="form"?!1:typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||s.attributes!==qt(s)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function"||s.nodeType!==z(s)||s.childNodes!==S(s)},Qe=function(s){if(!z||typeof s!="object"||s===null)return!1;try{return z(s)===oe.documentFragment}catch{return!1}},gt=function(s){if(!z||typeof s!="object"||s===null)return!1;try{return typeof z(s)=="number"}catch{return!1}};function ve(f,s,l){f.length!==0&&tt(f,d=>{d.call(e,s,l,Je)})}let Iu=function(s,l){return!!(Ce&&s.hasChildNodes()&&!gt(s.firstElementChild)&&q(Ls,s.textContent)&&q(Ls,s.innerHTML)||Ce&&s.namespaceURI===be&&l==="style"&&gt(s.firstElementChild)||s.nodeType===oe.processingInstruction||Ce&&s.nodeType===oe.comment&&q(Rs,s.data))},Du=function(s,l){if(!bt[l]&&ss(l)&&(O.tagNameCheck instanceof RegExp&&q(O.tagNameCheck,l)||O.tagNameCheck instanceof Function&&O.tagNameCheck(l)))return!1;if(yr&&!fe[l]){let d=K(s),_=S(s);if(_&&d){let w=_.length;for(let x=w-1;x>=0;--x){let N=_r?_[x]:T(_[x],!0);d.insertBefore(N,A(s))}}}return Le(s),!0},ns=function(s,l){if(ve(M.beforeSanitizeElements,s,null),s!==l&&K(s)===null)return!0;if(Wt(s))return Le(s),!0;let d=R(se?se(s):s.nodeName);if(ve(M.uponSanitizeElement,s,{tagName:d,allowedTags:I}),s!==l&&K(s)===null)return!0;if(Iu(s,d))return Le(s),!0;if(bt[d]||!(Se.tagCheck instanceof Function&&Se.tagCheck(d))&&!I[d]){let w=Du(s,d);return w===!1&&ve(M.afterSanitizeElements,s,null),w}if((z?z(s):s.nodeType)===oe.element&&!Lu(s)||(d==="noscript"||d==="noembed"||d==="noframes")&&q(wd,s.innerHTML))return Le(s),!0;if(Te&&s.nodeType===oe.text){let w=Vt(s.textContent);s.textContent!==w&&(it(e.removed,{element:s.cloneNode()}),s.textContent=w)}return ve(M.afterSanitizeElements,s,null),!1},os=function(s,l,d){if(Ho[l]||Ce&&l==="patchsrc"||Ce&&l==="for"&&s!=="label"&&s!=="output"||Ko&&(l==="id"||l==="name")&&(d in t||d in ku))return!1;let _=D[l]||Se.attributeCheck instanceof Function&&Se.attributeCheck(l,s);if(!(mr&&q(vu,l))){if(!(Bo&&q(gu,l))){if(_){if(!xr[l]){if(!q(Po,_t(d,$o,""))){if(!((l==="src"||l==="xlink:href"||l==="href")&&s!=="script"&&ws(d,"data:")===0&&Wo[s])){if(!(Uo&&!q(yu,_t(d,$o,"")))){if(d)return!1}}}}}else if(!(ss(s)&&(O.tagNameCheck instanceof RegExp&&q(O.tagNameCheck,s)||O.tagNameCheck instanceof Function&&O.tagNameCheck(s))&&(O.attributeNameCheck instanceof RegExp&&q(O.attributeNameCheck,l)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck(l,s))||l==="is"&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&q(O.tagNameCheck,d)||O.tagNameCheck instanceof Function&&O.tagNameCheck(d))))return!1}}return!0},Ou=E({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ss=function(s){return!Ou[xt(s)]&&q(_u,s)},Nu=function(s,l,d,_){if(G&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!d)switch(m.getAttributeType(s,l)){case"TrustedHTML":return We(_);case"TrustedScriptURL":return cu(_)}return _},zu=function(s,l,d,_){try{d?s.setAttributeNS(d,l,_):s.setAttribute(l,_),Wt(s)?Le(s):ys(e.removed)}catch{He(l,s)}},as=function(s){ve(M.beforeSanitizeAttributes,s,null);let l=s.attributes;if(!l||Wt(s))return;let d={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0},_=l.length,w=R(s.nodeName);for(;_--;){let x=l[_],N=x.name,V=x.namespaceURI,le=x.value,Z=R(N),ce=le,Y=N==="value"?ce:rd(ce);if(d.attrName=Z,d.attrValue=Y,d.keepAttr=!0,d.forceKeepAttr=void 0,ve(M.uponSanitizeAttribute,s,d),Y=d.attrValue,Go&&(Z==="id"||Z==="name")&&ws(Y,Vo)!==0&&(He(N,s),Y=Vo+Y),Ce&&q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Y)){He(N,s);continue}if(Z==="attributename"&&_s(Y,"href")){He(N,s);continue}if(!d.forceKeepAttr){if(!d.keepAttr){He(N,s);continue}if(!jo&&q(xd,Y)){He(N,s);continue}if(Te&&(Y=Vt(Y)),!os(w,Z,Y)){He(N,s);continue}Y=Nu(w,Z,V,Y),Y!==ce&&zu(s,N,V,Y)}}ve(M.afterSanitizeAttributes,s,null)},Yt=function(s){let l=null,d=rs(s);for(ve(M.beforeSanitizeShadowDOM,s,null);l=d.nextNode();)if(ve(M.uponSanitizeShadowNode,l,null),ns(l,s),as(l),Qe(l.content)&&Yt(l.content),(z?z(l):l.nodeType)===oe.element){let w=me(l);Qe(w)&&(Rr(w),Yt(w))}ve(M.afterSanitizeShadowDOM,s,null)},Rr=function(s){let l=[{node:s,shadow:null}];for(;l.length>0;){let d=l.pop();if(d.shadow){Yt(d.shadow);continue}let _=d.node,x=(z?z(_):_.nodeType)===oe.element,N=S(_);if(N)for(let V=N.length-1;V>=0;--V)l.push({node:N[V],shadow:null});if(x){let V=se?se(_):null;if(typeof V=="string"&&R(V)==="template"){let le=_.content;Qe(le)&&l.push({node:le,shadow:null})}}if(x){let V=me(_);Qe(V)&&l.push({node:null,shadow:V},{node:V,shadow:null})}}};return e.sanitize=function(f){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=null,d=null,_=null,w=null;if(Ar=!f,Ar&&(f="<!-->"),typeof f!="string"&&!gt(f)&&(f=ld(f),typeof f!="string"))throw Be("dirty is not a string, aborting");if(!e.isSupported)return f;fr?(I=br,D=vr):Tr(s),(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&(I=X(I)),M.uponSanitizeAttribute.length>0&&(D=X(D)),e.removed=[];let x=_r&&typeof f!="string"&&gt(f);if(x){Mu(f);let Z=se?se(f):f.nodeName;if(typeof Z=="string"){let ce=R(Z);if(!I[ce]||bt[ce])throw Gt(f),Be("root node is forbidden and cannot be sanitized in-place")}if(Wt(f))throw Gt(f),Be("root node is clobbered and cannot be sanitized in-place");try{Rr(f)}catch(ce){throw Gt(f),ce}}else if(gt(f))l=is("<!---->"),d=l.ownerDocument.importNode(f,!0),d.nodeType===oe.element&&d.nodeName==="BODY"||d.nodeName==="HTML"?l=d:l.appendChild(d),Rr(d);else{if(!Ye&&!Te&&!qe&&f.indexOf("<")===-1)return G&&Ut?We(f):f;if(l=is(f),!l)return Ye?null:Ut?_e:""}l&&gr&&Le(l.firstChild);let N=x?f:l,V=rs(N);try{for(;_=V.nextNode();)ns(_,N),as(_),Qe(_.content)&&Yt(_.content)}catch(Z){throw x&&(Gt(f),tt(e.removed,ce=>{ce.element&&Cr(ce.element)})),Z}if(x)return tt(e.removed,Z=>{Z.element&&Cr(Z.element)}),Te&&Lr(f),f;if(Ye){if(Te&&Lr(l),Bt)for(w=du.call(l.ownerDocument);l.firstChild;)w.appendChild(l.firstChild);else w=l;return(D.shadowroot||D.shadowrootmode)&&(w=hu.call(r,w,!0)),w}let le=qe?l.outerHTML:l.innerHTML;return qe&&I["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&q(yd,l.ownerDocument.doctype.name)&&(le="<!DOCTYPE "+l.ownerDocument.doctype.name+`>
278
+ `+le),Te&&(le=Vt(le)),G&&Ut?We(le):le},e.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tr(f),fr=!0,br=I,vr=D},e.clearConfig=function(){Je=null,fr=!1,br=null,vr=null,G=ke,_e=""},e.isValidAttribute=function(f,s,l){Je||Tr({});let d=R(f),_=R(s);return os(d,_,l)},e.addHook=function(f,s){typeof s=="function"&&H(M,f)&&it(M[f],s)},e.removeHook=function(f,s){if(H(M,f)){if(s!==void 0){let l=td(M[f],s);return l===-1?void 0:id(M[f],l,1)[0]}return ys(M[f])}},e.removeHooks=function(f){H(M,f)&&(M[f]=[])},e.removeAllHooks=function(){M=Ms()},e}var Is,gs,Ju,Qu,ed,B,U,rt,Ds,Hr,Br,tt,td,ys,it,id,Me,xt,zr,_s,_t,ws,rd,nd,od,xs,As,H,wt,q,Be,Es,$r,Pr,ud,Fr,dd,ks,Ss,qr,Ts,ei,pd,hd,md,fd,bd,Cs,vd,gd,yd,_d,Ls,Rs,wd,xd,oe,Ad,Ed,Ms,Re,$,Ns=p(()=>{Is=Object.entries,gs=Object.setPrototypeOf,Ju=Object.isFrozen,Qu=Object.getPrototypeOf,ed=Object.getOwnPropertyDescriptor,B=Object.freeze,U=Object.seal,rt=Object.create,Ds=typeof Reflect<"u"&&Reflect,Hr=Ds.apply,Br=Ds.construct;B||(B=function(e){return e});U||(U=function(e){return e});Hr||(Hr=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)});Br||(Br=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)});tt=P(Array.prototype.forEach),td=P(Array.prototype.lastIndexOf),ys=P(Array.prototype.pop),it=P(Array.prototype.push),id=P(Array.prototype.splice),Me=Array.isArray,xt=P(String.prototype.toLowerCase),zr=P(String.prototype.toString),_s=P(String.prototype.match),_t=P(String.prototype.replace),ws=P(String.prototype.indexOf),rd=P(String.prototype.trim),nd=P(Number.prototype.toString),od=P(Boolean.prototype.toString),xs=typeof BigInt>"u"?null:P(BigInt.prototype.toString),As=typeof Symbol>"u"?null:P(Symbol.prototype.toString),H=P(Object.prototype.hasOwnProperty),wt=P(Object.prototype.toString),q=P(RegExp.prototype.test),Be=sd(TypeError);Es=B(["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"]),$r=B(["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"]),Pr=B(["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"]),ud=B(["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"]),Fr=B(["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"]),dd=B(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ks=B(["#text"]),Ss=B(["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"]),qr=B(["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","dominant-baseline","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-orientation","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"]),Ts=B(["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"]),ei=B(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pd=U(/{{[\w\W]*|^[\w\W]*}}/g),hd=U(/<%[\w\W]*|^[\w\W]*%>/g),md=U(/\${[\w\W]*/g),fd=U(/^data-[\-\w.\u00B7-\uFFFF]+$/),bd=U(/^aria-[\-\w]+$/),Cs=U(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vd=U(/^(?:\w+script|data):/i),gd=U(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yd=U(/^html$/i),_d=U(/^[a-z][.\w]*(-[.\w]+)+$/i),Ls=U(/<[/\w!]/g),Rs=U(/<[/\w]/g),wd=U(/<\/no(script|embed|frames)/i),xd=U(/\/>/i),oe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ad=function(){return typeof window>"u"?null:window},Ed=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}},Ms=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Re=function(e,t,r,n){return H(e,t)&&Me(e[t])?E(n.base?X(n.base):{},e[t],n.transform):r};$=Os()});var zs={};g(zs,{addHook:()=>Cd,clearConfig:()=>Dd,clearWindow:()=>$d,default:()=>kd,isSupported:()=>Td,isValidAttribute:()=>Od,removeAllHooks:()=>Md,removeHook:()=>Ld,removeHooks:()=>Rd,removed:()=>zd,sanitize:()=>Sd,setConfig:()=>Id,version:()=>Nd});function $d(){}var kd,Sd,Td,Cd,Ld,Rd,Md,Id,Dd,Od,Nd,zd,$s=p(()=>{Ns();kd=$,Sd=$.sanitize.bind($),Td=$.isSupported,Cd=$.addHook.bind($),Ld=$.removeHook.bind($),Rd=$.removeHooks.bind($),Md=$.removeAllHooks.bind($),Id=$.setConfig.bind($),Dd=$.clearConfig.bind($),Od=$.isValidAttribute.bind($),Nd=$.version,zd=$.removed});function y(i){return typeof i!="string"?"":i.replace(Fd,e=>Pd[e])}function Ur(i){return typeof i!="string"?"":i.replace(qd,"")}function we(i){return y(Ur(i))}function Ue(i,e){if(typeof i!="string")return"";let t=i.trim();if(!t||/^\s*javascript:/i.test(t)||/^\s*vbscript:/i.test(t)||Bd.test(t)||/^data:/i.test(t)&&!Ps.test(t))return"";try{let r=new URL(t,e||(typeof location<"u"?location.href:"https://example.invalid/"));return!Hd.has(r.protocol)||r.protocol==="data:"&&!Ps.test(r.href)?"":r.href}catch{return t.startsWith("#")||t.startsWith("/")?t:""}}function Fs(i,e){if(typeof i!="string")return"#";let t=i.trim();return t?t.startsWith("#")||t.startsWith("/")&&!t.startsWith("//")?t:/^https?:\/\//i.test(t)?Ue(t,e)||"#":/^\s*javascript:/i.test(t)||/^\s*vbscript:/i.test(t)?"#":t:"#"}function qs(i){let e=String(i||"text").toLowerCase();return Ud.has(e)?e:"text"}async function jd(){if(At)return At;try{let i=await Promise.resolve().then(()=>($s(),zs));At=i.default||i}catch{At=null}return At}async function Hs(i){if(typeof i!="string")return"";let e=await jd();return e?.sanitize?e.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:Kd,ADD_ATTR:Gd,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 Bs(){return ti||(typeof window<"u"&&window.trustedTypes?.createPolicy&&(ti=window.trustedTypes.createPolicy("velinstyle",{createHTML:i=>y(i)})),ti)}function Vd(i){let e=Bs(),t=y(Ur(i));return e?.createHTML?e.createHTML(t):t}var Pd,Fd,qd,Hd,Bd,Ps,Ud,At,Kd,Gd,ti,L=p(()=>{Pd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fd=/[&<>"']/g,qd=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,Hd=new Set(["http:","https:","data:","mailto:","tel:"]),Bd=/^data:(?:text\/html|image\/svg\+xml|application\/xml)/i,Ps=/^data:image\/(png|jpeg|jpg|gif|webp|avif);base64,/i,Ud=new Set(["text","password","email","search","tel","url","number"]);At=null;Kd=["svg","g","path","circle","rect","line","polyline","polygon","ellipse","defs","use","symbol","title","desc","clipPath","mask","linearGradient","radialGradient","stop","pattern","text","tspan"],Gd=["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"];ti=null});var js={};g(js,{default:()=>Us});var Wd,ii,Us,jr=p(()=>{L();Wd=`
279
279
  :host {
280
280
  position: fixed;
281
281
  z-index: var(--velin-z-toast, 600);
@@ -337,10 +337,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
337
337
  @media (prefers-reduced-motion: reduce) {
338
338
  .toast, .toast--out { animation: none; }
339
339
  }
340
- `,Zt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._container=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${fu}</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=`
341
- <div class="toast-content">${g(e)}</div>
340
+ `,ii=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._container=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Wd}</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=`
341
+ <div class="toast-content">${y(e)}</div>
342
342
  <button class="toast-close" aria-label="Close">&#215;</button>
343
- `,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",Zt);Ts=Zt});var Rs={};v(Rs,{default:()=>Cs});function bu(i,e){let t=Qt[i];return e&&t?.[e]?t[e]:Jt[i]}function vu(){if(typeof document<"u"){let t=document.querySelector('meta[name="velin-icon-sprite"]')?.getAttribute("content")?.trim();if(t)return t;let r=document.documentElement?.getAttribute("data-velin-icon-sprite")?.trim();if(r)return r}return(typeof Qe.defaultSprite=="string"?Qe.defaultSprite.trim():"")||Fr}var Jt,Qt,$r,Fr,Qe,Cs,Hr=h(()=>{C();Jt={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"},Qt={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"}};$r=new Map,Fr="velin-icons.svg";Qe=class extends HTMLElement{static defaultSprite=Fr;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&&(Jt[n]||Qt[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",_;if(c===""||c==null&&m)_=`#${e}`;else{let f=vu();_=`${Fe(c||f)||f||Fr}#${e}`}a.setAttribute("href",_),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($r.has(a)){this._injectSVG($r.get(a),t,r);return}let c=bu(n,o);if(!c){this._renderFromSprite(e,t,r);return}let d=Fe(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 _=await m.text();if(!_.includes("<svg"))throw new Error("Not SVG");let f=await Ss(_);$r.set(a,f),this._injectSVG(f,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(Jt)}static registerProvider(e,t,r){Jt[e]=t,r&&Qt[e]&&Object.assign(Qt[e],r)}};customElements.define("velin-icon",Qe);Cs=Qe});var Is={};v(Is,{default:()=>Ms});var gu,ei,Ms,qr=h(()=>{Z();gu=`
343
+ `,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",ii);Us=ii});var Gs={};g(Gs,{default:()=>Ks});function Yd(i,e){let t=ni[i];return e&&t?.[e]?t[e]:ri[i]}function Xd(){if(typeof document<"u"){let t=document.querySelector('meta[name="velin-icon-sprite"]')?.getAttribute("content")?.trim();if(t)return t;let r=document.documentElement?.getAttribute("data-velin-icon-sprite")?.trim();if(r)return r}return(typeof nt.defaultSprite=="string"?nt.defaultSprite.trim():"")||Gr}var ri,ni,Kr,Gr,nt,Ks,Vr=p(()=>{L();ri={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"},ni={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"}};Kr=new Map,Gr="velin-icons.svg";nt=class extends HTMLElement{static defaultSprite=Gr;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&&(ri[n]||ni[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"),u=document.getElementById(e),h=u&&u.tagName&&u.tagName.toLowerCase()==="symbol",b;if(c===""||c==null&&h)b=`#${e}`;else{let m=Xd();b=`${Ue(c||m)||m||Gr}#${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(Kr.has(a)){this._injectSVG(Kr.get(a),t,r);return}let c=Yd(n,o);if(!c){this._renderFromSprite(e,t,r);return}let u=Ue(c.replace("{name}",e));if(!u){this._renderFromSprite(e,t,r);return}try{let h=await fetch(u);if(!h.ok)throw new Error(`${h.status}`);let b=await h.text();if(!b.includes("<svg"))throw new Error("Not SVG");let m=await Hs(b);Kr.set(a,m),this._injectSVG(m,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(ri)}static registerProvider(e,t,r){ri[e]=t,r&&ni[e]&&Object.assign(ni[e],r)}};customElements.define("velin-icon",nt);Ks=nt});var Ws={};g(Ws,{default:()=>Vs});var Zd,oi,Vs,Wr=p(()=>{J();Zd=`
344
344
  :host { display: contents; }
345
345
  .overlay {
346
346
  position: fixed;
@@ -385,8 +385,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
385
385
  .close-btn:hover { background: var(--velin-color-surface-dim, #eee); color: var(--velin-color-text, #111); }
386
386
  .body { flex: 1; padding: var(--velin-space-5, 1.25rem); overflow-y: auto; }
387
387
  @media (prefers-reduced-motion: reduce) { .overlay, .drawer { transition: none; } }
388
- `,ei=class extends HTMLElement{static get observedAttributes(){return["open","title"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this),this._onTitleSlot=this._onTitleSlot.bind(this)}connectedCallback(){if(this.shadowRoot.querySelector(".drawer"))return;let e="velin-drawer-title";this.shadowRoot.innerHTML=`
389
- <style>${gu}</style>
388
+ `,oi=class extends HTMLElement{static get observedAttributes(){return["open","title"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this),this._onTitleSlot=this._onTitleSlot.bind(this)}connectedCallback(){if(this.shadowRoot.querySelector(".drawer"))return;let e="velin-drawer-title";this.shadowRoot.innerHTML=`
389
+ <style>${Zd}</style>
390
390
  <div class="overlay" part="overlay"></div>
391
391
  <div class="drawer" role="dialog" aria-modal="true" aria-labelledby="${e}" part="drawer">
392
392
  <div class="header" part="header">
@@ -398,7 +398,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
398
398
  </div>
399
399
  <div class="body" part="body"><slot></slot></div>
400
400
  </div>
401
- `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector('slot[name="title"]').addEventListener("slotchange",this._onTitleSlot),this._syncTitle()}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close()),e==="title"&&this._syncTitle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_syncTitle(){let e=this.shadowRoot?.querySelector(".title-fallback");e&&(e.textContent=this.getAttribute("title")||"")}_hasTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]');return e?e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent.trim():t.nodeType===Node.ELEMENT_NODE):!1}_onTitleSlot(){let e=this.shadowRoot?.querySelector('[role="dialog"]'),t=this.shadowRoot?.querySelector(".title-fallback");if(!(!e||!t))if(this._hasTitleSlot()){t.hidden=!0,e.removeAttribute("aria-labelledby");let n=this.shadowRoot.querySelector('slot[name="title"]').assignedNodes({flatten:!0}).map(o=>o.textContent||"").join(" ").trim();n&&e.setAttribute("aria-label",n)}else t.hidden=!1,e.removeAttribute("aria-label"),e.setAttribute("aria-labelledby","velin-drawer-title"),this._syncTitle()}_open(){this._prev=le(),de(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{let e=be(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),Y(this),ce(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}te(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),Y(this)}};customElements.define("velin-drawer",ei);Ms=ei});var Ns={};v(Ns,{default:()=>Ds});function xu(i,e){if(!i||_u.has(i)||Pr.has(i))return;if(document.querySelector(`link[data-velin-theme-css="${i}"]`)){Pr.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),Pr.add(i)}var yu,_u,Pr,wu,ti,Ds,Br=h(()=>{yu=[{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"}],_u=new Set(["","dark"]),Pr=new Set;wu=`
401
+ `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector('slot[name="title"]').addEventListener("slotchange",this._onTitleSlot),this._syncTitle()}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close()),e==="title"&&this._syncTitle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_syncTitle(){let e=this.shadowRoot?.querySelector(".title-fallback");e&&(e.textContent=this.getAttribute("title")||"")}_hasTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]');return e?e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent.trim():t.nodeType===Node.ELEMENT_NODE):!1}_onTitleSlot(){let e=this.shadowRoot?.querySelector('[role="dialog"]'),t=this.shadowRoot?.querySelector(".title-fallback");if(!(!e||!t))if(this._hasTitleSlot()){t.hidden=!0,e.removeAttribute("aria-labelledby");let n=this.shadowRoot.querySelector('slot[name="title"]').assignedNodes({flatten:!0}).map(o=>o.textContent||"").join(" ").trim();n&&e.setAttribute("aria-label",n)}else t.hidden=!1,e.removeAttribute("aria-label"),e.setAttribute("aria-labelledby","velin-drawer-title"),this._syncTitle()}_open(){this._prev=ue(),pe(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{let e=ge(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),W(this),de(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}re(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),W(this)}};customElements.define("velin-drawer",oi);Vs=oi});var Zs={};g(Zs,{default:()=>Xs});function ep(i,e){let t=Ys.has(e);(i===document.documentElement||i===document.body)&&(i.style.colorScheme=t?"dark":"light"),i.setAttribute("data-velin-color-scheme",t?"dark":"light")}function tp(i,e){if(!i||Qd.has(i)||Yr.has(i))return;if(document.querySelector(`link[data-velin-theme-css="${i}"]`)){Yr.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),Yr.add(i)}var Jd,Qd,Ys,Yr,ip,si,Xs,Xr=p(()=>{Jd=[{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"}],Qd=new Set(["","dark"]),Ys=new Set(["dark","midnight","neon"]),Yr=new Set;ip=`
402
402
  :host { display: inline-flex; position: relative; }
403
403
  .group {
404
404
  display: inline-flex; align-items: stretch;
@@ -477,8 +477,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
477
477
  background: currentColor;
478
478
  border: 1px solid var(--velin-color-border, #ddd);
479
479
  }
480
- `,ti=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=`
481
- <style>${wu}</style>
480
+ `,si=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=`
481
+ <style>${ip}</style>
482
482
  <div class="group" part="group">
483
483
  <button class="toggle" part="button" aria-label="Toggle dark mode" aria-pressed="false">
484
484
  <svg class="sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false">
@@ -498,14 +498,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
498
498
  </button>
499
499
  </div>
500
500
  <ul class="menu" role="menu" aria-label="Theme selection" hidden></ul>
501
- `,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=yu.map(e=>`
501
+ `,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=Jd.map(e=>`
502
502
  <li role="none">
503
503
  <button type="button" role="menuitem" data-theme="${e.slug}">
504
504
  <span class="swatch" aria-hidden="true" data-theme-swatch="${e.slug}"></span>
505
505
  ${e.label}
506
506
  </button>
507
507
  </li>
508
- `).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),xu(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",ti);Ds=ti});var zs={};v(zs,{default:()=>Os});var Au,Eu,ii,Os,Ur=h(()=>{C();Z();Au=`
508
+ `).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),tp(r,this._themesBase)):(this._target.removeAttribute("data-velin-theme"),this.removeAttribute("theme")),ep(this._target,r),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:Ys.has(r),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",si);Xs=si});var Qs={};g(Qs,{default:()=>Js});var rp,np,ai,Js,Zr=p(()=>{L();J();rp=`
509
509
  :host { position: relative; display: inline-block; }
510
510
  .popover {
511
511
  position: absolute; z-index: var(--velin-z-dropdown, 200);
@@ -530,14 +530,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
530
530
  border-bottom: 1px solid var(--velin-color-border, #ddd);
531
531
  }
532
532
  @media (prefers-reduced-motion: reduce) { .popover { transition: none; } }
533
- `,Eu=0,ii=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._popoverId=`velin-popover-${++Eu}`,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=`
534
- <style>${Au}</style>
533
+ `,np=0,ai=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._popoverId=`velin-popover-${++np}`,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=`
534
+ <style>${rp}</style>
535
535
  <slot name="trigger"></slot>
536
536
  <div class="popover popover--${e}" id="${this._popoverId}" role="${n}" part="popover"${o?` aria-labelledby="${o}"`:""}>
537
- ${r?`<div class="popover__title" id="${o}" part="title">${g(r)}</div>`:""}
537
+ ${r?`<div class="popover__title" id="${o}" part="title">${y(r)}</div>`:""}
538
538
  <slot></slot>
539
539
  </div>
540
- `;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=le(),requestAnimationFrame(()=>{let t=be(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&&(ce(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")&&te(this.shadowRoot.querySelector(".popover"),e)}disconnectedCallback(){document.removeEventListener("click",this._onOutside,!0),document.removeEventListener("keydown",this._onKey)}};customElements.define("velin-popover",ii);Os=ii});var Fs={};v(Fs,{default:()=>$s});var Su,ri,$s,jr=h(()=>{C();Su=`
540
+ `;let a=this.shadowRoot.querySelector(".popover");if(!r&&a){let u=this.getAttribute("aria-label")||(n==="tooltip"?"Tooltip":"Popover");a.setAttribute("aria-label",u)}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=ue(),requestAnimationFrame(()=>{let t=ge(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&&(de(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")&&re(this.shadowRoot.querySelector(".popover"),e)}disconnectedCallback(){document.removeEventListener("click",this._onOutside,!0),document.removeEventListener("keydown",this._onKey)}};customElements.define("velin-popover",ai);Js=ai});var ta={};g(ta,{default:()=>ea});var op,li,ea,Jr=p(()=>{L();op=`
541
541
  :host { display: inline-flex; }
542
542
  button {
543
543
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
@@ -557,8 +557,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
557
557
  button[data-copied] .copy-icon { display: none; }
558
558
  button[data-copied] .check { display: block; }
559
559
  @media (prefers-reduced-motion: reduce) { button { transition: none; } }
560
- `,ri=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let e=g(this.getAttribute("label")||"");this.shadowRoot.innerHTML=`
561
- <style>${Su}</style>
560
+ `,li=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let e=y(this.getAttribute("label")||"");this.shadowRoot.innerHTML=`
561
+ <style>${op}</style>
562
562
  <button part="button" aria-label="Copy">
563
563
  <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">
564
564
  <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"/>
@@ -568,7 +568,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
568
568
  </svg>
569
569
  ${e?`<span>${e}</span>`:""}
570
570
  </button>
571
- `,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",ri);$s=ri});var qs={};v(qs,{default:()=>Hs});var ku,ni,Hs,Kr=h(()=>{ku=`
571
+ `,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",li);ea=li});var ra={};g(ra,{default:()=>ia});var sp,ci,ia,Qr=p(()=>{sp=`
572
572
  :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); }
573
573
  button {
574
574
  display: inline-flex; align-items: center; justify-content: center;
@@ -584,14 +584,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
584
584
  :host([visible]) button { opacity: 1; visibility: visible; transform: translateY(0); }
585
585
  svg { width: 1.25rem; height: 1.25rem; }
586
586
  @media (prefers-reduced-motion: reduce) { button { transition: none; } }
587
- `,ni=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=`
588
- <style>${ku}</style>
587
+ `,ci=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=`
588
+ <style>${sp}</style>
589
589
  <button part="button" aria-label="Scroll to top">
590
590
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
591
591
  <line x1="12" y1="19" x2="12" y2="5"/><polyline points="5 12 12 5 19 12"/>
592
592
  </svg>
593
593
  </button>
594
- `,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",ni);Hs=ni});var Bs={};v(Bs,{default:()=>Ps});var Tu,oi,Ps,Wr=h(()=>{Tu=`
594
+ `,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",ci);ia=ci});var oa={};g(oa,{default:()=>na});var ap,ui,na,en=p(()=>{ap=`
595
595
  :host { display: block; position: relative; overflow: hidden; }
596
596
  .track {
597
597
  display: flex; transition: transform 400ms ease;
@@ -642,8 +642,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
642
642
  .dot[aria-current="true"]::before { background: var(--velin-color-primary, #2563eb); transform: scale(1.3); }
643
643
  .dot:focus-visible { outline: 2px solid var(--velin-color-focus, #2563eb); outline-offset: 2px; }
644
644
  @media (prefers-reduced-motion: reduce) { .track { transition: none; } }
645
- `,oi=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=`
646
- <style>${Tu}</style>
645
+ `,ui=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=`
646
+ <style>${ap}</style>
647
647
  <div class="track" role="group" aria-roledescription="carousel" part="track"><slot></slot></div>
648
648
  <div class="controls" part="controls">
649
649
  <button class="prev" aria-label="Previous slide" part="prev">
@@ -654,7 +654,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
654
654
  </button>
655
655
  </div>
656
656
  <div class="indicators" role="group" aria-label="Slide indicators" part="indicators"></div>
657
- `,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",oi);Ps=oi});var js={};v(js,{default:()=>Us});function Ru(i){let e=i.tagName;return e==="BUTTON"||e==="A"&&i.hasAttribute("href")||i.getAttribute("role")==="button"}var Lu,Cu,si,Us,Yr=h(()=>{Lu=`
657
+ `,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",ui);na=ui});var aa={};g(aa,{default:()=>sa});function up(i){let e=i.tagName;return e==="BUTTON"||e==="A"&&i.hasAttribute("href")||i.getAttribute("role")==="button"}var lp,cp,di,sa,tn=p(()=>{lp=`
658
658
  :host { display: block; }
659
659
  .content {
660
660
  overflow: hidden;
@@ -665,7 +665,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
665
665
  :host([open]) .content { grid-template-rows: 1fr; }
666
666
  .inner { min-height: 0; }
667
667
  @media (prefers-reduced-motion: reduce) { .content { transition: none; } }
668
- `,Cu=0;si=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._contentId=`velin-collapse-panel-${++Cu}`,this._onTriggerKey=this._onTriggerKey.bind(this)}connectedCallback(){let e=this._contentId;this.shadowRoot.innerHTML="<style>"+Lu+'</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&&(Ru(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",si);Us=si});var Ws={};v(Ws,{default:()=>Ks});var ai,Ks,Gr=h(()=>{ai=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",ai);Ks=ai});var Vr={};v(Vr,{VelinTooltip:()=>et,VelinTooltipWC:()=>gt,default:()=>Ys});var Mu,Iu,et,gt,Ys,li=h(()=>{C();Mu=`
668
+ `,cp=0;di=class extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),this.attachShadow({mode:"open"}),this._contentId=`velin-collapse-panel-${++cp}`,this._onTriggerKey=this._onTriggerKey.bind(this)}connectedCallback(){let e=this._contentId;this.shadowRoot.innerHTML="<style>"+lp+'</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&&(up(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",di);sa=di});var ca={};g(ca,{default:()=>la});var pi,la,rn=p(()=>{pi=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",pi);la=pi});var nn={};g(nn,{VelinTooltip:()=>ot,VelinTooltipWC:()=>Et,default:()=>ua});var dp,pp,ot,Et,ua,hi=p(()=>{L();dp=`
669
669
  :host { position: relative; display: inline-block; }
670
670
  .tip {
671
671
  position: absolute; z-index: var(--velin-z-tooltip, 700);
@@ -684,11 +684,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
684
684
  .tip[data-placement="start"] { right: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
685
685
  .tip[data-placement="end"] { left: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
686
686
  @media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
687
- `,Iu=0,et=class extends HTMLElement{static get observedAttributes(){return["content","placement"]}constructor(){super(),this.attachShadow({mode:"open"}),this._tipId=`velin-tooltip-${++Iu}`}connectedCallback(){let e=this.getAttribute("placement")||"top",t="div";this.shadowRoot.innerHTML=`
688
- <style>${Mu}</style>
687
+ `,pp=0,ot=class extends HTMLElement{static get observedAttributes(){return["content","placement"]}constructor(){super(),this.attachShadow({mode:"open"}),this._tipId=`velin-tooltip-${++pp}`}connectedCallback(){let e=this.getAttribute("placement")||"top",t="div";this.shadowRoot.innerHTML=`
688
+ <style>${dp}</style>
689
689
  <slot></slot>
690
- <${t} class="tip" id="${this._tipId}" role="tooltip" data-placement="${g(e)}" part="tip">${g(this.getAttribute("content")||"")}</${t}>
691
- `,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))}},gt=class i extends et{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",et);customElements.get("velin-tooltip-wc")||customElements.define("velin-tooltip-wc",gt);Ys=et});var Gs={};v(Gs,{announce:()=>oe,ensureAriaLabel:()=>Nu,getAnnouncer:()=>tt,liveDotLabel:()=>Xr,respectReducedMotion:()=>Ou,syncExpanded:()=>Du});function tt(){return typeof document>"u"?null:(He?.isConnected||(He=document.querySelector("velin-announcer"),He||(He=document.createElement("velin-announcer"),document.body.appendChild(He))),He)}function oe(i,e="polite"){let t=tt();!t||typeof t.announce!="function"||t.announce(i,{assertive:e==="assertive"})}function Du(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 Nu(i,e){!i||!e||i.getAttribute("aria-label")?.trim()||i.setAttribute("aria-label",e)}function Ou(i,e){typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches&&e?e():i()}function Xr(i){return{live:"Live",idle:"Idle",error:"Error",offline:"Offline",connecting:"Connecting"}[String(i||"live").toLowerCase()]||i||"Live"}var He,Le=h(()=>{});var Xs={};v(Xs,{default:()=>Vs});var zu,ci,Vs,Zr=h(()=>{Z();Le();C();zu=`
690
+ <${t} class="tip" id="${this._tipId}" role="tooltip" data-placement="${y(e)}" part="tip">${y(this.getAttribute("content")||"")}</${t}>
691
+ `,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))}},Et=class i extends ot{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",ot);customElements.get("velin-tooltip-wc")||customElements.define("velin-tooltip-wc",Et);ua=ot});var da={};g(da,{announce:()=>ae,ensureAriaLabel:()=>mp,getAnnouncer:()=>st,liveDotLabel:()=>on,respectReducedMotion:()=>fp,syncExpanded:()=>hp});function st(){return typeof document>"u"?null:(je?.isConnected||(je=document.querySelector("velin-announcer"),je||(je=document.createElement("velin-announcer"),document.body.appendChild(je))),je)}function ae(i,e="polite"){let t=st();!t||typeof t.announce!="function"||t.announce(i,{assertive:e==="assertive"})}function hp(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 mp(i,e){!i||!e||i.getAttribute("aria-label")?.trim()||i.setAttribute("aria-label",e)}function fp(i,e){typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches&&e?e():i()}function on(i){return{live:"Live",idle:"Idle",error:"Error",offline:"Offline",connecting:"Connecting"}[String(i||"live").toLowerCase()]||i||"Live"}var je,Ie=p(()=>{});var ha={};g(ha,{default:()=>pa});var bp,mi,pa,sn=p(()=>{J();Ie();L();bp=`
692
692
  :host { display: contents; }
693
693
  .overlay {
694
694
  position: fixed; inset: 0; z-index: var(--velin-z-modal, 500);
@@ -727,8 +727,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
727
727
  .nav--prev { left: 0.5rem; }
728
728
  .nav--next { right: 0.5rem; }
729
729
  }
730
- `,ci=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._index=0,this._items=[],this._previousFocus=null,this._onTrapKey=e=>{e.key==="Tab"&&te(this.shadowRoot,e)}}connectedCallback(){this.shadowRoot.innerHTML=`
731
- <style>${zu}</style>
730
+ `,mi=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._index=0,this._items=[],this._previousFocus=null,this._onTrapKey=e=>{e.key==="Tab"&&re(this.shadowRoot,e)}}connectedCallback(){this.shadowRoot.innerHTML=`
731
+ <style>${bp}</style>
732
732
  <slot></slot>
733
733
  <div class="overlay" role="dialog" aria-modal="true" aria-label="Image lightbox" aria-roledescription="lightbox" part="overlay">
734
734
  <button class="nav nav--prev" aria-label="Previous">&#8249;</button>
@@ -737,7 +737,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
737
737
  <button class="close" aria-label="Close">&times;</button>
738
738
  <div class="counter" part="counter" aria-live="polite" aria-atomic="true"></div>
739
739
  </div>
740
- `;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",""),de(this),this._render();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"),Y(this),this._previousFocus&&(this._previousFocus.focus(),this._previousFocus=null),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}disconnectedCallback(){Y(this)}_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=Fe(t.dataset.velinLightbox||t.src),n=g(t.alt||"");t.tagName==="VIDEO"?e.innerHTML=`<video src="${g(r)}" controls autoplay></video>`:e.innerHTML=`<img src="${g(r)}" alt="${n}">`;let o=this.shadowRoot.querySelector(".counter"),a=`${this._index+1} / ${this._items.length}`;o.textContent=a,oe(`Slide ${a}`,"polite")}};customElements.define("velin-lightbox",ci);Vs=ci});var Jr={};v(Jr,{VelinStepper:()=>it,VelinStepperWC:()=>yt,default:()=>Zs});var $u,it,yt,Zs,di=h(()=>{C();$u=`
740
+ `;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",""),pe(this),this._render();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"),W(this),this._previousFocus&&(this._previousFocus.focus(),this._previousFocus=null),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}disconnectedCallback(){W(this)}_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=Ue(t.dataset.velinLightbox||t.src),n=y(t.alt||"");t.tagName==="VIDEO"?e.innerHTML=`<video src="${y(r)}" controls autoplay></video>`:e.innerHTML=`<img src="${y(r)}" alt="${n}">`;let o=this.shadowRoot.querySelector(".counter"),a=`${this._index+1} / ${this._items.length}`;o.textContent=a,ae(`Slide ${a}`,"polite")}};customElements.define("velin-lightbox",mi);pa=mi});var an={};g(an,{VelinStepper:()=>at,VelinStepperWC:()=>kt,default:()=>ma});var vp,at,kt,ma,fi=p(()=>{L();vp=`
741
741
  :host { display: block; }
742
742
  .steps {
743
743
  display: flex; gap: var(--velin-space-2, 0.5rem);
@@ -790,11 +790,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
790
790
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
791
791
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
792
792
  }
793
- `,it=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"':"",_=n?`${n}, ${c}`:`Step ${o+1}, ${c}`;return`<div class="step ${a}" role="listitem" aria-label="${g(_)}"${m}><span class="step__marker">${d}</span><span class="step__label">${g(n)}</span></div>`}).join("");this.shadowRoot.innerHTML=`
794
- <style>${$u}</style>
795
- <div class="steps" role="list" aria-label="${g(t)}" part="steps">${r}</div>
793
+ `,at=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",u=o<this._current?'<span class="velin-sr-only">Completed</span><span aria-hidden="true">&#10003;</span>':`<span aria-hidden="true">${o+1}</span>`,h=o===this._current?' aria-current="step"':"",b=n?`${n}, ${c}`:`Step ${o+1}, ${c}`;return`<div class="step ${a}" role="listitem" aria-label="${y(b)}"${h}><span class="step__marker">${u}</span><span class="step__label">${y(n)}</span></div>`}).join("");this.shadowRoot.innerHTML=`
794
+ <style>${vp}</style>
795
+ <div class="steps" role="list" aria-label="${y(t)}" part="steps">${r}</div>
796
796
  <div class="panels" part="panels"><slot></slot></div>
797
- `}_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())}},yt=class i extends it{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",it);customElements.get("velin-stepper-wc")||customElements.define("velin-stepper-wc",yt);Zs=it});var Qs={};v(Qs,{default:()=>Js});var Fu,ui,Js,Qr=h(()=>{C();Fu=`
797
+ `}_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())}},kt=class i extends at{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",at);customElements.get("velin-stepper-wc")||customElements.define("velin-stepper-wc",kt);ma=at});var ba={};g(ba,{default:()=>fa});var gp,bi,fa,ln=p(()=>{L();gp=`
798
798
  :host { display: contents; }
799
799
  dialog {
800
800
  border: none; border-radius: var(--velin-radius-lg, 0.75rem);
@@ -851,12 +851,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
851
851
  color: var(--velin-color-text, #1a1a2e);
852
852
  }
853
853
  .input:focus { outline: 3px solid var(--velin-color-focus, #2563eb); outline-offset: 0; border-color: var(--velin-color-primary, #2563eb); }
854
- `,ui=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._resolve=null,this._previousFocus=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Fu}</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=g(r.title),a=g(t),c=g(r.confirmText),d=g(r.cancelText||""),m=g(r.placeholder||""),_=g(r.defaultValue||""),f=e==="alert"?`<button class="btn btn--primary" data-action="confirm">${c}</button>`:`<button class="btn" data-action="cancel">${d}</button>
855
- <button class="btn ${r.danger?"btn--danger":"btn--primary"}" data-action="confirm">${c}</button>`,b=e==="prompt"?`<input class="input" placeholder="${m}" value="${_}" part="input">`:"",L=`velin-dialog-title-${Math.random().toString(36).slice(2,9)}`;if(n.innerHTML=`
856
- <div class="header"><h3 class="title" id="${L}">${o}</h3><button class="close" aria-label="Close">&times;</button></div>
857
- <div class="body"><p>${a}</p>${b}</div>
858
- <div class="footer">${f}</div>
859
- `,n.setAttribute("aria-modal","true"),n.removeAttribute("aria-label"),n.setAttribute("aria-labelledby",L),n.showModal(),e!=="prompt"){let S=n.querySelector("[data-action]");S&&S.focus()}return new Promise(S=>{if(this._resolve=S,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",k=>{k.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;let o={value:n};this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0,detail:o})),this.dispatchEvent(new CustomEvent("velin-dialog-close",{bubbles:!0,detail:o}))}};customElements.define("velin-dialog",ui);Js=ui});var ta={};v(ta,{default:()=>ea});var Hu,hi,ea,en=h(()=>{C();Hu=`
854
+ `,bi=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._resolve=null,this._previousFocus=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${gp}</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=y(r.title),a=y(t),c=y(r.confirmText),u=y(r.cancelText||""),h=y(r.placeholder||""),b=y(r.defaultValue||""),m=e==="alert"?`<button class="btn btn--primary" data-action="confirm">${c}</button>`:`<button class="btn" data-action="cancel">${u}</button>
855
+ <button class="btn ${r.danger?"btn--danger":"btn--primary"}" data-action="confirm">${c}</button>`,v=e==="prompt"?`<input class="input" placeholder="${h}" value="${b}" part="input">`:"",T=`velin-dialog-title-${Math.random().toString(36).slice(2,9)}`;if(n.innerHTML=`
856
+ <div class="header"><h3 class="title" id="${T}">${o}</h3><button class="close" aria-label="Close">&times;</button></div>
857
+ <div class="body"><p>${a}</p>${v}</div>
858
+ <div class="footer">${m}</div>
859
+ `,n.setAttribute("aria-modal","true"),n.removeAttribute("aria-label"),n.setAttribute("aria-labelledby",T),n.showModal(),e!=="prompt"){let k=n.querySelector("[data-action]");k&&k.focus()}return new Promise(k=>{if(this._resolve=k,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",S=>{S.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;let o={value:n};this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0,detail:o})),this.dispatchEvent(new CustomEvent("velin-dialog-close",{bubbles:!0,detail:o}))}};customElements.define("velin-dialog",bi);fa=bi});var ga={};g(ga,{default:()=>va});var yp,vi,va,cn=p(()=>{L();yp=`
860
860
  :host { display: inline-flex; font-variant-numeric: tabular-nums; }
861
861
  .wrap { display: inline-flex; gap: var(--velin-space-3, 0.75rem); align-items: flex-start; }
862
862
  .segment {
@@ -886,7 +886,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
886
886
  :host([size="sm"]) .value { font-size: var(--velin-text-xl, 1.25rem); }
887
887
  :host([size="sm"]) .segment { min-width: 2.5rem; }
888
888
  :host([size="lg"]) .value { font-size: var(--velin-text-5xl, 3.052rem); }
889
- `,hi=class extends HTMLElement{static get observedAttributes(){return["datetime"]}constructor(){super(),this.attachShadow({mode:"open"}),this._timer=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${Hu}</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=k=>String(k).padStart(2,"0"),m=this.getAttribute("show-days")!=="false",_=g(this.getAttribute("label-days")||"Days"),f=g(this.getAttribute("label-hours")||"Hours"),b=g(this.getAttribute("label-minutes")||"Min"),L=g(this.getAttribute("label-seconds")||"Sec"),S="";m&&(S+=`<div class="segment" part="days"><span class="value">${d(n)}</span><span class="label">${_}</span></div><span class="separator">:</span>`),S+=`<div class="segment" part="hours"><span class="value">${d(o)}</span><span class="label">${f}</span></div><span class="separator">:</span>`,S+=`<div class="segment" part="minutes"><span class="value">${d(a)}</span><span class="label">${b}</span></div><span class="separator">:</span>`,S+=`<div class="segment" part="seconds"><span class="value">${d(c)}</span><span class="label">${L}</span></div>`,this._wrap&&(this._wrap.innerHTML=S);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",hi);ea=hi});var ra={};v(ra,{default:()=>ia});var qu,pi,ia,tn=h(()=>{qu=`
889
+ `,vi=class extends HTMLElement{static get observedAttributes(){return["datetime"]}constructor(){super(),this.attachShadow({mode:"open"}),this._timer=null}connectedCallback(){this.shadowRoot.innerHTML=`<style>${yp}</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),u=S=>String(S).padStart(2,"0"),h=this.getAttribute("show-days")!=="false",b=y(this.getAttribute("label-days")||"Days"),m=y(this.getAttribute("label-hours")||"Hours"),v=y(this.getAttribute("label-minutes")||"Min"),T=y(this.getAttribute("label-seconds")||"Sec"),k="";h&&(k+=`<div class="segment" part="days"><span class="value">${u(n)}</span><span class="label">${b}</span></div><span class="separator">:</span>`),k+=`<div class="segment" part="hours"><span class="value">${u(o)}</span><span class="label">${m}</span></div><span class="separator">:</span>`,k+=`<div class="segment" part="minutes"><span class="value">${u(a)}</span><span class="label">${v}</span></div><span class="separator">:</span>`,k+=`<div class="segment" part="seconds"><span class="value">${u(c)}</span><span class="label">${T}</span></div>`,this._wrap&&(this._wrap.innerHTML=k);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",vi);va=vi});var _a={};g(_a,{default:()=>ya});var _p,gi,ya,un=p(()=>{_p=`
890
890
  :host { display: inline-flex; align-items: center; justify-content: center; }
891
891
  svg { transform: rotate(-90deg); }
892
892
  .track { fill: none; stroke: var(--velin-color-border, #e5e5e5); }
@@ -904,16 +904,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
904
904
  }
905
905
  :host { position: relative; }
906
906
  @media (prefers-reduced-motion: reduce) { .fill { transition: none; } }
907
- `,pi=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=`
908
- <style>${qu}</style>
907
+ `,gi=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"),u=c?`stroke: var(--velin-color-${c}, ${c});`:"",h=this.getAttribute("label")!=="false";this.shadowRoot.innerHTML=`
908
+ <style>${_p}</style>
909
909
  <svg width="${t}" height="${t}" viewBox="0 0 ${t} ${t}" part="svg" role="progressbar" aria-valuenow="${e}" aria-valuemin="0" aria-valuemax="100">
910
910
  <circle class="track" cx="${t/2}" cy="${t/2}" r="${n}" stroke-width="${r}" />
911
911
  <circle class="fill" cx="${t/2}" cy="${t/2}" r="${n}" stroke-width="${r}"
912
912
  stroke-dasharray="${o}" stroke-dashoffset="${a}"
913
- style="${d}" part="fill" />
913
+ style="${u}" part="fill" />
914
914
  </svg>
915
- ${m?`<span class="label" part="label">${e}%</span>`:""}
916
- `,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",pi);ia=pi});var oa={};v(oa,{default:()=>na});var Pu,mi,na,rn=h(()=>{Pu=/^[a-zA-Z0-9_-]{1,64}$/,mi=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-${Pu.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",mi);na=mi});var aa={};v(aa,{default:()=>sa});var Bu,fi,sa,nn=h(()=>{Z();C();Bu=`
915
+ ${h?`<span class="label" part="label">${e}%</span>`:""}
916
+ `,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",gi);ya=gi});var xa={};g(xa,{default:()=>wa});var wp,yi,wa,dn=p(()=>{wp=/^[a-zA-Z0-9_-]{1,64}$/,yi=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-${wp.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",yi);wa=yi});var Ea={};g(Ea,{default:()=>Aa});var xp,_i,Aa,pn=p(()=>{J();L();xp=`
917
917
  :host { display: inline-block; position: relative; }
918
918
  .listbox {
919
919
  position: absolute; z-index: var(--velin-z-dropdown, 100);
@@ -938,11 +938,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
938
938
  ::slotted([role="option"][aria-selected="true"]) {
939
939
  background: var(--velin-color-surface-dim, #eee);
940
940
  }
941
- `,fi=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=g(this.getAttribute("aria-label")||"Options");this.shadowRoot.innerHTML=`
942
- <style>${Bu}</style>
941
+ `,_i=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=y(this.getAttribute("aria-label")||"Options");this.shadowRoot.innerHTML=`
942
+ <style>${xp}</style>
943
943
  <slot name="trigger"></slot>
944
944
  <div class="listbox" id="${e}" role="listbox" aria-label="${t}" part="listbox"><slot></slot></div>
945
- `,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&&(ie(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",g(this.getAttribute("aria-label")||"Options"))}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-combobox",fi);sa=fi});var ca={};v(ca,{default:()=>la});var Uu,bi,la,on=h(()=>{C();Uu=`
945
+ `,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&&(ne(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",y(this.getAttribute("aria-label")||"Options"))}}disconnectedCallback(){document.removeEventListener("click",this._onDocClick,!0)}};customElements.define("velin-combobox",_i);Aa=_i});var Sa={};g(Sa,{default:()=>ka});var Ap,wi,ka,hn=p(()=>{L();Ap=`
946
946
  :host { display: block; }
947
947
  nav {
948
948
  display: flex;
@@ -972,10 +972,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
972
972
  color: var(--velin-color-primary, #2563eb);
973
973
  font-weight: var(--velin-weight-semibold, 600);
974
974
  }
975
- `,bi=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onSlot=this._onSlot.bind(this)}connectedCallback(){let e=g(this.getAttribute("aria-label")||"Bottom navigation");this.shadowRoot.innerHTML=`
976
- <style>${Uu}</style>
975
+ `,wi=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._onSlot=this._onSlot.bind(this)}connectedCallback(){let e=y(this.getAttribute("aria-label")||"Bottom navigation");this.shadowRoot.innerHTML=`
976
+ <style>${Ap}</style>
977
977
  <nav role="navigation" aria-label="${e}"><slot></slot></nav>
978
- `,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"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t._velinBottomNavKey||(t._velinBottomNavKey=n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t.click())},t.addEventListener("keydown",t._velinBottomNavKey)))})}_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",g(this.getAttribute("aria-label")||"Bottom navigation"))}e==="current"&&this._syncCurrent()}};customElements.define("velin-bottom-nav",bi);la=bi});var J,Ce=h(()=>{J=`
978
+ `,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"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t._velinBottomNavKey||(t._velinBottomNavKey=n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t.click())},t.addEventListener("keydown",t._velinBottomNavKey)))})}_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",y(this.getAttribute("aria-label")||"Bottom navigation"))}e==="current"&&this._syncCurrent()}};customElements.define("velin-bottom-nav",wi);ka=wi});var Q,De=p(()=>{Q=`
979
979
  :host { display: block; }
980
980
  button, [role="button"] {
981
981
  min-inline-size: 2.75rem;
@@ -991,8 +991,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
991
991
  border: 1px solid ButtonText;
992
992
  }
993
993
  }
994
- `});var ua={};v(ua,{default:()=>da});var ju,vi,da,sn=h(()=>{Z();Ce();ju=`
995
- ${J}
994
+ `});var Ca={};g(Ca,{default:()=>Ta});var Ep,xi,Ta,mn=p(()=>{J();De();Ep=`
995
+ ${Q}
996
996
  :host { display: contents; }
997
997
  .overlay {
998
998
  position: fixed; inset: 0; z-index: var(--velin-z-overlay, 400);
@@ -1028,8 +1028,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1028
1028
  .close-btn:hover { background: var(--velin-color-surface-dim, #eee); color: var(--velin-color-text, #111); }
1029
1029
  .body { flex: 1; overflow-y: auto; padding: var(--velin-space-5, 1.25rem); }
1030
1030
  @media (prefers-reduced-motion: reduce) { .overlay, .sheet { transition: none; } }
1031
- `,vi=class extends HTMLElement{static get observedAttributes(){return["open","title","label"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this),this._onTitleSlot=this._onTitleSlot.bind(this)}connectedCallback(){if(this.shadowRoot.querySelector(".sheet"))return;let e="velin-sheet-title";this.shadowRoot.innerHTML=`
1032
- <style>${ju}</style>
1031
+ `,xi=class extends HTMLElement{static get observedAttributes(){return["open","title","label"]}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._prev=null,this._onKey=this._onKey.bind(this),this._onTitleSlot=this._onTitleSlot.bind(this)}connectedCallback(){if(this.shadowRoot.querySelector(".sheet"))return;let e="velin-sheet-title";this.shadowRoot.innerHTML=`
1032
+ <style>${Ep}</style>
1033
1033
  <div class="overlay" part="overlay"></div>
1034
1034
  <div class="sheet" role="dialog" aria-modal="true" aria-labelledby="${e}" part="sheet">
1035
1035
  <div class="header" part="header">
@@ -1041,8 +1041,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1041
1041
  </div>
1042
1042
  <div class="body" part="body"><slot></slot></div>
1043
1043
  </div>
1044
- `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector('slot[name="title"]').addEventListener("slotchange",this._onTitleSlot),this._syncTitle(),this.hasAttribute("open")&&this._open()}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close()),(e==="title"||e==="label")&&this._syncTitle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_syncTitle(){let e=this.shadowRoot?.querySelector(".title-fallback");e&&(e.textContent=this.getAttribute("title")||this.getAttribute("label")||"")}_hasTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]');return e?e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent.trim():t.nodeType===Node.ELEMENT_NODE):!1}_onTitleSlot(){let e=this.shadowRoot?.querySelector('[role="dialog"]'),t=this.shadowRoot?.querySelector(".title-fallback");if(!(!e||!t))if(this._hasTitleSlot()){t.hidden=!0,e.removeAttribute("aria-labelledby");let n=this.shadowRoot.querySelector('slot[name="title"]').assignedNodes({flatten:!0}).map(o=>o.textContent||"").join(" ").trim();n&&e.setAttribute("aria-label",n)}else t.hidden=!1,e.removeAttribute("aria-label"),e.setAttribute("aria-labelledby","velin-sheet-title"),this._syncTitle()}_open(){this._prev=le(),de(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{let e=be(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),Y(this),ce(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}te(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),Y(this)}};customElements.define("velin-sheet",vi);da=vi});var pa={};v(pa,{default:()=>ha});var Ku,gi,ha,an=h(()=>{Z();C();Ce();Ku=`
1045
- ${J}
1044
+ `,this.shadowRoot.querySelector(".close-btn").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector(".overlay").addEventListener("click",()=>this.close()),this.shadowRoot.querySelector('slot[name="title"]').addEventListener("slotchange",this._onTitleSlot),this._syncTitle(),this.hasAttribute("open")&&this._open()}attributeChangedCallback(e){e==="open"&&(this.hasAttribute("open")?this._open():this._close()),(e==="title"||e==="label")&&this._syncTitle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("velin-close",{bubbles:!0}))}_syncTitle(){let e=this.shadowRoot?.querySelector(".title-fallback");e&&(e.textContent=this.getAttribute("title")||this.getAttribute("label")||"")}_hasTitleSlot(){let e=this.shadowRoot?.querySelector('slot[name="title"]');return e?e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent.trim():t.nodeType===Node.ELEMENT_NODE):!1}_onTitleSlot(){let e=this.shadowRoot?.querySelector('[role="dialog"]'),t=this.shadowRoot?.querySelector(".title-fallback");if(!(!e||!t))if(this._hasTitleSlot()){t.hidden=!0,e.removeAttribute("aria-labelledby");let n=this.shadowRoot.querySelector('slot[name="title"]').assignedNodes({flatten:!0}).map(o=>o.textContent||"").join(" ").trim();n&&e.setAttribute("aria-label",n)}else t.hidden=!1,e.removeAttribute("aria-label"),e.setAttribute("aria-labelledby","velin-sheet-title"),this._syncTitle()}_open(){this._prev=ue(),pe(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{let e=ge(this.shadowRoot);e.length&&e[0].focus()})}_close(){document.removeEventListener("keydown",this._onKey),W(this),de(this._prev)}_onKey(e){if(e.key==="Escape"){this.close();return}re(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),W(this)}};customElements.define("velin-sheet",xi);Ta=xi});var Ra={};g(Ra,{default:()=>La});var kp,Ai,La,fn=p(()=>{J();L();De();kp=`
1045
+ ${Q}
1046
1046
  :host { display: block; }
1047
1047
  .group {
1048
1048
  display: inline-flex;
@@ -1068,11 +1068,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1068
1068
  font-weight: var(--velin-weight-semibold, 600);
1069
1069
  box-shadow: var(--velin-shadow-sm, 0 1px 2px rgba(0,0,0,0.06));
1070
1070
  }
1071
- `,gi=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=g(this.getAttribute("aria-label")||"Segmented control");this.shadowRoot.innerHTML=`
1072
- <style>${Ku}</style>
1071
+ `,Ai=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=y(this.getAttribute("aria-label")||"Segmented control");this.shadowRoot.innerHTML=`
1072
+ <style>${kp}</style>
1073
1073
  <div class="group" role="group" aria-label="${e}"><slot></slot></div>
1074
- `,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)&&(ie(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",g(this.getAttribute("aria-label")||"Segmented control"))}}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-segmented-control",gi);ha=gi});var ba={};v(ba,{default:()=>fa});var Wu,ma,yi,fa,ln=h(()=>{Z();C();Ce();Wu=`
1075
- ${J}
1074
+ `,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)&&(ne(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",y(this.getAttribute("aria-label")||"Segmented control"))}}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-segmented-control",Ai);La=Ai});var Da={};g(Da,{default:()=>Ia});var Sp,Ma,Ei,Ia,bn=p(()=>{J();L();De();Sp=`
1075
+ ${Q}
1076
1076
  :host { display: inline-block; }
1077
1077
  .stars { display: inline-flex; gap: var(--velin-space-1, 0.25rem); }
1078
1078
  button {
@@ -1081,8 +1081,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1081
1081
  color: var(--velin-color-border, #ccc);
1082
1082
  }
1083
1083
  button[aria-checked="true"] { color: var(--velin-color-warning, #f59e0b); }
1084
- `,ma=5,yi=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>${Wu}</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(ma,Math.max(0,Number.isNaN(e)?0:e))}_render(){let e=this.shadowRoot.querySelector(".stars"),t=this._value(),r=g(this.getAttribute("aria-label")||"Rating");e.setAttribute("aria-label",r),e.innerHTML="";for(let n=1;n<=ma;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",g(`${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)&&(ie(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",yi);fa=yi});var ga={};v(ga,{default:()=>va});var Yu,_i,va,cn=h(()=>{Z();C();Ce();Yu=`
1085
- ${J}
1084
+ `,Ma=5,Ei=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>${Sp}</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(Ma,Math.max(0,Number.isNaN(e)?0:e))}_render(){let e=this.shadowRoot.querySelector(".stars"),t=this._value(),r=y(this.getAttribute("aria-label")||"Rating");e.setAttribute("aria-label",r),e.innerHTML="";for(let n=1;n<=Ma;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",y(`${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)&&(ne(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",Ei);Ia=Ei});var Na={};g(Na,{default:()=>Oa});var Tp,ki,Oa,vn=p(()=>{J();L();De();Tp=`
1085
+ ${Q}
1086
1086
  :host { display: block; }
1087
1087
  .menubar {
1088
1088
  display: flex;
@@ -1106,11 +1106,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1106
1106
  ::slotted([role="menuitem"]:hover) {
1107
1107
  background: var(--velin-color-surface-dim, #eee);
1108
1108
  }
1109
- `,_i=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=g(this.getAttribute("aria-label")||"Menu bar");this.shadowRoot.innerHTML=`
1110
- <style>${Yu}</style>
1109
+ `,ki=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=y(this.getAttribute("aria-label")||"Menu bar");this.shadowRoot.innerHTML=`
1110
+ <style>${Tp}</style>
1111
1111
  <div class="menubar" role="menubar" aria-label="${e}"><slot></slot></div>
1112
- `,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)&&ie(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",g(this.getAttribute("aria-label")||"Menu bar"))}}disconnectedCallback(){this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-menubar",_i);va=_i});var _a={};v(_a,{default:()=>ya});var Gu,xi,ya,dn=h(()=>{Z();C();Ce();Gu=`
1113
- ${J}
1112
+ `,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)&&ne(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",y(this.getAttribute("aria-label")||"Menu bar"))}}disconnectedCallback(){this.removeEventListener("keydown",this._onKey)}};customElements.define("velin-menubar",ki);Oa=ki});var $a={};g($a,{default:()=>za});var Cp,Si,za,gn=p(()=>{J();L();De();Cp=`
1113
+ ${Q}
1114
1114
  :host { display: contents; }
1115
1115
  .overlay {
1116
1116
  position: fixed; inset: 0; z-index: var(--velin-z-modal, 500);
@@ -1153,17 +1153,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1153
1153
  ::slotted(button:focus-visible) {
1154
1154
  background: var(--velin-color-surface-dim, #eee);
1155
1155
  }
1156
- `,xi=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=g(this.getAttribute("placeholder")||"Search commands\u2026");this.shadowRoot.innerHTML=`
1157
- <style>${Gu}</style>
1156
+ `,Si=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=y(this.getAttribute("placeholder")||"Search commands\u2026");this.shadowRoot.innerHTML=`
1157
+ <style>${Cp}</style>
1158
1158
  <div class="overlay" part="overlay">
1159
1159
  <div class="panel" role="dialog" aria-modal="true" aria-label="Command palette" part="panel">
1160
1160
  <input class="search" type="search" autocomplete="off" placeholder="${e}" aria-label="Search" part="search" />
1161
1161
  <div class="results" part="results"><slot></slot></div>
1162
1162
  </div>
1163
1163
  </div>
1164
- `,this.shadowRoot.querySelector(".search").addEventListener("input",this._onInput),this.shadowRoot.querySelector(".overlay")?.addEventListener("click",this._onOverlayClick),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}))}toggle(){this.hasAttribute("open")?this.close():this.open()}_onOverlayClick=e=>{e.target===e.currentTarget&&this.close()};_open(){this._prev=le(),de(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{this.shadowRoot.querySelector(".search")?.focus(),this._filter("")})}_close(){document.removeEventListener("keydown",this._onKey),Y(this),ce(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}te(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),this.shadowRoot?.querySelector(".overlay")?.removeEventListener("click",this._onOverlayClick),this.hasAttribute("open")&&Y(this)}};customElements.define("velin-command",xi);ya=xi});var wa={};v(wa,{default:()=>xa});var Vu,wi,xa,un=h(()=>{Vu=`
1164
+ `,this.shadowRoot.querySelector(".search").addEventListener("input",this._onInput),this.shadowRoot.querySelector(".overlay")?.addEventListener("click",this._onOverlayClick),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}))}toggle(){this.hasAttribute("open")?this.close():this.open()}_onOverlayClick=e=>{e.target===e.currentTarget&&this.close()};_open(){this._prev=ue(),pe(this),document.addEventListener("keydown",this._onKey),requestAnimationFrame(()=>{this.shadowRoot.querySelector(".search")?.focus(),this._filter("")})}_close(){document.removeEventListener("keydown",this._onKey),W(this),de(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}re(this.shadowRoot,e)}disconnectedCallback(){document.removeEventListener("keydown",this._onKey),this.shadowRoot?.querySelector(".overlay")?.removeEventListener("click",this._onOverlayClick),this.hasAttribute("open")&&W(this)}};customElements.define("velin-command",Si);za=Si});var Fa={};g(Fa,{default:()=>Pa});var Lp,Ti,Pa,yn=p(()=>{Lp=`
1165
1165
  :host { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
1166
- `,wi=class extends HTMLElement{connectedCallback(){this.shadowRoot||this.attachShadow({mode:"open"});let e=this.getAttribute("polite")==="false"?"assertive":"polite";this.shadowRoot.innerHTML="<style>"+Vu+'</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",wi);xa=wi});var Sa={};v(Sa,{default:()=>Ea});function Xu(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 Aa,Ai,Ea,Ei=h(()=>{C();Aa=`
1166
+ `,Ti=class extends HTMLElement{connectedCallback(){this.shadowRoot||this.attachShadow({mode:"open"});let e=this.getAttribute("polite")==="false"?"assertive":"polite";this.shadowRoot.innerHTML="<style>"+Lp+'</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",Ti);Pa=Ti});var Ba={};g(Ba,{default:()=>Ha});function Rp(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 qa,Ci,Ha,Li=p(()=>{L();qa=`
1167
1167
  :host { display: inline; }
1168
1168
  button {
1169
1169
  font: inherit;
@@ -1183,13 +1183,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1183
1183
  border-radius: 2px;
1184
1184
  }
1185
1185
  .revealed { text-decoration: none; user-select: text; }
1186
- `;Ai=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?Xu(t,e):t}render(){let e=this.getAttribute("label")||"Show email address",t=this.email,r=g(t);if(this._revealed){this.shadowRoot.innerHTML=`
1187
- <style>${Aa}</style>
1188
- <span class="revealed" part="email"><a href="mailto:${ye(t)}">${r}</a></span>
1186
+ `;Ci=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?Rp(t,e):t}render(){let e=this.getAttribute("label")||"Show email address",t=this.email,r=y(t);if(this._revealed){this.shadowRoot.innerHTML=`
1187
+ <style>${qa}</style>
1188
+ <span class="revealed" part="email"><a href="mailto:${we(t)}">${r}</a></span>
1189
1189
  `;return}this.shadowRoot.innerHTML=`
1190
- <style>${Aa}</style>
1191
- <button type="button" part="reveal" aria-label="${ye(e)}">${g(e)}</button>
1192
- `,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",Ai);Ea=Ai});var Ta={};v(Ta,{default:()=>ka});function Re(i){let e=i.getFullYear(),t=String(i.getMonth()+1).padStart(2,"0"),r=String(i.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}function qe(i){if(!i)return null;let e=String(i).match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;let t=new Date(Number(e[1]),Number(e[2])-1,Number(e[3]));return Number.isNaN(t.getTime())?null:t}var Zu,Si,ka,hn=h(()=>{C();Zu=`
1190
+ <style>${qa}</style>
1191
+ <button type="button" part="reveal" aria-label="${we(e)}">${y(e)}</button>
1192
+ `,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",Ci);Ha=Ci});var ja={};g(ja,{default:()=>Ua});function Oe(i){let e=i.getFullYear(),t=String(i.getMonth()+1).padStart(2,"0"),r=String(i.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}function Ke(i){if(!i)return null;let e=String(i).match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;let t=new Date(Number(e[1]),Number(e[2])-1,Number(e[3]));return Number.isNaN(t.getTime())?null:t}var Mp,Ri,Ua,_n=p(()=>{L();Mp=`
1193
1193
  :host { display: block; max-inline-size: 100%; }
1194
1194
  .cal {
1195
1195
  box-sizing: border-box;
@@ -1243,19 +1243,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1243
1243
  }
1244
1244
  .day:focus-visible { outline: 2px solid var(--velin-color-focus, #2563eb); outline-offset: 1px; }
1245
1245
  .out { color: var(--velin-color-text-muted, #94a3b8); }
1246
- `;Si=class extends HTMLElement{static get observedAttributes(){return["value","min","max","label"]}constructor(){super(),this.attachShadow({mode:"open"}),this._view=new Date,this._view.setDate(1),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=qe(this.getAttribute("value"))||new Date;this._view=new Date(e.getFullYear(),e.getMonth(),1),this._render()}attributeChangedCallback(e,t,r){if(!(t===r||!this.shadowRoot?.querySelector(".cal"))){if(e==="value"&&r){let n=qe(r);n&&(this._view=new Date(n.getFullYear(),n.getMonth(),1))}this._render()}}get value(){return this.getAttribute("value")||""}set value(e){e?this.setAttribute("value",e):this.removeAttribute("value")}_inRange(e){let t=qe(this.getAttribute("min")),r=qe(this.getAttribute("max"));return!(t&&e<t||r&&e>r)}_select(e){if(!this._inRange(e))return;let t=Re(e);this.setAttribute("value",t),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:t,date:e}})),this._render()}_shiftMonth(e){this._view=new Date(this._view.getFullYear(),this._view.getMonth()+e,1),this._render()}_onKey(e){let t=qe(this.getAttribute("value"))||new Date,r=new Date(t);switch(e.key){case"ArrowLeft":r.setDate(r.getDate()-1);break;case"ArrowRight":r.setDate(r.getDate()+1);break;case"ArrowUp":r.setDate(r.getDate()-7);break;case"ArrowDown":r.setDate(r.getDate()+7);break;case"Home":r=new Date(r.getFullYear(),r.getMonth(),1);break;case"End":r=new Date(r.getFullYear(),r.getMonth()+1,0);break;case"PageUp":r=new Date(r.getFullYear(),r.getMonth()-1,r.getDate());break;case"PageDown":r=new Date(r.getFullYear(),r.getMonth()+1,r.getDate());break;case"Enter":case" ":e.preventDefault(),this._select(t);return;default:return}e.preventDefault(),this._inRange(r)&&(this._view=new Date(r.getFullYear(),r.getMonth(),1),this.setAttribute("value",Re(r)),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:Re(r),date:r}})),this._render(),this.shadowRoot.querySelector(`[data-iso="${Re(r)}"]`)?.focus())}_render(){let e=g(this.getAttribute("label")||"Choose date"),t=qe(this.getAttribute("value")),r=this._view.getFullYear(),n=this._view.getMonth(),o=this._view.toLocaleString(void 0,{month:"long",year:"numeric"}),c=(new Date(r,n,1).getDay()+6)%7,d=new Date(r,n+1,0).getDate(),_=["Mo","Tu","We","Th","Fr","Sa","Su"].map(f=>`<div class="dow" aria-hidden="true">${f}</div>`).join("");for(let f=0;f<c;f+=1){let b=new Date(r,n,-c+f+1);_+=`<button type="button" class="day out" tabindex="-1" data-iso="${Re(b)}" aria-label="${Re(b)}">${b.getDate()}</button>`}for(let f=1;f<=d;f+=1){let b=new Date(r,n,f),L=Re(b),S=t&&Re(t)===L,A=!this._inRange(b);_+=`<button type="button" class="day" data-iso="${L}" aria-label="${L}" aria-selected="${S?"true":"false"}" aria-disabled="${A?"true":"false"}" tabindex="${S?"0":"-1"}">${f}</button>`}this.shadowRoot.innerHTML=`
1247
- <style>${Zu}</style>
1246
+ `;Ri=class extends HTMLElement{static get observedAttributes(){return["value","min","max","label"]}constructor(){super(),this.attachShadow({mode:"open"}),this._view=new Date,this._view.setDate(1),this._onKey=this._onKey.bind(this)}connectedCallback(){let e=Ke(this.getAttribute("value"))||new Date;this._view=new Date(e.getFullYear(),e.getMonth(),1),this._render()}attributeChangedCallback(e,t,r){if(!(t===r||!this.shadowRoot?.querySelector(".cal"))){if(e==="value"&&r){let n=Ke(r);n&&(this._view=new Date(n.getFullYear(),n.getMonth(),1))}this._render()}}get value(){return this.getAttribute("value")||""}set value(e){e?this.setAttribute("value",e):this.removeAttribute("value")}_inRange(e){let t=Ke(this.getAttribute("min")),r=Ke(this.getAttribute("max"));return!(t&&e<t||r&&e>r)}_select(e){if(!this._inRange(e))return;let t=Oe(e);this.setAttribute("value",t),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:t,date:e}})),this._render()}_shiftMonth(e){this._view=new Date(this._view.getFullYear(),this._view.getMonth()+e,1),this._render()}_onKey(e){let t=Ke(this.getAttribute("value"))||new Date,r=new Date(t);switch(e.key){case"ArrowLeft":r.setDate(r.getDate()-1);break;case"ArrowRight":r.setDate(r.getDate()+1);break;case"ArrowUp":r.setDate(r.getDate()-7);break;case"ArrowDown":r.setDate(r.getDate()+7);break;case"Home":r=new Date(r.getFullYear(),r.getMonth(),1);break;case"End":r=new Date(r.getFullYear(),r.getMonth()+1,0);break;case"PageUp":r=new Date(r.getFullYear(),r.getMonth()-1,r.getDate());break;case"PageDown":r=new Date(r.getFullYear(),r.getMonth()+1,r.getDate());break;case"Enter":case" ":e.preventDefault(),this._select(t);return;default:return}e.preventDefault(),this._inRange(r)&&(this._view=new Date(r.getFullYear(),r.getMonth(),1),this.setAttribute("value",Oe(r)),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,detail:{value:Oe(r),date:r}})),this._render(),this.shadowRoot.querySelector(`[data-iso="${Oe(r)}"]`)?.focus())}_render(){let e=y(this.getAttribute("label")||"Choose date"),t=Ke(this.getAttribute("value")),r=this._view.getFullYear(),n=this._view.getMonth(),o=this._view.toLocaleString(void 0,{month:"long",year:"numeric"}),c=(new Date(r,n,1).getDay()+6)%7,u=new Date(r,n+1,0).getDate(),b=["Mo","Tu","We","Th","Fr","Sa","Su"].map(m=>`<div class="dow" aria-hidden="true">${m}</div>`).join("");for(let m=0;m<c;m+=1){let v=new Date(r,n,-c+m+1);b+=`<button type="button" class="day out" tabindex="-1" data-iso="${Oe(v)}" aria-label="${Oe(v)}">${v.getDate()}</button>`}for(let m=1;m<=u;m+=1){let v=new Date(r,n,m),T=Oe(v),k=t&&Oe(t)===T,A=!this._inRange(v);b+=`<button type="button" class="day" data-iso="${T}" aria-label="${T}" aria-selected="${k?"true":"false"}" aria-disabled="${A?"true":"false"}" tabindex="${k?"0":"-1"}">${m}</button>`}this.shadowRoot.innerHTML=`
1247
+ <style>${Mp}</style>
1248
1248
  <div class="cal" role="group" aria-label="${e}">
1249
1249
  <div class="head">
1250
1250
  <button type="button" class="nav" data-nav="-1" aria-label="Previous month">\u2039</button>
1251
- <p class="title" id="cal-title">${g(o)}</p>
1251
+ <p class="title" id="cal-title">${y(o)}</p>
1252
1252
  <button type="button" class="nav" data-nav="1" aria-label="Next month">\u203A</button>
1253
1253
  </div>
1254
- <div class="grid" role="grid" aria-labelledby="cal-title">${_}</div>
1254
+ <div class="grid" role="grid" aria-labelledby="cal-title">${b}</div>
1255
1255
  </div>
1256
- `,this.shadowRoot.querySelectorAll("[data-nav]").forEach(f=>{f.addEventListener("click",()=>this._shiftMonth(Number(f.getAttribute("data-nav"))))}),this.shadowRoot.querySelectorAll(".day").forEach(f=>{f.addEventListener("click",()=>{if(f.getAttribute("aria-disabled")==="true")return;let b=qe(f.getAttribute("data-iso"));b&&this._select(b)}),f.addEventListener("keydown",this._onKey)})}};customElements.define("velin-calendar",Si);ka=Si});function H(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 Me(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 H(i,r)}var Q=h(()=>{});var pn={};v(pn,{default:()=>rt});function rt(i){return Me(i,Ju,Qu)}var Ju,Qu,_t=h(()=>{Q();Ju={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},Qu=[{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 mn={};v(mn,{default:()=>La});function La(i){return rt(i).map(e=>e.type==="identifier"&&eh.has(e.value)?{type:"keyword",value:e.value}:e)}var eh,fn=h(()=>{_t();eh=new Set(["type","interface","enum","implements","declare","namespace","readonly","public","private","protected","abstract","as","satisfies","keyof"])});var ki={};v(ki,{default:()=>Ca});function Ca(i){return H(i,th)}var th,Ti=h(()=>{Q();th=[{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 Ma={};v(Ma,{default:()=>Ra});function Ra(i){return Me(i,ih,rh)}var ih,rh,Ia=h(()=>{Q();ih={important:1,inherit:1,initial:1,unset:1,revert:1},rh=[{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 Na={};v(Na,{default:()=>Da});function Da(i){return H(i,nh)}var nh,Oa=h(()=>{Q();nh=[{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 bn={};v(bn,{default:()=>za});function za(i){return H(i,oh)}var oh,vn=h(()=>{Q();oh=[{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 Li={};v(Li,{default:()=>$a});function $a(i){return Me(i,sh,ah)}var sh,ah,Ci=h(()=>{Q();sh={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},ah=[{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 Ha={};v(Ha,{default:()=>Fa});function Fa(i){return H(i,lh)}var lh,qa=h(()=>{Q();lh=[{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 xt={};v(xt,{default:()=>Pa});function Pa(i){return i?[{type:"plain",value:i}]:[]}var wt=h(()=>{});var Ua={};v(Ua,{default:()=>Ba});function Ba(i){return Me(i,ch,dh)}var ch,dh,ja=h(()=>{Q();ch={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},dh=[{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 Wa={};v(Wa,{default:()=>Ka});function Ka(i){return H(i,uh)}var uh,Ya=h(()=>{Q();uh=[{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}]});var gn={};v(gn,{default:()=>Ga});function Ga(i){return H(i,hh)}var hh,yn=h(()=>{Q();hh=[{type:"comment",re:/#[^\n]*/y},{type:"string",re:/[rbfu]{0,2}"""[\s\S]*?"""/y},{type:"string",re:/[rbfu]{0,2}'''[\s\S]*?'''/y},{type:"string",re:/[rbfu]{0,2}"(?:\\.|[^"\\\n])*"/y},{type:"string",re:/[rbfu]{0,2}'(?:\\.|[^'\\\n])*'/y},{type:"number",re:/\b0[xX][\da-fA-F_]+\b|\b\d[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?j?\b/y},{type:"keyword",re:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b/y},{type:"builtin",re:/\b(?:None|True|False|self|cls|abs|all|any|bool|bytes|dict|dir|enumerate|filter|float|format|frozenset|getattr|hasattr|int|isinstance|issubclass|iter|len|list|map|max|min|next|object|open|print|range|repr|reversed|round|set|setattr|sorted|str|sum|super|tuple|type|zip)\b/y},{type:"operator",re:/->|:=|\*\*=?|\/\/=?|<<=?|>>=?|[-+*/%&|^~<>!=]=?/y},{type:"punctuation",re:/[[\]{}(),:;.@]/y},{type:"identifier",re:/\b[A-Za-z_]\w*\b/y}]});var _n={};v(_n,{default:()=>Va});function Va(i){return H(i,ph)}var ph,xn=h(()=>{Q();ph=[{type:"comment",re:/#[^\n]*/y},{type:"punctuation",re:/^(?:---|\.\.\.)$/my},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'(?:''|[^'])*'/y},{type:"attr-name",re:/^[ \t]*-?[ \t]*[\w.$-]+(?=[ \t]*:(?:[ \t]|$))/my},{type:"punctuation",re:/^[ \t]*-(?=[ \t]|$)/my},{type:"keyword",re:/\b(?:true|false|null|yes|no|on|off|~)\b/yi},{type:"number",re:/\b-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/y},{type:"operator",re:/[&*]\w+|![\w/!-]*|[|>][+-]?\d*(?=\s*$)/my},{type:"punctuation",re:/[:,[\]{}]/y}]});var wn={};v(wn,{default:()=>Xa});function Xa(i){return H(i,mh)}var mh,An=h(()=>{Q();mh=[{type:"comment",re:/\/\/[^\n]*/y},{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/`[^`]*`/y},{type:"string",re:/"(?:\\.|[^"\\\n])*"/y},{type:"string",re:/'(?:\\.|[^'\\\n])*'/y},{type:"number",re:/\b0[xX][\da-fA-F_]+\b|\b\d[\d_]*(?:\.[\d_]*)?(?:[eE][+-]?\d+)?i?\b/y},{type:"keyword",re:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/y},{type:"builtin",re:/\b(?:append|bool|byte|cap|clear|close|complex|complex64|complex128|copy|delete|error|float32|float64|imag|int|int8|int16|int32|int64|len|make|max|min|new|nil|panic|print|println|real|recover|rune|string|true|false|iota|uint|uint8|uint16|uint32|uint64|uintptr|any)\b/y},{type:"operator",re:/:=|\.\.\.|&&|\|\||<-|\+\+|--|<<=?|>>=?|&\^=?|[-+*/%&|^<>!=]=?|~/y},{type:"punctuation",re:/[[\]{}(),;:.]/y},{type:"identifier",re:/\b[A-Za-z_]\w*\b/y}]});var En={};v(En,{default:()=>Za});function Za(i){return H(i,fh)}var fh,Sn=h(()=>{Q();fh=[{type:"comment",re:/\/\/\/?[^\n]*/y},{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/b?r(#*)"[\s\S]*?"\1/y},{type:"string",re:/b?"(?:\\.|[^"\\])*"/y},{type:"string",re:/b?'(?:\\.|[^'\\])'/y},{type:"builtin",re:/#!?\[[^\]]*\]/y},{type:"number",re:/\b0[xXbo][\da-fA-F_]+\b|\b\d[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?(?:[iuf](?:8|16|32|64|128|size))?\b/y},{type:"keyword",re:/\b(?:as|async|await|break|const|continue|crate|dyn|else|enum|extern|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|type|unsafe|use|where|while)\b/y},{type:"builtin",re:/\b(?:bool|char|f32|f64|i8|i16|i32|i64|i128|isize|str|u8|u16|u32|u64|u128|usize|String|Vec|Option|Result|Some|None|Ok|Err|Box|Rc|Arc|true|false)\b/y},{type:"operator",re:/'[a-z_]\w*\b/y},{type:"operator",re:/=>|->|::|\.\.=?|&&|\|\||<<=?|>>=?|[-+*/%&|^<>!=]=?|[?@]/y},{type:"punctuation",re:/[[\]{}(),;:.#]/y},{type:"identifier",re:/\b[A-Za-z_]\w*!?\b/y}]});function _e(i){let e=(i||"").trim().toLowerCase();return e?e.startsWith("language-")?_e(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:"yaml",toml:"text",ini:"text",php8:"php",py:"python",python3:"python",golang:"go",rs:"rust"}[e]||e:""}function ot(i,e){nt.set(_e(i),e)}function At(i){return nt.get(_e(i))}async function Ie(i){let e=_e(i);if(!e)return;if(nt.has(e))return nt.get(e);if(Ri.has(e))return Ri.get(e);let t=Ja[e];if(!t)return;let r=t().then(n=>{let o=n.default;return nt.set(e,o),Ri.delete(e),o});return Ri.set(e,r),r}function Mi(){return[...new Set([...nt.keys(),...Object.keys(Ja)])]}var nt,Ri,Ja,Ii=h(()=>{_t();nt=new Map,Ri=new Map,Ja={js:()=>Promise.resolve().then(()=>(_t(),pn)),javascript:()=>Promise.resolve().then(()=>(_t(),pn)),ts:()=>Promise.resolve().then(()=>(fn(),mn)),typescript:()=>Promise.resolve().then(()=>(fn(),mn)),html:()=>Promise.resolve().then(()=>(Ti(),ki)),xml:()=>Promise.resolve().then(()=>(Ti(),ki)),css:()=>Promise.resolve().then(()=>(Ia(),Ma)),json:()=>Promise.resolve().then(()=>(Oa(),Na)),md:()=>Promise.resolve().then(()=>(vn(),bn)),markdown:()=>Promise.resolve().then(()=>(vn(),bn)),shell:()=>Promise.resolve().then(()=>(Ci(),Li)),bash:()=>Promise.resolve().then(()=>(Ci(),Li)),sh:()=>Promise.resolve().then(()=>(Ci(),Li)),sql:()=>Promise.resolve().then(()=>(qa(),Ha)),text:()=>Promise.resolve().then(()=>(wt(),xt)),plain:()=>Promise.resolve().then(()=>(wt(),xt)),txt:()=>Promise.resolve().then(()=>(wt(),xt)),markup:()=>Promise.resolve().then(()=>(Ti(),ki)),console:()=>Promise.resolve().then(()=>(wt(),xt)),php:()=>Promise.resolve().then(()=>(ja(),Ua)),blade:()=>Promise.resolve().then(()=>(Ya(),Wa)),python:()=>Promise.resolve().then(()=>(yn(),gn)),py:()=>Promise.resolve().then(()=>(yn(),gn)),yaml:()=>Promise.resolve().then(()=>(xn(),_n)),yml:()=>Promise.resolve().then(()=>(xn(),_n)),go:()=>Promise.resolve().then(()=>(An(),wn)),golang:()=>Promise.resolve().then(()=>(An(),wn)),rust:()=>Promise.resolve().then(()=>(Sn(),En)),rs:()=>Promise.resolve().then(()=>(Sn(),En))};ot("js",rt)});function kn(i){return i.replace(/[&<>"]/g,e=>bh[e]||e)}function Di(i){return i.map(e=>{let t=e.type==="plain"?"":e.type;return`<span class="${t?`velin-token velin-token--${t}`:"velin-token"}">${kn(e.value)}</span>`}).join("")}function Ni(i,e){i.innerHTML=Di(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 bh,Tn=h(()=>{bh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}});function Ln(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 _e(n);let a=(t?.className||"").match(/\blanguage-([\w-]+)\b/i);return a?_e(a[1]):""}function Oi(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,`
1257
- `),n.value)return n.value}return t.textContent||""}async function ue(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=Oi(t);r.textContent=c,t.textContent="",t.appendChild(r)}r.dataset.velinSource||(r.dataset.velinSource=r.textContent||"");let n=e.language||Ln(t);if(!n)return;t.classList.add("velin-syntax-pending"),r.classList.add("velin-syntax-pending");let o=e.lexer||At(n);o||(o=await Ie(n)),o||(o=At("text")||await Ie("text"));let a=r.dataset.velinSource||Oi(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);Ni(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 Et(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=>ue(t)))}var zi=h(()=>{Ii();Tn()});function Mn(i){Cn.add(i),Rn||(Rn=requestAnimationFrame(()=>{Rn=0;let e=[...Cn];Cn.clear(),e.forEach(t=>t())}))}function vh(i={}){return typeof IntersectionObserver>"u"?null:(Pe||(Pe=new IntersectionObserver(e=>{for(let t of e){if(!t.isIntersecting)continue;let r=In.get(t.target);r&&Mn(()=>r(t.target)),t.target.dataset.velinOnce!=="false"&&Pe.unobserve(t.target)}},{threshold:i.threshold??.1,rootMargin:i.rootMargin??"0px 0px -40px 0px"})),Pe)}function St(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 Mn(()=>e(i,!0)),()=>{};let o=vh(t);return o?(In.set(i,e),o.observe(i),()=>{In.delete(i),o.unobserve(i)}):(Mn(()=>e(i,!0)),()=>{})}function Qa(){Pe&&(Pe.disconnect(),Pe=null)}var Cn,Rn,Pe,In,Dn=h(()=>{Cn=new Set,Rn=0;Pe=null,In=new WeakMap});function De(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){ue(c);continue}c.classList.add("velin-syntax-pending");let d=St(c,async m=>{await ue(m)});n.push(d)}return()=>n.forEach(a=>a())}var kt,Nn=h(()=>{zi();Dn();kt=De});var On={};v(On,{applyHighlight:()=>Ni,escapeHtml:()=>kn,getLanguage:()=>At,getSourceText:()=>Oi,highlightAll:()=>Et,highlightElement:()=>ue,initHighlight:()=>De,lazyLoadLanguage:()=>Ie,listLanguages:()=>Mi,normalizeLanguage:()=>_e,observeCodeBlocks:()=>kt,registerLanguage:()=>ot,renderTokens:()=>Di,resolveLanguage:()=>Ln,velinSyntax:()=>el});var el,Tt=h(()=>{Ii();Tn();zi();Nn();zi();Nn();Ii();el={highlightElement:ue,highlightAll:Et,initHighlight:De,observeCodeBlocks:kt,registerLanguage:ot,lazyLoadLanguage:Ie,listLanguages:Mi}});var il={};v(il,{default:()=>tl});function gh(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 $i,tl,zn=h(()=>{Tt();$i=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=gh(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 b=document.createElement("button");b.type="button",b.className="velin-btn velin-btn--sm velin-btn--ghost",b.textContent="Expand",b.setAttribute("aria-expanded","false"),b.setAttribute("aria-controls",d),b.setAttribute("aria-label","Expand code block"),b.addEventListener("click",()=>{this.hasAttribute("data-collapsed")?(this.removeAttribute("data-collapsed"),b.textContent="Collapse",b.setAttribute("aria-expanded","true"),b.setAttribute("aria-label","Collapse code block")):(this.setAttribute("data-collapsed",""),b.textContent="Expand",b.setAttribute("aria-expanded","false"),b.setAttribute("aria-label","Expand code block"))}),this.setAttribute("data-collapsed",""),a.appendChild(b)}if(t){let b=document.createElement("div");b.className="velin-code-block__line-numbers";let S=o.split(`
1258
- `).length;b.textContent="";for(let A=0;A<S;A+=1){let k=A+1,j=document.createElement("span");n.has(k)&&(j.className="velin-code-block__line--highlight"),j.textContent=String(k),b.appendChild(j)}m.appendChild(b)}let _=document.createElement("pre");e&&(_.setAttribute("language",e),_.dataset.language=e);let f=document.createElement("code");e&&(f.className=`language-${e}`),f.textContent=o,_.appendChild(f),m.appendChild(_),this.appendChild(a),this.appendChild(m),this._pre=_}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 ue(this._pre):De(this,{root:this})}};customElements.define("velin-code-block",$i);tl=$i});var nl={};v(nl,{default:()=>rl});function _h(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 yh,Fi,rl,Hi=h(()=>{yh=i=>i===1?1:1-Math.pow(2,-10*i);Fi=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)*yh(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=_h(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",Fi);rl=Fi});var ll={};v(ll,{default:()=>al});function sl(i,e){let r=(i?.dataset?.sortValue??i?.textContent??"").trim();if(e==="number"){let n=Number.parseFloat(r.replace(/[^\d.,-]/g,"").replace(",","."));return Number.isNaN(n)?Number.NEGATIVE_INFINITY:n}if(e==="date"){let n=Date.parse(r);return Number.isNaN(n)?Number.NEGATIVE_INFINITY:n}return r.toLowerCase()}var xh,ol,qi,al,$n=h(()=>{Le();xh=new Set(["text","number","date"]),ol=!1;qi=class extends HTMLElement{static get observedAttributes(){return["page-size","filter-input","empty-text","label","editable"]}constructor(){super(),this._table=null,this._page=1,this._query="",this._sortIndex=-1,this._sortDirection="ascending",this._filterEl=null,this._pagination=null,this._emptyRow=null,this._filterTimer=null,this._onFilterInput=this._onFilterInput.bind(this)}connectedCallback(){this.classList.add("velin-data-table"),requestAnimationFrame(()=>this._init())}disconnectedCallback(){this._filterEl&&this._filterEl.removeEventListener("input",this._onFilterInput),this._filterTimer&&clearTimeout(this._filterTimer)}attributeChangedCallback(e,t,r){t===r||!this._table||(e==="page-size"?(this._page=1,this._render()):e==="filter-input"?this._bindFilterInput():e==="label"&&this._ensureAccessibleName())}get rows(){let e=this._table?.tBodies?.[0];return e?[...e.rows].filter(t=>t!==this._emptyRow):[]}get matchingRows(){return this.rows.filter(e=>!e.dataset.velinFiltered)}get visibleRows(){return this.matchingRows.filter(e=>!e.hidden)}get page(){return this._page}get pageSize(){let e=Number.parseInt(this.getAttribute("page-size")||"",10);return Number.isFinite(e)&&e>0?e:0}get pageCount(){let e=this.pageSize;return e?Math.max(1,Math.ceil(this.matchingRows.length/e)):1}sort(e,t){let n=this._headers()[e];if(!n)return;let o=this._sortType(n);if(o==="none")return;this._sortDirection=t||(this._sortIndex===e&&this._sortDirection==="ascending"?"descending":"ascending"),this._sortIndex=e;let a=this._sortDirection==="ascending"?1:-1,c=this._table.tBodies[0],d=this.rows.slice().sort((_,f)=>{let b=sl(_.cells[e],o),L=sl(f.cells[e],o);return b<L?-1*a:b>L?1*a:0});for(let _ of d)c.appendChild(_);this._syncSortState(),this._page=1,this._render();let m=n.dataset.sortLabel||n.textContent.trim();oe(`${m} sorted ${this._sortDirection}`),this.dispatchEvent(new CustomEvent("velin-data-table-sort",{bubbles:!0,detail:{index:e,direction:this._sortDirection,column:m}}))}filter(e){this._query=String(e||"").trim().toLowerCase();for(let r of this.rows)!this._query||this._rowText(r).includes(this._query)?delete r.dataset.velinFiltered:r.dataset.velinFiltered="true";this._page=1,this._render();let t=this.matchingRows.length;oe(t===1?"1 row matches":`${t} rows match`),this.dispatchEvent(new CustomEvent("velin-data-table-filter",{bubbles:!0,detail:{query:this._query,count:t}}))}goToPage(e){let t=Math.min(Math.max(1,Math.trunc(e)||1),this.pageCount);t!==this._page&&(this._page=t,this._render(),oe(`Page ${this._page} of ${this.pageCount}`),this.dispatchEvent(new CustomEvent("velin-data-table-page",{bubbles:!0,detail:{page:this._page,pageCount:this.pageCount}})))}_init(){this._table=this.querySelector("table"),!(!this._table||!this._table.tBodies.length)&&(this._ensureAccessibleName(),this._setupSorting(),this._setupEditable(),this._bindFilterInput(),this._render())}_headers(){let e=this._table.tHead?.rows?.[0];return e?[...e.cells]:[]}_sortType(e){let t=(e.dataset.sort||"").toLowerCase();return t==="none"?"none":xh.has(t)?t:this.hasAttribute("sortable")?"text":"none"}_ensureAccessibleName(){let e=this._table;if(!e)return;let t=this.getAttribute("label"),r=e.caption?.textContent.trim()||e.getAttribute("aria-label")?.trim()||e.getAttribute("aria-labelledby")?.trim();if(!r&&t){e.setAttribute("aria-label",t);return}!r&&!ol&&(ol=!0,console.warn("[velinstyle] <velin-data-table> needs a <caption>, aria-label, or a label attribute."))}_setupSorting(){this._headers().forEach((e,t)=>{if(this._sortType(e)==="none"||e.querySelector(".velin-data-table__sort"))return;let r=e.textContent.trim();e.dataset.sortLabel=r,e.setAttribute("aria-sort","none"),e.classList.add("velin-data-table__th");let n=document.createElement("button");n.type="button",n.className="velin-data-table__sort",n.textContent=r;let o=document.createElement("span");o.className="velin-data-table__sort-icon",o.setAttribute("aria-hidden","true"),n.appendChild(o),n.addEventListener("click",()=>this.sort(t)),e.textContent="",e.appendChild(n)})}_setupEditable(){if(!this.hasAttribute("editable")&&!this.querySelector("[data-editable]"))return;let e=this._table.tBodies[0];if(!(!e||e.dataset.velinEditBound)){e.dataset.velinEditBound="true",e.addEventListener("dblclick",t=>{let r=t.target.closest("td");!r||!e.contains(r)||!this.hasAttribute("editable")&&!r.hasAttribute("data-editable")||this._beginEdit(r)}),e.addEventListener("keydown",t=>{let r=t.target.closest("td");if(!(!r||t.target!==r)&&(t.key==="Enter"||t.key==="F2")){if(!this.hasAttribute("editable")&&!r.hasAttribute("data-editable"))return;t.preventDefault(),this._beginEdit(r)}});for(let t of e.querySelectorAll("td[data-editable], td"))!this.hasAttribute("editable")&&!t.hasAttribute("data-editable")||t.hasAttribute("tabindex")||t.setAttribute("tabindex","0")}}_beginEdit(e){if(e.querySelector("input"))return;let t=e.textContent.trim(),r=document.createElement("input");r.className="velin-input velin-data-table__edit",r.value=t,r.setAttribute("aria-label","Edit cell"),e.textContent="",e.appendChild(r),r.focus(),r.select();let n=o=>{let a=o?r.value.trim():t;e.textContent=a,o&&a!==t&&(this.dispatchEvent(new CustomEvent("velin-data-table-edit",{bubbles:!0,detail:{cell:e,row:e.parentElement,previous:t,value:a,columnIndex:e.cellIndex}})),oe("Cell updated"))};r.addEventListener("keydown",o=>{o.key==="Enter"?(o.preventDefault(),n(!0)):o.key==="Escape"&&(o.preventDefault(),n(!1))}),r.addEventListener("blur",()=>n(!0))}_syncSortState(){this._headers().forEach((e,t)=>{if(this._sortType(e)==="none")return;let r=t===this._sortIndex;e.setAttribute("aria-sort",r?this._sortDirection:"none"),e.querySelector(".velin-data-table__sort")?.classList.toggle("velin-data-table__sort--active",r)})}_bindFilterInput(){this._filterEl&&this._filterEl.removeEventListener("input",this._onFilterInput);let e=this.getAttribute("filter-input");this._filterEl=e?document.querySelector(e):null,this._filterEl&&this._filterEl.addEventListener("input",this._onFilterInput)}_onFilterInput(e){this._filterTimer&&clearTimeout(this._filterTimer);let t=e.target.value;this._filterTimer=setTimeout(()=>this.filter(t),150)}_rowText(e){let t=[...e.cells].filter(n=>n.hasAttribute("data-filter"));return(t.length?t:[...e.cells]).map(n=>n.textContent||"").join(" ").toLowerCase()}_render(){let e=this.pageSize;this._page=Math.min(this._page,this.pageCount);let t=this.matchingRows,r=e?(this._page-1)*e:0,n=e?r+e:t.length;for(let o of this.rows){let a=t.indexOf(o);o.hidden=a===-1||a<r||a>=n}this._renderEmptyState(t.length===0),this._renderPagination()}_renderEmptyState(e){if(!e){this._emptyRow?.remove(),this._emptyRow=null;return}if(this._emptyRow?.isConnected)return;let t=this._headers().length||1,r=document.createElement("tr");r.className="velin-data-table__empty";let n=document.createElement("td");n.colSpan=t,n.textContent=this.getAttribute("empty-text")||"No matching rows",r.appendChild(n),this._table.tBodies[0].appendChild(r),this._emptyRow=r}_renderPagination(){if(!this.pageSize||this.pageCount<=1){this._pagination?.remove(),this._pagination=null;return}if(!this._pagination?.isConnected){let n=document.createElement("nav");n.className="velin-data-table__pagination",n.setAttribute("aria-label",this.getAttribute("pagination-label")||"Table pagination");let o=document.createElement("button");o.type="button",o.className="velin-btn velin-btn--outline velin-btn--sm",o.dataset.velinPage="previous",o.textContent=this.getAttribute("previous-text")||"Previous",o.addEventListener("click",()=>this.goToPage(this._page-1));let a=document.createElement("p");a.className="velin-data-table__page-status",a.dataset.velinPage="status";let c=document.createElement("button");c.type="button",c.className="velin-btn velin-btn--outline velin-btn--sm",c.dataset.velinPage="next",c.textContent=this.getAttribute("next-text")||"Next",c.addEventListener("click",()=>this.goToPage(this._page+1)),n.append(o,a,c),this.appendChild(n),this._pagination=n}let e=this._pagination.querySelector('[data-velin-page="status"]');e&&(e.textContent=`Page ${this._page} of ${this.pageCount}`);let t=this._pagination.querySelector('[data-velin-page="previous"]'),r=this._pagination.querySelector('[data-velin-page="next"]');t&&(t.disabled=this._page<=1),r&&(r.disabled=this._page>=this.pageCount)}};customElements.define("velin-data-table",qi);al=qi});var dl={};v(dl,{default:()=>cl});var wh,Pi,cl,Fn=h(()=>{wh=`
1256
+ `,this.shadowRoot.querySelectorAll("[data-nav]").forEach(m=>{m.addEventListener("click",()=>this._shiftMonth(Number(m.getAttribute("data-nav"))))}),this.shadowRoot.querySelectorAll(".day").forEach(m=>{m.addEventListener("click",()=>{if(m.getAttribute("aria-disabled")==="true")return;let v=Ke(m.getAttribute("data-iso"));v&&this._select(v)}),m.addEventListener("keydown",this._onKey)})}};customElements.define("velin-calendar",Ri);Ua=Ri});function F(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 Ne(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 F(i,r)}var ee=p(()=>{});var wn={};g(wn,{default:()=>lt});function lt(i){return Ne(i,Ip,Dp)}var Ip,Dp,St=p(()=>{ee();Ip={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},Dp=[{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 xn={};g(xn,{default:()=>Ka});function Ka(i){return lt(i).map(e=>e.type==="identifier"&&Op.has(e.value)?{type:"keyword",value:e.value}:e)}var Op,An=p(()=>{St();Op=new Set(["type","interface","enum","implements","declare","namespace","readonly","public","private","protected","abstract","as","satisfies","keyof"])});var Mi={};g(Mi,{default:()=>Ga});function Ga(i){return F(i,Np)}var Np,Ii=p(()=>{ee();Np=[{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 Wa={};g(Wa,{default:()=>Va});function Va(i){return Ne(i,zp,$p)}var zp,$p,Ya=p(()=>{ee();zp={important:1,inherit:1,initial:1,unset:1,revert:1},$p=[{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 Za={};g(Za,{default:()=>Xa});function Xa(i){return F(i,Pp)}var Pp,Ja=p(()=>{ee();Pp=[{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 En={};g(En,{default:()=>Qa});function Qa(i){return F(i,Fp)}var Fp,kn=p(()=>{ee();Fp=[{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 Di={};g(Di,{default:()=>el});function el(i){return Ne(i,qp,Hp)}var qp,Hp,Oi=p(()=>{ee();qp={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},Hp=[{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 il={};g(il,{default:()=>tl});function tl(i){return F(i,Bp)}var Bp,rl=p(()=>{ee();Bp=[{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 Tt={};g(Tt,{default:()=>nl});function nl(i){return i?[{type:"plain",value:i}]:[]}var Ct=p(()=>{});var sl={};g(sl,{default:()=>ol});function ol(i){return Ne(i,Up,jp)}var Up,jp,al=p(()=>{ee();Up={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},jp=[{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 cl={};g(cl,{default:()=>ll});function ll(i){return F(i,Kp)}var Kp,ul=p(()=>{ee();Kp=[{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}]});var Sn={};g(Sn,{default:()=>dl});function dl(i){return F(i,Gp)}var Gp,Tn=p(()=>{ee();Gp=[{type:"comment",re:/#[^\n]*/y},{type:"string",re:/[rbfu]{0,2}"""[\s\S]*?"""/y},{type:"string",re:/[rbfu]{0,2}'''[\s\S]*?'''/y},{type:"string",re:/[rbfu]{0,2}"(?:\\.|[^"\\\n])*"/y},{type:"string",re:/[rbfu]{0,2}'(?:\\.|[^'\\\n])*'/y},{type:"number",re:/\b0[xX][\da-fA-F_]+\b|\b\d[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?j?\b/y},{type:"keyword",re:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b/y},{type:"builtin",re:/\b(?:None|True|False|self|cls|abs|all|any|bool|bytes|dict|dir|enumerate|filter|float|format|frozenset|getattr|hasattr|int|isinstance|issubclass|iter|len|list|map|max|min|next|object|open|print|range|repr|reversed|round|set|setattr|sorted|str|sum|super|tuple|type|zip)\b/y},{type:"operator",re:/->|:=|\*\*=?|\/\/=?|<<=?|>>=?|[-+*/%&|^~<>!=]=?/y},{type:"punctuation",re:/[[\]{}(),:;.@]/y},{type:"identifier",re:/\b[A-Za-z_]\w*\b/y}]});var Cn={};g(Cn,{default:()=>pl});function pl(i){return F(i,Vp)}var Vp,Ln=p(()=>{ee();Vp=[{type:"comment",re:/#[^\n]*/y},{type:"punctuation",re:/^(?:---|\.\.\.)$/my},{type:"string",re:/"(?:\\.|[^"\\])*"/y},{type:"string",re:/'(?:''|[^'])*'/y},{type:"attr-name",re:/^[ \t]*-?[ \t]*[\w.$-]+(?=[ \t]*:(?:[ \t]|$))/my},{type:"punctuation",re:/^[ \t]*-(?=[ \t]|$)/my},{type:"keyword",re:/\b(?:true|false|null|yes|no|on|off|~)\b/yi},{type:"number",re:/\b-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/y},{type:"operator",re:/[&*]\w+|![\w/!-]*|[|>][+-]?\d*(?=\s*$)/my},{type:"punctuation",re:/[:,[\]{}]/y}]});var Rn={};g(Rn,{default:()=>hl});function hl(i){return F(i,Wp)}var Wp,Mn=p(()=>{ee();Wp=[{type:"comment",re:/\/\/[^\n]*/y},{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/`[^`]*`/y},{type:"string",re:/"(?:\\.|[^"\\\n])*"/y},{type:"string",re:/'(?:\\.|[^'\\\n])*'/y},{type:"number",re:/\b0[xX][\da-fA-F_]+\b|\b\d[\d_]*(?:\.[\d_]*)?(?:[eE][+-]?\d+)?i?\b/y},{type:"keyword",re:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/y},{type:"builtin",re:/\b(?:append|bool|byte|cap|clear|close|complex|complex64|complex128|copy|delete|error|float32|float64|imag|int|int8|int16|int32|int64|len|make|max|min|new|nil|panic|print|println|real|recover|rune|string|true|false|iota|uint|uint8|uint16|uint32|uint64|uintptr|any)\b/y},{type:"operator",re:/:=|\.\.\.|&&|\|\||<-|\+\+|--|<<=?|>>=?|&\^=?|[-+*/%&|^<>!=]=?|~/y},{type:"punctuation",re:/[[\]{}(),;:.]/y},{type:"identifier",re:/\b[A-Za-z_]\w*\b/y}]});var In={};g(In,{default:()=>ml});function ml(i){return F(i,Yp)}var Yp,Dn=p(()=>{ee();Yp=[{type:"comment",re:/\/\/\/?[^\n]*/y},{type:"comment",re:/\/\*[\s\S]*?\*\//y},{type:"string",re:/b?r(#*)"[\s\S]*?"\1/y},{type:"string",re:/b?"(?:\\.|[^"\\])*"/y},{type:"string",re:/b?'(?:\\.|[^'\\])'/y},{type:"builtin",re:/#!?\[[^\]]*\]/y},{type:"number",re:/\b0[xXbo][\da-fA-F_]+\b|\b\d[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?(?:[iuf](?:8|16|32|64|128|size))?\b/y},{type:"keyword",re:/\b(?:as|async|await|break|const|continue|crate|dyn|else|enum|extern|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|type|unsafe|use|where|while)\b/y},{type:"builtin",re:/\b(?:bool|char|f32|f64|i8|i16|i32|i64|i128|isize|str|u8|u16|u32|u64|u128|usize|String|Vec|Option|Result|Some|None|Ok|Err|Box|Rc|Arc|true|false)\b/y},{type:"operator",re:/'[a-z_]\w*\b/y},{type:"operator",re:/=>|->|::|\.\.=?|&&|\|\||<<=?|>>=?|[-+*/%&|^<>!=]=?|[?@]/y},{type:"punctuation",re:/[[\]{}(),;:.#]/y},{type:"identifier",re:/\b[A-Za-z_]\w*!?\b/y}]});function xe(i){let e=(i||"").trim().toLowerCase();return e?e.startsWith("language-")?xe(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:"yaml",toml:"text",ini:"text",php8:"php",py:"python",python3:"python",golang:"go",rs:"rust"}[e]||e:""}function ut(i,e){ct.set(xe(i),e)}function Lt(i){return ct.get(xe(i))}async function ze(i){let e=xe(i);if(!e)return;if(ct.has(e))return ct.get(e);if(Ni.has(e))return Ni.get(e);let t=fl[e];if(!t)return;let r=t().then(n=>{let o=n.default;return ct.set(e,o),Ni.delete(e),o});return Ni.set(e,r),r}function zi(){return[...new Set([...ct.keys(),...Object.keys(fl)])]}var ct,Ni,fl,$i=p(()=>{St();ct=new Map,Ni=new Map,fl={js:()=>Promise.resolve().then(()=>(St(),wn)),javascript:()=>Promise.resolve().then(()=>(St(),wn)),ts:()=>Promise.resolve().then(()=>(An(),xn)),typescript:()=>Promise.resolve().then(()=>(An(),xn)),html:()=>Promise.resolve().then(()=>(Ii(),Mi)),xml:()=>Promise.resolve().then(()=>(Ii(),Mi)),css:()=>Promise.resolve().then(()=>(Ya(),Wa)),json:()=>Promise.resolve().then(()=>(Ja(),Za)),md:()=>Promise.resolve().then(()=>(kn(),En)),markdown:()=>Promise.resolve().then(()=>(kn(),En)),shell:()=>Promise.resolve().then(()=>(Oi(),Di)),bash:()=>Promise.resolve().then(()=>(Oi(),Di)),sh:()=>Promise.resolve().then(()=>(Oi(),Di)),sql:()=>Promise.resolve().then(()=>(rl(),il)),text:()=>Promise.resolve().then(()=>(Ct(),Tt)),plain:()=>Promise.resolve().then(()=>(Ct(),Tt)),txt:()=>Promise.resolve().then(()=>(Ct(),Tt)),markup:()=>Promise.resolve().then(()=>(Ii(),Mi)),console:()=>Promise.resolve().then(()=>(Ct(),Tt)),php:()=>Promise.resolve().then(()=>(al(),sl)),blade:()=>Promise.resolve().then(()=>(ul(),cl)),python:()=>Promise.resolve().then(()=>(Tn(),Sn)),py:()=>Promise.resolve().then(()=>(Tn(),Sn)),yaml:()=>Promise.resolve().then(()=>(Ln(),Cn)),yml:()=>Promise.resolve().then(()=>(Ln(),Cn)),go:()=>Promise.resolve().then(()=>(Mn(),Rn)),golang:()=>Promise.resolve().then(()=>(Mn(),Rn)),rust:()=>Promise.resolve().then(()=>(Dn(),In)),rs:()=>Promise.resolve().then(()=>(Dn(),In))};ut("js",lt)});function On(i){return i.replace(/[&<>"]/g,e=>Xp[e]||e)}function Pi(i){return i.map(e=>{let t=e.type==="plain"?"":e.type;return`<span class="${t?`velin-token velin-token--${t}`:"velin-token"}">${On(e.value)}</span>`}).join("")}function Fi(i,e){i.innerHTML=Pi(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 Xp,Nn=p(()=>{Xp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}});function zn(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 xe(n);let a=(t?.className||"").match(/\blanguage-([\w-]+)\b/i);return a?xe(a[1]):""}function qi(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,`
1257
+ `),n.value)return n.value}return t.textContent||""}async function he(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=qi(t);r.textContent=c,t.textContent="",t.appendChild(r)}r.dataset.velinSource||(r.dataset.velinSource=r.textContent||"");let n=e.language||zn(t);if(!n)return;t.classList.add("velin-syntax-pending"),r.classList.add("velin-syntax-pending");let o=e.lexer||Lt(n);o||(o=await ze(n)),o||(o=Lt("text")||await ze("text"));let a=r.dataset.velinSource||qi(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);Fi(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 Rt(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=>he(t)))}var Hi=p(()=>{$i();Nn()});function Fn(i){$n.add(i),Pn||(Pn=requestAnimationFrame(()=>{Pn=0;let e=[...$n];$n.clear(),e.forEach(t=>t())}))}function Zp(i={}){return typeof IntersectionObserver>"u"?null:(Ge||(Ge=new IntersectionObserver(e=>{for(let t of e){if(!t.isIntersecting)continue;let r=qn.get(t.target);r&&Fn(()=>r(t.target)),t.target.dataset.velinOnce!=="false"&&Ge.unobserve(t.target)}},{threshold:i.threshold??.1,rootMargin:i.rootMargin??"0px 0px -40px 0px"})),Ge)}function Ae(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 Fn(()=>e(i,!0)),()=>{};let o=Zp(t);return o?(qn.set(i,e),o.observe(i),()=>{qn.delete(i),o.unobserve(i)}):(Fn(()=>e(i,!0)),()=>{})}function bl(){Ge&&(Ge.disconnect(),Ge=null)}var $n,Pn,Ge,qn,Bi=p(()=>{$n=new Set,Pn=0;Ge=null,qn=new WeakMap});function $e(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){he(c);continue}c.classList.add("velin-syntax-pending");let u=Ae(c,async h=>{await he(h)});n.push(u)}return()=>n.forEach(a=>a())}var Mt,Hn=p(()=>{Hi();Bi();Mt=$e});var Bn={};g(Bn,{applyHighlight:()=>Fi,escapeHtml:()=>On,getLanguage:()=>Lt,getSourceText:()=>qi,highlightAll:()=>Rt,highlightElement:()=>he,initHighlight:()=>$e,lazyLoadLanguage:()=>ze,listLanguages:()=>zi,normalizeLanguage:()=>xe,observeCodeBlocks:()=>Mt,registerLanguage:()=>ut,renderTokens:()=>Pi,resolveLanguage:()=>zn,velinSyntax:()=>vl});var vl,It=p(()=>{$i();Nn();Hi();Hn();Hi();Hn();$i();vl={highlightElement:he,highlightAll:Rt,initHighlight:$e,observeCodeBlocks:Mt,registerLanguage:ut,lazyLoadLanguage:ze,listLanguages:zi}});var yl={};g(yl,{default:()=>gl});function Jp(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 Ui,gl,Un=p(()=>{It();Ui=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=Jp(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 u=`velin-code-panel-${Math.random().toString(36).slice(2,9)}`,h=document.createElement("div");if(h.id=u,h.className=t?"velin-code-block__gutter":"",r){let v=document.createElement("button");v.type="button",v.className="velin-btn velin-btn--sm velin-btn--ghost",v.textContent="Expand",v.setAttribute("aria-expanded","false"),v.setAttribute("aria-controls",u),v.setAttribute("aria-label","Expand code block"),v.addEventListener("click",()=>{this.hasAttribute("data-collapsed")?(this.removeAttribute("data-collapsed"),v.textContent="Collapse",v.setAttribute("aria-expanded","true"),v.setAttribute("aria-label","Collapse code block")):(this.setAttribute("data-collapsed",""),v.textContent="Expand",v.setAttribute("aria-expanded","false"),v.setAttribute("aria-label","Expand code block"))}),this.setAttribute("data-collapsed",""),a.appendChild(v)}if(t){let v=document.createElement("div");v.className="velin-code-block__line-numbers";let k=o.split(`
1258
+ `).length;v.textContent="";for(let A=0;A<k;A+=1){let S=A+1,K=document.createElement("span");n.has(S)&&(K.className="velin-code-block__line--highlight"),K.textContent=String(S),v.appendChild(K)}h.appendChild(v)}let b=document.createElement("pre");e&&(b.setAttribute("language",e),b.dataset.language=e);let m=document.createElement("code");e&&(m.className=`language-${e}`),m.textContent=o,b.appendChild(m),h.appendChild(b),this.appendChild(a),this.appendChild(h),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 he(this._pre):$e(this,{root:this})}};customElements.define("velin-code-block",Ui);gl=Ui});var wl={};g(wl,{default:()=>_l});function eh(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 Qp,ji,_l,Ki=p(()=>{Qp=i=>i===1?1:1-Math.pow(2,-10*i);ji=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 u=Math.min(1,(c-o)/r),h=e+(t-e)*Qp(u);this._render(h),u<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=eh(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",ji);_l=ji});var kl={};g(kl,{default:()=>El});function Al(i,e){let r=(i?.dataset?.sortValue??i?.textContent??"").trim();if(e==="number"){let n=Number.parseFloat(r.replace(/[^\d.,-]/g,"").replace(",","."));return Number.isNaN(n)?Number.NEGATIVE_INFINITY:n}if(e==="date"){let n=Date.parse(r);return Number.isNaN(n)?Number.NEGATIVE_INFINITY:n}return r.toLowerCase()}var th,xl,Gi,El,jn=p(()=>{Ie();th=new Set(["text","number","date"]),xl=!1;Gi=class extends HTMLElement{static get observedAttributes(){return["page-size","filter-input","empty-text","label","editable"]}constructor(){super(),this._table=null,this._page=1,this._query="",this._sortIndex=-1,this._sortDirection="ascending",this._filterEl=null,this._pagination=null,this._emptyRow=null,this._filterTimer=null,this._onFilterInput=this._onFilterInput.bind(this)}connectedCallback(){this.classList.add("velin-data-table"),requestAnimationFrame(()=>this._init())}disconnectedCallback(){this._filterEl&&this._filterEl.removeEventListener("input",this._onFilterInput),this._filterTimer&&clearTimeout(this._filterTimer)}attributeChangedCallback(e,t,r){t===r||!this._table||(e==="page-size"?(this._page=1,this._render()):e==="filter-input"?this._bindFilterInput():e==="label"&&this._ensureAccessibleName())}get rows(){let e=this._table?.tBodies?.[0];return e?[...e.rows].filter(t=>t!==this._emptyRow):[]}get matchingRows(){return this.rows.filter(e=>!e.dataset.velinFiltered)}get visibleRows(){return this.matchingRows.filter(e=>!e.hidden)}get page(){return this._page}get pageSize(){let e=Number.parseInt(this.getAttribute("page-size")||"",10);return Number.isFinite(e)&&e>0?e:0}get pageCount(){let e=this.pageSize;return e?Math.max(1,Math.ceil(this.matchingRows.length/e)):1}sort(e,t){let n=this._headers()[e];if(!n)return;let o=this._sortType(n);if(o==="none")return;this._sortDirection=t||(this._sortIndex===e&&this._sortDirection==="ascending"?"descending":"ascending"),this._sortIndex=e;let a=this._sortDirection==="ascending"?1:-1,c=this._table.tBodies[0],u=this.rows.slice().sort((b,m)=>{let v=Al(b.cells[e],o),T=Al(m.cells[e],o);return v<T?-1*a:v>T?1*a:0});for(let b of u)c.appendChild(b);this._syncSortState(),this._page=1,this._render();let h=n.dataset.sortLabel||n.textContent.trim();ae(`${h} sorted ${this._sortDirection}`),this.dispatchEvent(new CustomEvent("velin-data-table-sort",{bubbles:!0,detail:{index:e,direction:this._sortDirection,column:h}}))}filter(e){this._query=String(e||"").trim().toLowerCase();for(let r of this.rows)!this._query||this._rowText(r).includes(this._query)?delete r.dataset.velinFiltered:r.dataset.velinFiltered="true";this._page=1,this._render();let t=this.matchingRows.length;ae(t===1?"1 row matches":`${t} rows match`),this.dispatchEvent(new CustomEvent("velin-data-table-filter",{bubbles:!0,detail:{query:this._query,count:t}}))}goToPage(e){let t=Math.min(Math.max(1,Math.trunc(e)||1),this.pageCount);t!==this._page&&(this._page=t,this._render(),ae(`Page ${this._page} of ${this.pageCount}`),this.dispatchEvent(new CustomEvent("velin-data-table-page",{bubbles:!0,detail:{page:this._page,pageCount:this.pageCount}})))}_init(){this._table=this.querySelector("table"),!(!this._table||!this._table.tBodies.length)&&(this._ensureAccessibleName(),this._setupSorting(),this._setupEditable(),this._bindFilterInput(),this._render())}_headers(){let e=this._table.tHead?.rows?.[0];return e?[...e.cells]:[]}_sortType(e){let t=(e.dataset.sort||"").toLowerCase();return t==="none"?"none":th.has(t)?t:this.hasAttribute("sortable")?"text":"none"}_ensureAccessibleName(){let e=this._table;if(!e)return;let t=this.getAttribute("label"),r=e.caption?.textContent.trim()||e.getAttribute("aria-label")?.trim()||e.getAttribute("aria-labelledby")?.trim();if(!r&&t){e.setAttribute("aria-label",t);return}!r&&!xl&&(xl=!0,console.warn("[velinstyle] <velin-data-table> needs a <caption>, aria-label, or a label attribute."))}_setupSorting(){this._headers().forEach((e,t)=>{if(this._sortType(e)==="none"||e.querySelector(".velin-data-table__sort"))return;let r=e.textContent.trim();e.dataset.sortLabel=r,e.setAttribute("aria-sort","none"),e.classList.add("velin-data-table__th");let n=document.createElement("button");n.type="button",n.className="velin-data-table__sort",n.textContent=r;let o=document.createElement("span");o.className="velin-data-table__sort-icon",o.setAttribute("aria-hidden","true"),n.appendChild(o),n.addEventListener("click",()=>this.sort(t)),e.textContent="",e.appendChild(n)})}_setupEditable(){if(!this.hasAttribute("editable")&&!this.querySelector("[data-editable]"))return;let e=this._table.tBodies[0];if(!(!e||e.dataset.velinEditBound)){e.dataset.velinEditBound="true",e.addEventListener("dblclick",t=>{let r=t.target.closest("td");!r||!e.contains(r)||!this.hasAttribute("editable")&&!r.hasAttribute("data-editable")||this._beginEdit(r)}),e.addEventListener("keydown",t=>{let r=t.target.closest("td");if(!(!r||t.target!==r)&&(t.key==="Enter"||t.key==="F2")){if(!this.hasAttribute("editable")&&!r.hasAttribute("data-editable"))return;t.preventDefault(),this._beginEdit(r)}});for(let t of e.querySelectorAll("td[data-editable], td"))!this.hasAttribute("editable")&&!t.hasAttribute("data-editable")||t.hasAttribute("tabindex")||t.setAttribute("tabindex","0")}}_beginEdit(e){if(e.querySelector("input"))return;let t=e.textContent.trim(),r=document.createElement("input");r.className="velin-input velin-data-table__edit",r.value=t,r.setAttribute("aria-label","Edit cell"),e.textContent="",e.appendChild(r),r.focus(),r.select();let n=o=>{let a=o?r.value.trim():t;e.textContent=a,o&&a!==t&&(this.dispatchEvent(new CustomEvent("velin-data-table-edit",{bubbles:!0,detail:{cell:e,row:e.parentElement,previous:t,value:a,columnIndex:e.cellIndex}})),ae("Cell updated"))};r.addEventListener("keydown",o=>{o.key==="Enter"?(o.preventDefault(),n(!0)):o.key==="Escape"&&(o.preventDefault(),n(!1))}),r.addEventListener("blur",()=>n(!0))}_syncSortState(){this._headers().forEach((e,t)=>{if(this._sortType(e)==="none")return;let r=t===this._sortIndex;e.setAttribute("aria-sort",r?this._sortDirection:"none"),e.querySelector(".velin-data-table__sort")?.classList.toggle("velin-data-table__sort--active",r)})}_bindFilterInput(){this._filterEl&&this._filterEl.removeEventListener("input",this._onFilterInput);let e=this.getAttribute("filter-input");this._filterEl=e?document.querySelector(e):null,this._filterEl&&this._filterEl.addEventListener("input",this._onFilterInput)}_onFilterInput(e){this._filterTimer&&clearTimeout(this._filterTimer);let t=e.target.value;this._filterTimer=setTimeout(()=>this.filter(t),150)}_rowText(e){let t=[...e.cells].filter(n=>n.hasAttribute("data-filter"));return(t.length?t:[...e.cells]).map(n=>n.textContent||"").join(" ").toLowerCase()}_render(){let e=this.pageSize;this._page=Math.min(this._page,this.pageCount);let t=this.matchingRows,r=e?(this._page-1)*e:0,n=e?r+e:t.length;for(let o of this.rows){let a=t.indexOf(o);o.hidden=a===-1||a<r||a>=n}this._renderEmptyState(t.length===0),this._renderPagination()}_renderEmptyState(e){if(!e){this._emptyRow?.remove(),this._emptyRow=null;return}if(this._emptyRow?.isConnected)return;let t=this._headers().length||1,r=document.createElement("tr");r.className="velin-data-table__empty";let n=document.createElement("td");n.colSpan=t,n.textContent=this.getAttribute("empty-text")||"No matching rows",r.appendChild(n),this._table.tBodies[0].appendChild(r),this._emptyRow=r}_renderPagination(){if(!this.pageSize||this.pageCount<=1){this._pagination?.remove(),this._pagination=null;return}if(!this._pagination?.isConnected){let n=document.createElement("nav");n.className="velin-data-table__pagination",n.setAttribute("aria-label",this.getAttribute("pagination-label")||"Table pagination");let o=document.createElement("button");o.type="button",o.className="velin-btn velin-btn--outline velin-btn--sm",o.dataset.velinPage="previous",o.textContent=this.getAttribute("previous-text")||"Previous",o.addEventListener("click",()=>this.goToPage(this._page-1));let a=document.createElement("p");a.className="velin-data-table__page-status",a.dataset.velinPage="status";let c=document.createElement("button");c.type="button",c.className="velin-btn velin-btn--outline velin-btn--sm",c.dataset.velinPage="next",c.textContent=this.getAttribute("next-text")||"Next",c.addEventListener("click",()=>this.goToPage(this._page+1)),n.append(o,a,c),this.appendChild(n),this._pagination=n}let e=this._pagination.querySelector('[data-velin-page="status"]');e&&(e.textContent=`Page ${this._page} of ${this.pageCount}`);let t=this._pagination.querySelector('[data-velin-page="previous"]'),r=this._pagination.querySelector('[data-velin-page="next"]');t&&(t.disabled=this._page<=1),r&&(r.disabled=this._page>=this.pageCount)}};customElements.define("velin-data-table",Gi);El=Gi});var Tl={};g(Tl,{default:()=>Sl});var ih,Vi,Sl,Kn=p(()=>{ih=`
1259
1259
  :host {
1260
1260
  display: block;
1261
1261
  text-align: center;
@@ -1285,8 +1285,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1285
1285
  gap: var(--velin-space-3, 0.75rem);
1286
1286
  justify-content: center;
1287
1287
  }
1288
- `,Pi=class extends HTMLElement{static get observedAttributes(){return["heading","description"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){if(this.shadowRoot.querySelector(".root")){this._syncText();return}let e="velin-empty-title";this.shadowRoot.innerHTML=`
1289
- <style>${wh}</style>
1288
+ `,Vi=class extends HTMLElement{static get observedAttributes(){return["heading","description"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){if(this.shadowRoot.querySelector(".root")){this._syncText();return}let e="velin-empty-title";this.shadowRoot.innerHTML=`
1289
+ <style>${ih}</style>
1290
1290
  <section class="root" part="root" role="status" aria-labelledby="${e}">
1291
1291
  <div class="illustration" part="illustration"><slot name="illustration"></slot></div>
1292
1292
  <h2 class="title" id="${e}" part="title">
@@ -1298,7 +1298,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1298
1298
  <div class="actions" part="actions"><slot name="actions"></slot></div>
1299
1299
  <slot></slot>
1300
1300
  </section>
1301
- `,this._syncText()}attributeChangedCallback(){this._syncText()}_syncText(){let e=this.shadowRoot?.querySelector(".heading-fallback"),t=this.shadowRoot?.querySelector(".description-fallback");if(e&&(e.textContent=this.getAttribute("heading")||"Nothing here yet"),t){let r=this.getAttribute("description")||"";t.textContent=r,t.hidden=!r}}};customElements.define("velin-empty-state",Pi);cl=Pi});var hl={};v(hl,{default:()=>ul});var Ah,Bi,ul,Hn=h(()=>{C();Ah=`
1301
+ `,this._syncText()}attributeChangedCallback(){this._syncText()}_syncText(){let e=this.shadowRoot?.querySelector(".heading-fallback"),t=this.shadowRoot?.querySelector(".description-fallback");if(e&&(e.textContent=this.getAttribute("heading")||"Nothing here yet"),t){let r=this.getAttribute("description")||"";t.textContent=r,t.hidden=!r}}};customElements.define("velin-empty-state",Vi);Sl=Vi});var Ll={};g(Ll,{default:()=>Cl});var rh,Wi,Cl,Gn=p(()=>{L();rh=`
1302
1302
  :host { display: block; }
1303
1303
  .zone {
1304
1304
  border: 2px dashed var(--velin-color-border, #cbd5e1);
@@ -1347,19 +1347,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1347
1347
  }
1348
1348
  .status { margin: var(--velin-space-2, 0.5rem) 0 0; font-size: var(--velin-text-sm, 0.875rem); }
1349
1349
  .status[data-tone="error"] { color: var(--velin-color-danger, #b91c1c); }
1350
- `,Bi=class extends HTMLElement{static get observedAttributes(){return["accept","multiple","label","progress"]}constructor(){super(),this.attachShadow({mode:"open"}),this._files=[]}connectedCallback(){this._render()}attributeChangedCallback(){this.shadowRoot?.querySelector(".zone")&&this._render()}get files(){return this._files.slice()}_emitFiles(e){let t=this.getAttribute("accept"),r=[...e];if(t){let n=t.split(",").map(a=>a.trim().toLowerCase()),o=r.find(a=>{let c=a.name.toLowerCase(),d=(a.type||"").toLowerCase();return!n.some(m=>m.startsWith(".")?c.endsWith(m):d===m||d.startsWith(m.replace("/*","/")))});if(o){this._setStatus(`File type not allowed: ${o.name}`,"error"),this.dispatchEvent(new CustomEvent("velin-error",{bubbles:!0,detail:{message:"accept",file:o}}));return}}this._files=r,this._setStatus(r.length?`${r.length} file(s) ready`:"","ok"),this.dispatchEvent(new CustomEvent("velin-files",{bubbles:!0,detail:{files:r}})),this._renderList()}_setStatus(e,t="ok"){let r=this.shadowRoot?.querySelector(".status");r&&(r.textContent=e,r.dataset.tone=t)}_renderList(){let e=this.shadowRoot?.querySelector(".list");e&&(e.innerHTML=this._files.map(t=>`<li><span>${g(t.name)}</span><span>${Math.round(t.size/1024)} KB</span></li>`).join(""))}_render(){let e=g(this.getAttribute("label")||"Upload files"),t=this.getAttribute("accept")||"",r=this.hasAttribute("multiple"),n=Math.max(0,Math.min(100,Number(this.getAttribute("progress")||0)));this.shadowRoot.innerHTML=`
1351
- <style>${Ah}</style>
1350
+ `,Wi=class extends HTMLElement{static get observedAttributes(){return["accept","multiple","label","progress"]}constructor(){super(),this.attachShadow({mode:"open"}),this._files=[]}connectedCallback(){this._render()}attributeChangedCallback(){this.shadowRoot?.querySelector(".zone")&&this._render()}get files(){return this._files.slice()}_emitFiles(e){let t=this.getAttribute("accept"),r=[...e];if(t){let n=t.split(",").map(a=>a.trim().toLowerCase()),o=r.find(a=>{let c=a.name.toLowerCase(),u=(a.type||"").toLowerCase();return!n.some(h=>h.startsWith(".")?c.endsWith(h):u===h||u.startsWith(h.replace("/*","/")))});if(o){this._setStatus(`File type not allowed: ${o.name}`,"error"),this.dispatchEvent(new CustomEvent("velin-error",{bubbles:!0,detail:{message:"accept",file:o}}));return}}this._files=r,this._setStatus(r.length?`${r.length} file(s) ready`:"","ok"),this.dispatchEvent(new CustomEvent("velin-files",{bubbles:!0,detail:{files:r}})),this._renderList()}_setStatus(e,t="ok"){let r=this.shadowRoot?.querySelector(".status");r&&(r.textContent=e,r.dataset.tone=t)}_renderList(){let e=this.shadowRoot?.querySelector(".list");e&&(e.innerHTML=this._files.map(t=>`<li><span>${y(t.name)}</span><span>${Math.round(t.size/1024)} KB</span></li>`).join(""))}_render(){let e=y(this.getAttribute("label")||"Upload files"),t=this.getAttribute("accept")||"",r=this.hasAttribute("multiple"),n=Math.max(0,Math.min(100,Number(this.getAttribute("progress")||0)));this.shadowRoot.innerHTML=`
1351
+ <style>${rh}</style>
1352
1352
  <div class="zone" role="group" aria-label="${e}">
1353
1353
  <p class="hint">Drag and drop files here, or browse. Client-side only \u2014 wire <code>velin-files</code> to your upload API.</p>
1354
1354
  <button type="button" class="browse">Browse files</button>
1355
- <input type="file" ${t?`accept="${g(t)}"`:""} ${r?"multiple":""} />
1355
+ <input type="file" ${t?`accept="${y(t)}"`:""} ${r?"multiple":""} />
1356
1356
  <div class="progress" hidden="${n<=0?"true":"false"}" aria-hidden="${n<=0?"true":"false"}">
1357
1357
  <div class="bar" style="inline-size:${n}%"></div>
1358
1358
  </div>
1359
1359
  <p class="status" role="status" aria-live="polite"></p>
1360
1360
  <ul class="list"></ul>
1361
1361
  </div>
1362
- `;let o=this.shadowRoot.querySelector("input"),a=this.shadowRoot.querySelector(".browse"),c=this.shadowRoot.querySelector(".zone");a.addEventListener("click",()=>o.click()),o.addEventListener("change",()=>{o.files?.length&&this._emitFiles(o.files)}),["dragenter","dragover"].forEach(d=>{c.addEventListener(d,m=>{m.preventDefault(),this.setAttribute("dragging","")})}),["dragleave","drop"].forEach(d=>{c.addEventListener(d,m=>{m.preventDefault(),this.removeAttribute("dragging")})}),c.addEventListener("drop",d=>{let m=d.dataTransfer?.files;m?.length&&this._emitFiles(m)}),this._renderList()}};customElements.define("velin-file-dropzone",Bi);ul=Bi});var ml={};v(ml,{default:()=>pl});function qn(i){let e=String(i??"");return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/[^\w-]/g,t=>`\\${t}`)}function Th(i){let e=i.getAttribute("data-error-label");if(e)return e;let t=i.getAttribute("aria-label");if(t?.trim())return t.trim();let r=i.getAttribute("aria-labelledby");if(r){let o=r.split(/\s+/).map(a=>i.ownerDocument.getElementById(a)?.textContent?.trim()||"").filter(Boolean).join(" ");if(o)return o}if(i.id){let o=i.ownerDocument.querySelector(`label[for="${qn(i.id)}"]`);if(o?.textContent.trim())return o.textContent.trim()}let n=i.closest("label");return n?.textContent.trim()?n.textContent.trim():i.name||"This field"}function Lh(i){return i.getAttribute("data-error-message")?.trim()||i.validationMessage||"Invalid value"}function Ch(i,e){let t=(i.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean);t.includes(e)||(t.push(e),i.setAttribute("aria-describedby",t.join(" ")))}function Rh(i,e){let r=(i.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean).filter(n=>n!==e);r.length?i.setAttribute("aria-describedby",r.join(" ")):i.removeAttribute("aria-describedby")}var Eh,Sh,kh,Ui,pl,Pn=h(()=>{Le();Eh="input, select, textarea",Sh=new Set(["submit","reset","button","image","hidden"]),kh=0;Ui=class extends HTMLElement{static get observedAttributes(){return["for","heading"]}constructor(){super(),this._form=null,this._panel=null,this._errors=[],this._onSubmit=this._onSubmit.bind(this),this._onFieldChange=this._onFieldChange.bind(this),this._onReset=this._onReset.bind(this)}connectedCallback(){this.classList.add("velin-form-summary"),requestAnimationFrame(()=>this._bindForm())}disconnectedCallback(){this._unbindForm()}attributeChangedCallback(e,t,r){if(t!==r){if(e==="for"&&this.isConnected)this._unbindForm(),this._bindForm();else if(e==="heading"&&this._panel){let n=this._panel.querySelector(".velin-form-summary__heading");n&&(n.textContent=this.headingText)}}}get form(){return this._form}get errors(){return this._errors.slice()}get headingText(){return this.getAttribute("heading")||"There is a problem"}validate(){if(!this._form)return!0;let e=[];for(let t of this._fields()){if(t.checkValidity()){this._clearFieldError(t);continue}let r={field:t,label:Th(t),message:Lh(t)};this._markFieldError(t,r.message),e.push(r)}return this._errors=e,this._render(),e.length===0}clear(){for(let e of this._fields())this._clearFieldError(e);this._errors=[],this._render()}focusFirstError(){let e=this._errors[0];e&&this._focusField(e.field)}_bindForm(){let e=this.getAttribute("for");this._form=e?this.ownerDocument.getElementById(e):this.closest("form"),this._form&&(this.hasAttribute("native-validation")||(this._form.noValidate=!0),this._form.addEventListener("submit",this._onSubmit),this._form.addEventListener("reset",this._onReset),this._form.addEventListener("input",this._onFieldChange),this._form.addEventListener("change",this._onFieldChange))}_unbindForm(){this._form&&(this._form.removeEventListener("submit",this._onSubmit),this._form.removeEventListener("reset",this._onReset),this._form.removeEventListener("input",this._onFieldChange),this._form.removeEventListener("change",this._onFieldChange),this._form=null)}_fields(){if(!this._form)return[];let e=new Set;return[...this._form.querySelectorAll(Eh)].filter(t=>{if(Sh.has(t.type)||t.disabled||t.hasAttribute("data-error-ignore")||typeof t.checkValidity!="function")return!1;if(t.type==="radio"&&t.name){if(e.has(t.name))return!1;e.add(t.name)}return!0})}_onSubmit(e){this.validate()||(e.preventDefault(),this._announceErrors(),this._focusPanel(),this.dispatchEvent(new CustomEvent("velin-form-invalid",{bubbles:!0,detail:{errors:this.errors.map(({label:t,message:r})=>({label:t,message:r}))}})))}_onReset(){requestAnimationFrame(()=>this.clear())}_onFieldChange(e){let t=e.target;!t||!this._errors.some(r=>r.field===t)||t.checkValidity()&&(this._clearFieldError(t),this._errors=this._errors.filter(r=>r.field!==t),this._render(),this._errors.length===0&&this.dispatchEvent(new CustomEvent("velin-form-valid",{bubbles:!0})))}_errorId(e){return e.id||(e.id=`velin-field-${++kh}`),`${e.id}-error`}_markFieldError(e,t){let r=this._errorId(e);e.setAttribute("aria-invalid","true");let n=this.ownerDocument.getElementById(r);n||(n=this._form.querySelector(`[data-velin-error-for="${qn(e.name||e.id)}"]`)),n||(n=this.ownerDocument.createElement("p"),n.dataset.velinErrorGenerated="true",e.insertAdjacentElement("afterend",n)),n.id=r,n.classList.add("velin-field-error"),n.textContent=t,Ch(e,r)}_clearFieldError(e){if(!e.id)return;let t=`${e.id}-error`;e.removeAttribute("aria-invalid"),Rh(e,t);let r=this.ownerDocument.getElementById(t);r&&(r.dataset.velinErrorGenerated?r.remove():r.textContent="")}_focusField(e){let t=e.type==="radio"&&e.name&&this._form.querySelector(`input[type="radio"][name="${qn(e.name)}"]`)||e;t.focus(),this.dispatchEvent(new CustomEvent("velin-form-error-focus",{bubbles:!0,detail:{name:t.name||t.id}}))}_render(){if(!this._errors.length){this._panel?.remove(),this._panel=null,this.hidden=!0;return}if(this.hidden=!1,!this._panel?.isConnected){let t=this.ownerDocument.createElement("div");t.className="velin-form-summary__panel velin-alert velin-alert--danger",t.setAttribute("role","alert"),t.tabIndex=-1;let r=this.ownerDocument.createElement("p");r.className="velin-form-summary__heading",r.textContent=this.headingText;let n=this.ownerDocument.createElement("ul");n.className="velin-form-summary__list",t.append(r,n),this.appendChild(t),this._panel=t}let e=this._panel.querySelector(".velin-form-summary__list");e.textContent="";for(let t of this._errors){let r=this.ownerDocument.createElement("li"),n=this.ownerDocument.createElement("a");n.href=`#${this._errorId(t.field).replace(/-error$/,"")}`,n.textContent=`${t.label}: ${t.message}`,n.addEventListener("click",o=>{o.preventDefault(),this._focusField(t.field)}),r.appendChild(n),e.appendChild(r)}}_focusPanel(){this._panel?.focus()}_announceErrors(){let e=this._errors.length;oe(e===1?"1 field needs attention":`${e} fields need attention`,"assertive")}};customElements.define("velin-form-summary",Ui);pl=Ui});var vl={};v(vl,{default:()=>bl});var fl,Mh,Ih,ji,bl,Ki=h(()=>{Le();fl={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))"},Mh=`
1362
+ `;let o=this.shadowRoot.querySelector("input"),a=this.shadowRoot.querySelector(".browse"),c=this.shadowRoot.querySelector(".zone");a.addEventListener("click",()=>o.click()),o.addEventListener("change",()=>{o.files?.length&&this._emitFiles(o.files)}),["dragenter","dragover"].forEach(u=>{c.addEventListener(u,h=>{h.preventDefault(),this.setAttribute("dragging","")})}),["dragleave","drop"].forEach(u=>{c.addEventListener(u,h=>{h.preventDefault(),this.removeAttribute("dragging")})}),c.addEventListener("drop",u=>{let h=u.dataTransfer?.files;h?.length&&this._emitFiles(h)}),this._renderList()}};customElements.define("velin-file-dropzone",Wi);Cl=Wi});var Ml={};g(Ml,{default:()=>Rl});function Vn(i){let e=String(i??"");return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/[^\w-]/g,t=>`\\${t}`)}function ah(i){let e=i.getAttribute("data-error-label");if(e)return e;let t=i.getAttribute("aria-label");if(t?.trim())return t.trim();let r=i.getAttribute("aria-labelledby");if(r){let o=r.split(/\s+/).map(a=>i.ownerDocument.getElementById(a)?.textContent?.trim()||"").filter(Boolean).join(" ");if(o)return o}if(i.id){let o=i.ownerDocument.querySelector(`label[for="${Vn(i.id)}"]`);if(o?.textContent.trim())return o.textContent.trim()}let n=i.closest("label");return n?.textContent.trim()?n.textContent.trim():i.name||"This field"}function lh(i){return i.getAttribute("data-error-message")?.trim()||i.validationMessage||"Invalid value"}function ch(i,e){let t=(i.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean);t.includes(e)||(t.push(e),i.setAttribute("aria-describedby",t.join(" ")))}function uh(i,e){let r=(i.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean).filter(n=>n!==e);r.length?i.setAttribute("aria-describedby",r.join(" ")):i.removeAttribute("aria-describedby")}var nh,oh,sh,Yi,Rl,Wn=p(()=>{Ie();nh="input, select, textarea",oh=new Set(["submit","reset","button","image","hidden"]),sh=0;Yi=class extends HTMLElement{static get observedAttributes(){return["for","heading"]}constructor(){super(),this._form=null,this._panel=null,this._errors=[],this._onSubmit=this._onSubmit.bind(this),this._onFieldChange=this._onFieldChange.bind(this),this._onReset=this._onReset.bind(this)}connectedCallback(){this.classList.add("velin-form-summary"),requestAnimationFrame(()=>this._bindForm())}disconnectedCallback(){this._unbindForm()}attributeChangedCallback(e,t,r){if(t!==r){if(e==="for"&&this.isConnected)this._unbindForm(),this._bindForm();else if(e==="heading"&&this._panel){let n=this._panel.querySelector(".velin-form-summary__heading");n&&(n.textContent=this.headingText)}}}get form(){return this._form}get errors(){return this._errors.slice()}get headingText(){return this.getAttribute("heading")||"There is a problem"}validate(){if(!this._form)return!0;let e=[];for(let t of this._fields()){if(t.checkValidity()){this._clearFieldError(t);continue}let r={field:t,label:ah(t),message:lh(t)};this._markFieldError(t,r.message),e.push(r)}return this._errors=e,this._render(),e.length===0}clear(){for(let e of this._fields())this._clearFieldError(e);this._errors=[],this._render()}focusFirstError(){let e=this._errors[0];e&&this._focusField(e.field)}_bindForm(){let e=this.getAttribute("for");this._form=e?this.ownerDocument.getElementById(e):this.closest("form"),this._form&&(this.hasAttribute("native-validation")||(this._form.noValidate=!0),this._form.addEventListener("submit",this._onSubmit),this._form.addEventListener("reset",this._onReset),this._form.addEventListener("input",this._onFieldChange),this._form.addEventListener("change",this._onFieldChange))}_unbindForm(){this._form&&(this._form.removeEventListener("submit",this._onSubmit),this._form.removeEventListener("reset",this._onReset),this._form.removeEventListener("input",this._onFieldChange),this._form.removeEventListener("change",this._onFieldChange),this._form=null)}_fields(){if(!this._form)return[];let e=new Set;return[...this._form.querySelectorAll(nh)].filter(t=>{if(oh.has(t.type)||t.disabled||t.hasAttribute("data-error-ignore")||typeof t.checkValidity!="function")return!1;if(t.type==="radio"&&t.name){if(e.has(t.name))return!1;e.add(t.name)}return!0})}_onSubmit(e){this.validate()||(e.preventDefault(),this._announceErrors(),this._focusPanel(),this.dispatchEvent(new CustomEvent("velin-form-invalid",{bubbles:!0,detail:{errors:this.errors.map(({label:t,message:r})=>({label:t,message:r}))}})))}_onReset(){requestAnimationFrame(()=>this.clear())}_onFieldChange(e){let t=e.target;!t||!this._errors.some(r=>r.field===t)||t.checkValidity()&&(this._clearFieldError(t),this._errors=this._errors.filter(r=>r.field!==t),this._render(),this._errors.length===0&&this.dispatchEvent(new CustomEvent("velin-form-valid",{bubbles:!0})))}_errorId(e){return e.id||(e.id=`velin-field-${++sh}`),`${e.id}-error`}_markFieldError(e,t){let r=this._errorId(e);e.setAttribute("aria-invalid","true");let n=this.ownerDocument.getElementById(r);n||(n=this._form.querySelector(`[data-velin-error-for="${Vn(e.name||e.id)}"]`)),n||(n=this.ownerDocument.createElement("p"),n.dataset.velinErrorGenerated="true",e.insertAdjacentElement("afterend",n)),n.id=r,n.classList.add("velin-field-error"),n.textContent=t,ch(e,r)}_clearFieldError(e){if(!e.id)return;let t=`${e.id}-error`;e.removeAttribute("aria-invalid"),uh(e,t);let r=this.ownerDocument.getElementById(t);r&&(r.dataset.velinErrorGenerated?r.remove():r.textContent="")}_focusField(e){let t=e.type==="radio"&&e.name&&this._form.querySelector(`input[type="radio"][name="${Vn(e.name)}"]`)||e;t.focus(),this.dispatchEvent(new CustomEvent("velin-form-error-focus",{bubbles:!0,detail:{name:t.name||t.id}}))}_render(){if(!this._errors.length){this._panel?.remove(),this._panel=null,this.hidden=!0;return}if(this.hidden=!1,!this._panel?.isConnected){let t=this.ownerDocument.createElement("div");t.className="velin-form-summary__panel velin-alert velin-alert--danger",t.setAttribute("role","alert"),t.tabIndex=-1;let r=this.ownerDocument.createElement("p");r.className="velin-form-summary__heading",r.textContent=this.headingText;let n=this.ownerDocument.createElement("ul");n.className="velin-form-summary__list",t.append(r,n),this.appendChild(t),this._panel=t}let e=this._panel.querySelector(".velin-form-summary__list");e.textContent="";for(let t of this._errors){let r=this.ownerDocument.createElement("li"),n=this.ownerDocument.createElement("a");n.href=`#${this._errorId(t.field).replace(/-error$/,"")}`,n.textContent=`${t.label}: ${t.message}`,n.addEventListener("click",o=>{o.preventDefault(),this._focusField(t.field)}),r.appendChild(n),e.appendChild(r)}}_focusPanel(){this._panel?.focus()}_announceErrors(){let e=this._errors.length;ae(e===1?"1 field needs attention":`${e} fields need attention`,"assertive")}};customElements.define("velin-form-summary",Yi);Rl=Yi});var Ol={};g(Ol,{default:()=>Dl});var Il,dh,ph,Xi,Dl,Zi=p(()=>{Ie();Il={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))"},dh=`
1363
1363
  :host {
1364
1364
  display: inline-flex;
1365
1365
  align-items: center;
@@ -1380,16 +1380,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1380
1380
  @media (prefers-reduced-motion: reduce) {
1381
1381
  .dot { animation: none !important; }
1382
1382
  }
1383
- `,Ih=`
1383
+ `,ph=`
1384
1384
  @keyframes velin-live-pulse {
1385
1385
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--velin-live-color) 65%, transparent); }
1386
1386
  70% { box-shadow: 0 0 0 0.6rem color-mix(in oklch, var(--velin-live-color) 0%, transparent); }
1387
1387
  100% { box-shadow: 0 0 0 0 transparent; }
1388
- }`,ji=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=fl[e]||fl.live,r=this.getAttribute("aria-label")||Xr(e);this.setAttribute("role","status"),this.setAttribute("aria-label",r),this.style.setProperty("--velin-live-color",t),this.shadowRoot.innerHTML=`
1389
- <style>${Mh}${Ih}</style>
1388
+ }`,Xi=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=Il[e]||Il.live,r=this.getAttribute("aria-label")||on(e);this.setAttribute("role","status"),this.setAttribute("aria-label",r),this.style.setProperty("--velin-live-color",t),this.shadowRoot.innerHTML=`
1389
+ <style>${dh}${ph}</style>
1390
1390
  <span class="dot" aria-hidden="true"></span><slot></slot>
1391
- `}};typeof customElements<"u"&&!customElements.get("velin-live-dot")&&customElements.define("velin-live-dot",ji);bl=ji});var yl={};v(yl,{default:()=>gl});function Wi(i){return String(i||"").replace(/\D/g,"")}var Dh,Yi,gl,Bn=h(()=>{C();Ce();Dh=`
1392
- ${J}
1391
+ `}};typeof customElements<"u"&&!customElements.get("velin-live-dot")&&customElements.define("velin-live-dot",Xi);Dl=Xi});var zl={};g(zl,{default:()=>Nl});function Ji(i){return String(i||"").replace(/\D/g,"")}var hh,Qi,Nl,Yn=p(()=>{L();De();hh=`
1392
+ ${Q}
1393
1393
  :host { display: block; }
1394
1394
  .group {
1395
1395
  display: inline-flex;
@@ -1420,11 +1420,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1420
1420
  @media (forced-colors: active) {
1421
1421
  input { border: 1px solid ButtonText; }
1422
1422
  }
1423
- `;Yi=class extends HTMLElement{static get observedAttributes(){return["length","value","disabled","name","autocomplete","label"]}constructor(){super(),this.attachShadow({mode:"open"}),this._onInput=this._onInput.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onPaste=this._onPaste.bind(this),this._onFocus=this._onFocus.bind(this)}connectedCallback(){this.shadowRoot.querySelector(".group")||this._render()}attributeChangedCallback(e,t,r){t!==r&&this.shadowRoot.querySelector(".group")&&(e==="length"?this._render():e==="value"?this._applyValue(this.getAttribute("value")||"",!1):e==="disabled"?this._syncDisabled():(e==="label"||e==="autocomplete"||e==="name")&&this._syncMeta())}get value(){return this._readValue()}set value(e){this.setAttribute("value",Wi(e).slice(0,this._length()))}focus(){let e=this._inputs();(e.find(r=>!r.value)||e[0])?.focus()}_length(){let e=parseInt(this.getAttribute("length")||"6",10);return Number.isFinite(e)&&e>0?Math.min(e,12):6}_inputs(){return[...this.shadowRoot?.querySelectorAll("input")||[]]}_readValue(){return this._inputs().map(e=>e.value).join("")}_render(){let e=this._length(),t=g(this.getAttribute("label")||"One-time password");this.shadowRoot.innerHTML=`
1424
- <style>${Dh}</style>
1423
+ `;Qi=class extends HTMLElement{static get observedAttributes(){return["length","value","disabled","name","autocomplete","label"]}constructor(){super(),this.attachShadow({mode:"open"}),this._onInput=this._onInput.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onPaste=this._onPaste.bind(this),this._onFocus=this._onFocus.bind(this)}connectedCallback(){this.shadowRoot.querySelector(".group")||this._render()}attributeChangedCallback(e,t,r){t!==r&&this.shadowRoot.querySelector(".group")&&(e==="length"?this._render():e==="value"?this._applyValue(this.getAttribute("value")||"",!1):e==="disabled"?this._syncDisabled():(e==="label"||e==="autocomplete"||e==="name")&&this._syncMeta())}get value(){return this._readValue()}set value(e){this.setAttribute("value",Ji(e).slice(0,this._length()))}focus(){let e=this._inputs();(e.find(r=>!r.value)||e[0])?.focus()}_length(){let e=parseInt(this.getAttribute("length")||"6",10);return Number.isFinite(e)&&e>0?Math.min(e,12):6}_inputs(){return[...this.shadowRoot?.querySelectorAll("input")||[]]}_readValue(){return this._inputs().map(e=>e.value).join("")}_render(){let e=this._length(),t=y(this.getAttribute("label")||"One-time password");this.shadowRoot.innerHTML=`
1424
+ <style>${hh}</style>
1425
1425
  <div class="group" role="group" aria-label="${t}" part="group"></div>
1426
- `;let r=this.shadowRoot.querySelector(".group");for(let n=0;n<e;n++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.pattern="[0-9]*",o.maxLength=1,o.setAttribute("aria-label",`Digit ${n+1} of ${e}`),o.dataset.index=String(n),o.part="digit",o.addEventListener("input",this._onInput),o.addEventListener("keydown",this._onKeydown),o.addEventListener("paste",this._onPaste),o.addEventListener("focus",this._onFocus),r.appendChild(o)}this._syncMeta(),this._syncDisabled(),this._applyValue(this.getAttribute("value")||"",!1)}_syncMeta(){let e=this.shadowRoot?.querySelector(".group");if(!e)return;e.setAttribute("aria-label",this.getAttribute("label")||"One-time password");let t=this.getAttribute("autocomplete")||"one-time-code",r=this.getAttribute("name")||"";this._inputs().forEach((n,o)=>{n.autocomplete=o===0?t:"off",n.name=r?`${r}-${o+1}`:""})}_syncDisabled(){let e=this.hasAttribute("disabled");this._inputs().forEach(t=>{t.disabled=e})}_applyValue(e,t){let r=Wi(e).slice(0,this._length()).split("");this._inputs().forEach((o,a)=>{o.value=r[a]||""}),t&&this._emit()}_emit(){let e=this._readValue();this.getAttribute("value")!==e&&this.setAttribute("value",e),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,composed:!0,detail:{value:e}})),e.length===this._length()&&this.dispatchEvent(new CustomEvent("velin-complete",{bubbles:!0,composed:!0,detail:{value:e}}))}_onInput(e){let t=e.target,r=Wi(t.value).slice(-1);t.value=r;let n=Number(t.dataset.index),o=this._inputs();r&&n<o.length-1&&o[n+1].focus(),this._emit()}_onKeydown(e){let t=e.target,r=Number(t.dataset.index),n=this._inputs();e.key==="Backspace"&&!t.value&&r>0?(n[r-1].focus(),n[r-1].value="",this._emit(),e.preventDefault()):e.key==="ArrowLeft"&&r>0?(n[r-1].focus(),e.preventDefault()):e.key==="ArrowRight"&&r<n.length-1&&(n[r+1].focus(),e.preventDefault())}_onPaste(e){e.preventDefault();let t=Wi(e.clipboardData?.getData("text")||"");if(!t)return;let r=Number(e.target.dataset.index),n=this._inputs(),o=t.split("");for(let c=0;c<o.length&&r+c<n.length;c++)n[r+c].value=o[c];let a=Math.min(r+o.length,n.length-1);n[a]?.focus(),this._emit()}_onFocus(e){e.target.select?.()}};customElements.define("velin-otp-input",Yi);gl=Yi});var xl={};v(xl,{default:()=>_l,scorePassword:()=>Un});function Un(i){let e=String(i||""),t=0;return e.length>=8&&(t+=1),e.length>=12&&(t+=1),/[A-Z]/.test(e)&&/[a-z]/.test(e)&&(t+=1),/\d/.test(e)&&(t+=1),/[^A-Za-z0-9]/.test(e)&&(t+=1),{score:t,label:["Too weak","Weak","Okay","Strong","Excellent","Excellent"][t]||"Too weak",pct:Math.min(100,t*20)}}var Nh,Gi,_l,jn=h(()=>{Ce();Nh=`
1427
- ${J}
1426
+ `;let r=this.shadowRoot.querySelector(".group");for(let n=0;n<e;n++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.pattern="[0-9]*",o.maxLength=1,o.setAttribute("aria-label",`Digit ${n+1} of ${e}`),o.dataset.index=String(n),o.part="digit",o.addEventListener("input",this._onInput),o.addEventListener("keydown",this._onKeydown),o.addEventListener("paste",this._onPaste),o.addEventListener("focus",this._onFocus),r.appendChild(o)}this._syncMeta(),this._syncDisabled(),this._applyValue(this.getAttribute("value")||"",!1)}_syncMeta(){let e=this.shadowRoot?.querySelector(".group");if(!e)return;e.setAttribute("aria-label",this.getAttribute("label")||"One-time password");let t=this.getAttribute("autocomplete")||"one-time-code",r=this.getAttribute("name")||"";this._inputs().forEach((n,o)=>{n.autocomplete=o===0?t:"off",n.name=r?`${r}-${o+1}`:""})}_syncDisabled(){let e=this.hasAttribute("disabled");this._inputs().forEach(t=>{t.disabled=e})}_applyValue(e,t){let r=Ji(e).slice(0,this._length()).split("");this._inputs().forEach((o,a)=>{o.value=r[a]||""}),t&&this._emit()}_emit(){let e=this._readValue();this.getAttribute("value")!==e&&this.setAttribute("value",e),this.dispatchEvent(new CustomEvent("velin-change",{bubbles:!0,composed:!0,detail:{value:e}})),e.length===this._length()&&this.dispatchEvent(new CustomEvent("velin-complete",{bubbles:!0,composed:!0,detail:{value:e}}))}_onInput(e){let t=e.target,r=Ji(t.value).slice(-1);t.value=r;let n=Number(t.dataset.index),o=this._inputs();r&&n<o.length-1&&o[n+1].focus(),this._emit()}_onKeydown(e){let t=e.target,r=Number(t.dataset.index),n=this._inputs();e.key==="Backspace"&&!t.value&&r>0?(n[r-1].focus(),n[r-1].value="",this._emit(),e.preventDefault()):e.key==="ArrowLeft"&&r>0?(n[r-1].focus(),e.preventDefault()):e.key==="ArrowRight"&&r<n.length-1&&(n[r+1].focus(),e.preventDefault())}_onPaste(e){e.preventDefault();let t=Ji(e.clipboardData?.getData("text")||"");if(!t)return;let r=Number(e.target.dataset.index),n=this._inputs(),o=t.split("");for(let c=0;c<o.length&&r+c<n.length;c++)n[r+c].value=o[c];let a=Math.min(r+o.length,n.length-1);n[a]?.focus(),this._emit()}_onFocus(e){e.target.select?.()}};customElements.define("velin-otp-input",Qi);Nl=Qi});var Pl={};g(Pl,{default:()=>$l,scorePassword:()=>Xn});function Xn(i){let e=String(i||""),t=0;return e.length>=8&&(t+=1),e.length>=12&&(t+=1),/[A-Z]/.test(e)&&/[a-z]/.test(e)&&(t+=1),/\d/.test(e)&&(t+=1),/[^A-Za-z0-9]/.test(e)&&(t+=1),{score:t,label:["Too weak","Weak","Okay","Strong","Excellent","Excellent"][t]||"Too weak",pct:Math.min(100,t*20)}}var mh,er,$l,Zn=p(()=>{De();mh=`
1427
+ ${Q}
1428
1428
  :host { display: block; }
1429
1429
  .wrap { display: grid; gap: var(--velin-space-2, 0.5rem); }
1430
1430
  .meter {
@@ -1453,15 +1453,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1453
1453
  @media (prefers-reduced-motion: reduce) {
1454
1454
  .bar { transition: none; }
1455
1455
  }
1456
- `,Gi=class extends HTMLElement{static get observedAttributes(){return["for","value","label"]}constructor(){super(),this.attachShadow({mode:"open"}),this._onTargetInput=this._onTargetInput.bind(this),this._target=null}connectedCallback(){this.shadowRoot.querySelector(".wrap")||(this.shadowRoot.innerHTML=`
1457
- <style>${Nh}</style>
1456
+ `,er=class extends HTMLElement{static get observedAttributes(){return["for","value","label"]}constructor(){super(),this.attachShadow({mode:"open"}),this._onTargetInput=this._onTargetInput.bind(this),this._target=null}connectedCallback(){this.shadowRoot.querySelector(".wrap")||(this.shadowRoot.innerHTML=`
1457
+ <style>${mh}</style>
1458
1458
  <div class="wrap" part="wrap">
1459
1459
  <div class="meter" part="meter" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
1460
1460
  <div class="bar" part="bar"></div>
1461
1461
  </div>
1462
1462
  <p class="label" part="label" aria-live="polite"></p>
1463
1463
  </div>
1464
- `),this._bindTarget(),this._render(this._currentValue())}disconnectedCallback(){this._unbindTarget()}attributeChangedCallback(e,t,r){t!==r&&(e==="for"?(this._bindTarget(),this._render(this._currentValue())):(e==="value"||e==="label")&&this._render(this._currentValue()))}_currentValue(){return this._target?this._target.value||"":this.getAttribute("value")||""}_unbindTarget(){this._target&&(this._target.removeEventListener("input",this._onTargetInput),this._target=null)}_bindTarget(){this._unbindTarget();let e=this.getAttribute("for");if(!e||typeof document>"u")return;let t=document.getElementById(e);t&&"value"in t&&(this._target=t,this._target.addEventListener("input",this._onTargetInput))}_onTargetInput(e){this._render(e.target.value||"")}_render(e){let t=Un(e),r=this.shadowRoot?.querySelector(".meter"),n=this.shadowRoot?.querySelector(".bar"),o=this.shadowRoot?.querySelector(".label");if(!r||!n||!o)return;n.style.inlineSize=`${t.pct}%`,r.setAttribute("aria-valuenow",String(t.pct)),r.setAttribute("aria-valuetext",t.label);let a=this.getAttribute("label");o.textContent=a?`${a}: ${t.label}`:t.label,this.setAttribute("data-score",String(t.score)),this.dispatchEvent(new CustomEvent("velin-strength",{bubbles:!0,composed:!0,detail:t}))}};customElements.define("velin-password-strength",Gi);_l=Gi});function Vi(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=Lt.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?As(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 Lt,Kn,Wn=h(()=>{C();Lt=["docs","components","api","examples"],Kn={components:1.25,api:1.15,docs:1,examples:.9}});function Oh(i,e,t){let r=i.title.toLowerCase(),n=(i.excerpt||"").toLowerCase(),o=(i.keywords||[]).join(" ").toLowerCase(),a=(Kn[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&&Xi(r,e,t))c=40;else if(t>0&&Xi(o,e,t))c=28;else if(t>0&&Xi(n,e,t))c=18;else if(wl(r,e))c=22;else if(t>0){for(let d of r.split(/[^a-z0-9]+/))if(d.length>=3&&Xi(d,e,t)){c=32;break}}return c>0?c*a:0}function wl(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 Xi(i,e,t){if(!i||!e)return!1;if(i.includes(e)||wl(i,e))return!0;let r=Math.max(1,Math.floor(e.length*t*2));return zh(i.slice(0,Math.min(i.length,e.length+8)),e)<=r}function zh(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 Ct,Al=h(()=>{Wn();Ct=class{constructor(){this._entries=[]}setEntries(e){this._entries=e.map(t=>Vi(t)).filter(Boolean)}addEntries(e){let t=e.map(n=>Vi(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 f of this._entries){if(c&&c.length&&!c.includes(f.category))continue;let b=Oh(f,r,a);b>0&&d.push({entry:f,score:b})}d.sort((f,b)=>b.score-f.score);let m=d.slice(0,o).map(f=>({...f.entry,_score:f.score})),_={};for(let f of m)_[f.category]||(_[f.category]=[]),_[f.category].push(f);return{results:m,groups:_}}}});function Sl(i,e){if(!i||typeof e!="function")throw new Error("registerSearchProvider(id, fn) requires a non-empty id and function");El.set(i,e)}async function Yn(){let i=[];for(let e of El.values()){let t=await e();Array.isArray(t)&&i.push(...t)}return i}var El,Gn=h(()=>{El=new Map});function Zi(i,e){let t=String(i||""),r=String(e||"").trim();if(!r||r.length<2)return Rt(t);let n=t.toLowerCase(),o=r.toLowerCase(),a=n.indexOf(o),c=r.length;if(a===-1){if(a=$h(n,o),a===-1)return Rt(t);c=Math.min(r.length,t.length-a)}return Rt(t.slice(0,a))+'<mark class="velin-search-hit">'+Rt(t.slice(a,a+c))+"</mark>"+Rt(t.slice(a+c))}function Rt(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function $h(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 kl=h(()=>{});function Ll(){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(st);if(n!==-1)return r.origin+r.pathname.slice(0,n+st.length)}let e=window.location.pathname.replace(/\\/g,"/"),t=e.indexOf(st);return t>=0?new URL(e.slice(0,t+st.length),window.location.origin).href:new URL("./",window.location.href).href}function Fh(i){let e=i.indexOf("#");return e===-1?{path:i,hash:""}:{path:i.slice(0,e),hash:i.slice(e)}}function Cl(i){let e=i.indexOf(st);if(e<0)return null;let t=i.slice(e+st.length),r=t.split("/").filter(Boolean);return r.length>=2&&Tl.has(r[0])&&Tl.has(r[1])&&r[0]!==r[1]?r.slice(1).join("/"):t}function Ji(i){if(!i||i==="#")return"";if(typeof window>"u")return i;let{path:e,hash:t}=Fh(i);if(!e)return t||"";let r=e;if(/^https?:\/\//i.test(e))try{r=Cl(new URL(e).pathname)??e}catch{return""}try{let n=new URL(r||"",Ll());return n.href+(t&&!n.href.includes("#")?t:"")}catch{return""}}var st,Tl,Rl=h(()=>{st="/docs/",Tl=new Set(["getting-started","extend","guides","utilities","components","forms","layout","content","customize","animations","about","helpers","generated","migration"])});var Ml={};v(Ml,{createSearchWorker:()=>qh});function qh(i){if(typeof Worker>"u"||!i)return null;let e=i,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||{},_=r.get(a);_&&(r.delete(a),c?_.resolve(d):_.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=++Hh;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 Hh,Il=h(()=>{Hh=0});function Dl(i){return Array.isArray(i)?i:i&&Array.isArray(i.entries)?i.entries:[]}function Xn(i={}){let e=new Ct,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(()=>(Il(),Ml));return r=o(i.workerUrl),r}return{engine:e,async loadIndex(o){let a=[];if(typeof o=="string"){let d=await fetch(o);a=Dl(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 Ne,Vn,Ph,Zn=h(()=>{Al();Gn();kl();Gn();Wn();Rl();Ne=new Ct,Vn=!1;Ph={engine:Ne,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=Dl(await r.json())}else Array.isArray(i)&&(e=i);Ne.setEntries(e);let t=await Yn();return t.length&&Ne.addEntries(t),Vn=!0,e.length},addEntries(i){Ne.addEntries(i)},async refreshProviders(){let i=await Yn();return i.length&&Ne.addEntries(i),i.length},async query(i,e={}){return!Vn&&Ne._entries.length===0&&await this.refreshProviders(),Ne.query(i,e)},isReady(){return Vn||Ne._entries.length>0}}});var Jn={};v(Jn,{bindDeclarativeSearch:()=>Ol,default:()=>Nl});function Ol(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 Bh,Qi,Nl,Mt=h(()=>{Zn();C();Bh={docs:"Documentation",components:"Components",api:"API",examples:"Examples"},Qi=class extends HTMLElement{static get observedAttributes(){return["index","categories","min-chars","fuzzy","placeholder","debounce"]}constructor(){super(),this._search=Xn(),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=>Lt.includes(t)):null}get debounceMs(){return parseInt(this.getAttribute("debounce")||"120",10)}_ensureMarkup(){if(this.querySelector("[data-velin-search-input]"))return;let e=ye(this.getAttribute("placeholder")||"Search\u2026"),t=ye(this.getAttribute("aria-label")||"Search");this.innerHTML=`
1464
+ `),this._bindTarget(),this._render(this._currentValue())}disconnectedCallback(){this._unbindTarget()}attributeChangedCallback(e,t,r){t!==r&&(e==="for"?(this._bindTarget(),this._render(this._currentValue())):(e==="value"||e==="label")&&this._render(this._currentValue()))}_currentValue(){return this._target?this._target.value||"":this.getAttribute("value")||""}_unbindTarget(){this._target&&(this._target.removeEventListener("input",this._onTargetInput),this._target=null)}_bindTarget(){this._unbindTarget();let e=this.getAttribute("for");if(!e||typeof document>"u")return;let t=document.getElementById(e);t&&"value"in t&&(this._target=t,this._target.addEventListener("input",this._onTargetInput))}_onTargetInput(e){this._render(e.target.value||"")}_render(e){let t=Xn(e),r=this.shadowRoot?.querySelector(".meter"),n=this.shadowRoot?.querySelector(".bar"),o=this.shadowRoot?.querySelector(".label");if(!r||!n||!o)return;n.style.inlineSize=`${t.pct}%`,r.setAttribute("aria-valuenow",String(t.pct)),r.setAttribute("aria-valuetext",t.label);let a=this.getAttribute("label");o.textContent=a?`${a}: ${t.label}`:t.label,this.setAttribute("data-score",String(t.score)),this.dispatchEvent(new CustomEvent("velin-strength",{bubbles:!0,composed:!0,detail:t}))}};customElements.define("velin-password-strength",er);$l=er});function tr(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(u=>String(u)):typeof e.keywords=="string"?e.keywords.split(/\s+/).filter(Boolean):[],a=Dt.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?Fs(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 Dt,Jn,Qn=p(()=>{L();Dt=["docs","components","api","examples"],Jn={components:1.25,api:1.15,docs:1,examples:.9}});function fh(i,e,t){let r=i.title.toLowerCase(),n=(i.excerpt||"").toLowerCase(),o=(i.keywords||[]).join(" ").toLowerCase(),a=(Jn[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&&ir(r,e,t))c=40;else if(t>0&&ir(o,e,t))c=28;else if(t>0&&ir(n,e,t))c=18;else if(Fl(r,e))c=22;else if(t>0){for(let u of r.split(/[^a-z0-9]+/))if(u.length>=3&&ir(u,e,t)){c=32;break}}return c>0?c*a:0}function Fl(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 ir(i,e,t){if(!i||!e)return!1;if(i.includes(e)||Fl(i,e))return!0;let r=Math.max(1,Math.floor(e.length*t*2));return bh(i.slice(0,Math.min(i.length,e.length+8)),e)<=r}function bh(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 Ot,ql=p(()=>{Qn();Ot=class{constructor(){this._entries=[]}setEntries(e){this._entries=e.map(t=>tr(t)).filter(Boolean)}addEntries(e){let t=e.map(n=>tr(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 u=[];for(let m of this._entries){if(c&&c.length&&!c.includes(m.category))continue;let v=fh(m,r,a);v>0&&u.push({entry:m,score:v})}u.sort((m,v)=>v.score-m.score);let h=u.slice(0,o).map(m=>({...m.entry,_score:m.score})),b={};for(let m of h)b[m.category]||(b[m.category]=[]),b[m.category].push(m);return{results:h,groups:b}}}});function Bl(i,e){if(!i||typeof e!="function")throw new Error("registerSearchProvider(id, fn) requires a non-empty id and function");Hl.set(i,e)}async function eo(){let i=[];for(let e of Hl.values()){let t=await e();Array.isArray(t)&&i.push(...t)}return i}var Hl,to=p(()=>{Hl=new Map});function rr(i,e){let t=String(i||""),r=String(e||"").trim();if(!r||r.length<2)return Nt(t);let n=t.toLowerCase(),o=r.toLowerCase(),a=n.indexOf(o),c=r.length;if(a===-1){if(a=vh(n,o),a===-1)return Nt(t);c=Math.min(r.length,t.length-a)}return Nt(t.slice(0,a))+'<mark class="velin-search-hit">'+Nt(t.slice(a,a+c))+"</mark>"+Nt(t.slice(a+c))}function Nt(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function vh(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 Ul=p(()=>{});function Kl(){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(dt);if(n!==-1)return r.origin+r.pathname.slice(0,n+dt.length)}let e=window.location.pathname.replace(/\\/g,"/"),t=e.indexOf(dt);return t>=0?new URL(e.slice(0,t+dt.length),window.location.origin).href:new URL("./",window.location.href).href}function gh(i){let e=i.indexOf("#");return e===-1?{path:i,hash:""}:{path:i.slice(0,e),hash:i.slice(e)}}function Gl(i){let e=i.indexOf(dt);if(e<0)return null;let t=i.slice(e+dt.length),r=t.split("/").filter(Boolean);return r.length>=2&&jl.has(r[0])&&jl.has(r[1])&&r[0]!==r[1]?r.slice(1).join("/"):t}function nr(i){if(!i||i==="#")return"";if(typeof window>"u")return i;let{path:e,hash:t}=gh(i);if(!e)return t||"";let r=e;if(/^https?:\/\//i.test(e))try{r=Gl(new URL(e).pathname)??e}catch{return""}try{let n=new URL(r||"",Kl());return n.href+(t&&!n.href.includes("#")?t:"")}catch{return""}}var dt,jl,Vl=p(()=>{dt="/docs/",jl=new Set(["getting-started","extend","guides","utilities","components","forms","layout","content","customize","animations","about","helpers","generated","migration"])});var Wl={};g(Wl,{createSearchWorker:()=>_h});function _h(i){if(typeof Worker>"u"||!i)return null;let e=i,t;try{t=new Worker(e,{type:"module"})}catch{return null}let r=new Map;t.onmessage=o=>{let{id:a,ok:c,result:u,error:h}=o.data||{},b=r.get(a);b&&(r.delete(a),c?b.resolve(u):b.reject(new Error(h||"Worker error")))},t.onerror=()=>{for(let o of r.values())o.reject(new Error("Worker failed"));r.clear()};function n(o,a){let c=++yh;return new Promise((u,h)=>{r.set(c,{resolve:u,reject:h}),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 yh,Yl=p(()=>{yh=0});function Xl(i){return Array.isArray(i)?i:i&&Array.isArray(i.entries)?i.entries:[]}function ro(i={}){let e=new Ot,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(()=>(Yl(),Wl));return r=o(i.workerUrl),r}return{engine:e,async loadIndex(o){let a=[];if(typeof o=="string"){let u=await fetch(o);a=Xl(await u.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 Pe,io,wh,no=p(()=>{ql();to();Ul();to();Qn();Vl();Pe=new Ot,io=!1;wh={engine:Pe,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=Xl(await r.json())}else Array.isArray(i)&&(e=i);Pe.setEntries(e);let t=await eo();return t.length&&Pe.addEntries(t),io=!0,e.length},addEntries(i){Pe.addEntries(i)},async refreshProviders(){let i=await eo();return i.length&&Pe.addEntries(i),i.length},async query(i,e={}){return!io&&Pe._entries.length===0&&await this.refreshProviders(),Pe.query(i,e)},isReady(){return io||Pe._entries.length>0}}});var oo={};g(oo,{bindDeclarativeSearch:()=>Jl,default:()=>Zl});function Jl(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 xh,or,Zl,zt=p(()=>{no();L();xh={docs:"Documentation",components:"Components",api:"API",examples:"Examples"},or=class extends HTMLElement{static get observedAttributes(){return["index","categories","min-chars","fuzzy","placeholder","debounce"]}constructor(){super(),this._search=ro(),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=>Dt.includes(t)):null}get debounceMs(){return parseInt(this.getAttribute("debounce")||"120",10)}_ensureMarkup(){if(this.querySelector("[data-velin-search-input]"))return;let e=we(this.getAttribute("placeholder")||"Search\u2026"),t=we(this.getAttribute("aria-label")||"Search");this.innerHTML=`
1465
1465
  <div class="velin-search">
1466
1466
  <div class="velin-search__field">
1467
1467
  <input type="search" class="velin-search__input" data-velin-search-input
@@ -1472,7 +1472,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1472
1472
  <div class="velin-search__results" data-velin-search-results role="listbox"
1473
1473
  id="${this._listId}" hidden></div>
1474
1474
  </div>
1475
- `}_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}=await 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||[...Lt];this._flatResults=[];let a=0;for(let d of o){let m=n[d];if(!m?.length)continue;let _=`${this._listId}-group-${d}`,f=document.createElement("div");f.setAttribute("role","group"),f.setAttribute("aria-labelledby",_);let b=document.createElement("div");b.className="velin-search__group-label",b.id=_,b.textContent=Bh[d]||d,f.appendChild(b);for(let L of m){let S=document.createElement("a"),A=Ji(L.url);A&&(S.href=A),S.className="velin-search__item",S.setAttribute("role","option"),S.id=`velin-search-opt-${a}`,S.innerHTML=`<span class="velin-search__title">${Zi(L.title,r)}</span><span class="velin-search__excerpt">${Zi(L.excerpt||"",r)}</span>`,S.addEventListener("click",k=>{k.preventDefault(),A&&window.location.assign(A)},!0),S.addEventListener("mouseenter",()=>this._setActive(a,e,t)),f.appendChild(S),this._flatResults.push(L),a++}e.appendChild(f)}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?Ji(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}},Nl=Qi;typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("velin-search")&&customElements.define("velin-search",Qi)});var zl={};v(zl,{default:()=>Kh});async function jh(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 Uh,er,Kh,$l=h(()=>{C();Uh=`
1475
+ `}_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}=await 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||[...Dt];this._flatResults=[];let a=0;for(let u of o){let h=n[u];if(!h?.length)continue;let b=`${this._listId}-group-${u}`,m=document.createElement("div");m.setAttribute("role","group"),m.setAttribute("aria-labelledby",b);let v=document.createElement("div");v.className="velin-search__group-label",v.id=b,v.textContent=xh[u]||u,m.appendChild(v);for(let T of h){let k=document.createElement("a"),A=nr(T.url);A&&(k.href=A),k.className="velin-search__item",k.setAttribute("role","option"),k.id=`velin-search-opt-${a}`,k.innerHTML=`<span class="velin-search__title">${rr(T.title,r)}</span><span class="velin-search__excerpt">${rr(T.excerpt||"",r)}</span>`,k.addEventListener("click",S=>{S.preventDefault(),A&&window.location.assign(A)},!0),k.addEventListener("mouseenter",()=>this._setActive(a,e,t)),m.appendChild(k),this._flatResults.push(T),a++}e.appendChild(m)}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?nr(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}},Zl=or;typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("velin-search")&&customElements.define("velin-search",or)});var Ql={};g(Ql,{default:()=>kh});async function Eh(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 Ah,sr,kh,ec=p(()=>{L();Ah=`
1476
1476
  :host { display: block; }
1477
1477
  label { display: block; font-size: var(--velin-text-sm); margin-block-end: var(--velin-space-1); }
1478
1478
  input {
@@ -1492,12 +1492,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1492
1492
  color: var(--velin-color-text-muted);
1493
1493
  margin-block-start: var(--velin-space-1);
1494
1494
  }
1495
- `;er=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=Es(this.getAttribute("type")),t=this.getAttribute("name")||"secure",r=this.getAttribute("label")||"Secure field",n=ye(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=`
1496
- <style>${Uh}</style>
1497
- <label for="${o}">${g(r)}</label>
1495
+ `;sr=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=qs(this.getAttribute("type")),t=this.getAttribute("name")||"secure",r=this.getAttribute("label")||"Secure field",n=we(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=`
1496
+ <style>${Ah}</style>
1497
+ <label for="${o}">${y(r)}</label>
1498
1498
  <input id="${o}" type="${e}" autocomplete="${n}" part="input" />
1499
1499
  <p class="velin-field-help">Demo-only client encoding \u2014 use HTTPS and server-side crypto for real secrets.</p>
1500
- `;let c=this.shadowRoot.querySelector("input");this._onChange=async()=>{let d=this.getAttribute("mode")||"aes-gcm",m=await jh(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",er);Kh=er});var ql={};v(ql,{default:()=>Hl});function Wh(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 Yh(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 _=m*c,f=t-(d-r)/a*t;return[_,f]})}function Fl(i){return i.length?i.map(([e,t],r)=>`${r===0?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "):""}function Gh(i,e){if(!i.length)return"";let t=Fl(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 at,tr,Hl,ir=h(()=>{at="http://www.w3.org/2000/svg";tr=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:Wh(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",_=this.hasAttribute("glow")&&this.getAttribute("glow")!=="false",f=(this.getAttribute("animate")||"draw").toLowerCase(),b=Yh(n,t,r,c,d),L=Fl(b),S=m?Gh(b,r):"";this.innerHTML="";let A=document.createElementNS(at,"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 j=document.createElementNS(at,"defs"),he=document.createElementNS(at,"linearGradient");he.setAttribute("id",this._gradientId),he.setAttribute("x1","0"),he.setAttribute("x2","0"),he.setAttribute("y1","0"),he.setAttribute("y2","1"),[["0%","currentColor","0.35"],["100%","currentColor","0"]].forEach(([ne,K,ge])=>{let xe=document.createElementNS(at,"stop");xe.setAttribute("offset",ne),xe.setAttribute("stop-color",K),xe.setAttribute("stop-opacity",ge),he.appendChild(xe)}),j.appendChild(he),A.appendChild(j);let z=document.createElementNS(at,"path");z.setAttribute("d",S),z.setAttribute("fill",`url(#${this._gradientId})`),z.setAttribute("stroke","none"),z.classList.add("velin-chart-area"),A.appendChild(z)}let k=document.createElementNS(at,"path");if(k.setAttribute("d",L),k.setAttribute("fill","none"),k.setAttribute("stroke","currentColor"),k.setAttribute("stroke-width","2"),k.setAttribute("stroke-linecap","round"),k.setAttribute("stroke-linejoin","round"),k.setAttribute("vector-effect","non-scaling-stroke"),A.appendChild(k),_&&A.classList.add("velin-chart-glow"),this.appendChild(A),f!=="none"){let j=typeof k.getTotalLength=="function"&&k.getTotalLength()||t;k.style.setProperty("--velin-chart-len",j.toFixed(2)),k.classList.add("velin-chart-line")}else k.style.strokeDasharray="",k.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",tr);Hl=tr});var Qn,Pl=h(()=>{Qn={"velin-accordion":()=>Promise.resolve().then(()=>(kr(),Jo)),"velin-announcer":()=>Promise.resolve().then(()=>(un(),wa)),"velin-bottom-nav":()=>Promise.resolve().then(()=>(on(),ca)),"velin-calendar":()=>Promise.resolve().then(()=>(hn(),Ta)),"velin-carousel":()=>Promise.resolve().then(()=>(Wr(),Bs)),"velin-code-block":()=>Promise.resolve().then(()=>(zn(),il)),"velin-collapse":()=>Promise.resolve().then(()=>(Yr(),js)),"velin-combobox":()=>Promise.resolve().then(()=>(nn(),aa)),"velin-command":()=>Promise.resolve().then(()=>(dn(),_a)),"velin-copy":()=>Promise.resolve().then(()=>(jr(),Fs)),"velin-countdown":()=>Promise.resolve().then(()=>(en(),ta)),"velin-counter":()=>Promise.resolve().then(()=>(Hi(),nl)),"velin-data-table":()=>Promise.resolve().then(()=>($n(),ll)),"velin-dialog":()=>Promise.resolve().then(()=>(Qr(),Qs)),"velin-drawer":()=>Promise.resolve().then(()=>(qr(),Is)),"velin-dropdown":()=>Promise.resolve().then(()=>(Sr(),Vo)),"velin-email":()=>Promise.resolve().then(()=>(Ei(),Sa)),"velin-empty-state":()=>Promise.resolve().then(()=>(Fn(),dl)),"velin-file-dropzone":()=>Promise.resolve().then(()=>(Hn(),hl)),"velin-form-summary":()=>Promise.resolve().then(()=>(Pn(),ml)),"velin-icon":()=>Promise.resolve().then(()=>(Hr(),Rs)),"velin-lightbox":()=>Promise.resolve().then(()=>(Zr(),Xs)),"velin-live-dot":()=>Promise.resolve().then(()=>(Ki(),vl)),"velin-menubar":()=>Promise.resolve().then(()=>(cn(),ga)),"velin-modal":()=>Promise.resolve().then(()=>(Er(),Yo)),"velin-otp-input":()=>Promise.resolve().then(()=>(Bn(),yl)),"velin-password-strength":()=>Promise.resolve().then(()=>(jn(),xl)),"velin-persist":()=>Promise.resolve().then(()=>(rn(),oa)),"velin-popover":()=>Promise.resolve().then(()=>(Ur(),zs)),"velin-progress-ring":()=>Promise.resolve().then(()=>(tn(),ra)),"velin-rating":()=>Promise.resolve().then(()=>(ln(),ba)),"velin-scroll-top":()=>Promise.resolve().then(()=>(Kr(),qs)),"velin-scrollspy":()=>Promise.resolve().then(()=>(Gr(),Ws)),"velin-search":()=>Promise.resolve().then(()=>(Mt(),Jn)),"velin-secure-field":()=>Promise.resolve().then(()=>($l(),zl)),"velin-segmented-control":()=>Promise.resolve().then(()=>(an(),pa)),"velin-sheet":()=>Promise.resolve().then(()=>(sn(),ua)),"velin-sparkline":()=>Promise.resolve().then(()=>(ir(),ql)),"velin-stepper":()=>Promise.resolve().then(()=>(di(),Jr)),"velin-stepper-wc":()=>Promise.resolve().then(()=>(di(),Jr)),"velin-tabs":()=>Promise.resolve().then(()=>(Tr(),es)),"velin-theme-toggle":()=>Promise.resolve().then(()=>(Br(),Ns)),"velin-toast":()=>Promise.resolve().then(()=>(zr(),Ls)),"velin-tooltip":()=>Promise.resolve().then(()=>(li(),Vr)),"velin-tooltip-wc":()=>Promise.resolve().then(()=>(li(),Vr))}});function Ul(i,e={}){let t=new Set;for(let[r,n]of Object.entries(e)){if(n==="false"||n==="off")continue;let o=Bl[r];if(o&&o.forEach(a=>t.add(a)),r==="slide"&&n&&n!=="true"&&n!==""){let a=`slide-${n}`;Bl[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 rr(i){i.classList.add(eo),i.dataset.velinVisible="true"}function jl(){return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}var eo,Bl,Kl=h(()=>{eo="velin-in-view",Bl={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 Vh(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 Yl(i=document){i.querySelectorAll(`[${Wl}]`).forEach(e=>{e.dataset.velinStaggerDone||(e.dataset.velinStaggerDone="1",Vh(e,e.getAttribute(Wl)||"true"))})}var Wl,Gl=h(()=>{Wl="velin-stagger"});function Xh(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 Vl(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(),Xh(n))}))})}var Xl=h(()=>{});function Be(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=jl();for(let o of r){if(o.dataset.velinMotionInit)continue;o.dataset.velinMotionInit="1";let a={};for(let d of Zh)o.hasAttribute(d)&&(a[d.replace("velin-","")]=o.getAttribute(d)||"true");if(Ul(o,a),n){rr(o);continue}let c=St(o,d=>rr(d));to.push(c)}return Yl(e),Vl(e),()=>{to.forEach(o=>o()),to=[],Qa()}}function Zl(i={}){return Be({root:typeof document<"u"?document:null,selector:i.selector||".velin-animate-on-scroll"})}var Zh,to,Jl,io=h(()=>{Dn();Kl();Gl();Xl();Zh=["velin-reveal","velin-fade","velin-slide","velin-scale","velin-parallax","velin-hover"],to=[];Jl={init:Be,observe:St,markVisible:rr,VISIBLE_CLASS:eo}});function ec({status:i,review:e,license:t,claims:r=[]}={}){let n=new Set(Array.isArray(r)?r.filter(Boolean):[]),o=Qh[String(i||"").toLowerCase()];o&&n.add(o);let a=ep[String(e||"").toLowerCase()];if(a&&n.add(a),t){let c=String(t).toLowerCase().trim(),d=tp[c]||(c.startsWith("cc")?"license.cc-by":null);d&&n.add(d)}return[...n]}function Ql(i,e="en"){let t=Jh[i];return t&&(t.label[e]||t.label.en)||i}function tc(i=[],e="en"){let t=["ai.generated","ai.assisted","review.human","review.verified","trust.official","license.cc-by","license.mit"];for(let r of t)if(i.includes(r))return Ql(r,e);return i[0]?Ql(i[0],e):e==="de"?"Transparenz":"Transparency"}var Jh,Qh,ep,tp,ic=h(()=>{Jh={"ai.generated":{pillar:"ai",label:{en:"AI generated",de:"KI-generiert"}},"ai.assisted":{pillar:"ai",label:{en:"AI assisted",de:"KI-unterst\xFCtzt"}},"review.human":{pillar:"ai",label:{en:"Human reviewed",de:"Mensch gepr\xFCft"}},"review.verified":{pillar:"trust",label:{en:"Verified",de:"Verifiziert"}},"security.checked":{pillar:"trust",label:{en:"Security checked",de:"Security gepr\xFCft"}},"accessibility.checked":{pillar:"trust",label:{en:"Accessibility checked",de:"Barrierefreiheit gepr\xFCft"}},"trust.official":{pillar:"trust",label:{en:"Official",de:"Offiziell"}},"trust.signed":{pillar:"trust",label:{en:"Signed",de:"Signiert"}},"trust.opensource":{pillar:"trust",label:{en:"Open source",de:"Open Source"}},"privacy.gdpr":{pillar:"compliance",label:{en:"GDPR",de:"DSGVO"}},"license.cc-by":{pillar:"compliance",label:{en:"CC BY",de:"CC BY"}},"license.mit":{pillar:"compliance",label:{en:"MIT",de:"MIT"}},"license.apache-2":{pillar:"compliance",label:{en:"Apache-2.0",de:"Apache-2.0"}},"content.updated":{pillar:"metadata",label:{en:"Updated",de:"Aktualisiert"}},"content.author":{pillar:"metadata",label:{en:"Author",de:"Autor"}},"content.source":{pillar:"metadata",label:{en:"Source",de:"Quelle"}},"content.language":{pillar:"metadata",label:{en:"Language",de:"Sprache"}},"version.current":{pillar:"metadata",label:{en:"Version",de:"Version"}},"provenance.complete":{pillar:"provenance",label:{en:"Provenance complete",de:"Nachweis vollst\xE4ndig"}}},Qh={generated:"ai.generated",assisted:"ai.assisted","ai-assisted":"ai.assisted","human-reviewed":"review.human","human-edited":"review.human",verified:"review.verified",edited:"review.human",draft:null},ep={human:"review.human","human-reviewed":"review.human",verified:"review.verified",none:null},tp={"cc by 4.0":"license.cc-by","cc-by":"license.cc-by","cc-by-4.0":"license.cc-by",mit:"license.mit","apache-2.0":"license.apache-2",apache:"license.apache-2"}});function nc(){let i=new Map;return{register(e){if(!e?.id)throw new Error("DisclosureRecord requires id");return i.set(e.id,rc(e)),i.get(e.id)},get(e){return i.get(e)||null},has(e){return i.has(e)},remove(e){return i.delete(e)},list(){return[...i.values()].map(e=>rc(e))},query(e){return this.list().filter(e)},clear(){i.clear()},size(){return i.size},export(){return{schema:"velinstyle.transparency.registry",version:1,items:this.list()}},diff(e=[]){let t=new Map(e.map(a=>[a.id,a])),r=[],n=[],o=[];for(let a of i.values())t.has(a.id)?JSON.stringify(a)!==JSON.stringify(t.get(a.id))&&o.push(a.id):r.push(a.id);for(let a of t.keys())i.has(a)||n.push(a);return{added:r,removed:n,changed:o}}}}function rc(i){return JSON.parse(JSON.stringify(i))}function oc(i={}){if(i.id)return String(i.id).trim();let e=[i.file||"",i.selector||"",i.src||"",i.tag||"",i.type||""].join("|").toLowerCase(),t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return`tx-${(t>>>0).toString(16)}`}var ro=h(()=>{});function sc(i={},e={}){let t=String(i.provider||e.provider||"api"),r=String(i.type||"ai").toLowerCase(),n=i.status!=null?String(i.status).toLowerCase():void 0,o=i.review!=null?String(i.review).toLowerCase():void 0,a=rp(i.provenance||i);i.license&&!a.license&&(a.license=String(i.license)),i.model&&!a.source&&(a.source=`model:${i.model}`),i.generated;let c=n||(i.generated===!0?"generated":void 0),d=ec({status:c,review:o,license:a.license,claims:i.claims}),m={selector:i.target?.selector||i.selector||void 0,tag:i.target?.tag||i.tag||void 0,src:i.target?.src||i.src||void 0,file:i.target?.file||e.file||i.file||void 0},_=oc({id:i.id||i.velinTransparencyId,selector:m.selector,src:m.src,tag:m.tag,type:r,file:m.file}),f=e.lang==="de"?"de":"en",b=i.label?String(i.label):tc(d,f),L=i.updated||a.publishedAt||a.reviewedAt||a.createdAt||void 0;return{id:_,type:r,status:c,review:o,provider:t,claims:d,provenance:a,updated:L,label:b,description:i.description?String(i.description):void 0,renderer:i.renderer||i.overlay||"badge",tone:i.tone||np(d),position:i.position||"top-right",target:m,meta:i.meta&&typeof i.meta=="object"?i.meta:void 0}}function rp(i={}){let e={};for(let t of ip){let r=i[t]??i[t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)];r!=null&&String(r).trim()&&(e[t]=String(r).trim())}return i["created-by"]&&(e.createdBy=String(i["created-by"])),i["created-at"]&&(e.createdAt=String(i["created-at"])),i["reviewed-at"]&&(e.reviewedAt=String(i["reviewed-at"])),i["approved-by"]&&(e.approvedBy=String(i["approved-by"])),i["published-at"]&&(e.publishedAt=String(i["published-at"])),e}function np(i){return i.includes("ai.generated")?"generated":i.includes("review.verified")||i.includes("trust.official")?"verified":i.includes("review.human")?"human":i.includes("ai.assisted")?"mixed":"neutral"}var ip,ac=h(()=>{ic();ro();ip=["createdBy","createdAt","reviewedAt","approvedBy","source","license","version","publishedAt"]});function op(i,e){cc.set(i,e)}function dc(i,e){if(typeof document>"u"||!i)return null;let t=e.renderer||"badge",r=cc.get(t);return r?(r(i,e),i.querySelector(".velin-transparency")):uc(i,e)}function uc(i,e){getComputedStyle(i).position==="static"&&(i.style.position="relative");let r=i.querySelector(":scope > .velin-transparency");r||(r=document.createElement("div"),i.prepend(r));let n=e.renderer||"badge",o=e.tone||"neutral",a=e.position||"top-right";r.className=["velin-transparency",`velin-transparency--${n}`,`velin-transparency--tone-${o}`,`velin-transparency--pos-${a}`].join(" "),r.setAttribute("data-velin-transparency-id",e.id),r.setAttribute("role","note");let c=(e.claims||[]).join(", "),d=e.provenance||{},m=document.createElement("span");m.className="velin-sr-only";let _=(i.closest("[lang]")?.getAttribute("lang")||document.documentElement.lang||"en").startsWith("de")?"de":"en";m.textContent=_==="de"?`Transparenzhinweis: ${e.label}. ${c}. ${lc(d,"de")}`:`Transparency notice: ${e.label}. ${c}. ${lc(d,"en")}`;let f=document.createElement("span");f.className="velin-transparency__label",f.textContent=e.label||"Transparency";let b=document.createElement("span");return b.className="velin-transparency__details",b.hidden=n==="badge"||n==="icon",b.textContent=sp(e,_),r.replaceChildren(m,f,b),e.description?r.title=e.description:b.textContent&&(r.title=b.textContent),i.setAttribute("data-velin-transparency",e.id),r}function lc(i,e){let t=[];return i.createdBy&&t.push(e==="de"?`Erstellt von ${i.createdBy}`:`Created by ${i.createdBy}`),i.createdAt&&t.push(e==="de"?`am ${i.createdAt}`:`on ${i.createdAt}`),i.approvedBy&&t.push(e==="de"?`Freigegeben von ${i.approvedBy}`:`Approved by ${i.approvedBy}`),i.license&&t.push(i.license),i.version&&t.push(`v${i.version}`),t.join(". ")}function sp(i,e){let t=i.provenance||{},r=[];return t.approvedBy&&r.push(e==="de"?`Freigabe: ${t.approvedBy}`:`Approved: ${t.approvedBy}`),t.license&&r.push(t.license),t.version&&r.push(`v${t.version}`),(t.updated||i.updated)&&r.push(i.updated||t.publishedAt||""),r.filter(Boolean).join(" \xB7 ")}function ap(i){return i==="corner-badge"||i==="stamp"?"badge":i==="floating-card"||i==="sidebar"?"panel":i==="banner"?"footer":i}var cc,hc=h(()=>{cc=new Map;for(let i of["overlay","badge","inline","tooltip","footer","ribbon","panel","icon","corner-badge","stamp","sidebar","floating-card","banner"])op(i,(e,t)=>{uc(e,{...t,renderer:ap(i)})})});var so={};v(so,{VelinTransparency:()=>lp,attach:()=>oo,enhanceAll:()=>pc,getDefaultRegistry:()=>mc});function oo(i,e={},t={}){if(!i)throw new Error("VelinTransparency.attach requires an element");let r=t.registry||no,n={...e,tag:i.tagName,src:i.getAttribute?.("src")||i.getAttribute?.("href")||e.src,selector:i.id?`#${i.id}`:e.selector,id:e.id||i.getAttribute?.("velin-transparency-id")||i.id,provider:e.provider||"api"};(i.hasAttribute?.("velin-transparency")||i.hasAttribute?.("velin-disclosure"))&&(n.type=n.type||i.getAttribute("velin-type")||"ai",n.status=n.status||i.getAttribute("velin-status"),n.review=n.review||i.getAttribute("velin-review"),n.license=n.license||i.getAttribute("velin-license"),n.label=n.label||i.getAttribute("velin-label"),n.description=n.description||i.getAttribute("velin-description"),n.overlay=n.overlay||i.getAttribute("velin-overlay")||i.getAttribute("velin-renderer"),n.provenance={createdBy:i.getAttribute("velin-created-by"),createdAt:i.getAttribute("velin-created-at"),reviewedAt:i.getAttribute("velin-reviewed-at"),approvedBy:i.getAttribute("velin-approved-by"),source:i.getAttribute("velin-source"),license:i.getAttribute("velin-license"),version:i.getAttribute("velin-version"),publishedAt:i.getAttribute("velin-published-at"),...e.provenance||{}});let o=sc(n,{provider:n.provider,lang:t.lang});return r.register(o),i.hasAttribute("velin-transparency")||i.setAttribute("velin-transparency",""),i.hasAttribute("velin-transparency-id")||i.setAttribute("velin-transparency-id",o.id),dc(i,o),o}function pc(i=typeof document<"u"?document:null){if(!i?.querySelectorAll)return[];let e=[];return i.querySelectorAll("[velin-transparency], [velin-disclosure]").forEach(t=>{e.push(oo(t,{},{registry:no}))}),e}function mc(){return no}var no,lp,ao=h(()=>{ac();hc();ro();no=nc();lp={attach:oo,enhanceAll:pc,getRegistry:mc}});function T(i,e){lt.set(i,e)}function bc(i){return lt.get(i)}function It(i,e,t={}){i.setAttribute("data-velin-component",e);for(let[r,n]of Object.entries(t))n!=null&&i.setAttribute(r,n);return ee(e)}function cp(){T("velin-modal",{enhance(i){It(i,"velin-modal",{open:i.getAttribute("velin-modal")||""})}}),T("velin-tabs",{enhance:i=>It(i,"velin-tabs")}),T("velin-accordion",{enhance:i=>It(i,"velin-accordion")}),T("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),ee("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)),ee("velin-tooltip")}}),T("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),ee("velin-copy");i.appendChild(t)}return ee("velin-copy")}}),T("velin-counter",{enhance(i){It(i,"velin-counter",{value:i.getAttribute("velin-counter")||"0"})}}),T("velin-notify",{async enhance(i){await ee("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"}}))})}}),T("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")),ee("velin-theme-toggle");document.documentElement.setAttribute("data-velin-theme",e)}}),T("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),ee("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)),ee("velin-scroll-top")}}),T("velin-progress",{enhance(i){if(i.hasAttribute("ring"))return It(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)}%`)}}),T("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 ee("velin-search")}}),T("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})))}}),T("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")}}),T("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")}}),T("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)}}),T("velin-anchor",{enhance(i){!i.id&&i.getAttribute("velin-anchor")&&(i.id=i.getAttribute("velin-anchor")),i.setAttribute("tabindex","-1")}}),T("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 ee("velin-copy");let{initHighlight:t,highlightElement:r}=await Promise.resolve().then(()=>(Tt(),On));i.getAttribute("data-velin-highlight")==="immediate"||typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches?await r(i):t(i,{root:i})}}),T("velin-quote",{enhance(i){(i.tagName==="BLOCKQUOTE"||i.tagName==="Q")&&i.classList.add("velin-quote")}}),T("velin-highlight",{enhance(i){i.classList.add("velin-highlight")}}),T("velin-transparency",{async enhance(i){let{attach:e}=await Promise.resolve().then(()=>(ao(),so));e(i)}}),T("velin-disclosure",{async enhance(i){let{attach:e}=await Promise.resolve().then(()=>(ao(),so));i.hasAttribute("velin-transparency")||i.setAttribute("velin-transparency",""),e(i)}});for(let i of["velin-reveal","velin-fade","velin-slide","velin-scale","velin-parallax","velin-hover","velin-stagger","velin-scroll"])T(i,{enhance(){}})}async function lo(i=document){let e=[...lt.keys()].map(r=>`[${r}]`).join(","),t=i.querySelectorAll(e);for(let r of t)if(!fc.has(r)){for(let n of lt.keys()){if(!r.hasAttribute(n))continue;let o=lt.get(n);o?.enhance&&await o.enhance(r)}fc.add(r)}if(Be({root:i}),typeof HTMLElement<"u"){let{bindDeclarativeSearch:r}=await Promise.resolve().then(()=>(Mt(),Jn));if(r(i),!document.querySelector("velin-announcer")){let{getAnnouncer:n}=await Promise.resolve().then(()=>(Le(),Gs));n()}}}function co(){return[...lt.keys()]}var lt,fc,vc=h(()=>{uo();io();lt=new Map;cp();fc=new WeakSet});var gc={};v(gc,{bootAttributes:()=>lo,getAttributeHandler:()=>bc,listRegisteredAttributes:()=>co,registerAttribute:()=>T});var ho=h(()=>{vc()});var yc={};v(yc,{PATTERNS:()=>nr,VelinHapticObserver:()=>Nt,applyHaptic:()=>Dt,default:()=>dp,vibrate:()=>po});function po(i){if(typeof navigator>"u"||!navigator.vibrate||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;let t=typeof i=="string"?nr[i]||nr.tap:i;navigator.vibrate(t)}function Dt(i){let e=i.getAttribute("haptic")||"tap";i.addEventListener("click",()=>po(e))}var nr,Nt,dp,mo=h(()=>{nr={tap:[10],"double-tap":[10,50,10],success:[50],error:[100,30,100],warning:[30,20,30],long:[200]};Nt=class{constructor(){this._observer=null}start(e=document.body){e.querySelectorAll("[haptic]").forEach(Dt),this._observer=new MutationObserver(r=>{for(let n of r)for(let o of n.addedNodes)o.nodeType===1&&(o.hasAttribute?.("haptic")&&Dt(o),o.querySelectorAll?.("[haptic]").forEach(Dt))}),this._observer.observe(e,{childList:!0,subtree:!0})}stop(){this._observer?.disconnect()}},dp=Nt});function hp(i){return typeof customElements>"u"?Promise.reject(new Error("customElements not available")):customElements.whenDefined(i)}async function ee(i){let e=Qn[i];if(!e)throw new Error(`Unknown Velin component: ${i}`);if(fo.has(i))return fo.get(i);let t=e().then(r=>{let n=r.default;return n&&!customElements.get(i)&&customElements.define(i,n),n});return fo.set(i,t),t}async function _c(i){return Promise.all(i.map(e=>ee(e)))}function pp(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&&up.test(r)&&Qn[r]&&e.add(r)}return e}async function mp(i=document,e={}){let t=e.tags?.length?new Set(e.tags):pp(i),r=_c([...t]);if(e.attributes){let{bootAttributes:n}=await Promise.resolve().then(()=>(ho(),gc));await n(i)}if(e.highlight){let{initHighlight:n}=await Promise.resolve().then(()=>(Tt(),On));n(i)}if(e.haptic){let{VelinHapticObserver:n}=await Promise.resolve().then(()=>(mo(),yc));new n().start(i instanceof Document?i.body:i)}return r}var fo,up,uo=h(()=>{Pl();fo=new Map,up=/^velin-[a-z0-9-]+$/});Er();Sr();kr();Tr();zr();Hr();qr();Br();Ur();jr();Kr();Wr();Yr();Gr();li();Zr();di();Qr();en();tn();rn();nn();on();sn();an();ln();cn();dn();un();Ei();uo();ir();Hi();Ki();zn();$n();Pn();hn();Hn();Mt();Bn();jn();Fn();Mt();io();var fp=Zl;if(typeof document<"u"){let i=()=>{document.documentElement?.hasAttribute("data-velin-reveal-auto")&&Be()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i,{once:!0}):i()}Le();Le();function bp(i={}){if(typeof document>"u")return;let{announcer:e=!0,scrollPadding:t=!0,skipLink:r=!1}=i;if(e&&tt(),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)}}Zn();ho();Tt();var xc=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null,Tc={duration:250,easing:"var(--velin-ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1))",itemSelector:":scope > *"};function bo(i,e){return Array.from(i.querySelectorAll(e))}function Lc(i,e,t={}){if(!i||typeof e!="function")return;let r={...Tc,...t},n=xc&&xc.matches,o=bo(i,r.itemSelector),a=new Map;if(o.forEach(d=>{d.hidden||a.set(d,d.getBoundingClientRect())}),e(),n)return;bo(i,r.itemSelector).forEach(d=>{if(d.hidden)return;let m=a.get(d),_=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 f=m.left-_.left,b=m.top-_.top;f===0&&b===0||typeof d.animate=="function"&&d.animate([{transform:`translate(${f}px, ${b}px)`},{transform:"translate(0, 0)"}],{duration:r.duration,easing:r.easing,fill:"both"})})}function Cc(i,e,t={}){if(!i||typeof e!="function")return;let r={...Tc,...t};Lc(i,()=>{bo(i,r.itemSelector).forEach(n=>{n.hidden=!e(n)})},r)}function wc(i){return i?String(i).toLowerCase().split(/[\s,|]+/).map(e=>e.trim()).filter(Boolean):[]}function vp(i,e,t){return e.length?t==="all"?e.every(r=>i.includes(r)):e.some(r=>i.includes(r)):!0}function gp(i,e){return e?((i.getAttribute("data-tags")||"")+" "+(i.getAttribute("data-search")||"")+" "+(i.textContent||"")).toLowerCase().includes(e.toLowerCase()):!0}var vo=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=wc(this.tag),t=this.search;Cc(this.container,r=>{let n=wc(r.getAttribute("data-tags"));return vp(n,e,this.matchMode)&&gp(r,t)},{itemSelector:this.itemSelector})}},Ac=new WeakMap;function Ec(i){let e=Ac.get(i);return e||(e=new vo(i),Ac.set(i,e)),e}function Sc(i){let e=i.getAttribute("data-velin-filter-target");if(!e)return null;try{return document.querySelector(e)}catch{return null}}function yp(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 kc(){if(typeof document>"u")return;document.addEventListener("click",e=>{let t=e.target.closest("[data-velin-filter-value]");if(!t)return;let r=Sc(t);if(!r)return;let n=t.closest("[data-velin-filter-group]")||t.parentElement;yp(n,t);let o=Ec(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=Sc(t);if(!r)return;let n=Ec(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",kc,{once:!0}):kc());C();mo();Z();ir();Hi();Ki();Ei();export{nr as HapticPatterns,Zo as VelinAccordion,xa as VelinAnnouncer,la as VelinBottomNav,ka as VelinCalendar,Ps as VelinCarousel,tl as VelinCodeBlock,Us as VelinCollapse,sa as VelinCombobox,ya as VelinCommand,$s as VelinCopy,ea as VelinCountdown,rl as VelinCounter,al as VelinDataTable,Js as VelinDialog,Ms as VelinDrawer,Go as VelinDropdown,Ea as VelinEmail,cl as VelinEmptyState,ul as VelinFileDropzone,pl as VelinFormSummary,Nt as VelinHapticObserver,Cs as VelinIcon,Vs as VelinLightbox,bl as VelinLiveDot,va as VelinMenubar,Wo as VelinModal,gl as VelinOtpInput,_l as VelinPasswordStrength,na as VelinPersist,Os as VelinPopover,ia as VelinProgressRing,fa as VelinRating,Hs as VelinScrollTop,Ks as VelinScrollspy,Nl as VelinSearch,ha as VelinSegmentedControl,da as VelinSheet,Hl as VelinSparkline,Zs as VelinStepper,yt as VelinStepperWC,Qo as VelinTabs,Ds as VelinThemeToggle,Ts as VelinToast,Ys as VelinTooltip,gt as VelinTooltipWC,oe as announce,Dt as applyHaptic,Ol as bindDeclarativeSearch,lo as bootAttributes,mp as bootFromDOM,Y as clearBackgroundInert,mu as createSafeHTML,Xn as createSearch,g as escapeHTML,ye as escapeHTMLAttribute,Cc as filterList,Lc as flipReorder,tt as getAnnouncer,be as getFocusableElements,ks as getTrustedPolicy,Et as highlightAll,ue as highlightElement,bp as initA11y,De as initHighlight,Be as initMotion,fp as initReveal,ee as lazyDefine,Ie as lazyLoadLanguage,co as listRegisteredAttributes,kt as observeCodeBlocks,_c as register,T as registerAttribute,ot as registerLanguage,Sl as registerSearchProvider,Di as renderTokens,ce as restoreFocus,ie as rovingTabindex,Fe as sanitizeURL,le as saveFocus,Un as scorePassword,de as setBackgroundInert,Or as stripControlChars,te as trapFocus,Jl as velinMotion,Ph as velinSearch,el as velinSyntax,po as vibrate,hp as whenDefined};
1500
+ `;let c=this.shadowRoot.querySelector("input");this._onChange=async()=>{let u=this.getAttribute("mode")||"aes-gcm",h=await Eh(c.value,u);this.dispatchEvent(new CustomEvent("velin-secure-submit",{bubbles:!0,detail:{name:t,payload:h}}))},c.addEventListener("change",this._onChange)}};customElements.get("velin-secure-field")||customElements.define("velin-secure-field",sr);kh=sr});var rc={};g(rc,{default:()=>ic});function Sh(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 Th(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((u,h)=>{let b=h*c,m=t-(u-r)/a*t;return[b,m]})}function tc(i){return i.length?i.map(([e,t],r)=>`${r===0?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "):""}function Ch(i,e){if(!i.length)return"";let t=tc(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 pt,ar,ic,lr=p(()=>{pt="http://www.w3.org/2000/svg";ar=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:Sh(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),u=Number.isFinite(a)?a:Math.max(...n),h=this.hasAttribute("area")&&this.getAttribute("area")!=="false",b=this.hasAttribute("glow")&&this.getAttribute("glow")!=="false",m=(this.getAttribute("animate")||"draw").toLowerCase(),v=Th(n,t,r,c,u),T=tc(v),k=h?Ch(v,r):"";this.innerHTML="";let A=document.createElementNS(pt,"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),h){let K=document.createElementNS(pt,"defs"),me=document.createElementNS(pt,"linearGradient");me.setAttribute("id",this._gradientId),me.setAttribute("x1","0"),me.setAttribute("x2","0"),me.setAttribute("y1","0"),me.setAttribute("y2","1"),[["0%","currentColor","0.35"],["100%","currentColor","0"]].forEach(([se,G,_e])=>{let ke=document.createElementNS(pt,"stop");ke.setAttribute("offset",se),ke.setAttribute("stop-color",G),ke.setAttribute("stop-opacity",_e),me.appendChild(ke)}),K.appendChild(me),A.appendChild(K);let z=document.createElementNS(pt,"path");z.setAttribute("d",k),z.setAttribute("fill",`url(#${this._gradientId})`),z.setAttribute("stroke","none"),z.classList.add("velin-chart-area"),A.appendChild(z)}let S=document.createElementNS(pt,"path");if(S.setAttribute("d",T),S.setAttribute("fill","none"),S.setAttribute("stroke","currentColor"),S.setAttribute("stroke-width","2"),S.setAttribute("stroke-linecap","round"),S.setAttribute("stroke-linejoin","round"),S.setAttribute("vector-effect","non-scaling-stroke"),A.appendChild(S),b&&A.classList.add("velin-chart-glow"),this.appendChild(A),m!=="none"){let K=typeof S.getTotalLength=="function"&&S.getTotalLength()||t;S.style.setProperty("--velin-chart-len",K.toFixed(2)),S.classList.add("velin-chart-line")}else S.style.strokeDasharray="",S.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",ar);ic=ar});var so,nc=p(()=>{so={"velin-accordion":()=>Promise.resolve().then(()=>(Or(),ms)),"velin-announcer":()=>Promise.resolve().then(()=>(yn(),Fa)),"velin-bottom-nav":()=>Promise.resolve().then(()=>(hn(),Sa)),"velin-calendar":()=>Promise.resolve().then(()=>(_n(),ja)),"velin-carousel":()=>Promise.resolve().then(()=>(en(),oa)),"velin-code-block":()=>Promise.resolve().then(()=>(Un(),yl)),"velin-collapse":()=>Promise.resolve().then(()=>(tn(),aa)),"velin-combobox":()=>Promise.resolve().then(()=>(pn(),Ea)),"velin-command":()=>Promise.resolve().then(()=>(gn(),$a)),"velin-copy":()=>Promise.resolve().then(()=>(Jr(),ta)),"velin-countdown":()=>Promise.resolve().then(()=>(cn(),ga)),"velin-counter":()=>Promise.resolve().then(()=>(Ki(),wl)),"velin-data-table":()=>Promise.resolve().then(()=>(jn(),kl)),"velin-dialog":()=>Promise.resolve().then(()=>(ln(),ba)),"velin-drawer":()=>Promise.resolve().then(()=>(Wr(),Ws)),"velin-dropdown":()=>Promise.resolve().then(()=>(Dr(),ds)),"velin-email":()=>Promise.resolve().then(()=>(Li(),Ba)),"velin-empty-state":()=>Promise.resolve().then(()=>(Kn(),Tl)),"velin-file-dropzone":()=>Promise.resolve().then(()=>(Gn(),Ll)),"velin-form-summary":()=>Promise.resolve().then(()=>(Wn(),Ml)),"velin-icon":()=>Promise.resolve().then(()=>(Vr(),Gs)),"velin-lightbox":()=>Promise.resolve().then(()=>(sn(),ha)),"velin-live-dot":()=>Promise.resolve().then(()=>(Zi(),Ol)),"velin-menubar":()=>Promise.resolve().then(()=>(vn(),Na)),"velin-modal":()=>Promise.resolve().then(()=>(Ir(),cs)),"velin-otp-input":()=>Promise.resolve().then(()=>(Yn(),zl)),"velin-password-strength":()=>Promise.resolve().then(()=>(Zn(),Pl)),"velin-persist":()=>Promise.resolve().then(()=>(dn(),xa)),"velin-popover":()=>Promise.resolve().then(()=>(Zr(),Qs)),"velin-progress-ring":()=>Promise.resolve().then(()=>(un(),_a)),"velin-rating":()=>Promise.resolve().then(()=>(bn(),Da)),"velin-scroll-top":()=>Promise.resolve().then(()=>(Qr(),ra)),"velin-scrollspy":()=>Promise.resolve().then(()=>(rn(),ca)),"velin-search":()=>Promise.resolve().then(()=>(zt(),oo)),"velin-secure-field":()=>Promise.resolve().then(()=>(ec(),Ql)),"velin-segmented-control":()=>Promise.resolve().then(()=>(fn(),Ra)),"velin-sheet":()=>Promise.resolve().then(()=>(mn(),Ca)),"velin-sparkline":()=>Promise.resolve().then(()=>(lr(),rc)),"velin-stepper":()=>Promise.resolve().then(()=>(fi(),an)),"velin-stepper-wc":()=>Promise.resolve().then(()=>(fi(),an)),"velin-tabs":()=>Promise.resolve().then(()=>(Nr(),bs)),"velin-theme-toggle":()=>Promise.resolve().then(()=>(Xr(),Zs)),"velin-toast":()=>Promise.resolve().then(()=>(jr(),js)),"velin-tooltip":()=>Promise.resolve().then(()=>(hi(),nn)),"velin-tooltip-wc":()=>Promise.resolve().then(()=>(hi(),nn))}});function Ee(i,e={}){let t=new Set;for(let[r,n]of Object.entries(e)){if(n==="false"||n==="off")continue;if(r==="motion"&&n&&n!=="true"){let c=ao[n];c&&c.forEach(u=>t.add(u));continue}let o=ao[r];if(o&&o.forEach(a=>t.add(a)),r==="slide"&&n&&n!=="true"&&n!==""){let a=`slide-${n}`;ao[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 j(i){i.classList.add(lo),i.dataset.velinVisible="true"}function te(){return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}var lo,ao,Ve=p(()=>{lo="velin-in-view",ao={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"],zoom:["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"],lift:["velin-animate-hover"],flip:["velin-animate-scale-in"],blur:["velin-animate-fade-in"],pulse:["velin-animate-pulse"],shake:["velin-animate-shake"],bounce:["velin-animate-bounce"],shimmer:["velin-skeleton"],heroReveal:["velin-animate-on-scroll","velin-animate-on-scroll--fade"],fadeOut:["velin-animate-fade-out"]}});function Lh(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 sc(i=document){i.querySelectorAll(`[${oc}]`).forEach(e=>{e.dataset.velinStaggerDone||(e.dataset.velinStaggerDone="1",Lh(e,e.getAttribute(oc)||"true"))})}var oc,ac=p(()=>{oc="velin-stagger"});function Rh(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 lc(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(),Rh(n))}))})}var cc=p(()=>{});var co,uc=p(()=>{co={schema:"velinstyle.motion.registry",version:1,presets:[{id:"fade",title:"Fade",description:"Opacity entrance; layout-safe default reveal.",kind:"preset",category:"hero",tags:["entrance"],duration:400,fps:"60",reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-on-scroll--fade",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"slide",title:"Slide Up",description:"Slide from below into view.",kind:"preset",category:"cards",tags:["entrance","slide"],duration:500,fps:"60",reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-on-scroll--slide-up",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"slide-down",title:"Slide Down",description:"Slide from above into view.",kind:"preset",category:"navigation",tags:["entrance","slide"],duration:500,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-on-scroll--slide-down",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"slide-left",title:"Slide Left",description:"Slide from the inline-end.",kind:"preset",category:"lists",tags:["entrance","slide"],duration:500,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-on-scroll--slide-left",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"slide-right",title:"Slide Right",description:"Slide from the inline-start.",kind:"preset",category:"lists",tags:["entrance","slide"],duration:500,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-on-scroll--slide-right",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"zoom",title:"Zoom / Scale",description:"Scale-in entrance for cards and media.",kind:"preset",category:"media",tags:["entrance","scale"],duration:450,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-on-scroll--scale",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"blur",title:"Blur In",description:"Soft fade/blur entrance (maps to fade-in utility).",kind:"preset",category:"overlay",tags:["entrance"],duration:500,reducedMotion:!0,layoutSafe:!0,status:"beta",cssClass:"velin-animate-fade-in",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"flip",title:"Flip / Scale In",description:"Attention scale-in for emphasis.",kind:"preset",category:"feedback",tags:["attention"],duration:400,reducedMotion:!0,layoutSafe:!0,status:"beta",cssClass:"velin-animate-scale-in",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"lift",title:"Hover Lift",description:"Subtle lift on hover for interactive cards and buttons.",kind:"preset",category:"buttons",tags:["hover"],duration:200,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-hover",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"pulse",title:"Pulse",description:"Attention pulse; prefer finite loops under performance policy.",kind:"preset",category:"feedback",tags:["attention"],duration:1e3,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-pulse",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"shake",title:"Shake",description:"Error/attention shake feedback.",kind:"preset",category:"forms",tags:["attention","feedback"],duration:400,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-shake",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"bounce",title:"Bounce",description:"Playful bounce entrance or attention.",kind:"preset",category:"feedback",tags:["attention"],duration:600,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-bounce",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"shimmer",title:"Shimmer",description:"Loading shimmer surface (skeleton companion).",kind:"preset",category:"loading",tags:["loading"],duration:1200,reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-skeleton",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"heroReveal",title:"Hero Reveal",description:"Staggered entrance for hero content; layout-safe; reduced-motion fallback.",kind:"preset",category:"hero",tags:["entrance","stagger"],duration:600,fps:"60",reducedMotion:!0,layoutSafe:!0,status:"stable",cssClass:"velin-animate-on-scroll--fade",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"parallax",title:"Parallax",description:"Scroll-driven parallax shift.",kind:"preset",category:"media",tags:["scroll"],duration:0,reducedMotion:!0,layoutSafe:!1,status:"stable",cssClass:"velin-parallax",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"fadeOut",title:"Fade Out",description:"Exit fade (planned composition with timelines).",kind:"preset",category:"overlay",tags:["exit"],duration:300,reducedMotion:!0,layoutSafe:!0,status:"beta",cssClass:"velin-animate-fade-out",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}}],timelines:[{id:"hero-intro",title:"Hero Intro",description:"Title \u2192 subtitle \u2192 buttons \u2192 image",kind:"timeline",category:"hero",steps:["title","subtitle","buttons","image"],status:"beta",compatibility:{cssOnly:!1,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"card-stagger",title:"Card Stagger",description:"Sequential card entrance labels.",kind:"timeline",category:"cards",steps:["card-1","card-2","card-3"],status:"beta",compatibility:{cssOnly:!1,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}}],transitions:[{id:"cross-fade",title:"Cross Fade",description:"Page/view cross-fade (View Transition friendly).",kind:"transition",category:"page",status:"planned",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"modal-enter",title:"Modal Enter",description:"Overlay modal entrance transition.",kind:"transition",category:"modal",status:"planned",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"drawer-enter",title:"Drawer Enter",description:"Drawer slide transition.",kind:"transition",category:"drawer",status:"planned",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}}],physics:[{id:"spring",title:"Spring",description:"Spring easing token mapping (runtime simulation later).",kind:"physics",category:"feedback",status:"planned",token:"--velin-ease-spring",compatibility:{cssOnly:!0,runtime:!1,webComponents:!1,studio:!0,production:!0,review:!0,cli:!0}},{id:"elastic",title:"Elastic",description:"Elastic easing token mapping.",kind:"physics",category:"feedback",status:"planned",token:"--velin-ease-elastic",compatibility:{cssOnly:!0,runtime:!1,webComponents:!1,studio:!0,production:!0,review:!0,cli:!0}}],composers:[{id:"sequence",title:"Sequence Composer",description:"Ordered fade/wait/slide composition API.",kind:"composer",category:"page",status:"planned",compatibility:{cssOnly:!1,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}}],triggers:[{id:"load",title:"Load",description:"Start when document/module initializes.",kind:"trigger",category:"page",status:"stable",compatibility:{cssOnly:!1,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"visible",title:"Visible",description:"Start when element enters the viewport (IntersectionObserver).",kind:"trigger",category:"page",status:"stable",compatibility:{cssOnly:!1,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"hidden",title:"Hidden",description:"Fire when element leaves the viewport. (Planned \u2014 runtime falls back to visible.)",kind:"trigger",category:"page",status:"planned",compatibility:{cssOnly:!1,runtime:!1,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"hover",title:"Hover",description:"Pointer enter / hover.",kind:"trigger",category:"buttons",status:"stable",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"focus",title:"Focus",description:"Keyboard/pointer focus.",kind:"trigger",category:"forms",status:"stable",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"click",title:"Click",description:"Pointer activation.",kind:"trigger",category:"buttons",status:"stable",compatibility:{cssOnly:!1,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"scroll",title:"Scroll",description:"Scroll-linked or scroll-progress trigger.",kind:"trigger",category:"page",status:"stable",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"idle",title:"Idle",description:"After user idle timeout. (Planned \u2014 runtime falls back to visible.)",kind:"trigger",category:"feedback",status:"planned",compatibility:{cssOnly:!1,runtime:!1,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"media",title:"Media",description:"Match media query condition. (Planned \u2014 runtime falls back to visible.)",kind:"trigger",category:"page",status:"planned",compatibility:{cssOnly:!1,runtime:!1,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"container",title:"Container",description:"Container query / size trigger. (Planned \u2014 runtime falls back to visible.)",kind:"trigger",category:"cards",status:"planned",compatibility:{cssOnly:!1,runtime:!1,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"theme",title:"Theme",description:"Theme change trigger. (Planned \u2014 runtime falls back to visible.)",kind:"trigger",category:"page",status:"planned",compatibility:{cssOnly:!1,runtime:!1,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"custom",title:"Custom",description:"Custom event name via velin-trigger-event. (Planned \u2014 runtime falls back to visible.)",kind:"trigger",category:"page",status:"planned",compatibility:{cssOnly:!1,runtime:!1,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}}],policies:[{id:"safe",title:"Safe",description:"Default layout-safe motion with capped durations.",kind:"policy",category:"page",status:"stable",maxDurationMs:800,allowInfinite:!1,compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"reduced",title:"Reduced",description:"Honors prefers-reduced-motion first; shorten or skip decorative motion.",kind:"policy",category:"page",status:"stable",maxDurationMs:200,forceReduced:!0,compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"marketing",title:"Marketing",description:"Expressive hero motion allowed within caps.",kind:"policy",category:"hero",status:"stable",maxDurationMs:1200,allowInfinite:!1,compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"minimal",title:"Minimal",description:"Very little motion; feedback only.",kind:"policy",category:"page",status:"stable",maxDurationMs:300,allowInfinite:!1,compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"accessibility",title:"Accessibility",description:"Strict reduced-motion + focus-safe interactions.",kind:"policy",category:"page",status:"stable",maxDurationMs:200,forceReduced:!0,compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"performance",title:"Performance",description:"FPS-friendly; ban infinite decorative loops.",kind:"policy",category:"page",status:"stable",maxDurationMs:600,allowInfinite:!1,compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"disabled",title:"Disabled",description:"All motion off.",kind:"policy",category:"page",status:"stable",disabled:!0,compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}}],blueprints:[{id:"landing",title:"Landing",description:"Hero reveal + staggered sections + CTA hover.",kind:"blueprint",category:"hero",status:"beta",presets:["heroReveal","fade","lift"],timeline:"hero-intro",policy:"marketing",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"dashboard",title:"Dashboard",description:"Minimal card stagger for admin shells.",kind:"blueprint",category:"cards",status:"beta",presets:["fade","slide"],timeline:"card-stagger",policy:"minimal",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"pricing",title:"Pricing",description:"Pricing cards with stagger and lift.",kind:"blueprint",category:"cards",status:"beta",presets:["slide","lift"],policy:"marketing",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"portfolio",title:"Portfolio",description:"Media zoom + parallax-safe reveals.",kind:"blueprint",category:"media",status:"beta",presets:["zoom","fade"],policy:"marketing",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"shop",title:"Shop",description:"Product cards and feedback pulses.",kind:"blueprint",category:"cards",status:"planned",presets:["fade","lift"],policy:"safe",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"forum",title:"Forum",description:"List slides and form feedback.",kind:"blueprint",category:"lists",status:"planned",presets:["slide","shake"],policy:"safe",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"docs",title:"Docs",description:"Minimal fade for documentation pages.",kind:"blueprint",category:"page",status:"beta",presets:["fade"],policy:"minimal",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"blog",title:"Blog",description:"Article hero fade and card slides.",kind:"blueprint",category:"hero",status:"planned",presets:["fade","slide"],policy:"safe",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"crm",title:"CRM",description:"Table-safe minimal motion.",kind:"blueprint",category:"tables",status:"planned",presets:["fade"],policy:"performance",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}},{id:"login",title:"Login",description:"Form feedback and focus-safe motion.",kind:"blueprint",category:"forms",status:"beta",presets:["fade","shake"],policy:"accessibility",compatibility:{cssOnly:!0,runtime:!0,webComponents:!0,studio:!0,production:!0,review:!0,cli:!0}}]}});function cr(i=null){return i?(uo=i,uo):uo||co}function po(i,e={}){let t=cr(),r=i.endsWith("s")?i:`${i}s`;return(t[r]||t[i]||[]).filter(o=>!(e.status&&o.status!==e.status||e.category&&o.category!==e.category||e.tag&&!(o.tags||[]).includes(e.tag)))}function ur(i,e){return po(i).find(t=>t.id===e)||null}function pc(i){return ur("presets",i)}function ho(i){return ur("policies",i)}function hc(i){return ur("triggers",i)}function mc(i){return ur("timelines",i)}function fc(i){return po("presets",i)}function mo(i){return po("policies",i)}function bc(){let i=cr(),e={};for(let t of dc)e[t]=(i[t]||[]).length;return{schema:i.schema,version:i.version,counts:e,namespaces:dc}}function dr(i){if(!i)return null;let e=pc(i);if(e)return e;let r={scale:"zoom","hover-lift":"lift",reveal:"fade"}[i];return r?pc(r):null}var uo,dc,ht=p(()=>{uc();uo=co,dc=["presets","timelines","transitions","physics","composers","triggers","policies","blueprints"]});function fo(i,e="visible"){return(i.getAttribute("velin-trigger")||e||"visible").trim().toLowerCase()||e}function gc(i,e,t,r={}){let n=r.once!==!1,o=r.reduced??te(),a=(e||"visible").toLowerCase(),c=hc(a);if(o||i.dataset.velinMotion==="off")return t(),()=>{};if(c?.status==="planned"&&!vc.includes(a))return gc(i,"visible",t,r);let u=!1,h=()=>{n&&u||(u=!0,t())};if(a==="load")return h(),()=>{};if(a==="visible"||a==="scroll")return Ae(i,()=>h());if(a==="hover"){let b=()=>h();return i.addEventListener("pointerenter",b),()=>i.removeEventListener("pointerenter",b)}if(a==="focus"){let b=()=>h();return i.addEventListener("focusin",b),()=>i.removeEventListener("focusin",b)}if(a==="click"){let b=()=>h();return i.addEventListener("click",b),()=>i.removeEventListener("click",b)}if(a==="hidden"){let b=Ae(i,()=>{});if(typeof IntersectionObserver>"u")return()=>{};let m=new IntersectionObserver(v=>{for(let T of v)T.isIntersecting||h()},{threshold:0});return m.observe(i),()=>{b(),m.disconnect()}}if(a==="idle"){let b=Number(i.getAttribute("velin-trigger-delay")||3e3),m=setTimeout(h,b);return()=>clearTimeout(m)}if(a==="media"){let b=i.getAttribute("velin-trigger-media")||"(min-width: 768px)";if(typeof window>"u"||!window.matchMedia)return h(),()=>{};let m=window.matchMedia(b),v=()=>{m.matches&&h()};return v(),m.addEventListener?.("change",v),()=>m.removeEventListener?.("change",v)}if(a==="theme"){let b=i.ownerDocument?.documentElement;if(!b||typeof MutationObserver>"u")return h(),()=>{};let m=new MutationObserver(()=>h());return m.observe(b,{attributes:!0,attributeFilter:["data-velin-theme","class"]}),()=>m.disconnect()}if(a==="custom"){let b=i.getAttribute("velin-trigger-event")||"velin:motion",m=()=>h();return i.addEventListener(b,m),()=>i.removeEventListener(b,m)}return a==="container"?Ae(i,()=>h()):Ae(i,()=>h())}function yc(i,e){e();let t=fo(i,i.hasAttribute("velin-hover")?"hover":"visible");return te()||i.dataset.velinMotion==="off"?(j(i),()=>{}):t==="hover"||t==="focus"?(j(i),()=>{}):t==="load"?(j(i),()=>{}):gc(i,t,()=>j(i))}var vc,Ih,vb,_c=p(()=>{Bi();Ve();ht();vc=["load","visible","hover","focus","click","scroll"],Ih=["hidden","idle","media","container","theme","custom"],vb=[...vc,...Ih]});function bo(i="safe"){return ho(i)||ho("safe")}function vo(i){return i?!!(i.disabled||i.forceReduced&&te()||te()&&i.id!=="marketing"):te()}function Dh(i,e){let t=e?.maxDurationMs??800;return e?.disabled?0:Math.min(Number(i)||0,t)}function wc(i,e){let t=i.getAttribute("velin-duration"),r=i.getAttribute("velin-delay"),n=i.getAttribute("velin-ease");if(t){let o=Dh(Number(t),e);i.style.setProperty("--velin-motion-duration",`${o}ms`),i.style.animationDuration=`${o}ms`}if(r&&(i.style.animationDelay=`${Number(r)}ms`),n){let o={spring:"var(--velin-ease-spring)",bounce:"var(--velin-ease-bounce)",elastic:"var(--velin-ease-elastic)",default:"var(--velin-ease-default)"};i.style.animationTimingFunction=o[n]||n}(e?.disabled||vo(e))&&(i.dataset.velinMotion="off")}var xc=p(()=>{ht();Ve()});function Oh(i,e,t={}){let r=mc(i);if(!r)return{ok:!1,error:`Unknown timeline "${i}"`,ran:[]};let n=t.stepMs??120,o=[];if(t.policyDisabled||te()){for(let c of r.steps||[]){let u=Ac(e,c);u&&j(u),o.push(c)}return{ok:!0,ran:o}}let a=0;for(let c of r.steps||[]){let u=Ac(e,c);if(!u)continue;let h=a;a+=n,typeof window<"u"&&window.setTimeout?window.setTimeout(()=>j(u),h):j(u),o.push(c)}return{ok:!0,ran:o,timeline:r}}function Ac(i,e){return i?.querySelector?i.querySelector(`[data-velin-step="${e}"]`)||i.querySelector(`[velin-step="${e}"]`)||i.querySelector(`#${CSS.escape?.(e)||e}`):null}function Ec(i){if(!i?.querySelectorAll)return()=>{};let e=i.querySelectorAll("[velin-timeline]"),t=[];for(let r of e){let n=r.getAttribute("velin-timeline"),o=Oh(n,r);t.push(()=>o)}return()=>{}}var kc=p(()=>{ht();Ve()});function Nh(i=400){return{type:"fade",ms:i}}function zh(i=500,e="up"){return{type:"slide",ms:i,value:e}}function $h(i=200){return{type:"wait",ms:i}}function Ph(i=400){return{type:"rotate",ms:i}}function Fh(i=400){return{type:"blur",ms:i}}function qh(i,e){return{type:"preset",preset:i,ms:e}}async function Hh(i=[],e={}){let t=e.target||e.root,r=te(),n=[];for(let o of i){if(o.type==="wait"){!r&&o.ms&&await Sc(o.ms),n.push(o);continue}if(t&&typeof t.classList?.add=="function"){if(o.type==="preset"&&o.preset){let a=dr(o.preset);a?.cssClass&&t.classList.add(...String(a.cssClass).split(/\s+/)),Ee(t,{[o.preset]:"true"})}else o.type==="fade"?Ee(t,{fade:"true"}):o.type==="slide"?Ee(t,{slide:o.value||"up"}):o.type==="blur"?Ee(t,{blur:"true"}):o.type==="rotate"&&Ee(t,{flip:"true"});j(t)}!r&&o.ms&&await Sc(o.ms),n.push(o)}return{ok:!0,ran:n}}function Sc(i){return new Promise(e=>{if(typeof setTimeout>"u")return e();setTimeout(e,i)})}function Tc(i){if(!i?.querySelectorAll)return()=>{};let e=[...i.querySelectorAll("[velin-motion-sequence]")];for(let t of e){let r=[...t.children],n=0,o=Number(t.getAttribute("velin-sequence-gap")||120);for(let a of r){if(a.classList.add("velin-animate-on-scroll","velin-animate-on-scroll--fade"),te())j(a);else if(typeof setTimeout<"u"){let c=n*o;setTimeout(()=>j(a),c)}else j(a);n+=1}}return()=>{}}var Cc,Lc=p(()=>{Ve();ht();Ve();Cc={sequence:Hh,fade:Nh,slide:zh,wait:$h,rotate:Ph,blur:Fh,preset:qh}});function Uh(i={}){let e=bo(i.policy||"safe");return{policy:e,registry:()=>cr(),catalog:bc,listPresets:fc,listPolicies:mo,init:(t={})=>Fe({...t,policy:e.id}),Motion:Cc}}function Fe(i={}){let e=i.root||(typeof document<"u"?document:null);if(!e)return()=>{};let t=bo(i.policy||e.documentElement?.getAttribute?.("data-velin-motion-policy")||e.querySelector?.("[data-velin-motion-policy]")?.getAttribute("data-velin-motion-policy")||"safe"),r=i.selector||["[velin-motion]","[velin-reveal]","[velin-fade]","[velin-slide]","[velin-scale]","[velin-parallax]","[velin-hover]",".velin-animate-on-scroll"].join(","),n=e.querySelectorAll(r),o=vo(t)||te();for(let a of n){if(a.dataset.velinMotionInit)continue;a.dataset.velinMotionInit="1",wc(a,t);let c={},u=a.getAttribute("velin-motion");if(u){c.motion=u;let b=dr(u);b?.id&&(c[b.id]="true")}for(let b of Bh)a.hasAttribute(b)&&(c[b.replace("velin-","")]=a.getAttribute(b)||"true");if(Ee(a,c),o||a.dataset.velinMotion==="off"){j(a);continue}let h=yc(a,()=>Ee(a,c));go.push(h)}return sc(e),lc(e),Ec(e),Tc(e),()=>{go.forEach(a=>{try{a()}catch{}}),go=[],bl()}}function Rc(i={}){return Fe({root:typeof document<"u"?document:null,selector:i.selector||".velin-animate-on-scroll"})}var Bh,go,Mc,yo=p(()=>{Bi();Ve();ac();cc();_c();xc();kc();Lc();ht();Bh=["velin-reveal","velin-fade","velin-slide","velin-scale","velin-parallax","velin-hover"],go=[];Mc={init:Fe,observe:Ae,markVisible:j,VISIBLE_CLASS:lo,createEngine:Uh,readTrigger:fo}});function Dc({status:i,review:e,license:t,claims:r=[]}={}){let n=new Set(Array.isArray(r)?r.filter(Boolean):[]),o=Kh[String(i||"").toLowerCase()];o&&n.add(o);let a=Gh[String(e||"").toLowerCase()];if(a&&n.add(a),t){let c=String(t).toLowerCase().trim(),u=Vh[c]||(c.startsWith("cc")?"license.cc-by":null);u&&n.add(u)}return[...n]}function Ic(i,e="en"){let t=jh[i];return t&&(t.label[e]||t.label.en)||i}function Oc(i=[],e="en"){let t=["ai.generated","ai.assisted","review.human","review.verified","trust.official","license.cc-by","license.mit"];for(let r of t)if(i.includes(r))return Ic(r,e);return i[0]?Ic(i[0],e):e==="de"?"Transparenz":"Transparency"}var jh,Kh,Gh,Vh,Nc=p(()=>{jh={"ai.generated":{pillar:"ai",label:{en:"AI generated",de:"KI-generiert"}},"ai.assisted":{pillar:"ai",label:{en:"AI assisted",de:"KI-unterst\xFCtzt"}},"review.human":{pillar:"ai",label:{en:"Human reviewed",de:"Mensch gepr\xFCft"}},"review.verified":{pillar:"trust",label:{en:"Verified",de:"Verifiziert"}},"security.checked":{pillar:"trust",label:{en:"Security checked",de:"Security gepr\xFCft"}},"accessibility.checked":{pillar:"trust",label:{en:"Accessibility checked",de:"Barrierefreiheit gepr\xFCft"}},"trust.official":{pillar:"trust",label:{en:"Official",de:"Offiziell"}},"trust.signed":{pillar:"trust",label:{en:"Signed",de:"Signiert"}},"trust.opensource":{pillar:"trust",label:{en:"Open source",de:"Open Source"}},"privacy.gdpr":{pillar:"compliance",label:{en:"GDPR",de:"DSGVO"}},"license.cc-by":{pillar:"compliance",label:{en:"CC BY",de:"CC BY"}},"license.mit":{pillar:"compliance",label:{en:"MIT",de:"MIT"}},"license.apache-2":{pillar:"compliance",label:{en:"Apache-2.0",de:"Apache-2.0"}},"content.updated":{pillar:"metadata",label:{en:"Updated",de:"Aktualisiert"}},"content.author":{pillar:"metadata",label:{en:"Author",de:"Autor"}},"content.source":{pillar:"metadata",label:{en:"Source",de:"Quelle"}},"content.language":{pillar:"metadata",label:{en:"Language",de:"Sprache"}},"version.current":{pillar:"metadata",label:{en:"Version",de:"Version"}},"provenance.complete":{pillar:"provenance",label:{en:"Provenance complete",de:"Nachweis vollst\xE4ndig"}}},Kh={generated:"ai.generated",assisted:"ai.assisted","ai-assisted":"ai.assisted","human-reviewed":"review.human","human-edited":"review.human",verified:"review.verified",edited:"review.human",draft:null},Gh={human:"review.human","human-reviewed":"review.human",verified:"review.verified",none:null},Vh={"cc by 4.0":"license.cc-by","cc-by":"license.cc-by","cc-by-4.0":"license.cc-by",mit:"license.mit","apache-2.0":"license.apache-2",apache:"license.apache-2"}});function $c(){let i=new Map;return{register(e){if(!e?.id)throw new Error("DisclosureRecord requires id");return i.set(e.id,zc(e)),i.get(e.id)},get(e){return i.get(e)||null},has(e){return i.has(e)},remove(e){return i.delete(e)},list(){return[...i.values()].map(e=>zc(e))},query(e){return this.list().filter(e)},clear(){i.clear()},size(){return i.size},export(){return{schema:"velinstyle.transparency.registry",version:1,items:this.list()}},diff(e=[]){let t=new Map(e.map(a=>[a.id,a])),r=[],n=[],o=[];for(let a of i.values())t.has(a.id)?JSON.stringify(a)!==JSON.stringify(t.get(a.id))&&o.push(a.id):r.push(a.id);for(let a of t.keys())i.has(a)||n.push(a);return{added:r,removed:n,changed:o}}}}function zc(i){return JSON.parse(JSON.stringify(i))}function Pc(i={}){if(i.id)return String(i.id).trim();let e=[i.file||"",i.selector||"",i.src||"",i.tag||"",i.type||""].join("|").toLowerCase(),t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return`tx-${(t>>>0).toString(16)}`}var _o=p(()=>{});function Fc(i={},e={}){let t=String(i.provider||e.provider||"api"),r=String(i.type||"ai").toLowerCase(),n=i.status!=null?String(i.status).toLowerCase():void 0,o=i.review!=null?String(i.review).toLowerCase():void 0,a=Yh(i.provenance||i);i.license&&!a.license&&(a.license=String(i.license)),i.model&&!a.source&&(a.source=`model:${i.model}`),i.generated;let c=n||(i.generated===!0?"generated":void 0),u=Dc({status:c,review:o,license:a.license,claims:i.claims}),h={selector:i.target?.selector||i.selector||void 0,tag:i.target?.tag||i.tag||void 0,src:i.target?.src||i.src||void 0,file:i.target?.file||e.file||i.file||void 0},b=Pc({id:i.id||i.velinTransparencyId,selector:h.selector,src:h.src,tag:h.tag,type:r,file:h.file}),m=e.lang==="de"?"de":"en",v=i.label?String(i.label):Oc(u,m),T=i.updated||a.publishedAt||a.reviewedAt||a.createdAt||void 0;return{id:b,type:r,status:c,review:o,provider:t,claims:u,provenance:a,updated:T,label:v,description:i.description?String(i.description):void 0,renderer:i.renderer||i.overlay||"badge",tone:i.tone||Xh(u),position:i.position||"top-right",target:h,meta:i.meta&&typeof i.meta=="object"?i.meta:void 0}}function Yh(i={}){let e={};for(let t of Wh){let r=i[t]??i[t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)];r!=null&&String(r).trim()&&(e[t]=String(r).trim())}return i["created-by"]&&(e.createdBy=String(i["created-by"])),i["created-at"]&&(e.createdAt=String(i["created-at"])),i["reviewed-at"]&&(e.reviewedAt=String(i["reviewed-at"])),i["approved-by"]&&(e.approvedBy=String(i["approved-by"])),i["published-at"]&&(e.publishedAt=String(i["published-at"])),e}function Xh(i){return i.includes("ai.generated")?"generated":i.includes("review.verified")||i.includes("trust.official")?"verified":i.includes("review.human")?"human":i.includes("ai.assisted")?"mixed":"neutral"}var Wh,qc=p(()=>{Nc();_o();Wh=["createdBy","createdAt","reviewedAt","approvedBy","source","license","version","publishedAt"]});function Zh(i,e){Bc.set(i,e)}function Uc(i,e){if(typeof document>"u"||!i)return null;let t=e.renderer||"badge",r=Bc.get(t);return r?(r(i,e),i.querySelector(".velin-transparency")):jc(i,e)}function jc(i,e){getComputedStyle(i).position==="static"&&(i.style.position="relative");let r=i.querySelector(":scope > .velin-transparency");r||(r=document.createElement("div"),i.prepend(r));let n=e.renderer||"badge",o=e.tone||"neutral",a=e.position||"top-right";r.className=["velin-transparency",`velin-transparency--${n}`,`velin-transparency--tone-${o}`,`velin-transparency--pos-${a}`].join(" "),r.setAttribute("data-velin-transparency-id",e.id),r.setAttribute("role","note");let c=(e.claims||[]).join(", "),u=e.provenance||{},h=document.createElement("span");h.className="velin-sr-only";let b=(i.closest("[lang]")?.getAttribute("lang")||document.documentElement.lang||"en").startsWith("de")?"de":"en";h.textContent=b==="de"?`Transparenzhinweis: ${e.label}. ${c}. ${Hc(u,"de")}`:`Transparency notice: ${e.label}. ${c}. ${Hc(u,"en")}`;let m=document.createElement("span");m.className="velin-transparency__label",m.textContent=e.label||"Transparency";let v=document.createElement("span");return v.className="velin-transparency__details",v.hidden=n==="badge"||n==="icon",v.textContent=Jh(e,b),r.replaceChildren(h,m,v),e.description?r.title=e.description:v.textContent&&(r.title=v.textContent),i.setAttribute("data-velin-transparency",e.id),r}function Hc(i,e){let t=[];return i.createdBy&&t.push(e==="de"?`Erstellt von ${i.createdBy}`:`Created by ${i.createdBy}`),i.createdAt&&t.push(e==="de"?`am ${i.createdAt}`:`on ${i.createdAt}`),i.approvedBy&&t.push(e==="de"?`Freigegeben von ${i.approvedBy}`:`Approved by ${i.approvedBy}`),i.license&&t.push(i.license),i.version&&t.push(`v${i.version}`),t.join(". ")}function Jh(i,e){let t=i.provenance||{},r=[];return t.approvedBy&&r.push(e==="de"?`Freigabe: ${t.approvedBy}`:`Approved: ${t.approvedBy}`),t.license&&r.push(t.license),t.version&&r.push(`v${t.version}`),(t.updated||i.updated)&&r.push(i.updated||t.publishedAt||""),r.filter(Boolean).join(" \xB7 ")}function Qh(i){return i==="corner-badge"||i==="stamp"?"badge":i==="floating-card"||i==="sidebar"?"panel":i==="banner"?"footer":i}var Bc,Kc=p(()=>{Bc=new Map;for(let i of["overlay","badge","inline","tooltip","footer","ribbon","panel","icon","corner-badge","stamp","sidebar","floating-card","banner"])Zh(i,(e,t)=>{jc(e,{...t,renderer:Qh(i)})})});var Ao={};g(Ao,{VelinTransparency:()=>em,attach:()=>xo,enhanceAll:()=>Gc,getDefaultRegistry:()=>Vc});function xo(i,e={},t={}){if(!i)throw new Error("VelinTransparency.attach requires an element");let r=t.registry||wo,n={...e,tag:i.tagName,src:i.getAttribute?.("src")||i.getAttribute?.("href")||e.src,selector:i.id?`#${i.id}`:e.selector,id:e.id||i.getAttribute?.("velin-transparency-id")||i.id,provider:e.provider||"api"};(i.hasAttribute?.("velin-transparency")||i.hasAttribute?.("velin-disclosure"))&&(n.type=n.type||i.getAttribute("velin-type")||"ai",n.status=n.status||i.getAttribute("velin-status"),n.review=n.review||i.getAttribute("velin-review"),n.license=n.license||i.getAttribute("velin-license"),n.label=n.label||i.getAttribute("velin-label"),n.description=n.description||i.getAttribute("velin-description"),n.overlay=n.overlay||i.getAttribute("velin-overlay")||i.getAttribute("velin-renderer"),n.provenance={createdBy:i.getAttribute("velin-created-by"),createdAt:i.getAttribute("velin-created-at"),reviewedAt:i.getAttribute("velin-reviewed-at"),approvedBy:i.getAttribute("velin-approved-by"),source:i.getAttribute("velin-source"),license:i.getAttribute("velin-license"),version:i.getAttribute("velin-version"),publishedAt:i.getAttribute("velin-published-at"),...e.provenance||{}});let o=Fc(n,{provider:n.provider,lang:t.lang});return r.register(o),i.hasAttribute("velin-transparency")||i.setAttribute("velin-transparency",""),i.hasAttribute("velin-transparency-id")||i.setAttribute("velin-transparency-id",o.id),Uc(i,o),o}function Gc(i=typeof document<"u"?document:null){if(!i?.querySelectorAll)return[];let e=[];return i.querySelectorAll("[velin-transparency], [velin-disclosure]").forEach(t=>{e.push(xo(t,{},{registry:wo}))}),e}function Vc(){return wo}var wo,em,Eo=p(()=>{qc();Kc();_o();wo=$c();em={attach:xo,enhanceAll:Gc,getRegistry:Vc}});function C(i,e){mt.set(i,e)}function Yc(i){return mt.get(i)}function $t(i,e,t={}){i.setAttribute("data-velin-component",e);for(let[r,n]of Object.entries(t))n!=null&&i.setAttribute(r,n);return ie(e)}function tm(){C("velin-modal",{enhance(i){$t(i,"velin-modal",{open:i.getAttribute("velin-modal")||""})}}),C("velin-tabs",{enhance:i=>$t(i,"velin-tabs")}),C("velin-accordion",{enhance:i=>$t(i,"velin-accordion")}),C("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),ie("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)),ie("velin-tooltip")}}),C("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),ie("velin-copy");i.appendChild(t)}return ie("velin-copy")}}),C("velin-counter",{enhance(i){$t(i,"velin-counter",{value:i.getAttribute("velin-counter")||"0"})}}),C("velin-notify",{async enhance(i){await ie("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"}}))})}}),C("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")),ie("velin-theme-toggle");document.documentElement.setAttribute("data-velin-theme",e)}}),C("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),ie("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)),ie("velin-scroll-top")}}),C("velin-progress",{enhance(i){if(i.hasAttribute("ring"))return $t(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)}%`)}}),C("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 ie("velin-search")}}),C("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})))}}),C("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")}}),C("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")}}),C("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)}}),C("velin-anchor",{enhance(i){!i.id&&i.getAttribute("velin-anchor")&&(i.id=i.getAttribute("velin-anchor")),i.setAttribute("tabindex","-1")}}),C("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 ie("velin-copy");let{initHighlight:t,highlightElement:r}=await Promise.resolve().then(()=>(It(),Bn));i.getAttribute("data-velin-highlight")==="immediate"||typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches?await r(i):t(i,{root:i})}}),C("velin-quote",{enhance(i){(i.tagName==="BLOCKQUOTE"||i.tagName==="Q")&&i.classList.add("velin-quote")}}),C("velin-highlight",{enhance(i){i.classList.add("velin-highlight")}}),C("velin-transparency",{async enhance(i){let{attach:e}=await Promise.resolve().then(()=>(Eo(),Ao));e(i)}}),C("velin-disclosure",{async enhance(i){let{attach:e}=await Promise.resolve().then(()=>(Eo(),Ao));i.hasAttribute("velin-transparency")||i.setAttribute("velin-transparency",""),e(i)}});for(let i of["velin-motion","velin-trigger","velin-duration","velin-delay","velin-ease","velin-timeline","velin-motion-sequence","velin-reveal","velin-fade","velin-slide","velin-scale","velin-parallax","velin-hover","velin-stagger","velin-scroll"])C(i,{enhance(){}})}async function ko(i=document){let e=[...mt.keys()].map(r=>`[${r}]`).join(","),t=i.querySelectorAll(e);for(let r of t)if(!Wc.has(r)){for(let n of mt.keys()){if(!r.hasAttribute(n))continue;let o=mt.get(n);o?.enhance&&await o.enhance(r)}Wc.add(r)}if(Fe({root:i}),typeof HTMLElement<"u"){let{bindDeclarativeSearch:r}=await Promise.resolve().then(()=>(zt(),oo));if(r(i),!document.querySelector("velin-announcer")){let{getAnnouncer:n}=await Promise.resolve().then(()=>(Ie(),da));n()}}}function So(){return[...mt.keys()]}var mt,Wc,Xc=p(()=>{To();yo();mt=new Map;tm();Wc=new WeakSet});var Zc={};g(Zc,{bootAttributes:()=>ko,getAttributeHandler:()=>Yc,listRegisteredAttributes:()=>So,registerAttribute:()=>C});var Co=p(()=>{Xc()});var Jc={};g(Jc,{PATTERNS:()=>pr,VelinHapticObserver:()=>Ft,applyHaptic:()=>Pt,default:()=>im,vibrate:()=>Lo});function Lo(i){if(typeof navigator>"u"||!navigator.vibrate||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;let t=typeof i=="string"?pr[i]||pr.tap:i;navigator.vibrate(t)}function Pt(i){let e=i.getAttribute("haptic")||"tap";i.addEventListener("click",()=>Lo(e))}var pr,Ft,im,Ro=p(()=>{pr={tap:[10],"double-tap":[10,50,10],success:[50],error:[100,30,100],warning:[30,20,30],long:[200]};Ft=class{constructor(){this._observer=null}start(e=document.body){e.querySelectorAll("[haptic]").forEach(Pt),this._observer=new MutationObserver(r=>{for(let n of r)for(let o of n.addedNodes)o.nodeType===1&&(o.hasAttribute?.("haptic")&&Pt(o),o.querySelectorAll?.("[haptic]").forEach(Pt))}),this._observer.observe(e,{childList:!0,subtree:!0})}stop(){this._observer?.disconnect()}},im=Ft});function nm(i){return typeof customElements>"u"?Promise.reject(new Error("customElements not available")):customElements.whenDefined(i)}async function ie(i){let e=so[i];if(!e)throw new Error(`Unknown Velin component: ${i}`);if(Mo.has(i))return Mo.get(i);let t=e().then(r=>{let n=r.default;return n&&!customElements.get(i)&&customElements.define(i,n),n});return Mo.set(i,t),t}async function Qc(i){return Promise.all(i.map(e=>ie(e)))}function om(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&&rm.test(r)&&so[r]&&e.add(r)}return e}async function sm(i=document,e={}){let t=e.tags?.length?new Set(e.tags):om(i),r=Qc([...t]);if(e.attributes){let{bootAttributes:n}=await Promise.resolve().then(()=>(Co(),Zc));await n(i)}if(e.highlight){let{initHighlight:n}=await Promise.resolve().then(()=>(It(),Bn));n(i)}if(e.haptic){let{VelinHapticObserver:n}=await Promise.resolve().then(()=>(Ro(),Jc));new n().start(i instanceof Document?i.body:i)}return r}var Mo,rm,To=p(()=>{nc();Mo=new Map,rm=/^velin-[a-z0-9-]+$/});Ir();Dr();Or();Nr();jr();Vr();Wr();Xr();Zr();Jr();Qr();en();tn();rn();hi();sn();fi();ln();cn();un();dn();pn();hn();mn();fn();bn();vn();gn();yn();Li();To();lr();Ki();Zi();Un();jn();Wn();_n();Gn();zt();Yn();Zn();Kn();zt();yo();var am=Rc;if(typeof document<"u"){let i=()=>{document.documentElement?.hasAttribute("data-velin-reveal-auto")&&Fe()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i,{once:!0}):i()}Ie();Ie();function lm(i={}){if(typeof document>"u")return;let{announcer:e=!0,scrollPadding:t=!0,skipLink:r=!1}=i;if(e&&st(),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)}}no();Co();It();var eu=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null,su={duration:250,easing:"var(--velin-ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1))",itemSelector:":scope > *"};function Io(i,e){return Array.from(i.querySelectorAll(e))}function au(i,e,t={}){if(!i||typeof e!="function")return;let r={...su,...t},n=eu&&eu.matches,o=Io(i,r.itemSelector),a=new Map;if(o.forEach(u=>{u.hidden||a.set(u,u.getBoundingClientRect())}),e(),n)return;Io(i,r.itemSelector).forEach(u=>{if(u.hidden)return;let h=a.get(u),b=u.getBoundingClientRect();if(!h){if(typeof u.animate!="function")return;u.animate([{opacity:0,transform:"scale(0.96)"},{opacity:1,transform:"scale(1)"}],{duration:r.duration,easing:r.easing,fill:"both"});return}let m=h.left-b.left,v=h.top-b.top;m===0&&v===0||typeof u.animate=="function"&&u.animate([{transform:`translate(${m}px, ${v}px)`},{transform:"translate(0, 0)"}],{duration:r.duration,easing:r.easing,fill:"both"})})}function lu(i,e,t={}){if(!i||typeof e!="function")return;let r={...su,...t};au(i,()=>{Io(i,r.itemSelector).forEach(n=>{n.hidden=!e(n)})},r)}function tu(i){return i?String(i).toLowerCase().split(/[\s,|]+/).map(e=>e.trim()).filter(Boolean):[]}function cm(i,e,t){return e.length?t==="all"?e.every(r=>i.includes(r)):e.some(r=>i.includes(r)):!0}function um(i,e){return e?((i.getAttribute("data-tags")||"")+" "+(i.getAttribute("data-search")||"")+" "+(i.textContent||"")).toLowerCase().includes(e.toLowerCase()):!0}var Do=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=tu(this.tag),t=this.search;lu(this.container,r=>{let n=tu(r.getAttribute("data-tags"));return cm(n,e,this.matchMode)&&um(r,t)},{itemSelector:this.itemSelector})}},iu=new WeakMap;function ru(i){let e=iu.get(i);return e||(e=new Do(i),iu.set(i,e)),e}function nu(i){let e=i.getAttribute("data-velin-filter-target");if(!e)return null;try{return document.querySelector(e)}catch{return null}}function dm(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 ou(){if(typeof document>"u")return;document.addEventListener("click",e=>{let t=e.target.closest("[data-velin-filter-value]");if(!t)return;let r=nu(t);if(!r)return;let n=t.closest("[data-velin-filter-group]")||t.parentElement;dm(n,t);let o=ru(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=nu(t);if(!r)return;let n=ru(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",ou,{once:!0}):ou());L();Ro();J();lr();Ki();Zi();Li();export{pr as HapticPatterns,hs as VelinAccordion,Pa as VelinAnnouncer,ka as VelinBottomNav,Ua as VelinCalendar,na as VelinCarousel,gl as VelinCodeBlock,sa as VelinCollapse,Aa as VelinCombobox,za as VelinCommand,ea as VelinCopy,va as VelinCountdown,_l as VelinCounter,El as VelinDataTable,fa as VelinDialog,Vs as VelinDrawer,us as VelinDropdown,Ha as VelinEmail,Sl as VelinEmptyState,Cl as VelinFileDropzone,Rl as VelinFormSummary,Ft as VelinHapticObserver,Ks as VelinIcon,pa as VelinLightbox,Dl as VelinLiveDot,Oa as VelinMenubar,ls as VelinModal,Nl as VelinOtpInput,$l as VelinPasswordStrength,wa as VelinPersist,Js as VelinPopover,ya as VelinProgressRing,Ia as VelinRating,ia as VelinScrollTop,la as VelinScrollspy,Zl as VelinSearch,La as VelinSegmentedControl,Ta as VelinSheet,ic as VelinSparkline,ma as VelinStepper,kt as VelinStepperWC,fs as VelinTabs,Xs as VelinThemeToggle,Us as VelinToast,ua as VelinTooltip,Et as VelinTooltipWC,ae as announce,Pt as applyHaptic,Jl as bindDeclarativeSearch,ko as bootAttributes,sm as bootFromDOM,W as clearBackgroundInert,Vd as createSafeHTML,ro as createSearch,y as escapeHTML,we as escapeHTMLAttribute,lu as filterList,au as flipReorder,st as getAnnouncer,ge as getFocusableElements,Bs as getTrustedPolicy,Rt as highlightAll,he as highlightElement,lm as initA11y,$e as initHighlight,Fe as initMotion,am as initReveal,ie as lazyDefine,ze as lazyLoadLanguage,So as listRegisteredAttributes,Mt as observeCodeBlocks,Qc as register,C as registerAttribute,ut as registerLanguage,Bl as registerSearchProvider,Pi as renderTokens,de as restoreFocus,ne as rovingTabindex,Ue as sanitizeURL,ue as saveFocus,Xn as scorePassword,pe as setBackgroundInert,Ur as stripControlChars,re as trapFocus,Mc as velinMotion,wh as velinSearch,vl as velinSyntax,Lo as vibrate,nm as whenDefined};
1501
1501
  /*! Bundled license information:
1502
1502
 
1503
1503
  dompurify/dist/purify.es.mjs: