vanilla-breeze 0.4.0 → 0.4.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 (86) 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 +10 -5
@@ -324,7 +324,7 @@ svg {
324
324
  <span class="description" part="description"><slot name="description" data-slot="description"></slot></span>
325
325
  <span class="icon" part="icon"><slot name="icon" data-slot="icon"></slot></span>
326
326
  </div>
327
- `,Ei=class extends g{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of Zr){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=gd;for(let i of Zr){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#e(i,s)),this.#e(i,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,i){let s=!!i&&i.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 i of bd)this.setState(`trend-${i}`,i===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};b("score-card",Ei);var vd=0;function le(e,t){return e.matches("content-swap")?t:`data-${t}`}function ce(e){e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++vd}`);let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;let s=[];function n(o,c,d,l){o.addEventListener(c,d,l),s.push(()=>o.removeEventListener(c,d,l))}let r=[...e.querySelectorAll("[data-swap]")].filter(o=>o!==e&&o.closest("content-swap, [data-swap]")===e);return r.length===0?(e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.getAttribute("aria-label")||e.setAttribute("aria-label","Toggle content"),n(e,"click",()=>rt(e,"pointer")),n(e,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),rt(e,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),rt(e,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),rt(e,"keyboard"))})}),e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(n(e,"swipe-left",()=>rt(e,"pointer")),n(e,"swipe-right",()=>rt(e,"pointer"))),ea(e,t,i),()=>{for(let o of s)o();s.length=0}}function ea(e,t,i){let s=e.hasAttribute(le(e,"swapped"));t.inert=s,i.inert=!s}function yd(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Dt(e,t,i="api"){let{front:s,back:n}=yd(e);if(!s||!n)return;let r=le(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),ea(e,s,n),wd(e,i);let d=t?n:s,l=d.querySelector("[autofocus]");l?l.focus():i==="keyboard"&&Ed(d)},o=d=>{let l=e;typeof l.setState=="function"&&l.setState("transition-running",d)};o(!0);let c=U(a);c&&c.finished&&typeof c.finished.finally=="function"?c.finished.finally(()=>o(!1)):o(!1)}function rt(e,t="api"){Dt(e,!e.hasAttribute(le(e,"swapped")),t)}function wd(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(le(e,"swapped")),source:t},bubbles:!0}))}function Ed(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var Ai=class extends g{#e=null;setup(){this.#e=ce(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){Dt(this,!0)}unflip(){Dt(this,!1)}toggle(){rt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Dt(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Dt(this,!!t)}};b("content-swap",Ai);function Qr(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&(ce(e),e.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qr):Qr();var ta=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(ce(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(ce(n),n.setAttribute("data-swap-init",""))})}});document.body?ta.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{ta.observe(document.body,{childList:!0,subtree:!0})});var Si=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 i=t.map(s=>({...s}));this.#e&&this.#h(this.#e,i)||(this.#e=i,this.#o(i),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 i=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,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 i=this.current,s=this.#a();this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,i=Array.from(this.#s());if(i.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of i){let d=c.getAttribute("href");if(!d||/^[a-z]+:/i.test(d)||d.startsWith("//"))continue;let l=d.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}#c(t){let i=this.#s();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#o(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 i=document.createElement("a");if(i.href=t.href||"#",t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),i.appendChild(s)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",i.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),i.appendChild(s)}return i}#h(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[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]]!==i[s][r[a]])return!1}return!0}};b("nav-bar",Si);var Sd=0,Ti=class extends g{#e;#t=[];#i;#s;#r;#n;#a;#c=null;#o=0;#f=0;#h=!1;#p=!1;#u=!1;#l=null;get currentIndex(){return this.#o}get slideCount(){return this.#t.length}get playing(){return this.#c!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#p=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#u=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#u&&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.#b),this.#u){let r=++Sd,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.#u&&Promise.resolve().then(()=>(ki(),Ci)).then(({addSwipeListener:r})=>{this.#l=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#u||(this.#a=new IntersectionObserver(this.#v,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)),"onscrollend"in window&&this.listen(this.#e,"scrollend",()=>{this.#h=!1,this.#y()}));let n=this.#C()??(Number(this.getAttribute("start"))||0);if(this.#u){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#d(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);return this.#w(),this.hasAttribute("autoplay")&&!this.#p&&this.#g(),!0}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#l&&(this.#l(),this.#l=null),this.#e?.parentElement===this&&[...this.#e.children].forEach(t=>this.appendChild(t)),this.#e?.remove(),this.#i?.remove(),this.#s?.remove(),this.#r?.remove(),this.#n?.remove(),this.#e=this.#i=this.#s=this.#r=this.#n=null,this.#t=[],this.#u=!1,this.#o=0,this.#f=0,this.#h=!1}get slides(){return this.#t.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#t.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){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:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#o<this.#t.length-1?this.goTo(this.#o+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#o>0?this.goTo(this.#o-1):t&&this.goTo(this.#t.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#t.length)){if(this.#u)if(i&&t!==this.#o){let s=t>this.#o?"forward":"backward";document.documentElement.dataset.vtDirection=s,U(()=>{this.#m(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#m(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=i&&!this.#p?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#d(t)}}#m(t){this.#t.forEach((i,s)=>{i.hidden=s!==t})}play(){if(this.#c||this.#p)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#c=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#c&&(clearInterval(this.#c),this.#c=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#L()}#d(t){this.#o=t,this.#w(),this.#N(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),!this.#h&&(this.#y(),!this.#u&&"onscrollend"in window&&(this.#h=!0))}#y(){this.#o!==this.#f&&(this.#f=this.#o,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#o,slide:this.#t[this.#o]},bubbles:!0})))}#w(){let t=this.hasAttribute("loop"),i=this.#o===0,s=this.#o===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&i),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.#o;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#v=t=>{for(let i of t)if(i.isIntersecting){let s=this.#t.indexOf(i.target);s!==-1&&s!==this.#o&&this.#d(s)}};#b=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}};#g(){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})}#C(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#N(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#o))}catch{}}#L(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",Ti);function ca(e,t,i){"role"in ElementInternals.prototype?t.role=i:e.setAttribute("role",i)}var xd=0,Li=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#c=!1;#o="";#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 i=this.querySelector("ul, ol");if(!i)return!1;if(this.#i=i,this.#m){let o=this.querySelector(":scope > .tags-input-area");if(!o){o=document.createElement("div"),o.className="tags-input-area";let d=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(o,d)}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${++xd}`;this.#i.id||(this.#i.id=`combobox-listbox-${n}`),ca(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.#o}return this.listen(this.#t,"input",this.#g),this.listen(this.#t,"keydown",this.#C),this.listen(this.#t,"focus",this.#N),this.listen(this.#t,"click",this.#L),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.#M(),this.#E(),!0}teardown(){}#d(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#n=[...this.#r]}#y(t,i){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:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),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(`${i} added`),this.#t.value="",this.#k(""),this.#A(),this.#M(),this.#H(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#E())}#w(t){let i=this.#l.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#l.splice(i,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.#M(),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.#o){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#o="",this.#f="",this.removeAttribute("value"),this.#A(),this.#M()}this.#k(t),this.#_()};#C=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#c||this.#_(),this.#I(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#c||this.#_(),this.#I(this.#a-1);break;case"Home":this.#c&&(t.preventDefault(),this.#I(0));break;case"End":this.#c&&(t.preventDefault(),this.#I(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#c&&this.#a>=0&&this.#n[this.#a]){let i=this.#n[this.#a];this.#m?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#R(i)}else if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){let i=this.#t.value.trim();this.#y(i,i)}break;case"Backspace":if(this.#m&&!this.#t.value&&this.#l.length>0){let i=this.#l[this.#l.length-1];this.#w(i.value)}break;case",":if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let i=this.#t.value.trim();this.#y(i,i)}break;case"Escape":this.#c&&(t.preventDefault(),t.stopPropagation(),this.#E(),this.#t.focus());break;case"Tab":this.#c&&this.#E();break}};#N=()=>{this.#m?(this.#k(this.#t.value.trim()),this.#_()):(this.#t.value||!this.#o)&&(this.#k(this.#t.value.trim()),this.#_())};#L=()=>{this.#c||(this.#k(this.#t.value.trim()),this.#_())};#S=t=>{let i=t.target.closest("li[data-value]");i&&this.#n.includes(i)&&(this.#m?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#R(i))};#B=t=>{t.preventDefault()};#q=t=>{this.#c&&!this.contains(t.target)&&this.#E()};#k(t){let i=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?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#$(),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 i=this.#n[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",i.id)}#$(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();this.#o!==s&&(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#o=s,this.#f=n,this.#t.value=n,this.setAttribute("value",s),this.#A(),this.#M(),this.#E(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}})))}#T(t,i=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#R(n,s):(n.setAttribute("aria-selected","true"),this.#o=t,this.#f=n.textContent.trim(),this.#t.value=this.#f,this.setAttribute("value",t)))}#_(){this.#c||(this.#c=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#E(){this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#x=()=>{this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#A(){if(this.#m)if(this.#l.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#l)t.append(i,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#o?this.#e.setFormValue(this.#o,this.#f):this.#e.setFormValue(null)}#M(){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.#o?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.#o="",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.#$(),this.#E(),!this.#m&&this.#h&&this.#T(this.#h,!1),this.#A(),this.#M()}formStateRestoreCallback(t){t&&(this.#m||(this.#T(t,!1),this.#A(),this.#M()))}get value(){return this.#o}set value(t){t?this.#T(t):(this.#r.forEach(i=>i.setAttribute("aria-selected","false")),this.#o="",this.#f="",this.#t.value="",this.removeAttribute("value"),this.#A(),this.#M())}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,i,s){t==="value"&&this.#t&&s!==this.#o&&s&&(this.#T(s,!1),this.#A(),this.#M())}};b("combo-box",Li);function Cd(){try{let e=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return e.hourCycle==="h12"||e.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function F(e){return String(e).padStart(2,"0")}function bt(e){if(!e)return null;let t=e.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function It(e,t,i,s){return s?`${F(e)}:${F(t)}:${F(i)}`:`${F(e)}:${F(t)}`}function kd(e,t,i,s,n){if(n==="12h"){let r=e>=12?"PM":"AM",a=e%12||12;return s?`${a}:${F(t)}:${F(i)} ${r}`:`${a}:${F(t)} ${r}`}return It(e,t,i,s)}function la(e){let t=e.trim();if(!t)return null;let i=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;i&&(s=i[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,i.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 d=a;if(s){if(d<1||d>12)return null;s==="AM"?d=d===12?0:d:d=d===12?12:d+12}else if(d<0||d>23)return null;return{h:d,m:o,s:c}}function Td(e,t,i){return e>i?t:e<t?i:e}var Ni=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#c;#o;#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=bt(this.#t.getAttribute("min")),this.#d=bt(this.#t.getAttribute("max")),this.#o=this.getAttribute("data-format")||Cd();let t=bt(this.#t.value);return t&&(this.#h=t.h,this.#p=t.m,this.#u=t.s),this.#w=this.#t.value,this.#o==="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.#N(),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(){if(this.#s?.parentNode===this)return;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",i=>{i.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.#$)}#N(){if(this.#n?.parentNode===this)return;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.#o==="12h"?1:0,i=this.#o==="12h"?12:23,s=this.#L("Hours",t,i,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.#L("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#f){this.#n.appendChild(this.#S());let a=this.#L("Seconds",0,59,this.#y);this.#n.appendChild(a.el),this.#a.push(a)}this.#o==="12h"&&(this.#c=document.createElement("button"),this.#c.type="button",this.#c.className="period-toggle",this.#c.setAttribute("aria-label","Toggle AM/PM"),this.#c.textContent=this.#l,this.#n.appendChild(this.#c),this.listen(this.#c,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#c.textContent=this.#l,this.#h=this.#O(this.#D(),this.#l),this.#M()}),this.listen(this.#c,"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)}#L(t,i,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(i)),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 d={el:r,valueEl:o,label:t,min:i,max:s,step:n};return this.listen(a,"click",()=>{this.#x(d,n)}),this.listen(c,"click",()=>{this.#x(d,-n)}),this.listen(r,"keydown",l=>{this.#R(l,d)}),this.listen(r,"focus",()=>{this.#v=this.#a.indexOf(d)}),d}#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 i=la(this.#i.value);i&&(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M()),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}};#$=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let i=this.#i.value.trim();if(i){let s=la(i);s&&(this.#h=s.h,this.#p=s.m,this.#u=s.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:It(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,i)=>{let s=this.#a.indexOf(i);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(i,i.step);break;case"ArrowDown":t.preventDefault(),this.#x(i,-i.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#c&&this.#c.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#x(i,i.step*(i.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(i,-i.step*(i.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#A(i,i.min);break;case"End":t.preventDefault(),this.#A(i,i.max);break;case"Escape":t.preventDefault(),this.#q(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#E(t.key,i))}};#T="";#_=0;#E(t,i){clearTimeout(this.#_),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>i.max){let n=Math.min(Math.max(s,i.min),i.max);this.#A(i,n),this.#T=""}else this.#_=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,i.min),i.max);this.#A(i,r),this.#T=""},800)}#x(t,i){let s;t.label==="Hours"?s=this.#o==="12h"?this.#D():this.#h:t.label==="Minutes"?s=this.#p:s=this.#u;let n=Td(s+i,t.min,t.max);this.#A(t,n)}#A(t,i){t.label==="Hours"?this.#o==="12h"?this.#h=this.#O(i,this.#l):this.#h=i:t.label==="Minutes"?this.#p=i:this.#u=i,this.#M()}#M(t="internal"){this.#H(),this.#F(),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:It(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u,source:t}}))}#H(){let t=this.#o==="12h"?this.#D():this.#h;this.#a[0].valueEl.textContent=F(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#o==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=F(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#f&&this.#a[2]&&(this.#a[2].valueEl.textContent=F(this.#u),this.#a[2].el.setAttribute("aria-valuenow",String(this.#u))),this.#c&&(this.#c.textContent=this.#l)}#F(){this.#h!==void 0&&(this.#i.value=kd(this.#h,this.#p,this.#u,this.#f,this.#o))}#P(){let t=It(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({})}#O(t,i){return i==="AM"?t===12?0:t:t===12?12:t+12}#D(){if(this.#o==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=bt(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.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M()}formStateRestoreCallback(t){if(!t)return;let i=bt(t);i&&(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M())}get value(){return It(this.#h,this.#p,this.#u,this.#f)}set value(t){let i=bt(t);i&&(i.h===this.#h&&i.m===this.#p&&i.s===this.#u||(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M("api")))}};b("time-picker",Ni);var ue="popover"in HTMLElement.prototype;var Ld=["Su","Mo","Tu","We","Th","Fr","Sa"],Nd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Di=["january","february","march","april","may","june","july","august","september","october","november","december"];function B(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function R(e){if(!e)return null;let[t,i,s]=e.split("-").map(Number);return new Date(t,i-1,s)}function he(e,t){return new Date(e,t+1,0).getDate()}function Md(){try{let e=new Intl.Locale(navigator.language);if(e.weekInfo)return e.weekInfo.firstDay%7}catch{}return 0}function _d(e){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return B(e)}}function fe(e,t){return e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Dd(){let e=new Map;Di.forEach((t,i)=>{e.set(t,i),e.set(t.slice(0,3),i)});try{for(let t=0;t<12;t++){let i=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(".","");e.set(i,t),e.set(s,t)}}catch{}return e}var Mi=Dd();function _i(e){let t=e.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=R(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=R(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let i=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(i);if(s){let a=Mi.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=Mi.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=Mi.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var Ii=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#c;#o;#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=R(this.#t.getAttribute("min")),this.#w=R(this.#t.getAttribute("max")),this.#C=Md();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#v.set(r,a||"")});let i=this.getAttribute("data-highlight-dates");i&&i.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||"")}),this.#u=R(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.#N(),this.#L(),this.#T(),this.#D(),this.#z(),this.#p=ue,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)}#N(){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",i=>{i.stopPropagation(),this.#h?this.#E():this.#_(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#M),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#F)}#L(){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 i=document.createElement("button");i.type="button",i.className="calendar-nav",i.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"),i.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#o=document.createElement("span"),this.#o.className="calendar-month",this.#f=document.createElement("select"),this.#f.className="calendar-year",this.#f.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#o),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(i),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"),d=document.createElement("tr");for(let l=0;l<7;l++){let u=(this.#C+l)%7,h=document.createElement("th");h.setAttribute("abbr",Nd[u]),h.setAttribute("scope","col"),h.textContent=Ld[u],d.appendChild(h)}c.appendChild(d),o.appendChild(c),this.#c=document.createElement("tbody"),o.appendChild(this.#c),this.#n.appendChild(o),this.appendChild(this.#n),this.#S(),this.listen(i,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#f,"change",()=>{this.#m=Number(this.#f.value);let l=he(this.#m,this.#d),u=Math.min(this.#l?.getDate()??1,l);this.#l=new Date(this.#m,this.#d,u),this.#S()}),this.listen(this.#c,"click",this.#V),this.listen(this.#n,"keydown",this.#O)}#S(){try{this.#o.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#m,this.#d,1))}catch{this.#o.textContent=Di[this.#d].charAt(0).toUpperCase()+Di[this.#d].slice(1)}this.#f.querySelector(`option[value="${this.#m}"]`)||this.#k(),this.#f.value=String(this.#m),this.#c.innerHTML="";let t=he(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),d=B(c),l=document.createElement("td"),u=document.createElement("button");u.type="button",u.setAttribute("data-date",d),u.textContent=String(o),fe(c,n)&&u.setAttribute("aria-current","date"),fe(c,this.#u)&&u.setAttribute("aria-selected","true");let h=this.#q(c,d);if(h.disabled&&(u.setAttribute("aria-disabled","true"),u.setAttribute("disabled",""),h.reason&&u.setAttribute("data-disabled-reason",h.reason)),this.#b.has(d)){let f=this.#b.get(d);u.setAttribute("data-highlight",f||"")}fe(c,this.#l)?(u.setAttribute("tabindex","0"),fe(c,this.#u)||u.setAttribute("data-focused","")):u.setAttribute("tabindex","-1"),l.appendChild(u),r.appendChild(l),(s+o)%7===0&&(this.#c.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.#c.appendChild(r)}}#B(t,i){return this.#q(t,i).disabled}#q(t,i){return this.#v.has(i)?{disabled:!0,reason:this.#v.get(i)}: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(),i=this.#y?this.#y.getFullYear():t-100,s=this.#w?this.#w.getFullYear():t+10;for(let n=i;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 i=he(this.#m,this.#d),s=Math.min(this.#l?.getDate()??1,i);this.#l=new Date(this.#m,this.#d,s),this.#S(),this.#R(this.#l)}#$(t,i="internal"){let s=B(t);this.#B(t,s)||this.#u&&B(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:i}})))}#R(t){let i=B(t),s=this.#c.querySelector(`[data-date="${i}"]`);s&&(this.#c.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#u?this.#i.value=_d(this.#u):this.#i.value=""}#_(){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(),i=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,d;o<i.height&&c>o?(d=t.top-i.height-s,this.#n.dataset.placement="top"):(d=t.bottom+s,delete this.#n.dataset.placement);let l=t.left;l+i.width>a-n&&(l=a-i.width-n),l<n&&(l=n),this.#n.style.setProperty("--calendar-top",`${d}px`),this.#n.style.setProperty("--calendar-left",`${l}px`)}#A=()=>{this.#h&&this.#x()};#M=()=>{let t=this.#i.value,{date:i,partial:s}=_i(t);if(i)this.#l=i,this.#m=i.getFullYear(),this.#d=i.getMonth(),this.#S();else if(s){this.#m=s.year,this.#d=s.month;let n=he(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.#_()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:i}=_i(this.#i.value);i&&!this.#B(i,B(i))&&this.#$(i);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#_(),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 i=this.#i.value.trim();if(i){let{date:s}=_i(i);s&&!this.#B(s,B(s))&&(this.#u=s,this.#l=s,this.#D(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:B(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=R(s.getAttribute("data-date"));n&&this.#$(n)};#O=t=>{if(t.key==="Tab"){this.#E();return}let i=this.#l;if(!i)return;let s;switch(t.key){case"ArrowRight":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+1);break;case"ArrowLeft":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-1);break;case"ArrowDown":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+7);break;case"ArrowUp":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(i.getFullYear()+1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()+1,i.getDate());break;case"PageUp":t.shiftKey?s=new Date(i.getFullYear()-1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()-1,i.getDate());break;case"Home":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+this.#C);break;case"End":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+(6-i.getDay()+this.#C));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#$(i);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?B(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=R(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=R(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?B(this.#u):""}set value(t){let i=R(t);i&&this.#$(i,"api")}get min(){return this.#y?B(this.#y):""}set min(t){this.#y=t?R(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#w?B(this.#w):""}set max(t){this.#w=t?R(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};b("date-picker",Ii);Nt();function gt(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-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 pe(e,t,i){e/=255,t/=255,i/=255;let s=Math.max(e,t,i),n=Math.min(e,t,i),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 e:a=((t-i)/c+(t<i?6:0))/6;break;case t:a=((i-e)/c+2)/6;break;case i:a=((e-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function Id(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function Od(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function J(e){let{r:t,g:i,b:s}=Id(e);return pe(t,i,s)}function Z(e,t,i){let{r:s,g:n,b:r}=gt(e,t,i);return Od(s,n,r)}function M(e,t,i){return Math.max(t,Math.min(i,e))}function Oi(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function qi(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(M(t,0,1)*255)}function qd(e,t,i){let s=Oi(e),n=Oi(t),r=Oi(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,d=Math.cbrt(a),l=Math.cbrt(o),u=Math.cbrt(c),h=.2104542553*d+.793617785*l-.0040720468*u,f=1.9779984951*d-2.428592205*l+.4505937099*u,v=.0259040371*d+.7827717662*l-.808675766*u,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:h,C:p,H:m}}function $d(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,d=a**3,l=o**3,u=c**3,h=4.0767416621*d-3.3077115913*l+.2309699292*u,f=-1.2684380046*d+2.6097574011*l-.3413193965*u,v=-.0041960863*d-.7034186147*l+1.707614701*u;return{r:qi(h),g:qi(f),b:qi(v)}}function $i(e,t,i){let s=gt(e,t,i);return qd(s.r,s.g,s.b)}function da(e,t,i){let{r:s,g:n,b:r}=$d(e,t,i);return pe(s,n,r)}function Bd(e,t,i){return Z(e,t,i)}function Pd(e,t,i){let{r:s,g:n,b:r}=gt(e,t,i);return`rgb(${s} ${n} ${r})`}function Fd(e,t,i){return`hsl(${e}deg ${t}% ${i}%)`}function Rd(e,t,i){let{L:s,C:n,H:r}=$i(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function ua(e,t,i,s){switch(e){case"rgb":return Pd(t,i,s);case"hsl":return Fd(t,i,s);case"oklch":return Rd(t,i,s);default:return Bd(t,i,s)}}var vt=["hex","rgb","hsl","oklch"],Hd="hex",Bi=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#c;#o;#f;#h;#p={};#u=Hd;#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&&vt.includes(t)&&(this.#u=t);let i=this.#t.value||"#000000";this.#C=i;let s=J(i);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.#N(),this.#L(),this.#D(),this.#j(),this.#w=ue,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)}#N(){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()})}#L(){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.#c=document.createElement("div"),this.#c.className="color-area-thumb",this.#a.appendChild(this.#c),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#o=document.createElement("div"),this.#o.className="color-hue",this.#o.setAttribute("role","slider"),this.#o.setAttribute("aria-label","Hue"),this.#o.setAttribute("aria-valuemin","0"),this.#o.setAttribute("aria-valuemax","360"),this.#o.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#o.appendChild(this.#f),t.appendChild(this.#o),this.#n.appendChild(t);let i=document.createElement("div");i.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 vt){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),i.appendChild(s),this.#n.appendChild(i),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 vt)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.#$),this.listen(this.#o,"pointerdown",this.#R),this.listen(this.#o,"keydown",this.#_);for(let o of vt){let c=o==="hex"?this.#x:o==="rgb"?this.#A:o==="hsl"?this.#M:this.#H;for(let{el:d}of this.#p[o].inputs)this.listen(d,"change",c)}}#S(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){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 vt)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;vt.includes(t)&&(this.#u=t,this.#B(),this.#D())};#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let i=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",i),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",i),this.#a.addEventListener("pointerup",s)};#I(t){let i=this.#a.getBoundingClientRect(),s=M((t.clientX-i.left)/i.width,0,1),n=M((t.clientY-i.top)/i.height,0,1);this.#b=Math.round(s*100),this.#g=Math.round((1-n)*100),this.#O()}#$=t=>{let i=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#b=M(this.#b+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#b=M(this.#b-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#g=M(this.#g+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#g=M(this.#g-i,0,100);break;default:return}this.#O()};#R=t=>{t.preventDefault(),this.#o.setPointerCapture(t.pointerId),this.#T(t);let i=n=>this.#T(n),s=n=>{this.#o.releasePointerCapture(n.pointerId),this.#o.removeEventListener("pointermove",i),this.#o.removeEventListener("pointerup",s)};this.#o.addEventListener("pointermove",i),this.#o.addEventListener("pointerup",s)};#T(t){let i=this.#o.getBoundingClientRect(),s=M((t.clientX-i.left)/i.width,0,1);this.#v=Math.round(s*360),this.#O()}#_=t=>{let i=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-i+361)%361;break;default:return}this.#O()};#E(t,i){return this.#p[t].inputs.find(s=>s.channel===i)?.el}#x=()=>{let t=this.#E("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=J(i);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#O()}};#A=()=>{let t=M(Number(this.#E("rgb","r").value)||0,0,255),i=M(Number(this.#E("rgb","g").value)||0,0,255),s=M(Number(this.#E("rgb","b").value)||0,0,255),n=pe(t,i,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#M=()=>{let t=M(Number(this.#E("hsl","h").value)||0,0,360)%361,i=M(Number(this.#E("hsl","s").value)||0,0,100),s=M(Number(this.#E("hsl","l").value)||0,0,100);this.#v=t,this.#b=i,this.#g=s,this.#O()};#H=()=>{let t=M(Number(this.#E("oklch","oL").value)||0,0,100)/100,i=M(Number(this.#E("oklch","oC").value)||0,0,.4),s=M(Number(this.#E("oklch","oH").value)||0,0,360),n=da(t,i,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#F=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=J(s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#P=async()=>{try{let i=await new window.EyeDropper().open(),s=J(i.sRGBHex);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#O()}catch{}};#V=()=>{let t=ua(this.#u,this.#v,this.#b,this.#g);nt(t,{button:this.#d,announceMessage:"Color copied"})};#O(t="internal"){this.#D(),this.#j();let i=Z(this.#v,this.#b,this.#g),s=gt(this.#v,this.#b,this.#g);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,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=Z(this.#v,this.#b,this.#g),i=gt(this.#v,this.#b,this.#g),s=Z(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#c.style.insetInlineStart=`${this.#b}%`,this.#c.style.insetBlockStart=`${100-this.#g}%`,this.#c.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#b}%, Lightness ${this.#g}%`),this.#f.style.insetInlineStart=`${this.#v/360*100}%`,this.#o.setAttribute("aria-valuenow",String(this.#v)),this.#o.setAttribute("aria-valuetext",`Hue ${this.#v}\xB0`);let n=(a,o,c)=>{let d=this.#E(a,o);d&&(d.value=String(c))};n("hex","hex",t),n("rgb","r",i.r),n("rgb","g",i.g),n("rgb","b",i.b),n("hsl","h",this.#v),n("hsl","s",this.#b),n("hsl","l",this.#g);let r=$i(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=Z(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=J(this.#C);this.#v=t.h,this.#b=t.s,this.#g=t.l,this.#D(),this.#j()}formStateRestoreCallback(t){if(!t)return;let i=J(t);this.#v=i.h,this.#b=i.s,this.#g=i.l,this.#D(),this.#j()}get value(){return Z(this.#v,this.#b,this.#g)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=Z(this.#v,this.#b,this.#g).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=J(t);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O("api")}};b("color-picker",Bi);var zd='<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>',Vd='<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 Ud(e){if(!e)return[];let t=e.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(i=>{let s=i.trim();return{value:s,label:s}})}function Wd(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function jd(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Yd(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);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`${i<0?"-":""}${a.format(r)} ${s[n]}`}function Gd(){return document.documentElement.lang||void 0}function Pi(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var Fi=class extends g{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#c;#o;#f="";#h=!1;#p=!1;#u;#l;#m;#d;#y;#w;#v;#b;#g;#C=0;#N=0;#L=!1;#S=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#B(),this.#q(),this.#$();let t=this.getAttribute("value");this.#m=t,this.#P(t??this.#I(),"init")}attributeChangedCallback(t,i,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=Wd(this.getAttribute("data-values")),this.#a=Ud(this.getAttribute("data-options")),this.#c=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#o=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=Gd(),this.#g=this.#k()}#k(){if(!this.#c)return null;let t=Pi(this.#r);return this.#c==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#c==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#o}):this.#c==="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"}#$(){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=zd,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=Vd,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,i){if(this.listen(t,"click",n=>{if(this.#S){this.#S=!1,n.preventDefault();return}this.#x(i,1)}),!this.#p)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#_()||(this.#L=!1,this.#C=window.setTimeout(()=>{this.#L=!0,this.#N=window.setInterval(()=>this.#x(i,1),100),this.#C=window.setTimeout(()=>{window.clearInterval(this.#N),this.#N=window.setInterval(()=>this.#x(i,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#C),window.clearInterval(this.#N),this.#C=0,this.#N=0,this.#L&&(this.#S=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T=t=>{if(!this.#_())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:}};#_(){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,i){if(this.#_())return;let s=this.#M(t,i);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 i=t==="min"?this.#i===-1/0?this.#l:this.#i:this.#s===1/0?this.#l:this.#s;this.#P(String(i),"step")}#M(t,i){if(this.#t==="enum"){let c=this.#a.findIndex(u=>u.value===this.#l),d=c===-1?0:c,l=Math.min(this.#a.length-1,Math.max(0,d+t*i));return this.#a[l]?.value}if(this.#t==="token"){let d=this.#H(this.#l);d===-1&&(d=this.#F(this.#l));let l=Math.min(this.#n.length-1,Math.max(0,d+t*i));return this.#n[l]}let s=Number(this.#l)||0,n=Pi(this.#r),r=s+t*this.#r*i,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 i=this.#n.indexOf(String(t));if(i!==-1)return i;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 i=Number(t);if(!Number.isFinite(i))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-i);c<n&&(n=c,s=a)}),s}#P(t,i){let s=this.#V(t),n=s!==this.#l;this.#l=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#O(),this.#Y(),this.#U(),this.#X(),this.#K(),n&&i!=="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 i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=Pi(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,i)).toFixed(s)))}#O(){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 i=this.#h?String(t).replace(/^--/,""):String(t);return this.#f?`${i}${this.#f}`:i}if(this.#t==="formatted"){let i=Number(t)||0;if(this.#c==="duration")return jd(i);if(this.#c==="bytes")return Yd(i,this.#u);if(this.#g){let s=this.#c==="percent"?i/100:i,n=this.#g.format(s);return this.#f&&this.#c==="number"?`${n}${this.#f}`:n}return this.#f?`${i}${this.#f}`:String(i)}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,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#s!==1/0&&i(this.#s),i(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#c==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#D(String(s)))}#W(t){let i=String(t??"");if(!i||this.#w.has(i))return;this.#w.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,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 i=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((i===-1?0:i)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}if(this.#t==="token"){let i=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((i===-1?0:i)+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(),i=this.#j();this.#v.disabled=t||this.hasAttribute("disabled"),this.#b.disabled=i||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",Fi);var Kd=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),Ri=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,i,s){!this.isConnected||i===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):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&&(Kd.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 i=this.querySelector(".status-dot");if(!i)return!0;let s=getComputedStyle(i).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),i=this.hasAttribute("aria-label");!t&&!i&&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",Ri);ae();oe();var ha=0,Hi=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#e=t,this.#t=i;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-${++ha}`,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-${++ha}`),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"),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=Wr(r),n.appendChild(a);let o=mt(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.#c),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 i of this.#t.querySelectorAll(":scope > li")){if(i.hasAttribute("data-group")){t.push({group:i.textContent.trim()});continue}if(i.matches(':empty, [role="separator"]')||i.querySelector("hr")){t.push({separator:!0});continue}let s=i.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 i=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 i){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:i,source:"property"},bubbles:!0}))}#c=t=>{t.preventDefault(),t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#o(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#o(t.clientX,t.clientY)};#o(t,i){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}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=i+s.height>window.innerHeight?i-s.height:i;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",Hi);var zi=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 i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){t==="src"&&s&&i!==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 i of t)if(i.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 i=await fetch(t,{signal:this.#t.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);let s=await i.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(i){if(i.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:i.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",zi);X();var fa="environment",pa="preferences",Vi={timeOfDay:!1,seasonal:!1},Xd=900*1e3,Q={...Vi};function at(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var Ot={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await S.get(fa,pa);Q=e?{...Vi,...e}:{...Vi},(Q.timeOfDay||Q.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...Q}},save(e){return Q={...Q,...e},S.set(fa,pa,Q).catch(()=>{}),{...Q}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[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(i)&&!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 e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?at(-20,20,(e-5)/2):e<10?at(20,5,(e-7)/3):e<14?at(5,0,(e-10)/4):e<17?at(0,-5,(e-14)/3):e<19?at(-5,15,(e-17)/2):e<21?at(15,-10,(e-19)/2):at(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Xd))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var me=null;function ba(){return"0.4.0-513cbce1"}function Jd(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function ga(){return me||(me=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),me}function va(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?ma(navigator.serviceWorker.controller,e,t,i):ga().then(s=>{let n=s.active||s.waiting||s.installing;n?ma(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function ma(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function ya(){return va("GET_STATUS")}async function wa(){return va("CLEAR_CACHE")}async function Ea(){let e=await ga();return await e.update(),{updated:!!e.waiting}}function Zd(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Zd()){let e=Jd();window.addEventListener("load",()=>{me=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}X();var yt=null,H="settings",$t={motionFx:!0,sounds:!1},Gi=class extends g{#e=null;#t=null;#i=!1;#s=[];#r={...$t};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#c(),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(){this.#t?.remove(),this.#t=null}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let i=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],i.push(S.set(H,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...$t,...t.extensions},i.push(S.set(H,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,i.push(S.set(H,"sticky",this.#n?"on":"off"))),Promise.all(i).then(()=>{this.#V?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#c(){let[t,i,s]=await Promise.all([S.get(H,"a11y"),S.get(H,"extensions"),S.get(H,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...$t,...i??{}},this.#n=s==="on"}#o(t){return t!==""&&t!==void 0}#f(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,i){return t?i==="compact"?"compact":i==="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,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#y(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&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:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:d,pageBgGradDir:l}=x.getState(),u=this.#W(),h=this.#X(),f=this.#o(s),v=this.#f(s),p=this.#u(n),m=this.#l(n);return`
327
+ `,Ei=class extends g{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of Zr){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=gd;for(let i of Zr){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#e(i,s)),this.#e(i,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,i){let s=!!i&&i.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 i of bd)this.setState(`trend-${i}`,i===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};b("score-card",Ei);var vd=0;function le(e,t){return e.matches("content-swap")?t:`data-${t}`}function ce(e){e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++vd}`);let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;let s=[];function n(o,c,d,l){o.addEventListener(c,d,l),s.push(()=>o.removeEventListener(c,d,l))}let r=[...e.querySelectorAll("[data-swap]")].filter(o=>o!==e&&o.closest("content-swap, [data-swap]")===e);return r.length===0?(e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.getAttribute("aria-label")||e.setAttribute("aria-label","Toggle content"),n(e,"click",()=>rt(e,"pointer")),n(e,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),rt(e,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),rt(e,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),rt(e,"keyboard"))})}),e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(n(e,"swipe-left",()=>rt(e,"pointer")),n(e,"swipe-right",()=>rt(e,"pointer"))),ea(e,t,i),()=>{for(let o of s)o();s.length=0}}function ea(e,t,i){let s=e.hasAttribute(le(e,"swapped"));t.inert=s,i.inert=!s}function yd(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Dt(e,t,i="api"){let{front:s,back:n}=yd(e);if(!s||!n)return;let r=le(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),ea(e,s,n),wd(e,i);let d=t?n:s,l=d.querySelector("[autofocus]");l?l.focus():i==="keyboard"&&Ed(d)},o=d=>{let l=e;typeof l.setState=="function"&&l.setState("transition-running",d)};o(!0);let c=U(a);c&&c.finished&&typeof c.finished.finally=="function"?c.finished.finally(()=>o(!1)):o(!1)}function rt(e,t="api"){Dt(e,!e.hasAttribute(le(e,"swapped")),t)}function wd(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(le(e,"swapped")),source:t},bubbles:!0}))}function Ed(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var Ai=class extends g{#e=null;setup(){this.#e=ce(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){Dt(this,!0)}unflip(){Dt(this,!1)}toggle(){rt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Dt(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Dt(this,!!t)}};b("content-swap",Ai);function Qr(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&(ce(e),e.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qr):Qr();var ta=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(ce(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(ce(n),n.setAttribute("data-swap-init",""))})}});document.body?ta.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{ta.observe(document.body,{childList:!0,subtree:!0})});var Si=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 i=t.map(s=>({...s}));this.#e&&this.#h(this.#e,i)||(this.#e=i,this.#o(i),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 i=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,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 i=this.current,s=this.#a();this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,i=Array.from(this.#s());if(i.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of i){let d=c.getAttribute("href");if(!d||/^[a-z]+:/i.test(d)||d.startsWith("//"))continue;let l=d.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}#c(t){let i=this.#s();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#o(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 i=document.createElement("a");if(i.href=t.href||"#",t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),i.appendChild(s)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",i.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),i.appendChild(s)}return i}#h(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[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]]!==i[s][r[a]])return!1}return!0}};b("nav-bar",Si);var Sd=0,Ti=class extends g{#e;#t=[];#i;#s;#r;#n;#a;#c=null;#o=0;#f=0;#h=!1;#p=!1;#u=!1;#l=null;get currentIndex(){return this.#o}get slideCount(){return this.#t.length}get playing(){return this.#c!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#p=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#u=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#u&&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.#b),this.#u){let r=++Sd,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.#u&&Promise.resolve().then(()=>(ki(),Ci)).then(({addSwipeListener:r})=>{this.#l=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#u||(this.#a=new IntersectionObserver(this.#v,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)),"onscrollend"in window&&this.listen(this.#e,"scrollend",()=>{this.#h=!1,this.#y()}));let n=this.#C()??(Number(this.getAttribute("start"))||0);if(this.#u){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#d(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);return this.#w(),this.hasAttribute("autoplay")&&!this.#p&&this.#g(),!0}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#l&&(this.#l(),this.#l=null),this.#e?.parentElement===this&&[...this.#e.children].forEach(t=>this.appendChild(t)),this.#e?.remove(),this.#i?.remove(),this.#s?.remove(),this.#r?.remove(),this.#n?.remove(),this.#e=this.#i=this.#s=this.#r=this.#n=null,this.#t=[],this.#u=!1,this.#o=0,this.#f=0,this.#h=!1}get slides(){return this.#t.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#t.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){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:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#o<this.#t.length-1?this.goTo(this.#o+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#o>0?this.goTo(this.#o-1):t&&this.goTo(this.#t.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#t.length)){if(this.#u)if(i&&t!==this.#o){let s=t>this.#o?"forward":"backward";document.documentElement.dataset.vtDirection=s,U(()=>{this.#m(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#m(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=i&&!this.#p?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#d(t)}}#m(t){this.#t.forEach((i,s)=>{i.hidden=s!==t})}play(){if(this.#c||this.#p)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#c=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#c&&(clearInterval(this.#c),this.#c=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#L()}#d(t){this.#o=t,this.#w(),this.#N(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),!this.#h&&(this.#y(),!this.#u&&"onscrollend"in window&&(this.#h=!0))}#y(){this.#o!==this.#f&&(this.#f=this.#o,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#o,slide:this.#t[this.#o]},bubbles:!0})))}#w(){let t=this.hasAttribute("loop"),i=this.#o===0,s=this.#o===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&i),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.#o;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#v=t=>{for(let i of t)if(i.isIntersecting){let s=this.#t.indexOf(i.target);s!==-1&&s!==this.#o&&this.#d(s)}};#b=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}};#g(){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})}#C(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#N(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#o))}catch{}}#L(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",Ti);function ca(e,t,i){"role"in ElementInternals.prototype?t.role=i:e.setAttribute("role",i)}var xd=0,Li=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#c=!1;#o="";#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 i=this.querySelector("ul, ol");if(!i)return!1;if(this.#i=i,this.#m){let o=this.querySelector(":scope > .tags-input-area");if(!o){o=document.createElement("div"),o.className="tags-input-area";let d=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(o,d)}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${++xd}`;this.#i.id||(this.#i.id=`combobox-listbox-${n}`),ca(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.#o}return this.listen(this.#t,"input",this.#g),this.listen(this.#t,"keydown",this.#C),this.listen(this.#t,"focus",this.#N),this.listen(this.#t,"click",this.#L),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.#M(),this.#E(),!0}teardown(){}#d(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#n=[...this.#r]}#y(t,i){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:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),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(`${i} added`),this.#t.value="",this.#k(""),this.#A(),this.#M(),this.#H(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#E())}#w(t){let i=this.#l.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#l.splice(i,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.#M(),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.#o){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#o="",this.#f="",this.removeAttribute("value"),this.#A(),this.#M()}this.#k(t),this.#_()};#C=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#c||this.#_(),this.#I(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#c||this.#_(),this.#I(this.#a-1);break;case"Home":this.#c&&(t.preventDefault(),this.#I(0));break;case"End":this.#c&&(t.preventDefault(),this.#I(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#c&&this.#a>=0&&this.#n[this.#a]){let i=this.#n[this.#a];this.#m?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#R(i)}else if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){let i=this.#t.value.trim();this.#y(i,i)}break;case"Backspace":if(this.#m&&!this.#t.value&&this.#l.length>0){let i=this.#l[this.#l.length-1];this.#w(i.value)}break;case",":if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let i=this.#t.value.trim();this.#y(i,i)}break;case"Escape":this.#c&&(t.preventDefault(),t.stopPropagation(),this.#E(),this.#t.focus());break;case"Tab":this.#c&&this.#E();break}};#N=()=>{this.#m?(this.#k(this.#t.value.trim()),this.#_()):(this.#t.value||!this.#o)&&(this.#k(this.#t.value.trim()),this.#_())};#L=()=>{this.#c||(this.#k(this.#t.value.trim()),this.#_())};#S=t=>{let i=t.target.closest("li[data-value]");i&&this.#n.includes(i)&&(this.#m?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#R(i))};#B=t=>{t.preventDefault()};#q=t=>{this.#c&&!this.contains(t.target)&&this.#E()};#k(t){let i=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?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#$(),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 i=this.#n[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",i.id)}#$(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();this.#o!==s&&(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#o=s,this.#f=n,this.#t.value=n,this.setAttribute("value",s),this.#A(),this.#M(),this.#E(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}})))}#T(t,i=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#R(n,s):(n.setAttribute("aria-selected","true"),this.#o=t,this.#f=n.textContent.trim(),this.#t.value=this.#f,this.setAttribute("value",t)))}#_(){this.#c||(this.#c=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#E(){this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#x=()=>{this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#$(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#A(){if(this.#m)if(this.#l.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#l)t.append(i,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#o?this.#e.setFormValue(this.#o,this.#f):this.#e.setFormValue(null)}#M(){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.#o?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.#o="",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.#$(),this.#E(),!this.#m&&this.#h&&this.#T(this.#h,!1),this.#A(),this.#M()}formStateRestoreCallback(t){t&&(this.#m||(this.#T(t,!1),this.#A(),this.#M()))}get value(){return this.#o}set value(t){t?this.#T(t):(this.#r.forEach(i=>i.setAttribute("aria-selected","false")),this.#o="",this.#f="",this.#t.value="",this.removeAttribute("value"),this.#A(),this.#M())}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,i,s){t==="value"&&this.#t&&s!==this.#o&&s&&(this.#T(s,!1),this.#A(),this.#M())}};b("combo-box",Li);function Cd(){try{let e=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return e.hourCycle==="h12"||e.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function F(e){return String(e).padStart(2,"0")}function bt(e){if(!e)return null;let t=e.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function It(e,t,i,s){return s?`${F(e)}:${F(t)}:${F(i)}`:`${F(e)}:${F(t)}`}function kd(e,t,i,s,n){if(n==="12h"){let r=e>=12?"PM":"AM",a=e%12||12;return s?`${a}:${F(t)}:${F(i)} ${r}`:`${a}:${F(t)} ${r}`}return It(e,t,i,s)}function la(e){let t=e.trim();if(!t)return null;let i=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;i&&(s=i[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,i.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 d=a;if(s){if(d<1||d>12)return null;s==="AM"?d=d===12?0:d:d=d===12?12:d+12}else if(d<0||d>23)return null;return{h:d,m:o,s:c}}function Td(e,t,i){return e>i?t:e<t?i:e}var Ni=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#c;#o;#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=bt(this.#t.getAttribute("min")),this.#d=bt(this.#t.getAttribute("max")),this.#o=this.getAttribute("data-format")||Cd();let t=bt(this.#t.value);return t&&(this.#h=t.h,this.#p=t.m,this.#u=t.s),this.#w=this.#t.value,this.#o==="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.#N(),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(){if(this.#s?.parentNode===this)return;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",i=>{i.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.#$)}#N(){if(this.#n?.parentNode===this)return;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.#o==="12h"?1:0,i=this.#o==="12h"?12:23,s=this.#L("Hours",t,i,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.#L("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#f){this.#n.appendChild(this.#S());let a=this.#L("Seconds",0,59,this.#y);this.#n.appendChild(a.el),this.#a.push(a)}this.#o==="12h"&&(this.#c=document.createElement("button"),this.#c.type="button",this.#c.className="period-toggle",this.#c.setAttribute("aria-label","Toggle AM/PM"),this.#c.textContent=this.#l,this.#n.appendChild(this.#c),this.listen(this.#c,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#c.textContent=this.#l,this.#h=this.#O(this.#D(),this.#l),this.#M()}),this.listen(this.#c,"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)}#L(t,i,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(i)),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 d={el:r,valueEl:o,label:t,min:i,max:s,step:n};return this.listen(a,"click",()=>{this.#x(d,n)}),this.listen(c,"click",()=>{this.#x(d,-n)}),this.listen(r,"keydown",l=>{this.#R(l,d)}),this.listen(r,"focus",()=>{this.#v=this.#a.indexOf(d)}),d}#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 i=la(this.#i.value);i&&(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M()),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}};#$=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let i=this.#i.value.trim();if(i){let s=la(i);s&&(this.#h=s.h,this.#p=s.m,this.#u=s.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:It(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,i)=>{let s=this.#a.indexOf(i);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(i,i.step);break;case"ArrowDown":t.preventDefault(),this.#x(i,-i.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#c&&this.#c.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#x(i,i.step*(i.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(i,-i.step*(i.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#A(i,i.min);break;case"End":t.preventDefault(),this.#A(i,i.max);break;case"Escape":t.preventDefault(),this.#q(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#E(t.key,i))}};#T="";#_=0;#E(t,i){clearTimeout(this.#_),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>i.max){let n=Math.min(Math.max(s,i.min),i.max);this.#A(i,n),this.#T=""}else this.#_=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,i.min),i.max);this.#A(i,r),this.#T=""},800)}#x(t,i){let s;t.label==="Hours"?s=this.#o==="12h"?this.#D():this.#h:t.label==="Minutes"?s=this.#p:s=this.#u;let n=Td(s+i,t.min,t.max);this.#A(t,n)}#A(t,i){t.label==="Hours"?this.#o==="12h"?this.#h=this.#O(i,this.#l):this.#h=i:t.label==="Minutes"?this.#p=i:this.#u=i,this.#M()}#M(t="internal"){this.#H(),this.#F(),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:It(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u,source:t}}))}#H(){let t=this.#o==="12h"?this.#D():this.#h;this.#a[0].valueEl.textContent=F(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#o==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=F(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#f&&this.#a[2]&&(this.#a[2].valueEl.textContent=F(this.#u),this.#a[2].el.setAttribute("aria-valuenow",String(this.#u))),this.#c&&(this.#c.textContent=this.#l)}#F(){this.#h!==void 0&&(this.#i.value=kd(this.#h,this.#p,this.#u,this.#f,this.#o))}#P(){let t=It(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({})}#O(t,i){return i==="AM"?t===12?0:t:t===12?12:t+12}#D(){if(this.#o==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=bt(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.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M()}formStateRestoreCallback(t){if(!t)return;let i=bt(t);i&&(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M())}get value(){return It(this.#h,this.#p,this.#u,this.#f)}set value(t){let i=bt(t);i&&(i.h===this.#h&&i.m===this.#p&&i.s===this.#u||(this.#h=i.h,this.#p=i.m,this.#u=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#M("api")))}};b("time-picker",Ni);var ue="popover"in HTMLElement.prototype;var Ld=["Su","Mo","Tu","We","Th","Fr","Sa"],Nd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Di=["january","february","march","april","may","june","july","august","september","october","november","december"];function B(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function R(e){if(!e)return null;let[t,i,s]=e.split("-").map(Number);return new Date(t,i-1,s)}function he(e,t){return new Date(e,t+1,0).getDate()}function Md(){try{let e=new Intl.Locale(navigator.language);if(e.weekInfo)return e.weekInfo.firstDay%7}catch{}return 0}function _d(e){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return B(e)}}function fe(e,t){return e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Dd(){let e=new Map;Di.forEach((t,i)=>{e.set(t,i),e.set(t.slice(0,3),i)});try{for(let t=0;t<12;t++){let i=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(".","");e.set(i,t),e.set(s,t)}}catch{}return e}var Mi=Dd();function _i(e){let t=e.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=R(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=R(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let i=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(i);if(s){let a=Mi.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=Mi.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=Mi.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var Ii=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#c;#o;#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=R(this.#t.getAttribute("min")),this.#w=R(this.#t.getAttribute("max")),this.#C=Md();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#v.set(r,a||"")});let i=this.getAttribute("data-highlight-dates");i&&i.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||"")}),this.#u=R(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.#N(),this.#L(),this.#T(),this.#D(),this.#z(),this.#p=ue,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)}#N(){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",i=>{i.stopPropagation(),this.#h?this.#E():this.#_(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#M),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#F)}#L(){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 i=document.createElement("button");i.type="button",i.className="calendar-nav",i.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"),i.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#o=document.createElement("span"),this.#o.className="calendar-month",this.#f=document.createElement("select"),this.#f.className="calendar-year",this.#f.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#o),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(i),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"),d=document.createElement("tr");for(let l=0;l<7;l++){let u=(this.#C+l)%7,h=document.createElement("th");h.setAttribute("abbr",Nd[u]),h.setAttribute("scope","col"),h.textContent=Ld[u],d.appendChild(h)}c.appendChild(d),o.appendChild(c),this.#c=document.createElement("tbody"),o.appendChild(this.#c),this.#n.appendChild(o),this.appendChild(this.#n),this.#S(),this.listen(i,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#f,"change",()=>{this.#m=Number(this.#f.value);let l=he(this.#m,this.#d),u=Math.min(this.#l?.getDate()??1,l);this.#l=new Date(this.#m,this.#d,u),this.#S()}),this.listen(this.#c,"click",this.#V),this.listen(this.#n,"keydown",this.#O)}#S(){try{this.#o.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#m,this.#d,1))}catch{this.#o.textContent=Di[this.#d].charAt(0).toUpperCase()+Di[this.#d].slice(1)}this.#f.querySelector(`option[value="${this.#m}"]`)||this.#k(),this.#f.value=String(this.#m),this.#c.innerHTML="";let t=he(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),d=B(c),l=document.createElement("td"),u=document.createElement("button");u.type="button",u.setAttribute("data-date",d),u.textContent=String(o),fe(c,n)&&u.setAttribute("aria-current","date"),fe(c,this.#u)&&u.setAttribute("aria-selected","true");let h=this.#q(c,d);if(h.disabled&&(u.setAttribute("aria-disabled","true"),u.setAttribute("disabled",""),h.reason&&u.setAttribute("data-disabled-reason",h.reason)),this.#b.has(d)){let f=this.#b.get(d);u.setAttribute("data-highlight",f||"")}fe(c,this.#l)?(u.setAttribute("tabindex","0"),fe(c,this.#u)||u.setAttribute("data-focused","")):u.setAttribute("tabindex","-1"),l.appendChild(u),r.appendChild(l),(s+o)%7===0&&(this.#c.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.#c.appendChild(r)}}#B(t,i){return this.#q(t,i).disabled}#q(t,i){return this.#v.has(i)?{disabled:!0,reason:this.#v.get(i)}: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(),i=this.#y?this.#y.getFullYear():t-100,s=this.#w?this.#w.getFullYear():t+10;for(let n=i;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 i=he(this.#m,this.#d),s=Math.min(this.#l?.getDate()??1,i);this.#l=new Date(this.#m,this.#d,s),this.#S(),this.#R(this.#l)}#$(t,i="internal"){let s=B(t);this.#B(t,s)||this.#u&&B(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:i}})))}#R(t){let i=B(t),s=this.#c.querySelector(`[data-date="${i}"]`);s&&(this.#c.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#u?this.#i.value=_d(this.#u):this.#i.value=""}#_(){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(),i=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,d;o<i.height&&c>o?(d=t.top-i.height-s,this.#n.dataset.placement="top"):(d=t.bottom+s,delete this.#n.dataset.placement);let l=t.left;l+i.width>a-n&&(l=a-i.width-n),l<n&&(l=n),this.#n.style.setProperty("--calendar-top",`${d}px`),this.#n.style.setProperty("--calendar-left",`${l}px`)}#A=()=>{this.#h&&this.#x()};#M=()=>{let t=this.#i.value,{date:i,partial:s}=_i(t);if(i)this.#l=i,this.#m=i.getFullYear(),this.#d=i.getMonth(),this.#S();else if(s){this.#m=s.year,this.#d=s.month;let n=he(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.#_()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:i}=_i(this.#i.value);i&&!this.#B(i,B(i))&&this.#$(i);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#_(),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 i=this.#i.value.trim();if(i){let{date:s}=_i(i);s&&!this.#B(s,B(s))&&(this.#u=s,this.#l=s,this.#D(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:B(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=R(s.getAttribute("data-date"));n&&this.#$(n)};#O=t=>{if(t.key==="Tab"){this.#E();return}let i=this.#l;if(!i)return;let s;switch(t.key){case"ArrowRight":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+1);break;case"ArrowLeft":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-1);break;case"ArrowDown":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+7);break;case"ArrowUp":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(i.getFullYear()+1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()+1,i.getDate());break;case"PageUp":t.shiftKey?s=new Date(i.getFullYear()-1,i.getMonth(),i.getDate()):s=new Date(i.getFullYear(),i.getMonth()-1,i.getDate());break;case"Home":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+this.#C);break;case"End":s=new Date(i.getFullYear(),i.getMonth(),i.getDate()+(6-i.getDay()+this.#C));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#$(i);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?B(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=R(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=R(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?B(this.#u):""}set value(t){let i=R(t);i&&this.#$(i,"api")}get min(){return this.#y?B(this.#y):""}set min(t){this.#y=t?R(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#w?B(this.#w):""}set max(t){this.#w=t?R(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};b("date-picker",Ii);Nt();function gt(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-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 pe(e,t,i){e/=255,t/=255,i/=255;let s=Math.max(e,t,i),n=Math.min(e,t,i),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 e:a=((t-i)/c+(t<i?6:0))/6;break;case t:a=((i-e)/c+2)/6;break;case i:a=((e-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function Id(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function Od(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function J(e){let{r:t,g:i,b:s}=Id(e);return pe(t,i,s)}function Z(e,t,i){let{r:s,g:n,b:r}=gt(e,t,i);return Od(s,n,r)}function M(e,t,i){return Math.max(t,Math.min(i,e))}function Oi(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function qi(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(M(t,0,1)*255)}function qd(e,t,i){let s=Oi(e),n=Oi(t),r=Oi(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,d=Math.cbrt(a),l=Math.cbrt(o),u=Math.cbrt(c),h=.2104542553*d+.793617785*l-.0040720468*u,f=1.9779984951*d-2.428592205*l+.4505937099*u,v=.0259040371*d+.7827717662*l-.808675766*u,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:h,C:p,H:m}}function $d(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,d=a**3,l=o**3,u=c**3,h=4.0767416621*d-3.3077115913*l+.2309699292*u,f=-1.2684380046*d+2.6097574011*l-.3413193965*u,v=-.0041960863*d-.7034186147*l+1.707614701*u;return{r:qi(h),g:qi(f),b:qi(v)}}function $i(e,t,i){let s=gt(e,t,i);return qd(s.r,s.g,s.b)}function da(e,t,i){let{r:s,g:n,b:r}=$d(e,t,i);return pe(s,n,r)}function Bd(e,t,i){return Z(e,t,i)}function Pd(e,t,i){let{r:s,g:n,b:r}=gt(e,t,i);return`rgb(${s} ${n} ${r})`}function Fd(e,t,i){return`hsl(${e}deg ${t}% ${i}%)`}function Rd(e,t,i){let{L:s,C:n,H:r}=$i(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function ua(e,t,i,s){switch(e){case"rgb":return Pd(t,i,s);case"hsl":return Fd(t,i,s);case"oklch":return Rd(t,i,s);default:return Bd(t,i,s)}}var vt=["hex","rgb","hsl","oklch"],Hd="hex",Bi=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#c;#o;#f;#h;#p={};#u=Hd;#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&&vt.includes(t)&&(this.#u=t);let i=this.#t.value||"#000000";this.#C=i;let s=J(i);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.#N(),this.#L(),this.#D(),this.#j(),this.#w=ue,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)}#N(){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()})}#L(){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.#c=document.createElement("div"),this.#c.className="color-area-thumb",this.#a.appendChild(this.#c),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#o=document.createElement("div"),this.#o.className="color-hue",this.#o.setAttribute("role","slider"),this.#o.setAttribute("aria-label","Hue"),this.#o.setAttribute("aria-valuemin","0"),this.#o.setAttribute("aria-valuemax","360"),this.#o.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#o.appendChild(this.#f),t.appendChild(this.#o),this.#n.appendChild(t);let i=document.createElement("div");i.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 vt){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),i.appendChild(s),this.#n.appendChild(i),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 vt)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.#$),this.listen(this.#o,"pointerdown",this.#R),this.listen(this.#o,"keydown",this.#_);for(let o of vt){let c=o==="hex"?this.#x:o==="rgb"?this.#A:o==="hsl"?this.#M:this.#H;for(let{el:d}of this.#p[o].inputs)this.listen(d,"change",c)}}#S(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){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 vt)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;vt.includes(t)&&(this.#u=t,this.#B(),this.#D())};#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let i=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",i),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",i),this.#a.addEventListener("pointerup",s)};#I(t){let i=this.#a.getBoundingClientRect(),s=M((t.clientX-i.left)/i.width,0,1),n=M((t.clientY-i.top)/i.height,0,1);this.#b=Math.round(s*100),this.#g=Math.round((1-n)*100),this.#O()}#$=t=>{let i=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#b=M(this.#b+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#b=M(this.#b-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#g=M(this.#g+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#g=M(this.#g-i,0,100);break;default:return}this.#O()};#R=t=>{t.preventDefault(),this.#o.setPointerCapture(t.pointerId),this.#T(t);let i=n=>this.#T(n),s=n=>{this.#o.releasePointerCapture(n.pointerId),this.#o.removeEventListener("pointermove",i),this.#o.removeEventListener("pointerup",s)};this.#o.addEventListener("pointermove",i),this.#o.addEventListener("pointerup",s)};#T(t){let i=this.#o.getBoundingClientRect(),s=M((t.clientX-i.left)/i.width,0,1);this.#v=Math.round(s*360),this.#O()}#_=t=>{let i=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-i+361)%361;break;default:return}this.#O()};#E(t,i){return this.#p[t].inputs.find(s=>s.channel===i)?.el}#x=()=>{let t=this.#E("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=J(i);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#O()}};#A=()=>{let t=M(Number(this.#E("rgb","r").value)||0,0,255),i=M(Number(this.#E("rgb","g").value)||0,0,255),s=M(Number(this.#E("rgb","b").value)||0,0,255),n=pe(t,i,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#M=()=>{let t=M(Number(this.#E("hsl","h").value)||0,0,360)%361,i=M(Number(this.#E("hsl","s").value)||0,0,100),s=M(Number(this.#E("hsl","l").value)||0,0,100);this.#v=t,this.#b=i,this.#g=s,this.#O()};#H=()=>{let t=M(Number(this.#E("oklch","oL").value)||0,0,100)/100,i=M(Number(this.#E("oklch","oC").value)||0,0,.4),s=M(Number(this.#E("oklch","oH").value)||0,0,360),n=da(t,i,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#F=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=J(s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O()};#P=async()=>{try{let i=await new window.EyeDropper().open(),s=J(i.sRGBHex);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#O()}catch{}};#V=()=>{let t=ua(this.#u,this.#v,this.#b,this.#g);nt(t,{button:this.#d,announceMessage:"Color copied"})};#O(t="internal"){this.#D(),this.#j();let i=Z(this.#v,this.#b,this.#g),s=gt(this.#v,this.#b,this.#g);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,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=Z(this.#v,this.#b,this.#g),i=gt(this.#v,this.#b,this.#g),s=Z(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#c.style.insetInlineStart=`${this.#b}%`,this.#c.style.insetBlockStart=`${100-this.#g}%`,this.#c.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#b}%, Lightness ${this.#g}%`),this.#f.style.insetInlineStart=`${this.#v/360*100}%`,this.#o.setAttribute("aria-valuenow",String(this.#v)),this.#o.setAttribute("aria-valuetext",`Hue ${this.#v}\xB0`);let n=(a,o,c)=>{let d=this.#E(a,o);d&&(d.value=String(c))};n("hex","hex",t),n("rgb","r",i.r),n("rgb","g",i.g),n("rgb","b",i.b),n("hsl","h",this.#v),n("hsl","s",this.#b),n("hsl","l",this.#g);let r=$i(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=Z(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=J(this.#C);this.#v=t.h,this.#b=t.s,this.#g=t.l,this.#D(),this.#j()}formStateRestoreCallback(t){if(!t)return;let i=J(t);this.#v=i.h,this.#b=i.s,this.#g=i.l,this.#D(),this.#j()}get value(){return Z(this.#v,this.#b,this.#g)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=Z(this.#v,this.#b,this.#g).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=J(t);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#O("api")}};b("color-picker",Bi);var zd='<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>',Vd='<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 Ud(e){if(!e)return[];let t=e.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(i=>{let s=i.trim();return{value:s,label:s}})}function Wd(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function jd(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Yd(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);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`${i<0?"-":""}${a.format(r)} ${s[n]}`}function Gd(){return document.documentElement.lang||void 0}function Pi(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var Fi=class extends g{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#c;#o;#f="";#h=!1;#p=!1;#u;#l;#m;#d;#y;#w;#v;#b;#g;#C=0;#N=0;#L=!1;#S=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#B(),this.#q(),this.#$();let t=this.getAttribute("value");this.#m=t,this.#P(t??this.#I(),"init")}attributeChangedCallback(t,i,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=Wd(this.getAttribute("data-values")),this.#a=Ud(this.getAttribute("data-options")),this.#c=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#o=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=Gd(),this.#g=this.#k()}#k(){if(!this.#c)return null;let t=Pi(this.#r);return this.#c==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#c==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#o}):this.#c==="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"}#$(){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=zd,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=Vd,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,i){if(this.listen(t,"click",n=>{if(this.#S){this.#S=!1,n.preventDefault();return}this.#x(i,1)}),!this.#p)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#_()||(this.#L=!1,this.#C=window.setTimeout(()=>{this.#L=!0,this.#N=window.setInterval(()=>this.#x(i,1),100),this.#C=window.setTimeout(()=>{window.clearInterval(this.#N),this.#N=window.setInterval(()=>this.#x(i,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#C),window.clearInterval(this.#N),this.#C=0,this.#N=0,this.#L&&(this.#S=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T=t=>{if(!this.#_())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:}};#_(){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,i){if(this.#_())return;let s=this.#M(t,i);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 i=t==="min"?this.#i===-1/0?this.#l:this.#i:this.#s===1/0?this.#l:this.#s;this.#P(String(i),"step")}#M(t,i){if(this.#t==="enum"){let c=this.#a.findIndex(u=>u.value===this.#l),d=c===-1?0:c,l=Math.min(this.#a.length-1,Math.max(0,d+t*i));return this.#a[l]?.value}if(this.#t==="token"){let d=this.#H(this.#l);d===-1&&(d=this.#F(this.#l));let l=Math.min(this.#n.length-1,Math.max(0,d+t*i));return this.#n[l]}let s=Number(this.#l)||0,n=Pi(this.#r),r=s+t*this.#r*i,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 i=this.#n.indexOf(String(t));if(i!==-1)return i;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 i=Number(t);if(!Number.isFinite(i))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-i);c<n&&(n=c,s=a)}),s}#P(t,i){let s=this.#V(t),n=s!==this.#l;this.#l=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#O(),this.#Y(),this.#U(),this.#X(),this.#K(),n&&i!=="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 i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=Pi(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,i)).toFixed(s)))}#O(){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 i=this.#h?String(t).replace(/^--/,""):String(t);return this.#f?`${i}${this.#f}`:i}if(this.#t==="formatted"){let i=Number(t)||0;if(this.#c==="duration")return jd(i);if(this.#c==="bytes")return Yd(i,this.#u);if(this.#g){let s=this.#c==="percent"?i/100:i,n=this.#g.format(s);return this.#f&&this.#c==="number"?`${n}${this.#f}`:n}return this.#f?`${i}${this.#f}`:String(i)}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,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#s!==1/0&&i(this.#s),i(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#c==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#D(String(s)))}#W(t){let i=String(t??"");if(!i||this.#w.has(i))return;this.#w.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,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 i=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((i===-1?0:i)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}if(this.#t==="token"){let i=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((i===-1?0:i)+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(),i=this.#j();this.#v.disabled=t||this.hasAttribute("disabled"),this.#b.disabled=i||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",Fi);var Kd=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),Ri=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,i,s){!this.isConnected||i===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):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&&(Kd.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 i=this.querySelector(".status-dot");if(!i)return!0;let s=getComputedStyle(i).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),i=this.hasAttribute("aria-label");!t&&!i&&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",Ri);ae();oe();var ha=0,Hi=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#e=t,this.#t=i;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-${++ha}`,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-${++ha}`),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"),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=Wr(r),n.appendChild(a);let o=mt(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.#c),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 i of this.#t.querySelectorAll(":scope > li")){if(i.hasAttribute("data-group")){t.push({group:i.textContent.trim()});continue}if(i.matches(':empty, [role="separator"]')||i.querySelector("hr")){t.push({separator:!0});continue}let s=i.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 i=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 i){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:i,source:"property"},bubbles:!0}))}#c=t=>{t.preventDefault(),t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#o(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#o(t.clientX,t.clientY)};#o(t,i){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}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=i+s.height>window.innerHeight?i-s.height:i;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",Hi);var zi=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 i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){t==="src"&&s&&i!==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 i of t)if(i.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 i=await fetch(t,{signal:this.#t.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);let s=await i.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(i){if(i.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:i.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",zi);X();var fa="environment",pa="preferences",Vi={timeOfDay:!1,seasonal:!1},Xd=900*1e3,Q={...Vi};function at(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var Ot={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await S.get(fa,pa);Q=e?{...Vi,...e}:{...Vi},(Q.timeOfDay||Q.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...Q}},save(e){return Q={...Q,...e},S.set(fa,pa,Q).catch(()=>{}),{...Q}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[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(i)&&!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 e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?at(-20,20,(e-5)/2):e<10?at(20,5,(e-7)/3):e<14?at(5,0,(e-10)/4):e<17?at(0,-5,(e-14)/3):e<19?at(-5,15,(e-17)/2):e<21?at(15,-10,(e-19)/2):at(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Xd))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var me=null;function ba(){return"0.4.1-7f95ee90"}function Jd(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function ga(){return me||(me=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),me}function va(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?ma(navigator.serviceWorker.controller,e,t,i):ga().then(s=>{let n=s.active||s.waiting||s.installing;n?ma(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function ma(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function ya(){return va("GET_STATUS")}async function wa(){return va("CLEAR_CACHE")}async function Ea(){let e=await ga();return await e.update(),{updated:!!e.waiting}}function Zd(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Zd()){let e=Jd();window.addEventListener("load",()=>{me=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}X();var yt=null,H="settings",$t={motionFx:!0,sounds:!1},Gi=class extends g{#e=null;#t=null;#i=!1;#s=[];#r={...$t};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#c(),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(){this.#t?.remove(),this.#t=null}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let i=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],i.push(S.set(H,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...$t,...t.extensions},i.push(S.set(H,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,i.push(S.set(H,"sticky",this.#n?"on":"off"))),Promise.all(i).then(()=>{this.#V?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#c(){let[t,i,s]=await Promise.all([S.get(H,"a11y"),S.get(H,"extensions"),S.get(H,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...$t,...i??{}},this.#n=s==="on"}#o(t){return t!==""&&t!==void 0}#f(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,i){return t?i==="compact"?"compact":i==="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,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#y(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&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:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:d,pageBgGradDir:l}=x.getState(),u=this.#W(),h=this.#X(),f=this.#o(s),v=this.#f(s),p=this.#u(n),m=this.#l(n);return`
328
328
  <header class="settings-header">
329
329
  <strong>Settings</strong>
330
330
  <button type="button" class="settings-close" aria-label="Close settings">