vanilla-breeze 0.3.0 → 0.3.1

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 (126) hide show
  1. package/dist/cdn/components/settings-panel.js +1 -1
  2. package/dist/cdn/themes/8bit.tokens.json +1 -1
  3. package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
  4. package/dist/cdn/themes/alpha1999.tokens.json +1 -1
  5. package/dist/cdn/themes/anthropic.tokens.json +1 -1
  6. package/dist/cdn/themes/art-deco-dark.tokens.json +1 -1
  7. package/dist/cdn/themes/art-deco.tokens.json +1 -1
  8. package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
  9. package/dist/cdn/themes/bauhaus.tokens.json +1 -1
  10. package/dist/cdn/themes/brutalist-dark.tokens.json +1 -1
  11. package/dist/cdn/themes/brutalist.tokens.json +1 -1
  12. package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
  13. package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
  14. package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
  15. package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
  16. package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
  17. package/dist/cdn/themes/classic-dark.tokens.json +1 -1
  18. package/dist/cdn/themes/classic.tokens.json +1 -1
  19. package/dist/cdn/themes/claymorphism-dark.tokens.json +1 -1
  20. package/dist/cdn/themes/claymorphism.tokens.json +1 -1
  21. package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
  22. package/dist/cdn/themes/clinical.tokens.json +1 -1
  23. package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
  24. package/dist/cdn/themes/cottagecore.tokens.json +1 -1
  25. package/dist/cdn/themes/cyber.tokens.json +1 -1
  26. package/dist/cdn/themes/dawn-dark.tokens.json +1 -1
  27. package/dist/cdn/themes/dawn.tokens.json +1 -1
  28. package/dist/cdn/themes/dracula.tokens.json +1 -1
  29. package/dist/cdn/themes/dusk.tokens.json +1 -1
  30. package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
  31. package/dist/cdn/themes/editorial.tokens.json +1 -1
  32. package/dist/cdn/themes/financial-dark.tokens.json +1 -1
  33. package/dist/cdn/themes/financial.tokens.json +1 -1
  34. package/dist/cdn/themes/genai.tokens.json +1 -1
  35. package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
  36. package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
  37. package/dist/cdn/themes/government-dark.tokens.json +1 -1
  38. package/dist/cdn/themes/government.tokens.json +1 -1
  39. package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
  40. package/dist/cdn/themes/gruvbox.tokens.json +1 -1
  41. package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
  42. package/dist/cdn/themes/high-noon.tokens.json +1 -1
  43. package/dist/cdn/themes/ibm.tokens.json +1 -1
  44. package/dist/cdn/themes/journal-dark.tokens.json +1 -1
  45. package/dist/cdn/themes/journal.tokens.json +1 -1
  46. package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
  47. package/dist/cdn/themes/kawaii.tokens.json +1 -1
  48. package/dist/cdn/themes/magna-dark.tokens.json +1 -1
  49. package/dist/cdn/themes/magna.tokens.json +1 -1
  50. package/dist/cdn/themes/mcdonalds.tokens.json +1 -1
  51. package/dist/cdn/themes/midnight.tokens.json +1 -1
  52. package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
  53. package/dist/cdn/themes/minimal.tokens.json +1 -1
  54. package/dist/cdn/themes/modern-dark.tokens.json +1 -1
  55. package/dist/cdn/themes/modern.tokens.json +1 -1
  56. package/dist/cdn/themes/nes-dark.tokens.json +1 -1
  57. package/dist/cdn/themes/nes.tokens.json +1 -1
  58. package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
  59. package/dist/cdn/themes/neumorphism.tokens.json +1 -1
  60. package/dist/cdn/themes/nord-dark.tokens.json +1 -1
  61. package/dist/cdn/themes/nord.tokens.json +1 -1
  62. package/dist/cdn/themes/organic-dark.tokens.json +1 -1
  63. package/dist/cdn/themes/organic.tokens.json +1 -1
  64. package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
  65. package/dist/cdn/themes/rose-pine.tokens.json +1 -1
  66. package/dist/cdn/themes/rough-dark.tokens.json +1 -1
  67. package/dist/cdn/themes/rough.tokens.json +1 -1
  68. package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
  69. package/dist/cdn/themes/solarized.tokens.json +1 -1
  70. package/dist/cdn/themes/starbucks.tokens.json +1 -1
  71. package/dist/cdn/themes/startup-dark.tokens.json +1 -1
  72. package/dist/cdn/themes/startup.tokens.json +1 -1
  73. package/dist/cdn/themes/super2026-dark.tokens.json +1 -1
  74. package/dist/cdn/themes/super2026.tokens.json +1 -1
  75. package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
  76. package/dist/cdn/themes/swiss.tokens.json +1 -1
  77. package/dist/cdn/themes/terminal.tokens.json +1 -1
  78. package/dist/cdn/themes/tokyo-night-dark.tokens.json +1 -1
  79. package/dist/cdn/themes/tokyo-night.tokens.json +1 -1
  80. package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
  81. package/dist/cdn/themes/vaporwave.tokens.json +1 -1
  82. package/dist/cdn/themes/win9x-dark.tokens.json +1 -1
  83. package/dist/cdn/themes/win9x.tokens.json +1 -1
  84. package/dist/cdn/vanilla-breeze-core.js +1 -1
  85. package/dist/cdn/vanilla-breeze.js +1 -1
  86. package/package.json +1 -1
  87. package/dist/cdn/components/accessibility-specimen.js +0 -11
  88. package/dist/cdn/components/adr-wc.js +0 -403
  89. package/dist/cdn/components/breakpoint-specimen.js +0 -26
  90. package/dist/cdn/components/burndown-chart.js +0 -2
  91. package/dist/cdn/components/capacity-plan.js +0 -25
  92. package/dist/cdn/components/color-palette.js +0 -16
  93. package/dist/cdn/components/component-sampler.js +0 -45
  94. package/dist/cdn/components/empathy-map.js +0 -582
  95. package/dist/cdn/components/font-pairer.js +0 -108
  96. package/dist/cdn/components/gantt-chart.js +0 -2
  97. package/dist/cdn/components/gradient-builder.js +0 -52
  98. package/dist/cdn/components/impact-effort.js +0 -2
  99. package/dist/cdn/components/iron-triangle.js +0 -2
  100. package/dist/cdn/components/kanban-board.js +0 -2
  101. package/dist/cdn/components/layout-specimen.js +0 -35
  102. package/dist/cdn/components/motion-specimen.js +0 -21
  103. package/dist/cdn/components/palette-generator.js +0 -15
  104. package/dist/cdn/components/product-roadmap.js +0 -3
  105. package/dist/cdn/components/quadrant-grid.js +0 -3
  106. package/dist/cdn/components/quality-target.js +0 -12
  107. package/dist/cdn/components/requirement-card.js +0 -122
  108. package/dist/cdn/components/review-surface.js +0 -535
  109. package/dist/cdn/components/risk-register.js +0 -25
  110. package/dist/cdn/components/semantic-palette.js +0 -30
  111. package/dist/cdn/components/spacing-specimen.js +0 -6
  112. package/dist/cdn/components/story-map.js +0 -2
  113. package/dist/cdn/components/theme-catalog.js +0 -28
  114. package/dist/cdn/components/theme-export.js +0 -26
  115. package/dist/cdn/components/theme-import.js +0 -44
  116. package/dist/cdn/components/token-specimen.js +0 -26
  117. package/dist/cdn/components/traceability-matrix.js +0 -3
  118. package/dist/cdn/components/type-specimen.js +0 -19
  119. package/dist/cdn/components/user-journey.js +0 -366
  120. package/dist/cdn/components/user-persona.js +0 -402
  121. package/dist/cdn/components/user-story.js +0 -411
  122. package/dist/cdn/components/work-item.js +0 -447
  123. package/dist/cdn/packs/design-system.full.css +0 -2
  124. package/dist/cdn/packs/design-system.full.js +0 -175
  125. package/dist/cdn/packs/ux-planning.full.css +0 -2
  126. package/dist/cdn/packs/ux-planning.full.js +0 -3160
@@ -313,7 +313,7 @@ svg {
313
313
  <span class="description" part="description"><slot name="description" data-slot="description"></slot></span>
314
314
  <span class="icon" part="icon"><slot name="icon" data-slot="icon"></slot></span>
315
315
  </div>
316
- `,Qe=class extends g{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of Cn){let e=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,e)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=co;for(let e of Cn){let s=t.querySelector(`slot[name="${e}"]`);s?.addEventListener("slotchange",()=>this.#e(e,s)),this.#e(e,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,e){let s=!!e&&e.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#t(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let e of oo)this.setState(`trend-${e}`,e===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};b("score-card",Qe);var lo=0;function Jt(i,t){return i.matches("content-swap")?t:`data-${t}`}function Xt(i){i.style.viewTransitionName||(i.style.viewTransitionName=`content-swap-${++lo}`);let t=i.querySelector(':scope > [data-face="front"]'),e=i.querySelector(':scope > [data-face="back"]');if(!t||!e)return;let s=[];function n(o,c,h,l){o.addEventListener(c,h,l),s.push(()=>o.removeEventListener(c,h,l))}let r=[...i.querySelectorAll("[data-swap]")].filter(o=>o!==i&&o.closest("content-swap, [data-swap]")===i);return r.length===0?(i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.getAttribute("aria-label")||i.setAttribute("aria-label","Toggle content"),n(i,"click",()=>tt(i,"pointer")),n(i,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),tt(i,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),tt(i,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),tt(i,"keyboard"))})}),i.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(n(i,"swipe-left",()=>tt(i,"pointer")),n(i,"swipe-right",()=>tt(i,"pointer"))),Ln(i,t,e),()=>{for(let o of s)o();s.length=0}}function Ln(i,t,e){let s=i.hasAttribute(Jt(i,"swapped"));t.inert=s,e.inert=!s}function ho(i){return{front:i.querySelector(':scope > [data-face="front"]'),back:i.querySelector(':scope > [data-face="back"]')}}function kt(i,t,e="api"){let{front:s,back:n}=ho(i);if(!s||!n)return;let r=Jt(i,"swapped");if(t&&i.hasAttribute(r)||!t&&!i.hasAttribute(r))return;let a=()=>{t?i.setAttribute(r,""):i.removeAttribute(r),Ln(i,s,n),uo(i,e);let h=t?n:s,l=h.querySelector("[autofocus]");l?l.focus():e==="keyboard"&&fo(h)},o=h=>{let l=i;typeof l.setState=="function"&&l.setState("transition-running",h)};o(!0);let c=P(a);c&&c.finished&&typeof c.finished.finally=="function"?c.finished.finally(()=>o(!1)):o(!1)}function tt(i,t="api"){kt(i,!i.hasAttribute(Jt(i,"swapped")),t)}function uo(i,t="internal"){i.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:i.hasAttribute(Jt(i,"swapped")),source:t},bubbles:!0}))}function fo(i){let t=i.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var ti=class extends g{#e=null;setup(){this.#e=Xt(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){kt(this,!0)}unflip(){kt(this,!1)}toggle(){tt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){kt(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){kt(this,!!t)}};b("content-swap",ti);function kn(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(i=>{i.querySelector(":scope > [data-face]")&&(Xt(i),i.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",kn):kn();var Tn=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(Xt(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(Xt(n),n.setAttribute("data-swap-init",""))})}});document.body?Tn.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Tn.observe(document.body,{childList:!0,subtree:!0})});var ei=class extends g{#e=null;#t=!1;#i=null;setup(){this.hasAttribute("role")||this.setAttribute("role","navigation"),this.#n("pathname"),this.listen(window,"popstate",this.#r)}get items(){return this.#e?this.#e.map(t=>({...t})):Array.from(this.#s()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let e=t.map(s=>({...s}));this.#e&&this.#h(this.#e,e)||(this.#e=e,this.#c(e),this.#n(this.#t?"property":"pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#t)return this.#i;for(let t of this.#s())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let e=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#t&&(this.#t=!1,this.#i=null,this.#n("pathname"))}refresh(){this.#t||this.#n("pathname")}#s(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#r=()=>{this.#t||this.#n("popstate")};#n(t){let e=this.current,s=this.#a();this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,e=Array.from(this.#s());if(e.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of e){let h=c.getAttribute("href");if(!h||/^[a-z]+:/i.test(h)||h.startsWith("//"))continue;let l=h.split("?")[0].split("#")[0];if(l===t&&n==null){n=c;continue}!s&&l!=="/"&&(t===l||t.startsWith(l.replace(/\/$/,"")+"/"))&&l.length>a&&(r=c,a=l.length)}let o=n||r;return o?o.getAttribute("data-route")||o.getAttribute("href"):null}#o(t){let e=this.#s();for(let s of e){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#c(t){this.#s().forEach(n=>n.remove());let s=document.createDocumentFragment();for(let n of t)s.appendChild(this.#f(n));this.appendChild(s)}#f(t){let e=document.createElement("a");if(e.href=t.href||"#",t.route&&e.setAttribute("data-route",t.route),t.external&&(e.target="_blank",e.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),e.appendChild(s)}if(e.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",e.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),e.appendChild(s)}return e}#h(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(e[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==e[s][r[a]])return!1}return!0}};b("nav-bar",ei);var mo=0,ii=class extends g{#e;#t=[];#i;#s;#r;#n;#a;#o=null;#c=0;#f=!1;#h=!1;#p=null;get currentIndex(){return this.#c}get slideCount(){return this.#t.length}get playing(){return this.#o!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#f=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#h=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#h&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0"),this.#e.setAttribute("aria-label","Slides"),t.forEach((r,a)=>{r.setAttribute("role","group"),r.setAttribute("aria-roledescription","slide"),r.setAttribute("aria-label",`${a+1} of ${t.length}`),this.#e.appendChild(r)}),this.#t=[...this.#e.children],this.#i=document.createElement("button"),this.#i.className="carousel-prev",this.#i.setAttribute("aria-label","Previous slide"),this.#i.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#r=document.createElement("div"),this.#r.className="carousel-indicators",this.#r.setAttribute("aria-label","Slide indicators"),this.#t.forEach((r,a)=>{let o=document.createElement("button");o.className="carousel-dot",o.setAttribute("aria-label",`Go to slide ${a+1}`),o.setAttribute("aria-current",a===0?"true":"false"),this.listen(o,"click",()=>this.goTo(a)),this.#r.appendChild(o)})),this.#n=document.createElement("div"),this.#n.className="carousel-live",this.#n.setAttribute("aria-live","polite"),this.#n.setAttribute("aria-atomic","true"),this.appendChild(this.#i),this.appendChild(this.#e),this.appendChild(this.#s),this.#r&&this.appendChild(this.#r),this.appendChild(this.#n),this.listen(this.#i,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#y),this.#h){let r=++mo,a=this.getAttribute("transition")||"fade",o=a==="slide"?"vt-carousel-slide":a==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${r}`,this.#e.style.viewTransitionClass=o}this.#h&&Promise.resolve().then(()=>(On(),qn)).then(({addSwipeListener:r})=>{this.#p=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#h||(this.#a=new IntersectionObserver(this.#d,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)));let n=this.#v()??(Number(this.getAttribute("start"))||0);if(this.#h){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#l(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);return this.#m(),this.hasAttribute("autoplay")&&!this.#f&&this.#w(),!0}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#p&&(this.#p(),this.#p=null),this.#t=[],this.#h=!1}get slides(){return this.#t.map((t,e)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${e+1} of ${this.#t.length}`}))}set slides(t){let e=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of e){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:e,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#t.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#t.length-1)}goTo(t,e=!0){if(!(t<0||t>=this.#t.length)){if(this.#h)if(e&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,P(()=>{this.#u(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#u(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=e&&!this.#f?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#l(t)}}#u(t){this.#t.forEach((e,s)=>{e.hidden=s!==t})}play(){if(this.#o||this.#f)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#o=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#o&&(clearInterval(this.#o),this.#o=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#g()}#l(t){this.#c=t,this.#m(),this.#b(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:t,slide:this.#t[t]},bubbles:!0}))}#m(){let t=this.hasAttribute("loop"),e=this.#c===0,s=this.#c===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&e),this.#s&&(this.#s.disabled=!t&&s),this.#r){let n=this.#r.children;for(let r=0;r<n.length;r++){let a=r===this.#c;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#d=t=>{for(let e of t)if(e.isIntersecting){let s=this.#t.indexOf(e.target);s!==-1&&s!==this.#c&&this.#l(s)}};#y=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#w(){this.play(),this.listen(this,"mouseenter",()=>this.pause()),this.listen(this,"mouseleave",()=>{this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"focusin",()=>this.pause()),this.listen(this,"focusout",t=>{!this.contains(t.relatedTarget)&&this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"touchstart",()=>this.pause(),{passive:!0})}#v(){let t=this.getAttribute("persist");if(!t)return null;try{let e=localStorage.getItem(`carousel:${t}`);return e!==null?Number(e):null}catch{return null}}#b(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#g(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",ii);function Bn(i,t,e){"role"in ElementInternals.prototype?t.role=e:i.setAttribute("role",e)}var bo=0,si=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#o=!1;#c="";#f="";#h="";#p;#u;#l=[];constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}get#m(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#t=t;let e=this.querySelector("ul, ol");if(!e)return!1;if(this.#i=e,this.#m){let o=this.querySelector(":scope > .tags-input-area");if(!o){o=document.createElement("div"),o.className="tags-input-area";let h=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(o,h)}this.#p=o,this.#t.parentNode!==this.#p&&this.#p.appendChild(this.#t);let c=this.querySelector(":scope > [data-combobox-live]");c||(c=document.createElement("div"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),c.setAttribute("data-combobox-live",""),c.className="visually-hidden",this.appendChild(c)),this.#u=c}let s=this.getAttribute("placeholder");s&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",s);let n=`cb${++bo}`;this.#i.id||(this.#i.id=`combobox-listbox-${n}`),Bn(this.#t,this.#e,"combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#i.id),this.#t.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#m&&this.#i.setAttribute("aria-multiselectable","true");let r=this.#m?this.#p:this.#t;r.id||(r.id=`combobox-anchor-${n}`);let a=this.querySelector(":scope > pop-over[data-combobox-host]");if(a?this.#s=a:(this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-combobox-host",""),this.#s.id=`combobox-pop-${n}`,this.#s.dataset.mode="manual",this.#s.dataset.position="bottom-start",this.#s.dataset.anchor=r.id,this.#s.appendChild(this.#i),this.appendChild(this.#s)),this.#s.dataset.anchor=r.id,this.#i.parentElement!==this.#s&&this.#s.appendChild(this.#i),this.#d(),!this.#m){let o=this.getAttribute("value");o&&this.#T(o,!1),this.#h=this.#c}return this.listen(this.#t,"input",this.#g),this.listen(this.#t,"keydown",this.#C),this.listen(this.#t,"focus",this.#_),this.listen(this.#t,"click",this.#M),this.listen(this.#i,"click",this.#S),this.listen(this.#i,"pointerdown",this.#B),this.listen(document,"click",this.#q),this.listen(this.#s,"pop-over:hide",this.#x),this.#A(),this.#L(),this.#E(),!0}teardown(){}#d(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,e)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${e}`)}),this.#n=[...this.#r]}#y(t,e){if(this.#l.some(o=>o.value===t))return;let s=this.#v();if(s&&this.#l.length>=s)return;this.#l.push({value:t,label:e});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=e+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${e}`),r.innerHTML="&times;",r.addEventListener("click",o=>{o.stopPropagation(),this.#w(t)}),n.appendChild(r),this.#p.insertBefore(n,this.#t);let a=this.#r.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#b(`${e} added`),this.#t.value="",this.#k(""),this.#A(),this.#L(),this.#H(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#E())}#w(t){let e=this.#l.findIndex(o=>o.value===t);if(e===-1)return;let s=this.#l.splice(e,1)[0],n=this.#p.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#r.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#b(`${s.label} removed`),this.#v()&&this.#t.disabled&&(this.#t.disabled=!1),this.#k(this.#t.value.trim()),this.#A(),this.#L(),this.#H(),this.#t.focus()}#v(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#b(t){this.#u&&(this.#u.textContent="",requestAnimationFrame(()=>{this.#u.textContent=t}))}#g=()=>{let t=this.#t.value.trim();if(!this.#m&&this.#c){let e=this.#i.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),this.#c="",this.#f="",this.removeAttribute("value"),this.#A(),this.#L()}this.#k(t),this.#N()};#C=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a-1);break;case"Home":this.#o&&(t.preventDefault(),this.#I(0));break;case"End":this.#o&&(t.preventDefault(),this.#I(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#o&&this.#a>=0&&this.#n[this.#a]){let e=this.#n[this.#a];this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e)}else if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){let e=this.#t.value.trim();this.#y(e,e)}break;case"Backspace":if(this.#m&&!this.#t.value&&this.#l.length>0){let e=this.#l[this.#l.length-1];this.#w(e.value)}break;case",":if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let e=this.#t.value.trim();this.#y(e,e)}break;case"Escape":this.#o&&(t.preventDefault(),t.stopPropagation(),this.#E(),this.#t.focus());break;case"Tab":this.#o&&this.#E();break}};#_=()=>{this.#m?(this.#k(this.#t.value.trim()),this.#N()):(this.#t.value||!this.#c)&&(this.#k(this.#t.value.trim()),this.#N())};#M=()=>{this.#o||(this.#k(this.#t.value.trim()),this.#N())};#S=t=>{let e=t.target.closest("li[data-value]");e&&this.#n.includes(e)&&(this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e))};#B=t=>{t.preventDefault()};#q=t=>{this.#o&&!this.contains(t.target)&&this.#E()};#k(t){let e=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#m?new Set(this.#l.map(r=>r.value)):null;this.#n=[],this.#r.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?e==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#O(),this.setState("no-matches",this.#n.length===0)}#I(t){if(this.#n.length===0)return;t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#a>=0&&this.#n[this.#a]&&this.#n[this.#a].removeAttribute("data-active"),this.#a=t;let e=this.#n[t];e.setAttribute("data-active",""),e.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",e.id)}#O(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t,e="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();this.#c!==s&&(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#c=s,this.#f=n,this.#t.value=n,this.setAttribute("value",s),this.#A(),this.#L(),this.#E(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:e}})))}#T(t,e=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(e?this.#R(n,s):(n.setAttribute("aria-selected","true"),this.#c=t,this.#f=n.textContent.trim(),this.#t.value=this.#f,this.setAttribute("value",t)))}#N(){this.#o||(this.#o=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#E(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#x=()=>{this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#A(){if(this.#m)if(this.#l.length>0){let t=new FormData,e=this.getAttribute("name")||"";for(let s of this.#l)t.append(e,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#c?this.#e.setFormValue(this.#c,this.#f):this.#e.setFormValue(null)}#L(){this.hasAttribute("required")?this.#m?this.#l.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#c?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({})}#H(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#l.map(t=>t.value),labels:this.#l.map(t=>t.label)}}))}formResetCallback(){this.#m?(this.#p.querySelectorAll(".tag").forEach(t=>t.remove()),this.#l=[],this.#t.value="",this.#t.disabled=!1):(this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value")),this.#r.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#n=[...this.#r],this.#a=-1,this.#O(),this.#E(),!this.#m&&this.#h&&this.#T(this.#h,!1),this.#A(),this.#L()}formStateRestoreCallback(t){t&&(this.#m||(this.#T(t,!1),this.#A(),this.#L()))}get value(){return this.#c}set value(t){t?this.#T(t):(this.#r.forEach(e=>e.setAttribute("aria-selected","false")),this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value"),this.#A(),this.#L())}get label(){return this.#f}get values(){return this.#l.map(t=>t.value)}get labels(){return this.#l.map(t=>t.label)}static get observedAttributes(){return["value"]}attributeChangedCallback(t,e,s){t==="value"&&this.#t&&s!==this.#c&&s&&(this.#T(s,!1),this.#A(),this.#L())}};b("combo-box",si);function go(){try{let i=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return i.hourCycle==="h12"||i.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function $(i){return String(i).padStart(2,"0")}function ht(i){if(!i)return null;let t=i.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function Tt(i,t,e,s){return s?`${$(i)}:${$(t)}:${$(e)}`:`${$(i)}:${$(t)}`}function vo(i,t,e,s,n){if(n==="12h"){let r=i>=12?"PM":"AM",a=i%12||12;return s?`${a}:${$(t)}:${$(e)} ${r}`:`${a}:${$(t)} ${r}`}return Tt(i,t,e,s)}function Pn(i){let t=i.trim();if(!t)return null;let e=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;e&&(s=e[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,e.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let h=a;if(s){if(h<1||h>12)return null;s==="AM"?h=h===12?0:h:h=h===12?12:h+12}else if(h<0||h>23)return null;return{h,m:o,s:c}}function yo(i,t,e){return i>e?t:i<t?e:i}var ni=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#o;#c;#f;#h=0;#p=0;#u=0;#l="AM";#m=null;#d=null;#y=60;#w;#v=0;#b=!1;#g;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#y=Number(this.#t.getAttribute("step"))||60,this.#f=this.#y<60,this.#m=ht(this.#t.getAttribute("min")),this.#d=ht(this.#t.getAttribute("max")),this.#c=this.getAttribute("data-format")||go();let t=ht(this.#t.value);return t&&(this.#h=t.h,this.#p=t.m,this.#u=t.s),this.#w=this.#t.value,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#C(),this.#_(),this.#H(),this.#F(),this.#P(),this.#V(),this.listen(document,"click",this.#k),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}#C(){this.#s=document.createElement("div"),this.#s.className="time-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="time-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","listbox"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a time\u2026"),this.#s.appendChild(this.#i),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label","Toggle time spinner"),this.#r.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#r.appendChild(t),this.#s.appendChild(this.#r),this.appendChild(this.#s),this.listen(this.#r,"click",e=>{e.stopPropagation(),this.#b?this.#q():this.#B(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"keydown",this.#I),this.listen(this.#i,"blur",this.#O)}#_(){this.#g=`tp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="time-panel",this.#n.id=this.#g,this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Time spinners"),this.#i.setAttribute("aria-controls",this.#g);let t=this.#c==="12h"?1:0,e=this.#c==="12h"?12:23,s=this.#M("Hours",t,e,1);this.#n.appendChild(s.el),this.#a.push(s),this.#n.appendChild(this.#S());let n=this.#y>=60?Math.max(1,Math.round(this.#y/60)):1,r=this.#M("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#f){this.#n.appendChild(this.#S());let a=this.#M("Seconds",0,59,this.#y);this.#n.appendChild(a.el),this.#a.push(a)}this.#c==="12h"&&(this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="period-toggle",this.#o.setAttribute("aria-label","Toggle AM/PM"),this.#o.textContent=this.#l,this.#n.appendChild(this.#o),this.listen(this.#o,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#o.textContent=this.#l,this.#h=this.#$(this.#D(),this.#l),this.#L()}),this.listen(this.#o,"keydown",a=>{let o=a;o.key==="ArrowLeft"&&(o.preventDefault(),this.#z(this.#a.length-1)),o.key==="Escape"&&(o.preventDefault(),this.#q(),this.#i.focus())})),this.appendChild(this.#n)}#M(t,e,s,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(e)),r.setAttribute("aria-valuemax",String(s)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="&#x25B2;";let o=document.createElement("span");o.className="time-value";let c=document.createElement("button");c.type="button",c.className="time-dec",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.innerHTML="&#x25BC;",r.appendChild(a),r.appendChild(o),r.appendChild(c);let h={el:r,valueEl:o,label:t,min:e,max:s,step:n};return this.listen(a,"click",()=>{this.#x(h,n)}),this.listen(c,"click",()=>{this.#x(h,-n)}),this.listen(r,"keydown",l=>{this.#R(l,h)}),this.listen(r,"focus",()=>{this.#v=this.#a.indexOf(h)}),h}#S(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#B(){this.#b||(this.#b=!0,this.#n.setAttribute("data-open",""),this.#i.setAttribute("aria-expanded","true"))}#q(){this.#b&&(this.#b=!1,this.#n.removeAttribute("data-open"),this.#i.setAttribute("aria-expanded","false"))}#k=t=>{this.#b&&!this.contains(t.target)&&this.#q()};#I=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let e=Pn(this.#i.value);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()),this.#F(),this.#b&&this.#q();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#B(),requestAnimationFrame(()=>this.#z(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#q(),this.#F();return;case"Tab":this.#b&&this.#q();return}};#O=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let s=Pn(e);s&&(this.#h=s.h,this.#p=s.m,this.#u=s.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u}})))}this.#F(),this.#b&&this.#q(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#R=(t,e)=>{let s=this.#a.indexOf(e);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(e,e.step);break;case"ArrowDown":t.preventDefault(),this.#x(e,-e.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#o&&this.#o.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#x(e,e.step*(e.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(e,-e.step*(e.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#A(e,e.min);break;case"End":t.preventDefault(),this.#A(e,e.max);break;case"Escape":t.preventDefault(),this.#q(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#E(t.key,e))}};#T="";#N=0;#E(t,e){clearTimeout(this.#N),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>e.max){let n=Math.min(Math.max(s,e.min),e.max);this.#A(e,n),this.#T=""}else this.#N=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,e.min),e.max);this.#A(e,r),this.#T=""},800)}#x(t,e){let s;t.label==="Hours"?s=this.#c==="12h"?this.#D():this.#h:t.label==="Minutes"?s=this.#p:s=this.#u;let n=yo(s+e,t.min,t.max);this.#A(t,n)}#A(t,e){t.label==="Hours"?this.#c==="12h"?this.#h=this.#$(e,this.#l):this.#h=e:t.label==="Minutes"?this.#p=e:this.#u=e,this.#L()}#L(t="internal"){this.#H(),this.#F(),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u,source:t}}))}#H(){let t=this.#c==="12h"?this.#D():this.#h;this.#a[0].valueEl.textContent=$(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#c==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=$(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#f&&this.#a[2]&&(this.#a[2].valueEl.textContent=$(this.#u),this.#a[2].el.setAttribute("aria-valuenow",String(this.#u))),this.#o&&(this.#o.textContent=this.#l)}#F(){this.#h!==void 0&&(this.#i.value=vo(this.#h,this.#p,this.#u,this.#f,this.#c))}#P(){let t=Tt(this.#h,this.#p,this.#u,this.#f);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#V(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#i||this);return}this.#e.setValidity({})}#$(t,e){return e==="AM"?t===12?0:t:t===12?12:t+12}#D(){if(this.#c==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=ht(this.#w);t?(this.#h=t.h,this.#p=t.m,this.#u=t.s):(this.#h=0,this.#p=0,this.#u=0),this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()}formStateRestoreCallback(t){if(!t)return;let e=ht(t);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L())}get value(){return Tt(this.#h,this.#p,this.#u,this.#f)}set value(t){let e=ht(t);e&&(e.h===this.#h&&e.m===this.#p&&e.s===this.#u||(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L("api")))}};b("time-picker",ni);var Qt="popover"in HTMLElement.prototype;var wo=["Su","Mo","Tu","We","Th","Fr","Sa"],Eo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],oi=["january","february","march","april","may","june","july","august","september","october","november","december"];function _(i){let t=i.getFullYear(),e=String(i.getMonth()+1).padStart(2,"0"),s=String(i.getDate()).padStart(2,"0");return`${t}-${e}-${s}`}function q(i){if(!i)return null;let[t,e,s]=i.split("-").map(Number);return new Date(t,e-1,s)}function te(i,t){return new Date(i,t+1,0).getDate()}function Ao(){try{let i=new Intl.Locale(navigator.language);if(i.weekInfo)return i.weekInfo.firstDay%7}catch{}return 0}function So(i){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(i)}catch{return _(i)}}function ee(i,t){return i&&t&&i.getFullYear()===t.getFullYear()&&i.getMonth()===t.getMonth()&&i.getDate()===t.getDate()}function xo(){let i=new Map;oi.forEach((t,e)=>{i.set(t,e),i.set(t.slice(0,3),e)});try{for(let t=0;t<12;t++){let e=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),s=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");i.set(e,t),i.set(s,t)}}catch{}return i}var ri=xo();function ai(i){let t=i.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=q(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=q(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let e=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(e);if(s){let a=ri.get(s[1].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[2]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let n=/^(\d{1,2})\s+([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(n),s){let a=ri.get(s[2].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[1]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let r=/^([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(r),s){let a=ri.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var ci=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h=!1;#p=!1;#u=null;#l=null;#m=new Date().getFullYear();#d=new Date().getMonth();#y=null;#w=null;#v=new Map;#b=new Map;#g=null;#C=0;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#y=q(this.#t.getAttribute("min")),this.#w=q(this.#t.getAttribute("max")),this.#C=Ao();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#v.set(r,a||"")});let e=this.getAttribute("data-highlight-dates");e&&e.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||"")}),this.#u=q(this.#t.value),this.#g=this.#t.value;let s=new Date;return this.#w&&s>this.#w&&(s=this.#w),this.#y&&s<this.#y&&(s=this.#y),this.#m=this.#u?this.#u.getFullYear():s.getFullYear(),this.#d=this.#u?this.#u.getMonth():s.getMonth(),this.#l=this.#u||s,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#T(),this.#D(),this.#z(),this.#p=Qt,this.#p&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#P),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}teardown(){window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}#_(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="date-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a date\u2026"),this.#r.appendChild(this.#i),this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="date-trigger-icon",this.#s.setAttribute("aria-label","Toggle calendar"),this.#s.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#s.appendChild(t),this.#r.appendChild(this.#s),this.appendChild(this.#r),this.listen(this.#s,"click",e=>{e.stopPropagation(),this.#h?this.#E():this.#N(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#L),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#F)}#M(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="calendar",this.#n.id=this.#a,this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-modal","false"),this.#n.setAttribute("aria-label","Choose date"),this.#n.hidden=!0,this.#i.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let e=document.createElement("button");e.type="button",e.className="calendar-nav",e.setAttribute("aria-label","Previous month");let s=document.createElement("icon-wc");s.setAttribute("name","chevron-left"),s.setAttribute("size","sm"),s.setAttribute("aria-hidden","true"),e.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#f=document.createElement("select"),this.#f.className="calendar-year",this.#f.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#c),n.appendChild(this.#f);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(e),t.appendChild(n),t.appendChild(r),this.#n.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),h=document.createElement("tr");for(let l=0;l<7;l++){let d=(this.#C+l)%7,u=document.createElement("th");u.setAttribute("abbr",Eo[d]),u.setAttribute("scope","col"),u.textContent=wo[d],h.appendChild(u)}c.appendChild(h),o.appendChild(c),this.#o=document.createElement("tbody"),o.appendChild(this.#o),this.#n.appendChild(o),this.appendChild(this.#n),this.#S(),this.listen(e,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#f,"change",()=>{this.#m=Number(this.#f.value);let l=te(this.#m,this.#d),d=Math.min(this.#l?.getDate()??1,l);this.#l=new Date(this.#m,this.#d,d),this.#S()}),this.listen(this.#o,"click",this.#V),this.listen(this.#n,"keydown",this.#$)}#S(){try{this.#c.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#m,this.#d,1))}catch{this.#c.textContent=oi[this.#d].charAt(0).toUpperCase()+oi[this.#d].slice(1)}this.#f.querySelector(`option[value="${this.#m}"]`)||this.#k(),this.#f.value=String(this.#m),this.#o.innerHTML="";let t=te(this.#m,this.#d),s=(new Date(this.#m,this.#d,1).getDay()-this.#C+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<s;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#m,this.#d,o),h=_(c),l=document.createElement("td"),d=document.createElement("button");d.type="button",d.setAttribute("data-date",h),d.textContent=String(o),ee(c,n)&&d.setAttribute("aria-current","date"),ee(c,this.#u)&&d.setAttribute("aria-selected","true");let u=this.#q(c,h);if(u.disabled&&(d.setAttribute("aria-disabled","true"),d.setAttribute("disabled",""),u.reason&&d.setAttribute("data-disabled-reason",u.reason)),this.#b.has(h)){let f=this.#b.get(h);d.setAttribute("data-highlight",f||"")}ee(c,this.#l)?(d.setAttribute("tabindex","0"),ee(c,this.#u)||d.setAttribute("data-focused","")):d.setAttribute("tabindex","-1"),l.appendChild(d),r.appendChild(l),(s+o)%7===0&&(this.#o.appendChild(r),r=document.createElement("tr"))}let a=(s+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#o.appendChild(r)}}#B(t,e){return this.#q(t,e).disabled}#q(t,e){return this.#v.has(e)?{disabled:!0,reason:this.#v.get(e)}:this.#y&&t<this.#y?{disabled:!0,reason:null}:this.#w&&t>this.#w?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#k(){this.#f.innerHTML="";let t=new Date().getFullYear(),e=this.#y?this.#y.getFullYear():t-100,s=this.#w?this.#w.getFullYear():t+10;for(let n=e;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#f.appendChild(r)}}#I(t){this.#d+=t,this.#d>11?(this.#d=0,this.#m++):this.#d<0&&(this.#d=11,this.#m--);let e=te(this.#m,this.#d),s=Math.min(this.#l?.getDate()??1,e);this.#l=new Date(this.#m,this.#d,s),this.#S(),this.#R(this.#l)}#O(t,e="internal"){let s=_(t);this.#B(t,s)||this.#u&&_(this.#u)===s||(this.#u=t,this.#l=t,this.#T(),this.#D(),this.#z(),this.#S(),this.#E(),this.#i.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:s,date:new Date(t),source:e}})))}#R(t){let e=_(t),s=this.#o.querySelector(`[data-date="${e}"]`);s&&(this.#o.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#u?this.#i.value=So(this.#u):this.#i.value=""}#N(){if(!this.#h){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#n.hidden=!1,this.#l&&(this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth()),this.#S(),this.#p){try{this.#n.showPopover()}catch{}this.#x(),window.addEventListener("scroll",this.#A,{capture:!0,passive:!0}),window.addEventListener("resize",this.#A,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#E(){if(this.#h){if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#n.hidden=!0,this.#p){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#x(){if(!this.#p)return;let t=this.#r.getBoundingClientRect(),e=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,h;o<e.height&&c>o?(h=t.top-e.height-s,this.#n.dataset.placement="top"):(h=t.bottom+s,delete this.#n.dataset.placement);let l=t.left;l+e.width>a-n&&(l=a-e.width-n),l<n&&(l=n),this.#n.style.setProperty("--calendar-top",`${h}px`),this.#n.style.setProperty("--calendar-left",`${l}px`)}#A=()=>{this.#h&&this.#x()};#L=()=>{let t=this.#i.value,{date:e,partial:s}=ai(t);if(e)this.#l=e,this.#m=e.getFullYear(),this.#d=e.getMonth(),this.#S();else if(s){this.#m=s.year,this.#d=s.month;let n=te(s.year,s.month),r=Math.min(this.#l?.getDate()??1,n);this.#l=new Date(s.year,s.month,r),this.#S()}!this.#h&&t.length>0&&this.#N()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:e}=ai(this.#i.value);e&&!this.#B(e,_(e))&&this.#O(e);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#N(),requestAnimationFrame(()=>this.#R(this.#l));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#h&&this.#E(),this.#T();return;case"Tab":this.#h&&this.#E();return}};#F=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let{date:s}=ai(e);s&&!this.#B(s,_(s))&&(this.#u=s,this.#l=s,this.#D(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:_(s),date:new Date(s)}})))}this.#T(),this.#h&&this.#E(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#P=t=>{this.#h&&!this.contains(t.target)&&this.#E()};#V=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.hasAttribute("disabled"))return;let n=q(s.getAttribute("data-date"));n&&this.#O(n)};#$=t=>{if(t.key==="Tab"){this.#E();return}let e=this.#l;if(!e)return;let s;switch(t.key){case"ArrowRight":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);break;case"ArrowLeft":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);break;case"ArrowDown":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+7);break;case"ArrowUp":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(e.getFullYear()+1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()+1,e.getDate());break;case"PageUp":t.shiftKey?s=new Date(e.getFullYear()-1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()-1,e.getDate());break;case"Home":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+this.#C);break;case"End":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-e.getDay()+this.#C));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#O(e);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#E(),this.#i.focus();return;default:return}t.preventDefault(),t.stopPropagation(),s&&(this.#y&&s<this.#y&&(s=this.#y),this.#w&&s>this.#w&&(s=this.#w),this.#l=s,(s.getMonth()!==this.#d||s.getFullYear()!==this.#m)&&(this.#d=s.getMonth(),this.#m=s.getFullYear(),this.#S()),this.#R(s))};#D(){let t=this.#u?_(this.#u):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#z(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#u?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#i||this):this.#e.setValidity({})}formResetCallback(){this.#u=q(this.#g);let t=new Date;this.#l=this.#u||t,this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth(),this.#T(),this.#D(),this.#z(),this.#h&&this.#S()}formStateRestoreCallback(t){t&&(this.#u=q(t),this.#u&&(this.#l=this.#u,this.#m=this.#u.getFullYear(),this.#d=this.#u.getMonth(),this.#T(),this.#D(),this.#z()))}get value(){return this.#u?_(this.#u):""}set value(t){let e=q(t);e&&this.#O(e,"api")}get min(){return this.#y?_(this.#y):""}set min(t){this.#y=t?q(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#w?_(this.#w):""}set max(t){this.#w=t?q(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};b("date-picker",ci);function dt(i,t,e){t/=100,e/=100;let s=a=>(a+i/30)%12,n=t*Math.min(e,1-e),r=a=>e-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function ie(i,t,e){i/=255,t/=255,e/=255;let s=Math.max(i,t,e),n=Math.min(i,t,e),r=(s+n)/2,a=0,o=0;if(s!==n){let c=s-n;switch(o=r>.5?c/(2-s-n):c/(s+n),s){case i:a=((t-e)/c+(t<e?6:0))/6;break;case t:a=((e-i)/c+2)/6;break;case e:a=((i-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function Co(i){i=i.replace(/^#/,""),i.length===3&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);let t=parseInt(i,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function ko(i,t,e){return"#"+[i,t,e].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function Y(i){let{r:t,g:e,b:s}=Co(i);return ie(t,e,s)}function G(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return ko(s,n,r)}function T(i,t,e){return Math.max(t,Math.min(e,i))}function li(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function hi(i){let t=i<=.0031308?i*12.92:1.055*Math.pow(i,.4166666666666667)-.055;return Math.round(T(t,0,1)*255)}function To(i,t,e){let s=li(i),n=li(t),r=li(e),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,h=Math.cbrt(a),l=Math.cbrt(o),d=Math.cbrt(c),u=.2104542553*h+.793617785*l-.0040720468*d,f=1.9779984951*h-2.428592205*l+.4505937099*d,v=.0259040371*h+.7827717662*l-.808675766*d,p=Math.sqrt(f*f+v*v),m=Math.atan2(v,f)*180/Math.PI;return m<0&&(m+=360),p<1e-4&&(m=0),{L:u,C:p,H:m}}function Lo(i,t,e){let s=e*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=i+.3963377774*n+.2158037573*r,o=i-.1055613458*n-.0638541728*r,c=i-.0894841775*n-1.291485548*r,h=a**3,l=o**3,d=c**3,u=4.0767416621*h-3.3077115913*l+.2309699292*d,f=-1.2684380046*h+2.6097574011*l-.3413193965*d,v=-.0041960863*h-.7034186147*l+1.707614701*d;return{r:hi(u),g:hi(f),b:hi(v)}}function di(i,t,e){let s=dt(i,t,e);return To(s.r,s.g,s.b)}function Fn(i,t,e){let{r:s,g:n,b:r}=Lo(i,t,e);return ie(s,n,r)}function Mo(i,t,e){return G(i,t,e)}function No(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return`rgb(${s} ${n} ${r})`}function Do(i,t,e){return`hsl(${i}deg ${t}% ${e}%)`}function _o(i,t,e){let{L:s,C:n,H:r}=di(i,t,e);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function Rn(i,t,e,s){switch(i){case"rgb":return No(t,e,s);case"hsl":return Do(t,e,s);case"oklch":return _o(t,e,s);default:return Mo(t,e,s)}}var ut=["hex","rgb","hsl","oklch"],Io="hex",ui=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h;#p={};#u=Io;#l;#m;#d;#y=!1;#w=!1;#v=0;#b=100;#g=50;#C;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;let t=this.getAttribute("format");t&&ut.includes(t)&&(this.#u=t);let e=this.#t.value||"#000000";this.#C=e;let s=Y(e);return this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#D(),this.#j(),this.#w=Qt,this.#w&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#G),(this.#t.disabled||this.hasAttribute("disabled"))&&this.setAttribute("data-disabled",""),!0}teardown(){window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}#_(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("span"),this.#s.className="color-swatch",this.#r=document.createElement("span"),this.#r.className="color-hex",this.#i.appendChild(this.#s),this.#i.appendChild(this.#r),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#y?this.#W():this.#z()})}#M(){this.#n=document.createElement("div"),this.#n.className="color-panel",this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("tabindex","0"),this.#o=document.createElement("div"),this.#o.className="color-area-thumb",this.#a.appendChild(this.#o),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#c.appendChild(this.#f),t.appendChild(this.#c),this.#n.appendChild(t);let e=document.createElement("div");e.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#h=document.createElement("select"),this.#h.className="color-format-select";for(let o of ut){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#h.appendChild(c)}this.#h.value=this.#u,s.appendChild(n),s.appendChild(this.#h),e.appendChild(s),this.#n.appendChild(e),this.listen(this.#h,"change",this.#q),this.#p.hex=this.#S("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#p.rgb=this.#S("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#p.hsl=this.#S("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#p.oklch=this.#S("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of ut)this.#n.appendChild(this.#p[o].wrapper);this.#B();let r=this.querySelector(":scope > datalist");if(r){this.#l=document.createElement("div"),this.#l.className="color-swatches",this.#l.setAttribute("role","listbox"),this.#l.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("role","option"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#l.appendChild(c)}this.#n.appendChild(this.#l),this.listen(this.#l,"click",this.#F)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-eyedropper",this.#m.setAttribute("aria-label","Pick color from screen"),this.#m.textContent="\u{1F4A7}",a.appendChild(this.#m),this.listen(this.#m,"click",this.#P)),this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-copy",this.#d.setAttribute("aria-label","Copy hex value"),this.#d.textContent="Copy",a.appendChild(this.#d),this.listen(this.#d,"click",this.#V),this.#n.appendChild(a),this.appendChild(this.#n),this.listen(this.#a,"pointerdown",this.#k),this.listen(this.#a,"keydown",this.#O),this.listen(this.#c,"pointerdown",this.#R),this.listen(this.#c,"keydown",this.#N);for(let o of ut){let c=o==="hex"?this.#x:o==="rgb"?this.#A:o==="hsl"?this.#L:this.#H;for(let{el:h}of this.#p[o].inputs)this.listen(h,"change",c)}}#S(t,e){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of e){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#B(){for(let t of ut)this.#p[t].wrapper.hidden=t!==this.#u;this.#d&&this.#d.setAttribute("aria-label",`Copy ${this.#u.toUpperCase()} value`)}#q=()=>{let t=this.#h.value;ut.includes(t)&&(this.#u=t,this.#B(),this.#D())};#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let e=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",e),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",e),this.#a.addEventListener("pointerup",s)};#I(t){let e=this.#a.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1),n=T((t.clientY-e.top)/e.height,0,1);this.#b=Math.round(s*100),this.#g=Math.round((1-n)*100),this.#$()}#O=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#b=T(this.#b+e,0,100);break;case"ArrowLeft":t.preventDefault(),this.#b=T(this.#b-e,0,100);break;case"ArrowUp":t.preventDefault(),this.#g=T(this.#g+e,0,100);break;case"ArrowDown":t.preventDefault(),this.#g=T(this.#g-e,0,100);break;default:return}this.#$()};#R=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#T(t);let e=n=>this.#T(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",e),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",e),this.#c.addEventListener("pointerup",s)};#T(t){let e=this.#c.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1);this.#v=Math.round(s*360),this.#$()}#N=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+e)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-e+361)%361;break;default:return}this.#$()};#E(t,e){return this.#p[t].inputs.find(s=>s.channel===e)?.el}#x=()=>{let t=this.#E("hex","hex");if(!t)return;let e=t.value.trim();if(e.startsWith("#")||(e="#"+e),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){let s=Y(e);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}};#A=()=>{let t=T(Number(this.#E("rgb","r").value)||0,0,255),e=T(Number(this.#E("rgb","g").value)||0,0,255),s=T(Number(this.#E("rgb","b").value)||0,0,255),n=ie(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#L=()=>{let t=T(Number(this.#E("hsl","h").value)||0,0,360)%361,e=T(Number(this.#E("hsl","s").value)||0,0,100),s=T(Number(this.#E("hsl","l").value)||0,0,100);this.#v=t,this.#b=e,this.#g=s,this.#$()};#H=()=>{let t=T(Number(this.#E("oklch","oL").value)||0,0,100)/100,e=T(Number(this.#E("oklch","oC").value)||0,0,.4),s=T(Number(this.#E("oklch","oH").value)||0,0,360),n=Fn(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#F=t=>{let e=t.target.closest("button[data-color]");if(!e)return;let s=e.getAttribute("data-color"),n=Y(s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#P=async()=>{try{let e=await new window.EyeDropper().open(),s=Y(e.sRGBHex);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}catch{}};#V=()=>{let t=Rn(this.#u,this.#v,this.#b,this.#g);St(t,{button:this.#d,announceMessage:"Color copied"})};#$(t="internal"){this.#D(),this.#j();let e=G(this.#v,this.#b,this.#g),s=dt(this.#v,this.#b,this.#g);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:e,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:this.#v,s:this.#b,l:this.#g},source:t}}))}#D(){let t=G(this.#v,this.#b,this.#g),e=dt(this.#v,this.#b,this.#g),s=G(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#o.style.insetInlineStart=`${this.#b}%`,this.#o.style.insetBlockStart=`${100-this.#g}%`,this.#o.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#b}%, Lightness ${this.#g}%`),this.#f.style.insetInlineStart=`${this.#v/360*100}%`,this.#c.setAttribute("aria-valuenow",String(this.#v)),this.#c.setAttribute("aria-valuetext",`Hue ${this.#v}\xB0`);let n=(a,o,c)=>{let h=this.#E(a,o);h&&(h.value=String(c))};n("hex","hex",t),n("rgb","r",e.r),n("rgb","g",e.g),n("rgb","b",e.b),n("hsl","h",this.#v),n("hsl","s",this.#b),n("hsl","l",this.#g);let r=di(this.#v,this.#b,this.#g);n("oklch","oL",(r.L*100).toFixed(1)),n("oklch","oC",r.C.toFixed(3)),n("oklch","oH",r.H.toFixed(1))}#z(){if(!this.#y){if(this.#y=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#w){this.#Y();try{this.#n.showPopover()}catch{}window.addEventListener("scroll",this.#U,{capture:!0,passive:!0}),window.addEventListener("resize",this.#U,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#W(){if(this.#y){if(this.#y=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#w){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}}#Y(){if(!this.#w)return;let t=this.#i.getBoundingClientRect();this.#n.style.setProperty("--panel-top",`${t.bottom+4}px`),this.#n.style.setProperty("--panel-left",`${t.left}px`)}#U=()=>{this.#y&&this.#Y()};#G=t=>{this.#y&&!this.contains(t.target)&&this.#W()};#j(){let t=G(this.#v,this.#b,this.#g);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){let t=Y(this.#C);this.#v=t.h,this.#b=t.s,this.#g=t.l,this.#D(),this.#j()}formStateRestoreCallback(t){if(!t)return;let e=Y(t);this.#v=e.h,this.#b=e.s,this.#g=e.l,this.#D(),this.#j()}get value(){return G(this.#v,this.#b,this.#g)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let e=G(this.#v,this.#b,this.#g).toLowerCase(),s=t.toLowerCase();if(e===s||e===s.toLowerCase())return;let n=Y(t);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$("api")}};b("color-picker",ui);var $o='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',qo='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function Oo(i){if(!i)return[];let t=i.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(e=>{let s=e.trim();return{value:s,label:s}})}function Bo(i){return i?i.split(",").map(t=>t.trim()).filter(Boolean):[]}function Po(i){let t=Math.max(0,Math.round(i)),e=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return e>0?`${e}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Fo(i,t){let e=Number(i)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(e);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${e<0?"-":""}${a.format(r)} ${s[n]}`}function Ro(){return document.documentElement.lang||void 0}function fi(i){let t=String(i),e=t.indexOf(".");return e<0?0:t.length-e-1}var pi=class extends g{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#o;#c;#f="";#h=!1;#p=!1;#u;#l;#m;#d;#y;#w;#v;#b;#g;#C=0;#_=0;#M=!1;#S=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#B(),this.#q(),this.#O();let t=this.getAttribute("value");this.#m=t,this.#P(t??this.#I(),"init")}attributeChangedCallback(t,e,s){!this.isConnected||!this.#d||(t==="value"?this.#P(s??this.#I(),"attr"):(t==="disabled"||t==="readonly")&&this.#E())}#B(){this.hasAttribute("data-options")?this.#t="enum":this.hasAttribute("data-values")?this.#t="token":this.hasAttribute("data-format")||this.hasAttribute("data-suffix")?this.#t="formatted":(this.#t="numeric",console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/concepts/numeric-inputs/'))}#q(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#s=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#r=Number(this.getAttribute("data-step"))||1,this.#n=Bo(this.getAttribute("data-values")),this.#a=Oo(this.getAttribute("data-options")),this.#o=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#c=this.getAttribute("data-currency")||"USD",this.#f=this.getAttribute("data-suffix")||"",this.#h=this.hasAttribute("data-show-label"),this.#p=this.hasAttribute("data-accelerate"),this.#u=Ro(),this.#g=this.#k()}#k(){if(!this.#o)return null;let t=fi(this.#r);return this.#o==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#o==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#c}):this.#o==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#t==="enum"?this.#a[0]?.value??"":this.#t==="token"?this.#n[0]??"":"0"}#O(){this.replaceChildren(),this.#v=document.createElement("button"),this.#v.type="button",this.#v.className="stepper-dec",this.#v.setAttribute("aria-label","Decrease"),this.#v.setAttribute("tabindex","-1"),this.#v.innerHTML=$o,this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="stepper-inc",this.#b.setAttribute("aria-label","Increase"),this.#b.setAttribute("tabindex","-1"),this.#b.innerHTML=qo,this.#d=document.createElement("span"),this.#d.className="stepper-value",this.#d.setAttribute("role","spinbutton"),this.#d.setAttribute("tabindex","0"),this.#y=document.createElement("span"),this.#y.className="stepper-value-display",this.#d.appendChild(this.#y),this.#w=new Set;for(let t of this.#z())this.#W(t);this.appendChild(this.#v),this.appendChild(this.#d),this.appendChild(this.#b),this.#R(this.#v,-1),this.#R(this.#b,1),this.listen(this.#d,"keydown",this.#T),this.#E()}#R(t,e){if(this.listen(t,"click",n=>{if(this.#S){this.#S=!1,n.preventDefault();return}this.#x(e,1)}),!this.#p)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#N()||(this.#M=!1,this.#C=window.setTimeout(()=>{this.#M=!0,this.#_=window.setInterval(()=>this.#x(e,1),100),this.#C=window.setTimeout(()=>{window.clearInterval(this.#_),this.#_=window.setInterval(()=>this.#x(e,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#C),window.clearInterval(this.#_),this.#C=0,this.#_=0,this.#M&&(this.#S=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T=t=>{if(!this.#N())switch(t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#x(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#x(-1,1);break;case"PageUp":t.preventDefault(),this.#x(1,10);break;case"PageDown":t.preventDefault(),this.#x(-1,10);break;case"Home":t.preventDefault(),this.#A("min");break;case"End":t.preventDefault(),this.#A("max");break;default:}};#N(){return this.hasAttribute("disabled")||this.hasAttribute("readonly")}#E(){let t=this.hasAttribute("disabled");this.#v.disabled=t,this.#b.disabled=t,this.#d.setAttribute("aria-disabled",String(t)),t?this.#d.removeAttribute("tabindex"):this.#d.setAttribute("tabindex","0")}#x(t,e){if(this.#N())return;let s=this.#L(t,e);s===null||s===this.#l||this.#P(s,"step")}#A(t){if(this.#t==="enum"){let s=t==="min"?0:this.#a.length-1;this.#P(this.#a[s]?.value,"step");return}if(this.#t==="token"){let s=t==="min"?0:this.#n.length-1;this.#P(this.#n[s],"step");return}let e=t==="min"?this.#i===-1/0?this.#l:this.#i:this.#s===1/0?this.#l:this.#s;this.#P(String(e),"step")}#L(t,e){if(this.#t==="enum"){let c=this.#a.findIndex(d=>d.value===this.#l),h=c===-1?0:c,l=Math.min(this.#a.length-1,Math.max(0,h+t*e));return this.#a[l]?.value}if(this.#t==="token"){let h=this.#H(this.#l);h===-1&&(h=this.#F(this.#l));let l=Math.min(this.#n.length-1,Math.max(0,h+t*e));return this.#n[l]}let s=Number(this.#l)||0,n=fi(this.#r),r=s+t*this.#r*e,a=Number(r.toFixed(n)),o=Math.min(this.#s,Math.max(this.#i,a));return String(o)}#H(t){if(t==null)return-1;let e=this.#n.indexOf(String(t));if(e!==-1)return e;let s=Number(t);if(Number.isFinite(s)){let n=this.#n.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#F(t){let e=Number(t);if(!Number.isFinite(e))return 0;let s=0,n=1/0;return this.#n.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-e);c<n&&(n=c,s=a)}),s}#P(t,e){let s=this.#V(t),n=s!==this.#l;this.#l=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#$(),this.#Y(),this.#U(),this.#X(),this.#K(),n&&e!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#V(t){if(t==null)return this.#I();if(this.#t==="enum"){let n=String(t);return this.#a.find(a=>a.value===n)?n:this.#a[0]?.value??""}if(this.#t==="token")return String(t);let e=Number(t);if(!Number.isFinite(e))return String(this.#i===-1/0?0:this.#i);let s=fi(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,e)).toFixed(s)))}#$(){let t=this.#D();this.#y.textContent=t,this.#W(t)}#D(t=this.#l){if(this.#t==="enum")return this.#a.find(s=>s.value===t)?.label??t??"";if(this.#t==="token"){let e=this.#h?String(t).replace(/^--/,""):String(t);return this.#f?`${e}${this.#f}`:e}if(this.#t==="formatted"){let e=Number(t)||0;if(this.#o==="duration")return Po(e);if(this.#o==="bytes")return Fo(e,this.#u);if(this.#g){let s=this.#o==="percent"?e/100:e,n=this.#g.format(s);return this.#f&&this.#o==="number"?`${n}${this.#f}`:n}return this.#f?`${e}${this.#f}`:String(e)}return String(t??"")}#z(){if(this.#t==="enum")return this.#a.map(s=>this.#D(s.value));if(this.#t==="token")return this.#n.map(s=>this.#D(s));let t=new Set,e=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&e(this.#i),this.#s!==1/0&&e(this.#s),e(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)e(n);if(this.#o==="bytes")for(let n of[999,999e3,999e6,999e9])e(n)}return[...t].map(s=>this.#D(String(s)))}#W(t){let e=String(t??"");if(!e||this.#w.has(e))return;this.#w.add(e);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=e,this.#d.appendChild(s)}recomputeWidth(){if(this.#d){this.#d.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#w=new Set;for(let t of this.#z())this.#W(t)}}#Y(){if(this.#t==="enum"){let e=this.#a.findIndex(s=>s.value===this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#a.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}if(this.#t==="token"){let e=this.#H(this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#n.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}let t=Number(this.#l)||0;this.#i!==-1/0?this.#d.setAttribute("aria-valuemin",String(this.#i)):this.#d.removeAttribute("aria-valuemin"),this.#s!==1/0?this.#d.setAttribute("aria-valuemax",String(this.#s)):this.#d.removeAttribute("aria-valuemax"),this.#d.setAttribute("aria-valuenow",String(t)),this.#d.setAttribute("aria-valuetext",this.#D())}#U(){let t=this.#G(),e=this.#j();this.#v.disabled=t||this.hasAttribute("disabled"),this.#b.disabled=e||this.hasAttribute("disabled")}#G(){return this.#t==="enum"?this.#l===this.#a[0]?.value:this.#t==="token"?this.#H(this.#l)===0:this.#i!==-1/0&&Number(this.#l)<=this.#i}#j(){return this.#t==="enum"?this.#l===this.#a[this.#a.length-1]?.value:this.#t==="token"?this.#H(this.#l)===this.#n.length-1:this.#s!==1/0&&Number(this.#l)>=this.#s}#X(){this.#e.setFormValue(String(this.#l??""))}#K(){this.setState("at-min",this.#G()),this.setState("at-max",this.#j())}formResetCallback(){this.#P(this.#m??this.#I(),"reset")}formStateRestoreCallback(t){t!=null&&this.#P(t,"restore")}get displayText(){return this.#y?.textContent??""}get value(){return this.#l==null?"":String(this.#l)}set value(t){String(t)!==String(this.#l)&&this.#P(t,"api")}get form(){return this.#e.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#e.validity}get validationMessage(){return this.#e.validationMessage}checkValidity(){return this.#e.checkValidity()}reportValidity(){return this.#e.reportValidity()}};b("stepper-wc",pi);var Ho=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),mi=class extends g{static observedAttributes=["data-variant","data-live"];#e;setup(){let t=document.createElement("span");for(t.className="status-dot",t.setAttribute("aria-hidden","true"),this.#e=document.createElement("span"),this.#e.className="status-label";this.firstChild;)this.#e.appendChild(this.firstChild);this.appendChild(t),this.appendChild(this.#e),this.#t(),this.#i(),this.#r()}attributeChangedCallback(t,e,s){!this.isConnected||e===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:e}}))):t==="data-live"&&this.#t())}#t(){this.getAttribute("data-live")==="off"?(this.removeAttribute("role"),this.removeAttribute("aria-live")):(this.hasAttribute("role")||this.setAttribute("role","status"),this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"))}#i(){let t=this.getAttribute("data-variant");t&&(Ho.has(t)||this.#s(t)||console.info(`[status-wc] data-variant="${t}" is not a built-in; add a CSS rule (status-wc[data-variant="${t}"] { --status-dot-color: \u2026; }) or use a built-in.`))}#s(t){let e=this.querySelector(".status-dot");if(!e)return!0;let s=getComputedStyle(e).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),e=this.hasAttribute("aria-label");!t&&!e&&console.warn("[status-wc] needs slot text or aria-label for accessibility.")}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};b("status-wc",mi);var Hn=0,bi=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),e=this.querySelector('menu, ul[role="menu"]');if(!t||!e)return!1;this.#e=t,this.#t=e;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Hn}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e?.setAttribute("aria-expanded","false"),this.#t.setAttribute("role","menu"),this.#t.id||(this.#t.id=`ctx-menu-list-${++Hn}`),this.#t.querySelectorAll(":scope > li[data-group]").forEach(n=>{n.setAttribute("role","presentation"),n.classList.add("ctx-group-label")}),this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(n=>!n.disabled&&!n.hasAttribute("data-disabled")),this.#s.forEach(n=>{n.setAttribute("role","menuitem"),n.setAttribute("tabindex","-1"),n.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",this.listen(n,"click",this.#h);let r=n.getAttribute("data-shortcut");if(r){let a=document.createElement("kbd");a.className="ctx-kbd",a.textContent=vn(r),n.appendChild(a);let o=Kt(r,()=>n.click());this.#a.push(o)}}),this.#t.querySelectorAll('li:empty:not([data-group]), [role="separator"], hr').forEach(n=>{n.setAttribute("role","separator")}),this.listen(this.#e,"contextmenu",this.#o),this.listen(this.#t,"keydown",this.#f),this.listen(window,"scroll",this.#u,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#p),!0}teardown(){this.#a.forEach(t=>t()),this.#a=[]}get items(){if(!this.#t)return[];let t=[];for(let e of this.#t.querySelectorAll(":scope > li")){if(e.hasAttribute("data-group")){t.push({group:e.textContent.trim()});continue}if(e.matches(':empty, [role="separator"]')||e.querySelector("hr")){t.push({separator:!0});continue}let s=e.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,shortcut:s.getAttribute("data-shortcut")||void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let e=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of e){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&(a.tagName==="BUTTON"?a.disabled=!0:a.setAttribute("data-disabled","")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:e,source:"property"},bubbles:!0}))}#o=t=>{t.preventDefault(),this.#c(t.clientX,t.clientY)};#c(t,e){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${e}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let s=this.#i.getBoundingClientRect(),n=t+s.width>window.innerWidth?t-s.width:t,r=e+s.height>window.innerHeight?e-s.height:e;this.#i.style.top=`${Math.max(0,r)}px`,this.#i.style.left=`${Math.max(0,n)}px`}),this.#r=-1,this.#l(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#i?.hide(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))}#f=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#l(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#l(this.#r-1);break;case"Home":t.preventDefault(),this.#l(0);break;case"End":t.preventDefault(),this.#l(this.#s.length-1);break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break;case"Tab":this.close();break}};#h=()=>{this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:this.#s[this.#r]}}))};#p=()=>{this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#u=()=>{this.#n&&this.close()};#l(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}get isOpen(){return this.#n}};b("context-menu",bi);var gi=class extends g{#e;#t;#i=null;#s=!1;setup(){if(this.#s)return;let t=this.getAttribute("src");return t?(this.#i===null&&(this.#i=this.innerHTML),this.hasAttribute("lazy")?this.#n():this.#a(t),!0):!1}teardown(){this.#e?.disconnect(),this.#t?.abort()}get src(){return this.getAttribute("src")||""}set src(t){let e=t==null?"":String(t);this.src!==e&&(e?this.setAttribute("src",e):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:e,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,s){t==="src"&&s&&e!==s&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#r()?this.#n():this.#a(s))}#r(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#n(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){this.#e.disconnect();let s=this.getAttribute("src");s&&this.#a(s)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let e=await fetch(t,{signal:this.#t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);let s=await e.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=s:n==="append"?this.insertAdjacentHTML("beforeend",s):n==="prepend"&&this.insertAdjacentHTML("afterbegin",s),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#s=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:s}}))}catch(e){if(e.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#i!==null&&!this.#s&&(this.innerHTML=this.#i),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:e.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",gi);j();var zn="environment",Vn="preferences",vi={timeOfDay:!1,seasonal:!1},zo=900*1e3,K={...vi};function et(i,t,e){return i+(t-i)*Math.min(1,Math.max(0,e))}var Lt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let i=await E.get(zn,Vn);K=i?{...vi,...i}:{...vi},(K.timeOfDay||K.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...K}},save(i){return K={...K,...i},E.set(zn,Vn,K).catch(()=>{}),{...K}},setTimeOverride(i){this._timeOverride=i,this._hasActiveSource()&&this._update()},setMonthOverride(i){this._monthOverride=i,this._hasActiveSource()&&this._update()},setSource(i,t){let e=this.save({[i]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(i){let t=i||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent");let t=i.getAttribute("data-theme");if(t){let e=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(e)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let i=this.load(),t=0;i.timeOfDay&&(t+=this._getTimeOfDayOffset()),i.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let i=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return i<5?-20:i<7?et(-20,20,(i-5)/2):i<10?et(20,5,(i-7)/3):i<14?et(5,0,(i-10)/4):i<17?et(0,-5,(i-14)/3):i<19?et(-5,15,(i-17)/2):i<21?et(15,-10,(i-19)/2):et(-10,-20,(i-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let i=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(i+6)%12:i;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),zo))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var se=null;function Wn(){return"0.3.0-2e045630"}function Vo(){let i=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of i){let s=e.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function jn(){return se||(se=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),se}function Yn(i){return new Promise((t,e)=>{navigator.serviceWorker?.controller?Un(navigator.serviceWorker.controller,i,t,e):jn().then(s=>{let n=s.active||s.waiting||s.installing;n?Un(n,i,t,e):e(new Error("No active service worker"))}).catch(e)})}function Un(i,t,e,s){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),i.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function Gn(){return Yn("GET_STATUS")}async function Kn(){return Yn("CLEAR_CACHE")}async function Xn(){let i=await jn();return await i.update(),{updated:!!i.waiting}}function Uo(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Uo()){let i=Vo();window.addEventListener("load",()=>{se=navigator.serviceWorker.register(i).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}j();var ft=null,O="settings",Nt={motionFx:!0,sounds:!1},Si=class extends g{#e=null;#t=null;#i=!1;#s=[];#r={...Nt};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#o(),this.#v(),this.#g(),this.#V(),this.listen(window,"vb:theme-change",this.#P),this.listen(window,"vb:extensions-change",this.#P),this.listen(window,"vb:a11y-themes-change",this.#P)}teardown(){}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let e=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],e.push(E.set(O,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...Nt,...t.extensions},e.push(E.set(O,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,e.push(E.set(O,"sticky",this.#n?"on":"off"))),Promise.all(e).then(()=>{this.#V?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#o(){let[t,e,s]=await Promise.all([E.get(O,"a11y"),E.get(O,"extensions"),E.get(O,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...Nt,...e??{}},this.#n=s==="on"}#c(t){return t!==""&&t!==void 0}#f(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#p(){return this.#n}#u(t){return t!==""&&t!==void 0}#l(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#m(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let e=t.split(/\s+/);for(let s of e)if(s==="stretch"||s==="integrated")return s;return"card"}#y(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,e){let s=[];return t&&t!=="card"&&s.push(t),e&&s.push("fixed"),s.join(" ")||"card"}#v(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#b(),this.appendChild(this.#t)}#b(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:h,pageBgGradDir:l}=A.getState(),d=this.#W(),u=this.#X(),f=this.#c(s),v=this.#f(s),p=this.#u(n),m=this.#l(n);return`
316
+ `,Qe=class extends g{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of Cn){let e=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,e)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=co;for(let e of Cn){let s=t.querySelector(`slot[name="${e}"]`);s?.addEventListener("slotchange",()=>this.#e(e,s)),this.#e(e,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,e){let s=!!e&&e.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#t(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let e of oo)this.setState(`trend-${e}`,e===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};b("score-card",Qe);var lo=0;function Jt(i,t){return i.matches("content-swap")?t:`data-${t}`}function Xt(i){i.style.viewTransitionName||(i.style.viewTransitionName=`content-swap-${++lo}`);let t=i.querySelector(':scope > [data-face="front"]'),e=i.querySelector(':scope > [data-face="back"]');if(!t||!e)return;let s=[];function n(o,c,h,l){o.addEventListener(c,h,l),s.push(()=>o.removeEventListener(c,h,l))}let r=[...i.querySelectorAll("[data-swap]")].filter(o=>o!==i&&o.closest("content-swap, [data-swap]")===i);return r.length===0?(i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.getAttribute("aria-label")||i.setAttribute("aria-label","Toggle content"),n(i,"click",()=>tt(i,"pointer")),n(i,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),tt(i,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),tt(i,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),tt(i,"keyboard"))})}),i.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(n(i,"swipe-left",()=>tt(i,"pointer")),n(i,"swipe-right",()=>tt(i,"pointer"))),Ln(i,t,e),()=>{for(let o of s)o();s.length=0}}function Ln(i,t,e){let s=i.hasAttribute(Jt(i,"swapped"));t.inert=s,e.inert=!s}function ho(i){return{front:i.querySelector(':scope > [data-face="front"]'),back:i.querySelector(':scope > [data-face="back"]')}}function kt(i,t,e="api"){let{front:s,back:n}=ho(i);if(!s||!n)return;let r=Jt(i,"swapped");if(t&&i.hasAttribute(r)||!t&&!i.hasAttribute(r))return;let a=()=>{t?i.setAttribute(r,""):i.removeAttribute(r),Ln(i,s,n),uo(i,e);let h=t?n:s,l=h.querySelector("[autofocus]");l?l.focus():e==="keyboard"&&fo(h)},o=h=>{let l=i;typeof l.setState=="function"&&l.setState("transition-running",h)};o(!0);let c=P(a);c&&c.finished&&typeof c.finished.finally=="function"?c.finished.finally(()=>o(!1)):o(!1)}function tt(i,t="api"){kt(i,!i.hasAttribute(Jt(i,"swapped")),t)}function uo(i,t="internal"){i.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:i.hasAttribute(Jt(i,"swapped")),source:t},bubbles:!0}))}function fo(i){let t=i.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var ti=class extends g{#e=null;setup(){this.#e=Xt(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){kt(this,!0)}unflip(){kt(this,!1)}toggle(){tt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){kt(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){kt(this,!!t)}};b("content-swap",ti);function kn(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(i=>{i.querySelector(":scope > [data-face]")&&(Xt(i),i.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",kn):kn();var Tn=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(Xt(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(Xt(n),n.setAttribute("data-swap-init",""))})}});document.body?Tn.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Tn.observe(document.body,{childList:!0,subtree:!0})});var ei=class extends g{#e=null;#t=!1;#i=null;setup(){this.hasAttribute("role")||this.setAttribute("role","navigation"),this.#n("pathname"),this.listen(window,"popstate",this.#r)}get items(){return this.#e?this.#e.map(t=>({...t})):Array.from(this.#s()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let e=t.map(s=>({...s}));this.#e&&this.#h(this.#e,e)||(this.#e=e,this.#c(e),this.#n(this.#t?"property":"pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#t)return this.#i;for(let t of this.#s())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let e=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#t&&(this.#t=!1,this.#i=null,this.#n("pathname"))}refresh(){this.#t||this.#n("pathname")}#s(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#r=()=>{this.#t||this.#n("popstate")};#n(t){let e=this.current,s=this.#a();this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,e=Array.from(this.#s());if(e.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of e){let h=c.getAttribute("href");if(!h||/^[a-z]+:/i.test(h)||h.startsWith("//"))continue;let l=h.split("?")[0].split("#")[0];if(l===t&&n==null){n=c;continue}!s&&l!=="/"&&(t===l||t.startsWith(l.replace(/\/$/,"")+"/"))&&l.length>a&&(r=c,a=l.length)}let o=n||r;return o?o.getAttribute("data-route")||o.getAttribute("href"):null}#o(t){let e=this.#s();for(let s of e){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#c(t){this.#s().forEach(n=>n.remove());let s=document.createDocumentFragment();for(let n of t)s.appendChild(this.#f(n));this.appendChild(s)}#f(t){let e=document.createElement("a");if(e.href=t.href||"#",t.route&&e.setAttribute("data-route",t.route),t.external&&(e.target="_blank",e.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),e.appendChild(s)}if(e.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",e.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),e.appendChild(s)}return e}#h(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(e[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==e[s][r[a]])return!1}return!0}};b("nav-bar",ei);var mo=0,ii=class extends g{#e;#t=[];#i;#s;#r;#n;#a;#o=null;#c=0;#f=!1;#h=!1;#p=null;get currentIndex(){return this.#c}get slideCount(){return this.#t.length}get playing(){return this.#o!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#f=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#h=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#h&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0"),this.#e.setAttribute("aria-label","Slides"),t.forEach((r,a)=>{r.setAttribute("role","group"),r.setAttribute("aria-roledescription","slide"),r.setAttribute("aria-label",`${a+1} of ${t.length}`),this.#e.appendChild(r)}),this.#t=[...this.#e.children],this.#i=document.createElement("button"),this.#i.className="carousel-prev",this.#i.setAttribute("aria-label","Previous slide"),this.#i.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#r=document.createElement("div"),this.#r.className="carousel-indicators",this.#r.setAttribute("aria-label","Slide indicators"),this.#t.forEach((r,a)=>{let o=document.createElement("button");o.className="carousel-dot",o.setAttribute("aria-label",`Go to slide ${a+1}`),o.setAttribute("aria-current",a===0?"true":"false"),this.listen(o,"click",()=>this.goTo(a)),this.#r.appendChild(o)})),this.#n=document.createElement("div"),this.#n.className="carousel-live",this.#n.setAttribute("aria-live","polite"),this.#n.setAttribute("aria-atomic","true"),this.appendChild(this.#i),this.appendChild(this.#e),this.appendChild(this.#s),this.#r&&this.appendChild(this.#r),this.appendChild(this.#n),this.listen(this.#i,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#y),this.#h){let r=++mo,a=this.getAttribute("transition")||"fade",o=a==="slide"?"vt-carousel-slide":a==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${r}`,this.#e.style.viewTransitionClass=o}this.#h&&Promise.resolve().then(()=>(On(),qn)).then(({addSwipeListener:r})=>{this.#p=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#h||(this.#a=new IntersectionObserver(this.#d,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)));let n=this.#v()??(Number(this.getAttribute("start"))||0);if(this.#h){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#l(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);return this.#m(),this.hasAttribute("autoplay")&&!this.#f&&this.#w(),!0}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#p&&(this.#p(),this.#p=null),this.#t=[],this.#h=!1}get slides(){return this.#t.map((t,e)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${e+1} of ${this.#t.length}`}))}set slides(t){let e=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of e){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:e,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#t.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#t.length-1)}goTo(t,e=!0){if(!(t<0||t>=this.#t.length)){if(this.#h)if(e&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,P(()=>{this.#u(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#u(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=e&&!this.#f?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#l(t)}}#u(t){this.#t.forEach((e,s)=>{e.hidden=s!==t})}play(){if(this.#o||this.#f)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#o=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#o&&(clearInterval(this.#o),this.#o=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#g()}#l(t){this.#c=t,this.#m(),this.#b(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:t,slide:this.#t[t]},bubbles:!0}))}#m(){let t=this.hasAttribute("loop"),e=this.#c===0,s=this.#c===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&e),this.#s&&(this.#s.disabled=!t&&s),this.#r){let n=this.#r.children;for(let r=0;r<n.length;r++){let a=r===this.#c;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#d=t=>{for(let e of t)if(e.isIntersecting){let s=this.#t.indexOf(e.target);s!==-1&&s!==this.#c&&this.#l(s)}};#y=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#w(){this.play(),this.listen(this,"mouseenter",()=>this.pause()),this.listen(this,"mouseleave",()=>{this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"focusin",()=>this.pause()),this.listen(this,"focusout",t=>{!this.contains(t.relatedTarget)&&this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"touchstart",()=>this.pause(),{passive:!0})}#v(){let t=this.getAttribute("persist");if(!t)return null;try{let e=localStorage.getItem(`carousel:${t}`);return e!==null?Number(e):null}catch{return null}}#b(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#g(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",ii);function Bn(i,t,e){"role"in ElementInternals.prototype?t.role=e:i.setAttribute("role",e)}var bo=0,si=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#o=!1;#c="";#f="";#h="";#p;#u;#l=[];constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}get#m(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#t=t;let e=this.querySelector("ul, ol");if(!e)return!1;if(this.#i=e,this.#m){let o=this.querySelector(":scope > .tags-input-area");if(!o){o=document.createElement("div"),o.className="tags-input-area";let h=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(o,h)}this.#p=o,this.#t.parentNode!==this.#p&&this.#p.appendChild(this.#t);let c=this.querySelector(":scope > [data-combobox-live]");c||(c=document.createElement("div"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),c.setAttribute("data-combobox-live",""),c.className="visually-hidden",this.appendChild(c)),this.#u=c}let s=this.getAttribute("placeholder");s&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",s);let n=`cb${++bo}`;this.#i.id||(this.#i.id=`combobox-listbox-${n}`),Bn(this.#t,this.#e,"combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#i.id),this.#t.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#m&&this.#i.setAttribute("aria-multiselectable","true");let r=this.#m?this.#p:this.#t;r.id||(r.id=`combobox-anchor-${n}`);let a=this.querySelector(":scope > pop-over[data-combobox-host]");if(a?this.#s=a:(this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-combobox-host",""),this.#s.id=`combobox-pop-${n}`,this.#s.dataset.mode="manual",this.#s.dataset.position="bottom-start",this.#s.dataset.anchor=r.id,this.#s.appendChild(this.#i),this.appendChild(this.#s)),this.#s.dataset.anchor=r.id,this.#i.parentElement!==this.#s&&this.#s.appendChild(this.#i),this.#d(),!this.#m){let o=this.getAttribute("value");o&&this.#T(o,!1),this.#h=this.#c}return this.listen(this.#t,"input",this.#g),this.listen(this.#t,"keydown",this.#C),this.listen(this.#t,"focus",this.#_),this.listen(this.#t,"click",this.#M),this.listen(this.#i,"click",this.#S),this.listen(this.#i,"pointerdown",this.#B),this.listen(document,"click",this.#q),this.listen(this.#s,"pop-over:hide",this.#x),this.#A(),this.#L(),this.#E(),!0}teardown(){}#d(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,e)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${e}`)}),this.#n=[...this.#r]}#y(t,e){if(this.#l.some(o=>o.value===t))return;let s=this.#v();if(s&&this.#l.length>=s)return;this.#l.push({value:t,label:e});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=e+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${e}`),r.innerHTML="&times;",r.addEventListener("click",o=>{o.stopPropagation(),this.#w(t)}),n.appendChild(r),this.#p.insertBefore(n,this.#t);let a=this.#r.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#b(`${e} added`),this.#t.value="",this.#k(""),this.#A(),this.#L(),this.#H(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#E())}#w(t){let e=this.#l.findIndex(o=>o.value===t);if(e===-1)return;let s=this.#l.splice(e,1)[0],n=this.#p.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#r.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#b(`${s.label} removed`),this.#v()&&this.#t.disabled&&(this.#t.disabled=!1),this.#k(this.#t.value.trim()),this.#A(),this.#L(),this.#H(),this.#t.focus()}#v(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#b(t){this.#u&&(this.#u.textContent="",requestAnimationFrame(()=>{this.#u.textContent=t}))}#g=()=>{let t=this.#t.value.trim();if(!this.#m&&this.#c){let e=this.#i.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),this.#c="",this.#f="",this.removeAttribute("value"),this.#A(),this.#L()}this.#k(t),this.#N()};#C=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a-1);break;case"Home":this.#o&&(t.preventDefault(),this.#I(0));break;case"End":this.#o&&(t.preventDefault(),this.#I(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#o&&this.#a>=0&&this.#n[this.#a]){let e=this.#n[this.#a];this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e)}else if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){let e=this.#t.value.trim();this.#y(e,e)}break;case"Backspace":if(this.#m&&!this.#t.value&&this.#l.length>0){let e=this.#l[this.#l.length-1];this.#w(e.value)}break;case",":if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let e=this.#t.value.trim();this.#y(e,e)}break;case"Escape":this.#o&&(t.preventDefault(),t.stopPropagation(),this.#E(),this.#t.focus());break;case"Tab":this.#o&&this.#E();break}};#_=()=>{this.#m?(this.#k(this.#t.value.trim()),this.#N()):(this.#t.value||!this.#c)&&(this.#k(this.#t.value.trim()),this.#N())};#M=()=>{this.#o||(this.#k(this.#t.value.trim()),this.#N())};#S=t=>{let e=t.target.closest("li[data-value]");e&&this.#n.includes(e)&&(this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e))};#B=t=>{t.preventDefault()};#q=t=>{this.#o&&!this.contains(t.target)&&this.#E()};#k(t){let e=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#m?new Set(this.#l.map(r=>r.value)):null;this.#n=[],this.#r.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?e==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#O(),this.setState("no-matches",this.#n.length===0)}#I(t){if(this.#n.length===0)return;t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#a>=0&&this.#n[this.#a]&&this.#n[this.#a].removeAttribute("data-active"),this.#a=t;let e=this.#n[t];e.setAttribute("data-active",""),e.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",e.id)}#O(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t,e="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();this.#c!==s&&(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#c=s,this.#f=n,this.#t.value=n,this.setAttribute("value",s),this.#A(),this.#L(),this.#E(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:e}})))}#T(t,e=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(e?this.#R(n,s):(n.setAttribute("aria-selected","true"),this.#c=t,this.#f=n.textContent.trim(),this.#t.value=this.#f,this.setAttribute("value",t)))}#N(){this.#o||(this.#o=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#E(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#x=()=>{this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#A(){if(this.#m)if(this.#l.length>0){let t=new FormData,e=this.getAttribute("name")||"";for(let s of this.#l)t.append(e,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#c?this.#e.setFormValue(this.#c,this.#f):this.#e.setFormValue(null)}#L(){this.hasAttribute("required")?this.#m?this.#l.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#c?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({})}#H(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#l.map(t=>t.value),labels:this.#l.map(t=>t.label)}}))}formResetCallback(){this.#m?(this.#p.querySelectorAll(".tag").forEach(t=>t.remove()),this.#l=[],this.#t.value="",this.#t.disabled=!1):(this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value")),this.#r.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#n=[...this.#r],this.#a=-1,this.#O(),this.#E(),!this.#m&&this.#h&&this.#T(this.#h,!1),this.#A(),this.#L()}formStateRestoreCallback(t){t&&(this.#m||(this.#T(t,!1),this.#A(),this.#L()))}get value(){return this.#c}set value(t){t?this.#T(t):(this.#r.forEach(e=>e.setAttribute("aria-selected","false")),this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value"),this.#A(),this.#L())}get label(){return this.#f}get values(){return this.#l.map(t=>t.value)}get labels(){return this.#l.map(t=>t.label)}static get observedAttributes(){return["value"]}attributeChangedCallback(t,e,s){t==="value"&&this.#t&&s!==this.#c&&s&&(this.#T(s,!1),this.#A(),this.#L())}};b("combo-box",si);function go(){try{let i=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return i.hourCycle==="h12"||i.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function $(i){return String(i).padStart(2,"0")}function ht(i){if(!i)return null;let t=i.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function Tt(i,t,e,s){return s?`${$(i)}:${$(t)}:${$(e)}`:`${$(i)}:${$(t)}`}function vo(i,t,e,s,n){if(n==="12h"){let r=i>=12?"PM":"AM",a=i%12||12;return s?`${a}:${$(t)}:${$(e)} ${r}`:`${a}:${$(t)} ${r}`}return Tt(i,t,e,s)}function Pn(i){let t=i.trim();if(!t)return null;let e=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;e&&(s=e[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,e.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let h=a;if(s){if(h<1||h>12)return null;s==="AM"?h=h===12?0:h:h=h===12?12:h+12}else if(h<0||h>23)return null;return{h,m:o,s:c}}function yo(i,t,e){return i>e?t:i<t?e:i}var ni=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#o;#c;#f;#h=0;#p=0;#u=0;#l="AM";#m=null;#d=null;#y=60;#w;#v=0;#b=!1;#g;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#y=Number(this.#t.getAttribute("step"))||60,this.#f=this.#y<60,this.#m=ht(this.#t.getAttribute("min")),this.#d=ht(this.#t.getAttribute("max")),this.#c=this.getAttribute("data-format")||go();let t=ht(this.#t.value);return t&&(this.#h=t.h,this.#p=t.m,this.#u=t.s),this.#w=this.#t.value,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#C(),this.#_(),this.#H(),this.#F(),this.#P(),this.#V(),this.listen(document,"click",this.#k),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}#C(){this.#s=document.createElement("div"),this.#s.className="time-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="time-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","listbox"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a time\u2026"),this.#s.appendChild(this.#i),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label","Toggle time spinner"),this.#r.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#r.appendChild(t),this.#s.appendChild(this.#r),this.appendChild(this.#s),this.listen(this.#r,"click",e=>{e.stopPropagation(),this.#b?this.#q():this.#B(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"keydown",this.#I),this.listen(this.#i,"blur",this.#O)}#_(){this.#g=`tp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="time-panel",this.#n.id=this.#g,this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Time spinners"),this.#i.setAttribute("aria-controls",this.#g);let t=this.#c==="12h"?1:0,e=this.#c==="12h"?12:23,s=this.#M("Hours",t,e,1);this.#n.appendChild(s.el),this.#a.push(s),this.#n.appendChild(this.#S());let n=this.#y>=60?Math.max(1,Math.round(this.#y/60)):1,r=this.#M("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#f){this.#n.appendChild(this.#S());let a=this.#M("Seconds",0,59,this.#y);this.#n.appendChild(a.el),this.#a.push(a)}this.#c==="12h"&&(this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="period-toggle",this.#o.setAttribute("aria-label","Toggle AM/PM"),this.#o.textContent=this.#l,this.#n.appendChild(this.#o),this.listen(this.#o,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#o.textContent=this.#l,this.#h=this.#$(this.#D(),this.#l),this.#L()}),this.listen(this.#o,"keydown",a=>{let o=a;o.key==="ArrowLeft"&&(o.preventDefault(),this.#z(this.#a.length-1)),o.key==="Escape"&&(o.preventDefault(),this.#q(),this.#i.focus())})),this.appendChild(this.#n)}#M(t,e,s,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(e)),r.setAttribute("aria-valuemax",String(s)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="&#x25B2;";let o=document.createElement("span");o.className="time-value";let c=document.createElement("button");c.type="button",c.className="time-dec",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.innerHTML="&#x25BC;",r.appendChild(a),r.appendChild(o),r.appendChild(c);let h={el:r,valueEl:o,label:t,min:e,max:s,step:n};return this.listen(a,"click",()=>{this.#x(h,n)}),this.listen(c,"click",()=>{this.#x(h,-n)}),this.listen(r,"keydown",l=>{this.#R(l,h)}),this.listen(r,"focus",()=>{this.#v=this.#a.indexOf(h)}),h}#S(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#B(){this.#b||(this.#b=!0,this.#n.setAttribute("data-open",""),this.#i.setAttribute("aria-expanded","true"))}#q(){this.#b&&(this.#b=!1,this.#n.removeAttribute("data-open"),this.#i.setAttribute("aria-expanded","false"))}#k=t=>{this.#b&&!this.contains(t.target)&&this.#q()};#I=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let e=Pn(this.#i.value);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()),this.#F(),this.#b&&this.#q();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#B(),requestAnimationFrame(()=>this.#z(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#q(),this.#F();return;case"Tab":this.#b&&this.#q();return}};#O=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let s=Pn(e);s&&(this.#h=s.h,this.#p=s.m,this.#u=s.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u}})))}this.#F(),this.#b&&this.#q(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#R=(t,e)=>{let s=this.#a.indexOf(e);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(e,e.step);break;case"ArrowDown":t.preventDefault(),this.#x(e,-e.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#o&&this.#o.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#x(e,e.step*(e.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(e,-e.step*(e.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#A(e,e.min);break;case"End":t.preventDefault(),this.#A(e,e.max);break;case"Escape":t.preventDefault(),this.#q(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#E(t.key,e))}};#T="";#N=0;#E(t,e){clearTimeout(this.#N),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>e.max){let n=Math.min(Math.max(s,e.min),e.max);this.#A(e,n),this.#T=""}else this.#N=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,e.min),e.max);this.#A(e,r),this.#T=""},800)}#x(t,e){let s;t.label==="Hours"?s=this.#c==="12h"?this.#D():this.#h:t.label==="Minutes"?s=this.#p:s=this.#u;let n=yo(s+e,t.min,t.max);this.#A(t,n)}#A(t,e){t.label==="Hours"?this.#c==="12h"?this.#h=this.#$(e,this.#l):this.#h=e:t.label==="Minutes"?this.#p=e:this.#u=e,this.#L()}#L(t="internal"){this.#H(),this.#F(),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u,source:t}}))}#H(){let t=this.#c==="12h"?this.#D():this.#h;this.#a[0].valueEl.textContent=$(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#c==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=$(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#f&&this.#a[2]&&(this.#a[2].valueEl.textContent=$(this.#u),this.#a[2].el.setAttribute("aria-valuenow",String(this.#u))),this.#o&&(this.#o.textContent=this.#l)}#F(){this.#h!==void 0&&(this.#i.value=vo(this.#h,this.#p,this.#u,this.#f,this.#c))}#P(){let t=Tt(this.#h,this.#p,this.#u,this.#f);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#V(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#i||this);return}this.#e.setValidity({})}#$(t,e){return e==="AM"?t===12?0:t:t===12?12:t+12}#D(){if(this.#c==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=ht(this.#w);t?(this.#h=t.h,this.#p=t.m,this.#u=t.s):(this.#h=0,this.#p=0,this.#u=0),this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()}formStateRestoreCallback(t){if(!t)return;let e=ht(t);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L())}get value(){return Tt(this.#h,this.#p,this.#u,this.#f)}set value(t){let e=ht(t);e&&(e.h===this.#h&&e.m===this.#p&&e.s===this.#u||(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L("api")))}};b("time-picker",ni);var Qt="popover"in HTMLElement.prototype;var wo=["Su","Mo","Tu","We","Th","Fr","Sa"],Eo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],oi=["january","february","march","april","may","june","july","august","september","october","november","december"];function _(i){let t=i.getFullYear(),e=String(i.getMonth()+1).padStart(2,"0"),s=String(i.getDate()).padStart(2,"0");return`${t}-${e}-${s}`}function q(i){if(!i)return null;let[t,e,s]=i.split("-").map(Number);return new Date(t,e-1,s)}function te(i,t){return new Date(i,t+1,0).getDate()}function Ao(){try{let i=new Intl.Locale(navigator.language);if(i.weekInfo)return i.weekInfo.firstDay%7}catch{}return 0}function So(i){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(i)}catch{return _(i)}}function ee(i,t){return i&&t&&i.getFullYear()===t.getFullYear()&&i.getMonth()===t.getMonth()&&i.getDate()===t.getDate()}function xo(){let i=new Map;oi.forEach((t,e)=>{i.set(t,e),i.set(t.slice(0,3),e)});try{for(let t=0;t<12;t++){let e=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),s=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");i.set(e,t),i.set(s,t)}}catch{}return i}var ri=xo();function ai(i){let t=i.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=q(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=q(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let e=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(e);if(s){let a=ri.get(s[1].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[2]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let n=/^(\d{1,2})\s+([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(n),s){let a=ri.get(s[2].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[1]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let r=/^([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(r),s){let a=ri.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var ci=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h=!1;#p=!1;#u=null;#l=null;#m=new Date().getFullYear();#d=new Date().getMonth();#y=null;#w=null;#v=new Map;#b=new Map;#g=null;#C=0;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#y=q(this.#t.getAttribute("min")),this.#w=q(this.#t.getAttribute("max")),this.#C=Ao();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#v.set(r,a||"")});let e=this.getAttribute("data-highlight-dates");e&&e.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||"")}),this.#u=q(this.#t.value),this.#g=this.#t.value;let s=new Date;return this.#w&&s>this.#w&&(s=this.#w),this.#y&&s<this.#y&&(s=this.#y),this.#m=this.#u?this.#u.getFullYear():s.getFullYear(),this.#d=this.#u?this.#u.getMonth():s.getMonth(),this.#l=this.#u||s,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#T(),this.#D(),this.#z(),this.#p=Qt,this.#p&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#P),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}teardown(){window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}#_(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="date-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a date\u2026"),this.#r.appendChild(this.#i),this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="date-trigger-icon",this.#s.setAttribute("aria-label","Toggle calendar"),this.#s.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#s.appendChild(t),this.#r.appendChild(this.#s),this.appendChild(this.#r),this.listen(this.#s,"click",e=>{e.stopPropagation(),this.#h?this.#E():this.#N(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#L),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#F)}#M(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="calendar",this.#n.id=this.#a,this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-modal","false"),this.#n.setAttribute("aria-label","Choose date"),this.#n.hidden=!0,this.#i.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let e=document.createElement("button");e.type="button",e.className="calendar-nav",e.setAttribute("aria-label","Previous month");let s=document.createElement("icon-wc");s.setAttribute("name","chevron-left"),s.setAttribute("size","sm"),s.setAttribute("aria-hidden","true"),e.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#f=document.createElement("select"),this.#f.className="calendar-year",this.#f.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#c),n.appendChild(this.#f);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(e),t.appendChild(n),t.appendChild(r),this.#n.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),h=document.createElement("tr");for(let l=0;l<7;l++){let d=(this.#C+l)%7,u=document.createElement("th");u.setAttribute("abbr",Eo[d]),u.setAttribute("scope","col"),u.textContent=wo[d],h.appendChild(u)}c.appendChild(h),o.appendChild(c),this.#o=document.createElement("tbody"),o.appendChild(this.#o),this.#n.appendChild(o),this.appendChild(this.#n),this.#S(),this.listen(e,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#f,"change",()=>{this.#m=Number(this.#f.value);let l=te(this.#m,this.#d),d=Math.min(this.#l?.getDate()??1,l);this.#l=new Date(this.#m,this.#d,d),this.#S()}),this.listen(this.#o,"click",this.#V),this.listen(this.#n,"keydown",this.#$)}#S(){try{this.#c.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#m,this.#d,1))}catch{this.#c.textContent=oi[this.#d].charAt(0).toUpperCase()+oi[this.#d].slice(1)}this.#f.querySelector(`option[value="${this.#m}"]`)||this.#k(),this.#f.value=String(this.#m),this.#o.innerHTML="";let t=te(this.#m,this.#d),s=(new Date(this.#m,this.#d,1).getDay()-this.#C+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<s;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#m,this.#d,o),h=_(c),l=document.createElement("td"),d=document.createElement("button");d.type="button",d.setAttribute("data-date",h),d.textContent=String(o),ee(c,n)&&d.setAttribute("aria-current","date"),ee(c,this.#u)&&d.setAttribute("aria-selected","true");let u=this.#q(c,h);if(u.disabled&&(d.setAttribute("aria-disabled","true"),d.setAttribute("disabled",""),u.reason&&d.setAttribute("data-disabled-reason",u.reason)),this.#b.has(h)){let f=this.#b.get(h);d.setAttribute("data-highlight",f||"")}ee(c,this.#l)?(d.setAttribute("tabindex","0"),ee(c,this.#u)||d.setAttribute("data-focused","")):d.setAttribute("tabindex","-1"),l.appendChild(d),r.appendChild(l),(s+o)%7===0&&(this.#o.appendChild(r),r=document.createElement("tr"))}let a=(s+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#o.appendChild(r)}}#B(t,e){return this.#q(t,e).disabled}#q(t,e){return this.#v.has(e)?{disabled:!0,reason:this.#v.get(e)}:this.#y&&t<this.#y?{disabled:!0,reason:null}:this.#w&&t>this.#w?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#k(){this.#f.innerHTML="";let t=new Date().getFullYear(),e=this.#y?this.#y.getFullYear():t-100,s=this.#w?this.#w.getFullYear():t+10;for(let n=e;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#f.appendChild(r)}}#I(t){this.#d+=t,this.#d>11?(this.#d=0,this.#m++):this.#d<0&&(this.#d=11,this.#m--);let e=te(this.#m,this.#d),s=Math.min(this.#l?.getDate()??1,e);this.#l=new Date(this.#m,this.#d,s),this.#S(),this.#R(this.#l)}#O(t,e="internal"){let s=_(t);this.#B(t,s)||this.#u&&_(this.#u)===s||(this.#u=t,this.#l=t,this.#T(),this.#D(),this.#z(),this.#S(),this.#E(),this.#i.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:s,date:new Date(t),source:e}})))}#R(t){let e=_(t),s=this.#o.querySelector(`[data-date="${e}"]`);s&&(this.#o.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#u?this.#i.value=So(this.#u):this.#i.value=""}#N(){if(!this.#h){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#n.hidden=!1,this.#l&&(this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth()),this.#S(),this.#p){try{this.#n.showPopover()}catch{}this.#x(),window.addEventListener("scroll",this.#A,{capture:!0,passive:!0}),window.addEventListener("resize",this.#A,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#E(){if(this.#h){if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#n.hidden=!0,this.#p){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#x(){if(!this.#p)return;let t=this.#r.getBoundingClientRect(),e=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,h;o<e.height&&c>o?(h=t.top-e.height-s,this.#n.dataset.placement="top"):(h=t.bottom+s,delete this.#n.dataset.placement);let l=t.left;l+e.width>a-n&&(l=a-e.width-n),l<n&&(l=n),this.#n.style.setProperty("--calendar-top",`${h}px`),this.#n.style.setProperty("--calendar-left",`${l}px`)}#A=()=>{this.#h&&this.#x()};#L=()=>{let t=this.#i.value,{date:e,partial:s}=ai(t);if(e)this.#l=e,this.#m=e.getFullYear(),this.#d=e.getMonth(),this.#S();else if(s){this.#m=s.year,this.#d=s.month;let n=te(s.year,s.month),r=Math.min(this.#l?.getDate()??1,n);this.#l=new Date(s.year,s.month,r),this.#S()}!this.#h&&t.length>0&&this.#N()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:e}=ai(this.#i.value);e&&!this.#B(e,_(e))&&this.#O(e);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#N(),requestAnimationFrame(()=>this.#R(this.#l));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#h&&this.#E(),this.#T();return;case"Tab":this.#h&&this.#E();return}};#F=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let{date:s}=ai(e);s&&!this.#B(s,_(s))&&(this.#u=s,this.#l=s,this.#D(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:_(s),date:new Date(s)}})))}this.#T(),this.#h&&this.#E(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#P=t=>{this.#h&&!this.contains(t.target)&&this.#E()};#V=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.hasAttribute("disabled"))return;let n=q(s.getAttribute("data-date"));n&&this.#O(n)};#$=t=>{if(t.key==="Tab"){this.#E();return}let e=this.#l;if(!e)return;let s;switch(t.key){case"ArrowRight":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);break;case"ArrowLeft":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);break;case"ArrowDown":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+7);break;case"ArrowUp":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(e.getFullYear()+1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()+1,e.getDate());break;case"PageUp":t.shiftKey?s=new Date(e.getFullYear()-1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()-1,e.getDate());break;case"Home":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+this.#C);break;case"End":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-e.getDay()+this.#C));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#O(e);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#E(),this.#i.focus();return;default:return}t.preventDefault(),t.stopPropagation(),s&&(this.#y&&s<this.#y&&(s=this.#y),this.#w&&s>this.#w&&(s=this.#w),this.#l=s,(s.getMonth()!==this.#d||s.getFullYear()!==this.#m)&&(this.#d=s.getMonth(),this.#m=s.getFullYear(),this.#S()),this.#R(s))};#D(){let t=this.#u?_(this.#u):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#z(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#u?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#i||this):this.#e.setValidity({})}formResetCallback(){this.#u=q(this.#g);let t=new Date;this.#l=this.#u||t,this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth(),this.#T(),this.#D(),this.#z(),this.#h&&this.#S()}formStateRestoreCallback(t){t&&(this.#u=q(t),this.#u&&(this.#l=this.#u,this.#m=this.#u.getFullYear(),this.#d=this.#u.getMonth(),this.#T(),this.#D(),this.#z()))}get value(){return this.#u?_(this.#u):""}set value(t){let e=q(t);e&&this.#O(e,"api")}get min(){return this.#y?_(this.#y):""}set min(t){this.#y=t?q(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#w?_(this.#w):""}set max(t){this.#w=t?q(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};b("date-picker",ci);function dt(i,t,e){t/=100,e/=100;let s=a=>(a+i/30)%12,n=t*Math.min(e,1-e),r=a=>e-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function ie(i,t,e){i/=255,t/=255,e/=255;let s=Math.max(i,t,e),n=Math.min(i,t,e),r=(s+n)/2,a=0,o=0;if(s!==n){let c=s-n;switch(o=r>.5?c/(2-s-n):c/(s+n),s){case i:a=((t-e)/c+(t<e?6:0))/6;break;case t:a=((e-i)/c+2)/6;break;case e:a=((i-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function Co(i){i=i.replace(/^#/,""),i.length===3&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);let t=parseInt(i,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function ko(i,t,e){return"#"+[i,t,e].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function Y(i){let{r:t,g:e,b:s}=Co(i);return ie(t,e,s)}function G(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return ko(s,n,r)}function T(i,t,e){return Math.max(t,Math.min(e,i))}function li(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function hi(i){let t=i<=.0031308?i*12.92:1.055*Math.pow(i,.4166666666666667)-.055;return Math.round(T(t,0,1)*255)}function To(i,t,e){let s=li(i),n=li(t),r=li(e),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,h=Math.cbrt(a),l=Math.cbrt(o),d=Math.cbrt(c),u=.2104542553*h+.793617785*l-.0040720468*d,f=1.9779984951*h-2.428592205*l+.4505937099*d,v=.0259040371*h+.7827717662*l-.808675766*d,p=Math.sqrt(f*f+v*v),m=Math.atan2(v,f)*180/Math.PI;return m<0&&(m+=360),p<1e-4&&(m=0),{L:u,C:p,H:m}}function Lo(i,t,e){let s=e*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=i+.3963377774*n+.2158037573*r,o=i-.1055613458*n-.0638541728*r,c=i-.0894841775*n-1.291485548*r,h=a**3,l=o**3,d=c**3,u=4.0767416621*h-3.3077115913*l+.2309699292*d,f=-1.2684380046*h+2.6097574011*l-.3413193965*d,v=-.0041960863*h-.7034186147*l+1.707614701*d;return{r:hi(u),g:hi(f),b:hi(v)}}function di(i,t,e){let s=dt(i,t,e);return To(s.r,s.g,s.b)}function Fn(i,t,e){let{r:s,g:n,b:r}=Lo(i,t,e);return ie(s,n,r)}function Mo(i,t,e){return G(i,t,e)}function No(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return`rgb(${s} ${n} ${r})`}function Do(i,t,e){return`hsl(${i}deg ${t}% ${e}%)`}function _o(i,t,e){let{L:s,C:n,H:r}=di(i,t,e);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function Rn(i,t,e,s){switch(i){case"rgb":return No(t,e,s);case"hsl":return Do(t,e,s);case"oklch":return _o(t,e,s);default:return Mo(t,e,s)}}var ut=["hex","rgb","hsl","oklch"],Io="hex",ui=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h;#p={};#u=Io;#l;#m;#d;#y=!1;#w=!1;#v=0;#b=100;#g=50;#C;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;let t=this.getAttribute("format");t&&ut.includes(t)&&(this.#u=t);let e=this.#t.value||"#000000";this.#C=e;let s=Y(e);return this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#D(),this.#j(),this.#w=Qt,this.#w&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#G),(this.#t.disabled||this.hasAttribute("disabled"))&&this.setAttribute("data-disabled",""),!0}teardown(){window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}#_(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("span"),this.#s.className="color-swatch",this.#r=document.createElement("span"),this.#r.className="color-hex",this.#i.appendChild(this.#s),this.#i.appendChild(this.#r),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#y?this.#W():this.#z()})}#M(){this.#n=document.createElement("div"),this.#n.className="color-panel",this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("tabindex","0"),this.#o=document.createElement("div"),this.#o.className="color-area-thumb",this.#a.appendChild(this.#o),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#c.appendChild(this.#f),t.appendChild(this.#c),this.#n.appendChild(t);let e=document.createElement("div");e.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#h=document.createElement("select"),this.#h.className="color-format-select";for(let o of ut){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#h.appendChild(c)}this.#h.value=this.#u,s.appendChild(n),s.appendChild(this.#h),e.appendChild(s),this.#n.appendChild(e),this.listen(this.#h,"change",this.#q),this.#p.hex=this.#S("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#p.rgb=this.#S("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#p.hsl=this.#S("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#p.oklch=this.#S("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of ut)this.#n.appendChild(this.#p[o].wrapper);this.#B();let r=this.querySelector(":scope > datalist");if(r){this.#l=document.createElement("div"),this.#l.className="color-swatches",this.#l.setAttribute("role","listbox"),this.#l.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("role","option"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#l.appendChild(c)}this.#n.appendChild(this.#l),this.listen(this.#l,"click",this.#F)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-eyedropper",this.#m.setAttribute("aria-label","Pick color from screen"),this.#m.textContent="\u{1F4A7}",a.appendChild(this.#m),this.listen(this.#m,"click",this.#P)),this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-copy",this.#d.setAttribute("aria-label","Copy hex value"),this.#d.textContent="Copy",a.appendChild(this.#d),this.listen(this.#d,"click",this.#V),this.#n.appendChild(a),this.appendChild(this.#n),this.listen(this.#a,"pointerdown",this.#k),this.listen(this.#a,"keydown",this.#O),this.listen(this.#c,"pointerdown",this.#R),this.listen(this.#c,"keydown",this.#N);for(let o of ut){let c=o==="hex"?this.#x:o==="rgb"?this.#A:o==="hsl"?this.#L:this.#H;for(let{el:h}of this.#p[o].inputs)this.listen(h,"change",c)}}#S(t,e){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of e){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#B(){for(let t of ut)this.#p[t].wrapper.hidden=t!==this.#u;this.#d&&this.#d.setAttribute("aria-label",`Copy ${this.#u.toUpperCase()} value`)}#q=()=>{let t=this.#h.value;ut.includes(t)&&(this.#u=t,this.#B(),this.#D())};#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let e=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",e),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",e),this.#a.addEventListener("pointerup",s)};#I(t){let e=this.#a.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1),n=T((t.clientY-e.top)/e.height,0,1);this.#b=Math.round(s*100),this.#g=Math.round((1-n)*100),this.#$()}#O=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#b=T(this.#b+e,0,100);break;case"ArrowLeft":t.preventDefault(),this.#b=T(this.#b-e,0,100);break;case"ArrowUp":t.preventDefault(),this.#g=T(this.#g+e,0,100);break;case"ArrowDown":t.preventDefault(),this.#g=T(this.#g-e,0,100);break;default:return}this.#$()};#R=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#T(t);let e=n=>this.#T(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",e),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",e),this.#c.addEventListener("pointerup",s)};#T(t){let e=this.#c.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1);this.#v=Math.round(s*360),this.#$()}#N=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+e)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-e+361)%361;break;default:return}this.#$()};#E(t,e){return this.#p[t].inputs.find(s=>s.channel===e)?.el}#x=()=>{let t=this.#E("hex","hex");if(!t)return;let e=t.value.trim();if(e.startsWith("#")||(e="#"+e),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){let s=Y(e);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}};#A=()=>{let t=T(Number(this.#E("rgb","r").value)||0,0,255),e=T(Number(this.#E("rgb","g").value)||0,0,255),s=T(Number(this.#E("rgb","b").value)||0,0,255),n=ie(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#L=()=>{let t=T(Number(this.#E("hsl","h").value)||0,0,360)%361,e=T(Number(this.#E("hsl","s").value)||0,0,100),s=T(Number(this.#E("hsl","l").value)||0,0,100);this.#v=t,this.#b=e,this.#g=s,this.#$()};#H=()=>{let t=T(Number(this.#E("oklch","oL").value)||0,0,100)/100,e=T(Number(this.#E("oklch","oC").value)||0,0,.4),s=T(Number(this.#E("oklch","oH").value)||0,0,360),n=Fn(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#F=t=>{let e=t.target.closest("button[data-color]");if(!e)return;let s=e.getAttribute("data-color"),n=Y(s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#P=async()=>{try{let e=await new window.EyeDropper().open(),s=Y(e.sRGBHex);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}catch{}};#V=()=>{let t=Rn(this.#u,this.#v,this.#b,this.#g);St(t,{button:this.#d,announceMessage:"Color copied"})};#$(t="internal"){this.#D(),this.#j();let e=G(this.#v,this.#b,this.#g),s=dt(this.#v,this.#b,this.#g);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:e,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:this.#v,s:this.#b,l:this.#g},source:t}}))}#D(){let t=G(this.#v,this.#b,this.#g),e=dt(this.#v,this.#b,this.#g),s=G(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#o.style.insetInlineStart=`${this.#b}%`,this.#o.style.insetBlockStart=`${100-this.#g}%`,this.#o.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#b}%, Lightness ${this.#g}%`),this.#f.style.insetInlineStart=`${this.#v/360*100}%`,this.#c.setAttribute("aria-valuenow",String(this.#v)),this.#c.setAttribute("aria-valuetext",`Hue ${this.#v}\xB0`);let n=(a,o,c)=>{let h=this.#E(a,o);h&&(h.value=String(c))};n("hex","hex",t),n("rgb","r",e.r),n("rgb","g",e.g),n("rgb","b",e.b),n("hsl","h",this.#v),n("hsl","s",this.#b),n("hsl","l",this.#g);let r=di(this.#v,this.#b,this.#g);n("oklch","oL",(r.L*100).toFixed(1)),n("oklch","oC",r.C.toFixed(3)),n("oklch","oH",r.H.toFixed(1))}#z(){if(!this.#y){if(this.#y=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#w){this.#Y();try{this.#n.showPopover()}catch{}window.addEventListener("scroll",this.#U,{capture:!0,passive:!0}),window.addEventListener("resize",this.#U,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#W(){if(this.#y){if(this.#y=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#w){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}}#Y(){if(!this.#w)return;let t=this.#i.getBoundingClientRect();this.#n.style.setProperty("--panel-top",`${t.bottom+4}px`),this.#n.style.setProperty("--panel-left",`${t.left}px`)}#U=()=>{this.#y&&this.#Y()};#G=t=>{this.#y&&!this.contains(t.target)&&this.#W()};#j(){let t=G(this.#v,this.#b,this.#g);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){let t=Y(this.#C);this.#v=t.h,this.#b=t.s,this.#g=t.l,this.#D(),this.#j()}formStateRestoreCallback(t){if(!t)return;let e=Y(t);this.#v=e.h,this.#b=e.s,this.#g=e.l,this.#D(),this.#j()}get value(){return G(this.#v,this.#b,this.#g)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let e=G(this.#v,this.#b,this.#g).toLowerCase(),s=t.toLowerCase();if(e===s||e===s.toLowerCase())return;let n=Y(t);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$("api")}};b("color-picker",ui);var $o='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',qo='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function Oo(i){if(!i)return[];let t=i.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(e=>{let s=e.trim();return{value:s,label:s}})}function Bo(i){return i?i.split(",").map(t=>t.trim()).filter(Boolean):[]}function Po(i){let t=Math.max(0,Math.round(i)),e=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return e>0?`${e}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Fo(i,t){let e=Number(i)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(e);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${e<0?"-":""}${a.format(r)} ${s[n]}`}function Ro(){return document.documentElement.lang||void 0}function fi(i){let t=String(i),e=t.indexOf(".");return e<0?0:t.length-e-1}var pi=class extends g{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#o;#c;#f="";#h=!1;#p=!1;#u;#l;#m;#d;#y;#w;#v;#b;#g;#C=0;#_=0;#M=!1;#S=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#B(),this.#q(),this.#O();let t=this.getAttribute("value");this.#m=t,this.#P(t??this.#I(),"init")}attributeChangedCallback(t,e,s){!this.isConnected||!this.#d||(t==="value"?this.#P(s??this.#I(),"attr"):(t==="disabled"||t==="readonly")&&this.#E())}#B(){this.hasAttribute("data-options")?this.#t="enum":this.hasAttribute("data-values")?this.#t="token":this.hasAttribute("data-format")||this.hasAttribute("data-suffix")?this.#t="formatted":(this.#t="numeric",console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/concepts/numeric-inputs/'))}#q(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#s=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#r=Number(this.getAttribute("data-step"))||1,this.#n=Bo(this.getAttribute("data-values")),this.#a=Oo(this.getAttribute("data-options")),this.#o=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#c=this.getAttribute("data-currency")||"USD",this.#f=this.getAttribute("data-suffix")||"",this.#h=this.hasAttribute("data-show-label"),this.#p=this.hasAttribute("data-accelerate"),this.#u=Ro(),this.#g=this.#k()}#k(){if(!this.#o)return null;let t=fi(this.#r);return this.#o==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#o==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#c}):this.#o==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#t==="enum"?this.#a[0]?.value??"":this.#t==="token"?this.#n[0]??"":"0"}#O(){this.replaceChildren(),this.#v=document.createElement("button"),this.#v.type="button",this.#v.className="stepper-dec",this.#v.setAttribute("aria-label","Decrease"),this.#v.setAttribute("tabindex","-1"),this.#v.innerHTML=$o,this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="stepper-inc",this.#b.setAttribute("aria-label","Increase"),this.#b.setAttribute("tabindex","-1"),this.#b.innerHTML=qo,this.#d=document.createElement("span"),this.#d.className="stepper-value",this.#d.setAttribute("role","spinbutton"),this.#d.setAttribute("tabindex","0"),this.#y=document.createElement("span"),this.#y.className="stepper-value-display",this.#d.appendChild(this.#y),this.#w=new Set;for(let t of this.#z())this.#W(t);this.appendChild(this.#v),this.appendChild(this.#d),this.appendChild(this.#b),this.#R(this.#v,-1),this.#R(this.#b,1),this.listen(this.#d,"keydown",this.#T),this.#E()}#R(t,e){if(this.listen(t,"click",n=>{if(this.#S){this.#S=!1,n.preventDefault();return}this.#x(e,1)}),!this.#p)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#N()||(this.#M=!1,this.#C=window.setTimeout(()=>{this.#M=!0,this.#_=window.setInterval(()=>this.#x(e,1),100),this.#C=window.setTimeout(()=>{window.clearInterval(this.#_),this.#_=window.setInterval(()=>this.#x(e,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#C),window.clearInterval(this.#_),this.#C=0,this.#_=0,this.#M&&(this.#S=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T=t=>{if(!this.#N())switch(t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#x(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#x(-1,1);break;case"PageUp":t.preventDefault(),this.#x(1,10);break;case"PageDown":t.preventDefault(),this.#x(-1,10);break;case"Home":t.preventDefault(),this.#A("min");break;case"End":t.preventDefault(),this.#A("max");break;default:}};#N(){return this.hasAttribute("disabled")||this.hasAttribute("readonly")}#E(){let t=this.hasAttribute("disabled");this.#v.disabled=t,this.#b.disabled=t,this.#d.setAttribute("aria-disabled",String(t)),t?this.#d.removeAttribute("tabindex"):this.#d.setAttribute("tabindex","0")}#x(t,e){if(this.#N())return;let s=this.#L(t,e);s===null||s===this.#l||this.#P(s,"step")}#A(t){if(this.#t==="enum"){let s=t==="min"?0:this.#a.length-1;this.#P(this.#a[s]?.value,"step");return}if(this.#t==="token"){let s=t==="min"?0:this.#n.length-1;this.#P(this.#n[s],"step");return}let e=t==="min"?this.#i===-1/0?this.#l:this.#i:this.#s===1/0?this.#l:this.#s;this.#P(String(e),"step")}#L(t,e){if(this.#t==="enum"){let c=this.#a.findIndex(d=>d.value===this.#l),h=c===-1?0:c,l=Math.min(this.#a.length-1,Math.max(0,h+t*e));return this.#a[l]?.value}if(this.#t==="token"){let h=this.#H(this.#l);h===-1&&(h=this.#F(this.#l));let l=Math.min(this.#n.length-1,Math.max(0,h+t*e));return this.#n[l]}let s=Number(this.#l)||0,n=fi(this.#r),r=s+t*this.#r*e,a=Number(r.toFixed(n)),o=Math.min(this.#s,Math.max(this.#i,a));return String(o)}#H(t){if(t==null)return-1;let e=this.#n.indexOf(String(t));if(e!==-1)return e;let s=Number(t);if(Number.isFinite(s)){let n=this.#n.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#F(t){let e=Number(t);if(!Number.isFinite(e))return 0;let s=0,n=1/0;return this.#n.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-e);c<n&&(n=c,s=a)}),s}#P(t,e){let s=this.#V(t),n=s!==this.#l;this.#l=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#$(),this.#Y(),this.#U(),this.#X(),this.#K(),n&&e!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#V(t){if(t==null)return this.#I();if(this.#t==="enum"){let n=String(t);return this.#a.find(a=>a.value===n)?n:this.#a[0]?.value??""}if(this.#t==="token")return String(t);let e=Number(t);if(!Number.isFinite(e))return String(this.#i===-1/0?0:this.#i);let s=fi(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,e)).toFixed(s)))}#$(){let t=this.#D();this.#y.textContent=t,this.#W(t)}#D(t=this.#l){if(this.#t==="enum")return this.#a.find(s=>s.value===t)?.label??t??"";if(this.#t==="token"){let e=this.#h?String(t).replace(/^--/,""):String(t);return this.#f?`${e}${this.#f}`:e}if(this.#t==="formatted"){let e=Number(t)||0;if(this.#o==="duration")return Po(e);if(this.#o==="bytes")return Fo(e,this.#u);if(this.#g){let s=this.#o==="percent"?e/100:e,n=this.#g.format(s);return this.#f&&this.#o==="number"?`${n}${this.#f}`:n}return this.#f?`${e}${this.#f}`:String(e)}return String(t??"")}#z(){if(this.#t==="enum")return this.#a.map(s=>this.#D(s.value));if(this.#t==="token")return this.#n.map(s=>this.#D(s));let t=new Set,e=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&e(this.#i),this.#s!==1/0&&e(this.#s),e(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)e(n);if(this.#o==="bytes")for(let n of[999,999e3,999e6,999e9])e(n)}return[...t].map(s=>this.#D(String(s)))}#W(t){let e=String(t??"");if(!e||this.#w.has(e))return;this.#w.add(e);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=e,this.#d.appendChild(s)}recomputeWidth(){if(this.#d){this.#d.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#w=new Set;for(let t of this.#z())this.#W(t)}}#Y(){if(this.#t==="enum"){let e=this.#a.findIndex(s=>s.value===this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#a.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}if(this.#t==="token"){let e=this.#H(this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#n.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}let t=Number(this.#l)||0;this.#i!==-1/0?this.#d.setAttribute("aria-valuemin",String(this.#i)):this.#d.removeAttribute("aria-valuemin"),this.#s!==1/0?this.#d.setAttribute("aria-valuemax",String(this.#s)):this.#d.removeAttribute("aria-valuemax"),this.#d.setAttribute("aria-valuenow",String(t)),this.#d.setAttribute("aria-valuetext",this.#D())}#U(){let t=this.#G(),e=this.#j();this.#v.disabled=t||this.hasAttribute("disabled"),this.#b.disabled=e||this.hasAttribute("disabled")}#G(){return this.#t==="enum"?this.#l===this.#a[0]?.value:this.#t==="token"?this.#H(this.#l)===0:this.#i!==-1/0&&Number(this.#l)<=this.#i}#j(){return this.#t==="enum"?this.#l===this.#a[this.#a.length-1]?.value:this.#t==="token"?this.#H(this.#l)===this.#n.length-1:this.#s!==1/0&&Number(this.#l)>=this.#s}#X(){this.#e.setFormValue(String(this.#l??""))}#K(){this.setState("at-min",this.#G()),this.setState("at-max",this.#j())}formResetCallback(){this.#P(this.#m??this.#I(),"reset")}formStateRestoreCallback(t){t!=null&&this.#P(t,"restore")}get displayText(){return this.#y?.textContent??""}get value(){return this.#l==null?"":String(this.#l)}set value(t){String(t)!==String(this.#l)&&this.#P(t,"api")}get form(){return this.#e.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#e.validity}get validationMessage(){return this.#e.validationMessage}checkValidity(){return this.#e.checkValidity()}reportValidity(){return this.#e.reportValidity()}};b("stepper-wc",pi);var Ho=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),mi=class extends g{static observedAttributes=["data-variant","data-live"];#e;setup(){let t=document.createElement("span");for(t.className="status-dot",t.setAttribute("aria-hidden","true"),this.#e=document.createElement("span"),this.#e.className="status-label";this.firstChild;)this.#e.appendChild(this.firstChild);this.appendChild(t),this.appendChild(this.#e),this.#t(),this.#i(),this.#r()}attributeChangedCallback(t,e,s){!this.isConnected||e===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:e}}))):t==="data-live"&&this.#t())}#t(){this.getAttribute("data-live")==="off"?(this.removeAttribute("role"),this.removeAttribute("aria-live")):(this.hasAttribute("role")||this.setAttribute("role","status"),this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"))}#i(){let t=this.getAttribute("data-variant");t&&(Ho.has(t)||this.#s(t)||console.info(`[status-wc] data-variant="${t}" is not a built-in; add a CSS rule (status-wc[data-variant="${t}"] { --status-dot-color: \u2026; }) or use a built-in.`))}#s(t){let e=this.querySelector(".status-dot");if(!e)return!0;let s=getComputedStyle(e).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),e=this.hasAttribute("aria-label");!t&&!e&&console.warn("[status-wc] needs slot text or aria-label for accessibility.")}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};b("status-wc",mi);var Hn=0,bi=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),e=this.querySelector('menu, ul[role="menu"]');if(!t||!e)return!1;this.#e=t,this.#t=e;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Hn}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e?.setAttribute("aria-expanded","false"),this.#t.setAttribute("role","menu"),this.#t.id||(this.#t.id=`ctx-menu-list-${++Hn}`),this.#t.querySelectorAll(":scope > li[data-group]").forEach(n=>{n.setAttribute("role","presentation"),n.classList.add("ctx-group-label")}),this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(n=>!n.disabled&&!n.hasAttribute("data-disabled")),this.#s.forEach(n=>{n.setAttribute("role","menuitem"),n.setAttribute("tabindex","-1"),n.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",this.listen(n,"click",this.#h);let r=n.getAttribute("data-shortcut");if(r){let a=document.createElement("kbd");a.className="ctx-kbd",a.textContent=vn(r),n.appendChild(a);let o=Kt(r,()=>n.click());this.#a.push(o)}}),this.#t.querySelectorAll('li:empty:not([data-group]), [role="separator"], hr').forEach(n=>{n.setAttribute("role","separator")}),this.listen(this.#e,"contextmenu",this.#o),this.listen(this.#t,"keydown",this.#f),this.listen(window,"scroll",this.#u,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#p),!0}teardown(){this.#a.forEach(t=>t()),this.#a=[]}get items(){if(!this.#t)return[];let t=[];for(let e of this.#t.querySelectorAll(":scope > li")){if(e.hasAttribute("data-group")){t.push({group:e.textContent.trim()});continue}if(e.matches(':empty, [role="separator"]')||e.querySelector("hr")){t.push({separator:!0});continue}let s=e.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,shortcut:s.getAttribute("data-shortcut")||void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let e=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of e){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&(a.tagName==="BUTTON"?a.disabled=!0:a.setAttribute("data-disabled","")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:e,source:"property"},bubbles:!0}))}#o=t=>{t.preventDefault(),this.#c(t.clientX,t.clientY)};#c(t,e){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${e}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let s=this.#i.getBoundingClientRect(),n=t+s.width>window.innerWidth?t-s.width:t,r=e+s.height>window.innerHeight?e-s.height:e;this.#i.style.top=`${Math.max(0,r)}px`,this.#i.style.left=`${Math.max(0,n)}px`}),this.#r=-1,this.#l(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#i?.hide(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))}#f=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#l(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#l(this.#r-1);break;case"Home":t.preventDefault(),this.#l(0);break;case"End":t.preventDefault(),this.#l(this.#s.length-1);break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break;case"Tab":this.close();break}};#h=()=>{this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:this.#s[this.#r]}}))};#p=()=>{this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#u=()=>{this.#n&&this.close()};#l(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}get isOpen(){return this.#n}};b("context-menu",bi);var gi=class extends g{#e;#t;#i=null;#s=!1;setup(){if(this.#s)return;let t=this.getAttribute("src");return t?(this.#i===null&&(this.#i=this.innerHTML),this.hasAttribute("lazy")?this.#n():this.#a(t),!0):!1}teardown(){this.#e?.disconnect(),this.#t?.abort()}get src(){return this.getAttribute("src")||""}set src(t){let e=t==null?"":String(t);this.src!==e&&(e?this.setAttribute("src",e):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:e,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,s){t==="src"&&s&&e!==s&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#r()?this.#n():this.#a(s))}#r(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#n(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){this.#e.disconnect();let s=this.getAttribute("src");s&&this.#a(s)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let e=await fetch(t,{signal:this.#t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);let s=await e.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=s:n==="append"?this.insertAdjacentHTML("beforeend",s):n==="prepend"&&this.insertAdjacentHTML("afterbegin",s),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#s=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:s}}))}catch(e){if(e.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#i!==null&&!this.#s&&(this.innerHTML=this.#i),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:e.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",gi);j();var zn="environment",Vn="preferences",vi={timeOfDay:!1,seasonal:!1},zo=900*1e3,K={...vi};function et(i,t,e){return i+(t-i)*Math.min(1,Math.max(0,e))}var Lt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let i=await E.get(zn,Vn);K=i?{...vi,...i}:{...vi},(K.timeOfDay||K.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...K}},save(i){return K={...K,...i},E.set(zn,Vn,K).catch(()=>{}),{...K}},setTimeOverride(i){this._timeOverride=i,this._hasActiveSource()&&this._update()},setMonthOverride(i){this._monthOverride=i,this._hasActiveSource()&&this._update()},setSource(i,t){let e=this.save({[i]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(i){let t=i||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent");let t=i.getAttribute("data-theme");if(t){let e=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(e)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let i=this.load(),t=0;i.timeOfDay&&(t+=this._getTimeOfDayOffset()),i.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let i=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return i<5?-20:i<7?et(-20,20,(i-5)/2):i<10?et(20,5,(i-7)/3):i<14?et(5,0,(i-10)/4):i<17?et(0,-5,(i-14)/3):i<19?et(-5,15,(i-17)/2):i<21?et(15,-10,(i-19)/2):et(-10,-20,(i-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let i=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(i+6)%12:i;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),zo))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var se=null;function Wn(){return"0.3.1-289faf69"}function Vo(){let i=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of i){let s=e.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function jn(){return se||(se=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),se}function Yn(i){return new Promise((t,e)=>{navigator.serviceWorker?.controller?Un(navigator.serviceWorker.controller,i,t,e):jn().then(s=>{let n=s.active||s.waiting||s.installing;n?Un(n,i,t,e):e(new Error("No active service worker"))}).catch(e)})}function Un(i,t,e,s){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),i.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function Gn(){return Yn("GET_STATUS")}async function Kn(){return Yn("CLEAR_CACHE")}async function Xn(){let i=await jn();return await i.update(),{updated:!!i.waiting}}function Uo(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Uo()){let i=Vo();window.addEventListener("load",()=>{se=navigator.serviceWorker.register(i).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}j();var ft=null,O="settings",Nt={motionFx:!0,sounds:!1},Si=class extends g{#e=null;#t=null;#i=!1;#s=[];#r={...Nt};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#o(),this.#v(),this.#g(),this.#V(),this.listen(window,"vb:theme-change",this.#P),this.listen(window,"vb:extensions-change",this.#P),this.listen(window,"vb:a11y-themes-change",this.#P)}teardown(){}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let e=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],e.push(E.set(O,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...Nt,...t.extensions},e.push(E.set(O,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,e.push(E.set(O,"sticky",this.#n?"on":"off"))),Promise.all(e).then(()=>{this.#V?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#o(){let[t,e,s]=await Promise.all([E.get(O,"a11y"),E.get(O,"extensions"),E.get(O,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...Nt,...e??{}},this.#n=s==="on"}#c(t){return t!==""&&t!==void 0}#f(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#p(){return this.#n}#u(t){return t!==""&&t!==void 0}#l(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#m(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let e=t.split(/\s+/);for(let s of e)if(s==="stretch"||s==="integrated")return s;return"card"}#y(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,e){let s=[];return t&&t!=="card"&&s.push(t),e&&s.push("fixed"),s.join(" ")||"card"}#v(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#b(),this.appendChild(this.#t)}#b(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:h,pageBgGradDir:l}=A.getState(),d=this.#W(),u=this.#X(),f=this.#c(s),v=this.#f(s),p=this.#u(n),m=this.#l(n);return`
317
317
  <header class="settings-header">
318
318
  <strong>Settings</strong>
319
319
  <button type="button" class="settings-close" aria-label="Close settings">