vanilla-breeze 0.1.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +17500 -6553
- package/dist/cdn/components/icon-wc.js +4 -4
- package/dist/cdn/components/manifest.json +3 -151
- package/dist/cdn/components/settings-panel.js +3 -3
- package/dist/cdn/components/site-map.js +1 -1
- package/dist/cdn/components/theme-picker.js +12 -12
- package/dist/cdn/components/user-story.js +5 -5
- package/dist/cdn/icons/bold.css +17 -0
- package/dist/cdn/icons/bold.json +1 -0
- package/dist/cdn/icons/custom.css +6 -0
- package/dist/cdn/icons/custom.json +1 -0
- package/dist/cdn/icons/lucide.css +1914 -0
- package/dist/cdn/icons/lucide.json +1 -0
- package/dist/cdn/icons/mage.css +17 -0
- package/dist/cdn/icons/mage.json +1 -0
- package/dist/cdn/icons/phosphor.css +17 -0
- package/dist/cdn/icons/phosphor.json +1 -0
- package/dist/cdn/icons/tabler.css +17 -0
- package/dist/cdn/icons/tabler.json +1 -0
- package/dist/cdn/packs/journal.effects.css +2 -0
- package/dist/cdn/packs/journal.full.css +2 -0
- package/dist/cdn/packs/manifest.json +11 -21
- package/dist/cdn/packs/ui.full.js +4 -4
- package/dist/cdn/packs/ux-planning.full.css +1 -1
- package/dist/cdn/packs/ux-planning.full.js +146 -147
- package/dist/cdn/themes/8bit.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999.tokens.json +1 -1
- package/dist/cdn/themes/anthropic.tokens.json +1 -1
- package/dist/cdn/themes/art-deco-dark.tokens.json +1 -1
- package/dist/cdn/themes/art-deco.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus.tokens.json +1 -1
- package/dist/cdn/themes/brutalist-dark.tokens.json +1 -1
- package/dist/cdn/themes/brutalist.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
- package/dist/cdn/themes/classic-dark.tokens.json +1 -1
- package/dist/cdn/themes/classic.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism.tokens.json +1 -1
- package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
- package/dist/cdn/themes/clinical.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore.tokens.json +1 -1
- package/dist/cdn/themes/cyber.tokens.json +1 -1
- package/dist/cdn/themes/dawn-dark.tokens.json +1 -1
- package/dist/cdn/themes/dawn.tokens.json +1 -1
- package/dist/cdn/themes/dracula.tokens.json +1 -1
- package/dist/cdn/themes/dusk.tokens.json +1 -1
- package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
- package/dist/cdn/themes/editorial.tokens.json +1 -1
- package/dist/cdn/themes/financial-dark.tokens.json +1 -1
- package/dist/cdn/themes/financial.tokens.json +1 -1
- package/dist/cdn/themes/genai.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
- package/dist/cdn/themes/government-dark.tokens.json +1 -1
- package/dist/cdn/themes/government.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox.tokens.json +1 -1
- package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
- package/dist/cdn/themes/high-noon.tokens.json +1 -1
- package/dist/cdn/themes/ibm.tokens.json +1 -1
- package/dist/cdn/themes/journal-dark.tokens.json +406 -0
- package/dist/cdn/themes/journal.css +2 -0
- package/dist/cdn/themes/journal.tokens.json +583 -0
- package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
- package/dist/cdn/themes/kawaii.tokens.json +1 -1
- package/dist/cdn/themes/magna-dark.tokens.json +1 -1
- package/dist/cdn/themes/magna.tokens.json +1 -1
- package/dist/cdn/themes/manifest.json +7 -0
- package/dist/cdn/themes/mcdonalds.tokens.json +1 -1
- package/dist/cdn/themes/midnight.tokens.json +1 -1
- package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
- package/dist/cdn/themes/minimal.tokens.json +1 -1
- package/dist/cdn/themes/modern-dark.tokens.json +1 -1
- package/dist/cdn/themes/modern.tokens.json +1 -1
- package/dist/cdn/themes/nes-dark.tokens.json +1 -1
- package/dist/cdn/themes/nes.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism.tokens.json +1 -1
- package/dist/cdn/themes/nord-dark.tokens.json +1 -1
- package/dist/cdn/themes/nord.tokens.json +1 -1
- package/dist/cdn/themes/organic-dark.tokens.json +1 -1
- package/dist/cdn/themes/organic.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine.tokens.json +1 -1
- package/dist/cdn/themes/rough-dark.tokens.json +1 -1
- package/dist/cdn/themes/rough.tokens.json +1 -1
- package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
- package/dist/cdn/themes/solarized.tokens.json +1 -1
- package/dist/cdn/themes/starbucks.tokens.json +1 -1
- package/dist/cdn/themes/startup-dark.tokens.json +1 -1
- package/dist/cdn/themes/startup.tokens.json +1 -1
- package/dist/cdn/themes/super2026-dark.tokens.json +1 -1
- package/dist/cdn/themes/super2026.tokens.json +1 -1
- package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
- package/dist/cdn/themes/swiss.tokens.json +1 -1
- package/dist/cdn/themes/terminal.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night-dark.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave.tokens.json +1 -1
- package/dist/cdn/themes/win9x-dark.tokens.json +1 -1
- package/dist/cdn/themes/win9x.tokens.json +1 -1
- package/dist/cdn/vanilla-breeze-core.css +1 -1
- package/dist/cdn/vanilla-breeze-core.js +23 -23
- package/dist/cdn/vanilla-breeze-extras.js +36 -222
- package/dist/cdn/vanilla-breeze.css +1 -1
- package/dist/cdn/vanilla-breeze.js +236 -2612
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var La=Object.defineProperty;var D=(i,t)=>()=>(i&&(t=i(i=0)),t);var yt=(i,t)=>{for(var e in t)La(i,e,{get:t[e],enumerable:!0})};function qa(){let i=globalThis.localStorage;if(!i)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return i.getItem(t)},async setRaw(t,e){i.setItem(t,e)},async removeRaw(t){i.removeItem(t)},async keys(t){let e=[];for(let s=0;s<i.length;s++){let n=i.key(s);n&&n.startsWith(t)&&e.push(n)}return e}}}function z(){return Ut||(Ut=qa()),Ut}function Me(i,t){if(typeof i!="string"||!i)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${i}:${t}`}function sn(i){if(typeof i!="string"||!i)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${i}:`}function nn(i){try{let t=JSON.parse(i);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var Ut,E,W=D(()=>{Ut=null;E={configure(i={}){Ut=i.backend??null},async set(i,t,e){let s={data:e,timestamp:Date.now()};await z().setRaw(Me(i,t),JSON.stringify(s))},async get(i,t,e){let s=await z().getRaw(Me(i,t));if(s==null)return null;let n=nn(s);return!n||e?.maxAge!=null&&Date.now()-n.timestamp>e.maxAge?null:n.data},async remove(i,t){await z().removeRaw(Me(i,t))},async list(i){let t=sn(i),e=await z().keys(t),s=[];for(let n of e){let r=await z().getRaw(n);if(r==null)continue;let a=nn(r);a&&s.push({key:n.slice(t.length),data:a.data,timestamp:a.timestamp})}return s},async clear(i){let t=sn(i),e=await z().keys(t);for(let s of e)await z().removeRaw(s)},async clearAll(){let i=await z().keys("vb:");for(let t of i)await z().removeRaw(t)},async setMany(i,t){for(let[e,s]of t)await E.set(i,e,s)}}});var Mn={};yt(Mn,{addDialogDismiss:()=>Tn,addFlickListener:()=>xn,addLongPress:()=>kn,addPullToRefresh:()=>ro,addSwipeListener:()=>Sn,haptic:()=>Zt,initGestures:()=>Ln,makeSwipeable:()=>Cn});function Sn(i,t={}){let e=t.threshold??50,s=t.restraint??100,n=t.timeout??300,r=t.velocity??.5,a=t.minFlickDistance??10,o,c,h;function l(u){u.isPrimary&&(o=u.clientX,c=u.clientY,h=Date.now())}function d(u){if(!u.isPrimary)return;let f=u.clientX-o,v=u.clientY-c,p=Date.now()-h;if(p>n)return;let m=Math.abs(f),y=Math.abs(v),S=Math.max(m,y),x=p>0?S/p:0,B=x>=r&&S>=a,H;if((m>=e||B&&m>y)&&y<=s?H=f<0?"left":"right":(y>=e||B&&y>m)&&m<=s&&(H=v<0?"up":"down"),H){let zt=H==="left"||H==="right"?m:y;i.dispatchEvent(new CustomEvent(`swipe-${H}`,{bubbles:!0,detail:{distance:zt,duration:p,velocity:x,flick:B}}))}}return i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("pointerup",d,{passive:!0}),()=>{i.removeEventListener("pointerdown",l),i.removeEventListener("pointerup",d)}}function xn(i,t={}){let e=t.minDistance??10,s=t.velocity??.6,n=t.timeout??250,r=t.restraint??80,a,o,c;function h(d){d.isPrimary&&(a=d.clientX,o=d.clientY,c=Date.now())}function l(d){if(!d.isPrimary)return;let u=d.clientX-a,f=d.clientY-o,v=Date.now()-c;if(v===0||v>n)return;let p=Math.abs(u),m=Math.abs(f),y=Math.max(p,m);if(y<e)return;let S=y/v;if(S<s)return;let x;if(p>m&&m<=r?x=u<0?"left":"right":m>p&&p<=r&&(x=f<0?"up":"down"),x){let B=x==="left"||x==="right"?p:m;i.dispatchEvent(new CustomEvent(`swipe-${x}`,{bubbles:!0,detail:{distance:B,duration:v,velocity:S,flick:!0}}))}}return i.addEventListener("pointerdown",h,{passive:!0}),i.addEventListener("pointerup",l,{passive:!0}),()=>{i.removeEventListener("pointerdown",h),i.removeEventListener("pointerup",l)}}function Cn(i,t={}){let e=t.threshold??100,s=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=s==="horizontal",a=0,o=0,c=!1;function h(p){!p.isPrimary||i.hasAttribute("data-dismissed")||(p.preventDefault(),c=!0,a=r?p.clientX:p.clientY,o=0,i.setPointerCapture(p.pointerId),i.setAttribute("data-swiping",""))}function l(p){if(!c||!p.isPrimary)return;o=(r?p.clientX:p.clientY)-a;let y=1-Math.min(Math.abs(o)/e,1)*.5;r?i.style.transform=`translateX(${o}px)`:i.style.transform=`translateY(${o}px)`,i.style.opacity=String(y)}function d(p){!c||!p.isPrimary||(c=!1,i.releasePointerCapture(p.pointerId),i.removeAttribute("data-swiping"),Math.abs(o)>=e?f(o>0?"right":"left"):v())}function u(p){!c||!p.isPrimary||(c=!1,i.releasePointerCapture(p.pointerId),i.removeAttribute("data-swiping"),v())}function f(p){let m=p==="right"?"100%":"-100%";i.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",i.style.transform=r?`translateX(${m})`:`translateY(${m})`,i.style.opacity="0",i.setAttribute("data-dismissed",""),Zt.dismiss(),i.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:p,distance:Math.abs(o)}})),n&&i.addEventListener("transitionend",()=>i.remove(),{once:!0})}function v(){i.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",i.style.transform="",i.style.opacity="",i.addEventListener("transitionend",()=>{i.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",h),i.addEventListener("pointermove",l),i.addEventListener("pointerup",d),i.addEventListener("pointercancel",u),()=>{i.removeEventListener("pointerdown",h),i.removeEventListener("pointermove",l),i.removeEventListener("pointerup",d),i.removeEventListener("pointercancel",u)}}function ro(i,t,e={}){let s=e.threshold??70,n=e.maxPull??120,r=document.createElement("div");r.setAttribute("data-pull-indicator",""),r.setAttribute("aria-hidden","true");let a=document.createElement("div");a.setAttribute("data-pull-spinner",""),r.appendChild(a),i.prepend(r);let o=0,c=!1,h=!1;function l(m){!m.isPrimary||h||i.scrollTop<=0&&(o=m.clientY,c=!0)}function d(m){if(!c||!m.isPrimary||h)return;let y=m.clientY-o;if(y<=0){r.style.transform="",r.style.opacity="";return}let S=Math.min(y,n),x=S/s;r.style.transform=`translateY(${S}px)`,r.style.opacity=String(Math.min(x,1)),x>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function u(m){!c||!m.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!h?v():p())}function f(m){!c||!m.isPrimary||(c=!1,p())}async function v(){h=!0,r.removeAttribute("data-pull-ready"),r.setAttribute("data-pull-loading",""),r.style.transform=`translateY(${s}px)`,r.style.opacity="1";try{await t()}finally{h=!1,r.removeAttribute("data-pull-loading"),p()}}function p(){r.style.transition="transform 0.3s ease, opacity 0.3s ease",r.style.transform="",r.style.opacity="",r.removeAttribute("data-pull-ready"),r.addEventListener("transitionend",()=>{r.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("pointermove",d,{passive:!0}),i.addEventListener("pointerup",u,{passive:!0}),i.addEventListener("pointercancel",f,{passive:!0}),()=>{i.removeEventListener("pointerdown",l),i.removeEventListener("pointermove",d),i.removeEventListener("pointerup",u),i.removeEventListener("pointercancel",f),r.remove()}}function kn(i,t,e={}){let s=e.duration??500,n=e.hapticFeedback??!0,r=e.blockContextMenu??!0,a=null;function o(l){l.isPrimary&&(a=setTimeout(()=>{n&&Zt.tap(),t(l),a=null},s))}function c(){a&&(clearTimeout(a),a=null)}function h(l){r&&l.preventDefault()}return i.addEventListener("pointerdown",o,{passive:!0}),i.addEventListener("pointermove",c,{passive:!0}),i.addEventListener("pointerup",c,{passive:!0}),i.addEventListener("pointercancel",c,{passive:!0}),i.addEventListener("contextmenu",h),()=>{c(),i.removeEventListener("pointerdown",o),i.removeEventListener("pointermove",c),i.removeEventListener("pointerup",c),i.removeEventListener("pointercancel",c),i.removeEventListener("contextmenu",h)}}function Tn(i,t={}){let e=t.threshold??80,s=0,n=0,r=!1;function a(u){if(!u.isPrimary||!i.open)return;let f=u.target;f.closest("a, button, input, select, textarea, [contenteditable]")&&!f.closest("header")||(r=!0,s=u.clientY,n=0,i.setPointerCapture(u.pointerId),i.style.transition="none")}function o(u){if(!r||!u.isPrimary)return;if(n=u.clientY-s,n<=0){i.style.transform="",i.style.opacity="";return}let v=1-Math.min(n/e,1)*.4;i.style.transform=`translateY(${n}px)`,i.style.opacity=String(v)}function c(u){!r||!u.isPrimary||(r=!1,i.releasePointerCapture(u.pointerId),n>=e?l():d())}function h(u){!r||!u.isPrimary||(r=!1,i.releasePointerCapture(u.pointerId),d())}function l(){i.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",i.style.transform="translateY(100%)",i.style.opacity="0",Zt.dismiss(),i.addEventListener("transitionend",()=>{i.style.transition="",i.style.transform="",i.style.opacity="",i.close("dismiss")},{once:!0})}function d(){i.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",i.style.transform="",i.style.opacity="",i.addEventListener("transitionend",()=>{i.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",a),i.addEventListener("pointermove",o),i.addEventListener("pointerup",c),i.addEventListener("pointercancel",h),()=>{i.removeEventListener("pointerdown",a),i.removeEventListener("pointermove",o),i.removeEventListener("pointerup",c),i.removeEventListener("pointercancel",h)}}function Ln(i=document){let t=[];for(let e of i.querySelectorAll('[data-gesture="swipe"]'))t.push(Sn(e));for(let e of i.querySelectorAll('[data-gesture="flick"]'))t.push(xn(e));for(let e of i.querySelectorAll('[data-gesture="dismiss"]'))t.push(Cn(e));for(let e of i.querySelectorAll('[data-gesture="long-press"]'))t.push(kn(e,()=>{e.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let e of i.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(Tn(e));return()=>t.forEach(e=>e())}var Zt,Nn=D(()=>{Zt={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};Ln()});var re={};yt(re,{destroyStickyManager:()=>Bo,initStickyManager:()=>yi});function it(){let i=document.documentElement;if(!i.hasAttribute("data-sticky"))return;let t=document.querySelector("header");t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",vi=!0);let e=document.querySelector("header[data-sticky]"),s=e?e.getBoundingClientRect().height:0;i.style.setProperty("--sticky-offset",`${s}px`)}function Wn(){it()}function yi(){if(ne)return;ne=!0,it(),requestAnimationFrame(it),document.fonts?.ready?.then(it),window.addEventListener("resize",it,{passive:!0}),document.addEventListener("toggle",Wn,!0),gi=new ResizeObserver(it);let i=document.querySelector("header[data-sticky]");i&&gi.observe(i)}function Bo(){if(ne){if(ne=!1,window.removeEventListener("resize",it),document.removeEventListener("toggle",Wn,!0),gi?.disconnect(),vi){let i=document.querySelector("header[data-sticky]");i&&delete i.dataset.sticky,vi=!1}document.documentElement.style.removeProperty("--sticky-offset")}}var ne,gi,vi,Mt=D(()=>{ne=!1,vi=!1});var Yn={};yt(Yn,{SoundManager:()=>Po});var jn,wi,Po,Gn=D(()=>{jn="vb-sound",wi={enabled:!1,volume:.5},Po={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let i=this._load();return this._enabled=i.enabled,this._volume=i.volume,this._initialized=!0,this},_getContext(){return this._ctx||(this._ctx=new(window.AudioContext||window.webkitAudioContext)),this._ctx.state==="suspended"&&this._ctx.resume(),this._ctx},_load(){try{let i=localStorage.getItem(jn);return i?{...wi,...JSON.parse(i)}:{...wi}}catch{return{...wi}}},_save(i){try{let t=this._load();localStorage.setItem(jn,JSON.stringify({...t,...i}))}catch{}},_playTone(i,t,e="sine"){if(!this._enabled)return;let s=this._getContext(),n=s.createOscillator(),r=s.createGain();n.connect(r),r.connect(s.destination),n.frequency.value=i,n.type=e,r.gain.value=this._volume*.3,n.start(),r.gain.exponentialRampToValueAtTime(.01,s.currentTime+t),n.stop(s.currentTime+t)},enable(){this._enabled=!0,this._save({enabled:!0}),this.play("click")},disable(){this._enabled=!1,this._save({enabled:!1})},toggle(){return this._enabled?this.disable():this.enable(),this._enabled},isEnabled(){return this._enabled},setVolume(i){this._volume=Math.max(0,Math.min(1,i)),this._save({volume:this._volume})},getVolume(){return this._volume},play(i){if(this._enabled)switch(i){case"click":this._playTone(800,.1);break;case"success":this._playTone(523,.1),setTimeout(()=>this._playTone(659,.1),100),setTimeout(()=>this._playTone(784,.15),200);break;case"error":this._playTone(200,.15,"sawtooth"),setTimeout(()=>this._playTone(180,.2,"sawtooth"),150);break;case"notification":this._playTone(880,.1),setTimeout(()=>this._playTone(1100,.15),100);break;case"soft":this._playTone(600,.05);break;case"tick":this._playTone(1200,.02,"square");break}},getState(){return{enabled:this._enabled,volume:this._volume}}}});function Fo(i,t){if(!t)return i;let e=i??new URLSearchParams;for(let[s,n]of Object.entries(t))n!=null&&e.set(s,String(n));return e}async function Ro(i){if((i.headers.get("content-type")??"").includes("application/json"))try{return await i.json()}catch{return null}try{return await i.text()}catch{return null}}function Kn(i){return i.endsWith("/")?i.slice(0,-1):i}var F,V,st,Ai=D(()=>{F={baseUrl:"/go",headers:{},services:{}},V=class extends Error{constructor(t,e,s,n){super(`VBService(${s}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=e,this.role=s,this.path=n}};st=class i{static configure(t={}){F={baseUrl:t.baseUrl??F.baseUrl,headers:{...F.headers,...t.headers??{}},services:{...F.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");return F.services[t]?Kn(F.services[t]):F.baseUrl?`${Kn(F.baseUrl)}/${t}`:`/go/${t}`}static _reset(){F={baseUrl:"/go",headers:{},services:{}}}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,e){return this.#e("GET",t,{params:e})}async post(t,e){return this.#e("POST",t,{body:e})}async patch(t,e){return this.#e("PATCH",t,{body:e})}async delete(t){return this.#e("DELETE",t,{})}async#e(t,e,s){let n=i.resolve(this.role),r=e?e.startsWith("/")?e:`/${e}`:"",a=new URL(`${n}${r}`,globalThis.location?.origin??"http://localhost"),o=Fo(a.searchParams,s.params);o&&(a.search=o.toString());let c={method:t,headers:{...F.headers}};s.body!==void 0&&(c.body=JSON.stringify(s.body),c.headers["content-type"]="application/json");let h=a.toString(),l=await fetch(h,c),d=await Ro(l);if(!l.ok)throw new V(l.status,d,this.role,`${r||"/"}`);return d}}});function ae(i){let t=2166136261;for(let e=0;e<i.length;e++)t^=i.charCodeAt(e),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Uo(){return"hn-"+crypto.randomUUID().slice(0,8)}function Wo(i,t){return getComputedStyle(i).getPropertyValue(`--highlight-${t}`).trim()}function jo(i){if(nt){Dt++;return}nt=new CSSStyleSheet;let t=i.map(e=>`::highlight(hn-${e}) { background-color: var(--highlight-${e}); text-decoration-line: underline; text-decoration-color: var(--highlight-${e}); text-underline-offset: 2px; }`).join(`
|
|
2
|
-
`);nt.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,nt],Dt=1}function Yo(){Dt--,Dt<=0&&nt&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(i=>i!==nt),nt=null,Dt=0)}function xi(i){K||(K=document.createElement("div"),K.setAttribute("aria-live","polite"),K.setAttribute("aria-atomic","true"),K.className="hn-sr-only",document.body.appendChild(K)),K.textContent="",requestAnimationFrame(()=>{K.textContent=i})}function Jn(i,t,e){let s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){if(s.currentNode===t)return n+e;n+=(s.currentNode.textContent??"").length}return-1}function pt(i,t,e){let s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT),n=0,r=null,a=0,o=null,c=0;for(;s.nextNode();){let h=s.currentNode,l=(h.textContent??"").length;if(!r&&n+l>t&&(r=h,a=t-n),n+l>=e){o=h,c=e-n;break}n+=l}if(!r||!o)return null;try{let h=document.createRange();return h.setStart(r,Math.min(a,(r.textContent??"").length)),h.setEnd(o,Math.min(c,(o.textContent??"").length)),h}catch{return null}}function Li(i){if(Ci.has(i))return Ci.get(i);let t=new Ti(i);return Ci.set(i,t),t}function Zn(i=document){i.querySelectorAll(ki).forEach(t=>{t.hasAttribute("data-highlights-init")||Li(t)})}var ki,Xn,zo,Vo,nt,Dt,K,Ti,Ci,Go,Qn=D(()=>{W();ki="[data-highlights]",Xn="highlights",zo=["yellow","green","blue","pink"],Vo=typeof CSS<"u"&&"highlights"in CSS;nt=null,Dt=0;K=null;Ti=class{#e;#t;#i;#s;#r=[];#n=!Vo;#a;#o;#c=!1;#f=[];constructor(t){this.#e=t,this.#s=t.hasAttribute("data-highlights-readonly");let e=t.dataset.highlights;this.#t=e&&e!==""?e:location.pathname;let s=t.dataset.highlightsColors;this.#i=s?s.split(",").map(n=>n.trim()).filter(Boolean):[...zo],this.#n||jo(this.#i),this.#d(),this.#s||(this.#a=this.#h.bind(this),this.#o=this.#p.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#o)),t.setAttribute("data-highlights-init",""),this.#l().then(()=>{this.#c||this.#d()})}get colors(){return[...this.#i]}get element(){return this.#e}getHighlights(){return this.#r.map(t=>({...t}))}removeHighlight(t){let e=this.#r.findIndex(s=>s.id===t);e<0||(this.#r.splice(e,1),this.#m(),this.#d(),this.#g("highlights:removed",{id:t}),xi("Highlight removed"))}clearAll(){this.#r=[],this.#m(),this.#d()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#r})}importHighlights(t){try{let e=typeof t=="string"?JSON.parse(t):t;if(!e.highlights||!Array.isArray(e.highlights))return;this.#r=e.highlights,this.#m(),this.#d()}catch{}}destroy(){if(!this.#c){if(this.#c=!0,this.#a&&this.#e.removeEventListener("pointerup",this.#a),this.#o&&this.#e.removeEventListener("click",this.#o),this.#n)this.#e.querySelectorAll("mark[data-hn-id]").forEach(t=>{let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.normalize()});else{for(let t of this.#i)CSS.highlights.delete(`hn-${t}`);Yo()}this.#v(),this.#e.removeAttribute("data-highlights-init")}}#h(){requestAnimationFrame(()=>{if(this.#c)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0);this.#e.contains(e.commonAncestorContainer)&&this.#g("highlights:selected",{text:t.toString().trim(),rect:e.getBoundingClientRect()})})}#p(t){let e=t.target.closest?.(".hn-margin-annotation");if(e){let n=e.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#g("highlights:clicked",{id:n,highlight:{...r}}),this.#g("highlights:request-note",{id:n,highlight:{...r},controller:this});return}}let s=t.target.closest?.("mark[data-hn-id]");if(s){let n=s.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#g("highlights:clicked",{id:n,highlight:{...r}});return}}if(!this.#n){let n=this.#u(t.clientX,t.clientY);n&&this.#g("highlights:clicked",{id:n.id,highlight:{...n}})}}findHighlightRect(t){let e=this.#r.find(r=>r.id===t);if(!e)return null;let s=pt(this.#e,e.startOffset,e.endOffset);if(!s)return null;let n=s.getClientRects();return n.length?n[0]:null}#u(t,e){for(let s of this.#r){let n=pt(this.#e,s.startOffset,s.endOffset);if(!n)continue;let r=n.getClientRects();for(let a of r)if(t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom)return s}return null}_createFromSelection(t){let e=window.getSelection();if(!e||e.isCollapsed)return;let s=e.getRangeAt(0);if(!this.#e.contains(s.commonAncestorContainer))return;let n=Jn(this.#e,s.startContainer,s.startOffset),r=Jn(this.#e,s.endContainer,s.endOffset);if(n<0||r<0||n>=r)return;let a=e.toString().trim(),o={id:Uo(),startOffset:n,endOffset:r,text:a,color:t,note:"",created:Date.now()};this.#r.push(o),this.#m(),this.#d(),e.removeAllRanges(),this.#g("highlights:added",{id:o.id,text:a,color:t,note:""}),xi("Highlight added")}_changeColor(t,e){let s=this.#r.find(n=>n.id===t);s&&(s.color=e,this.#m(),this.#d())}_updateNote(t,e){let s=this.#r.find(n=>n.id===t);s&&(s.note=e,this.#m(),this.#b(),this.#g("highlights:note-changed",{id:t,note:e}),xi("Note saved"))}async#l(){let t=await E.get(Xn,this.#t);if(!t||!Array.isArray(t.highlights))return;let e=ae(this.#e.textContent);t.contentHash&&t.contentHash!==e?(this.#r=t.highlights.filter(s=>{let n=pt(this.#e,s.startOffset,s.endOffset);return n?n.toString().trim()===s.text:!1}),this.#m()):this.#r=t.highlights}#m(){let t={version:1,contentHash:ae(this.#e.textContent),highlights:this.#r};E.set(Xn,this.#t,t).catch(()=>{})}#d(){this.#n?this.#w():this.#y(),this.#b()}#y(){let t=new Map;for(let e of this.#i)t.set(e,[]);for(let e of this.#r){let s=pt(this.#e,e.startOffset,e.endOffset);s&&t.has(e.color)&&t.get(e.color).push(s)}for(let[e,s]of t){let n=`hn-${e}`;s.length===0?CSS.highlights.delete(n):CSS.highlights.set(n,new Highlight(...s))}}#w(){this.#e.querySelectorAll("mark[data-hn-id]").forEach(e=>{let s=e.parentNode;for(;e.firstChild;)s.insertBefore(e.firstChild,e);s.removeChild(e)}),this.#e.normalize();let t=[...this.#r].sort((e,s)=>s.startOffset-e.startOffset);for(let e of t){let s=pt(this.#e,e.startOffset,e.endOffset);if(!s)continue;let n=Wo(this.#e,e.color),r=document.createElement("mark");r.dataset.hnId=e.id,r.dataset.hnColor=e.color,n&&(r.style.backgroundColor=n,r.style.textDecorationColor=n);try{s.surroundContents(r)}catch{let a=s.extractContents();r.appendChild(a),s.insertNode(r)}}}#v(){for(let t of this.#f)t.remove();this.#f=[]}#b(){if(this.#v(),this.#r.length===0)return;getComputedStyle(this.#e).position==="static"&&(this.#e.style.position="relative");for(let e of this.#r){let s=pt(this.#e,e.startOffset,e.endOffset);if(!s)continue;let n=s.getClientRects();if(n.length===0)continue;let r=n[0],a=this.#e.getBoundingClientRect(),o=r.top-a.top,c=document.createElement("span");c.className="hn-margin-annotation",c.dataset.hnId=e.id,c.setAttribute("aria-hidden","true"),c.style.top=`${o}px`,e.note?(c.innerHTML='<span class="hn-note-indicator">*</span> You highlighted',c.classList.add("hn-has-note")):c.textContent="You highlighted",this.#e.appendChild(c),this.#f.push(c)}}#g(t,e={}){this.#e.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}},Ci=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Zn()):Zn();Go=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ki)&&Li(s),s.querySelectorAll(ki).forEach(n=>{n.hasAttribute("data-highlights-init")||Li(n)})}});Go.observe(document.documentElement,{childList:!0,subtree:!0})});var qi={};yt(qi,{currentHash:()=>$i,initPageWatch:()=>_i,readWatch:()=>oe,removeWatch:()=>er,writeWatch:()=>_t});function tr(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function Ko(i){if(!tr())return null;try{let t=new st("notify"),e={url:i.url,type:"page-watch",notify:["panel"]},s=await t.post("/subscribe",e);return typeof s?.id=="string"?s.id:null}catch(t){let e=t instanceof V?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",e),null}}async function Xo(i){if(!(!i||!tr()))try{await new st("notify").delete(`/subscribe/${encodeURIComponent(i)}`)}catch(t){let e=t instanceof V?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",e)}}function Jo(){return document.querySelector("main")||document.querySelector("article")||document.body}function It(){return location.pathname||"/"}function $i(){let i=Jo();return i?ae(i.textContent||""):""}function Zo(){return document.title||It()}async function oe(){return await E.get(Ii,It())}async function _t(i){await E.set(Ii,It(),i)}async function er(){await E.remove(Ii,It())}function Mi(i,t){i.setAttribute("aria-pressed",t?"true":"false"),i.dataset.watching="",t||delete i.dataset.watching;let e=i.querySelector("icon-wc");e&&e.setAttribute("name",t?"bookmark-check":"bookmark");let s=[...i.childNodes].find(n=>n.nodeType===Node.TEXT_NODE&&(n.textContent||"").trim());s&&!i.hasAttribute("data-watch-label-locked")&&(s.textContent=t?"Watching":"Watch for updates"),i.setAttribute("title",t?"Stop watching this page":"Watch this page for content updates")}async function Di(i){if(i.hasAttribute("data-watch-page-init"))return;i.setAttribute("data-watch-page-init",""),i.setAttribute("type",i.getAttribute("type")||"button");let t=await oe();Mi(i,!!t),i.addEventListener("click",async e=>{e.preventDefault();let s=await oe();if(s)await er(),Mi(i,!1),i.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:s.url,subscriptionId:s.subscriptionId}})),Xo(s.subscriptionId);else{let n={url:It(),title:Zo(),contentHash:$i(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await _t(n),Mi(i,!0),i.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:n}}));let r=await Ko(n);r&&await _t({...n,subscriptionId:r})}})}async function Qo(){let i=await oe();if(!i)return;let t=$i(),e=new Date().toISOString(),s=i.contentHash,n={...i,lastChecked:e};if(t&&t!==s){n.contentHash=t,n.lastChanged=e,await _t(n);let r={id:`page-watch:${i.url}:${t}`,type:"watch",title:`Updated: ${i.title}`,body:"Content changed since your last visit.",url:i.url,date:e,read:!1,dismissed:!1,priority:"normal"};document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}}))}else await _t(n)}function _i(i=document){for(let t of i.querySelectorAll(Ni))Di(t);Qo()}var Ni,Ii,tc,Oi=D(()=>{W();Ai();Qn();Ni="[data-watch-page]",Ii="watches";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>_i()):_i();tc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches?.(Ni)&&Di(s),s.querySelectorAll?.(Ni).forEach(n=>Di(n))}});tc.observe(document.documentElement,{childList:!0,subtree:!0})});function Ee(i){try{if(sessionStorage.getItem("vb_optout")==="1")return!0}catch{}if(navigator.globalPrivacyControl===!0||navigator.doNotTrack==="1")return!0;if(typeof i.consent=="function")try{return i.consent()===!1}catch{return!0}return!1}function na(i){return i?.closest?.("[data-vb-no-track]")!=null}function Ul(){let{dataset:i}=document.documentElement,t={};for(let e of Object.keys(i)){let s=i[e];s!=null&&s!==""&&(t[e]=s)}return t}function Wl(){let i={};for(let e of document.querySelectorAll('meta[name^="vb:"]')){let s=e.getAttribute("name")?.slice(3),n=e.getAttribute("content")?.trim();s&&n&&(i[s]=n)}let t=[];for(let e of document.querySelectorAll('meta[name="concept"]')){let s=e.getAttribute("content")?.trim();s&&t.push(s)}return t.length&&(i.concepts=t),i}function jl(i,t){if(!t?.length)return i;for(let{pattern:e,replace:s}of t)if(e.test(i))return i.replace(e,s);return i}function Yl(i,t){let e=JSON.stringify(t);if(typeof navigator.sendBeacon=="function"){let s=new Blob([e],{type:"application/json"});if(navigator.sendBeacon(i,s))return!0}try{return fetch(i,{method:"POST",body:e,keepalive:!0,headers:{"content-type":"application/json"}}),!0}catch{return!1}}function ra(i){return`${(k.config?.endpoint??"/api/analytics").replace(/\/+$/,"")}/${i}`}function $s(i,t){let e=k.config;if(!e)throw new Error("analytics: buildEnvelope called before init");let s=jl(location.pathname+location.search,e.urlMasks),n=typeof e.context=="function"?e.context()??{}:{};return{name:i,ts:Date.now(),site:e.siteId,path:s,referrer:document.referrer||"",context:{...Ul(),...Wl(),...n},props:t??{}}}function Ae(i,t){let e=k.config;return!e||e.transport==="disabled"?!1:e.transport==="console"?(console.log("%c[vb:analytics]","color:#0aa;font-weight:600",i,t),!0):Yl(ra(i),t)}function aa(){let i=k.config?.sampleRate??1;return i>=1?!0:Math.random()<i}function oa(){if(!k.config||Ee(k.config)||document.documentElement.hasAttribute("data-vb-no-track")||!aa())return;let i=location.pathname+location.search;i!==ia&&(ia=i,Ae("hit",$s("page.view",{})))}function Gl(){let i,t=()=>{clearTimeout(i),i=setTimeout(oa,100)},e=history.pushState.bind(history);history.pushState=function(...n){e(...n),t()};let s=history.replaceState.bind(history);history.replaceState=function(...n){s(...n),t()},window.addEventListener("popstate",t)}function Kl(i){let t={};for(let[e,s]of Object.entries(i.dataset)){if(e==="vbEvent"||!e.startsWith("vbEvent"))continue;let n=e.slice(7).replace(/^./,r=>r.toLowerCase());t[n]=s}return t}function Xl(i){if(!k.config||Ee(k.config))return;let e=i.target?.closest?.("[data-vb-event]");if(!e||na(e))return;let s=e.dataset.vbEvent;s&&w.track(s,Kl(e))}function sa(){let i=document.querySelectorAll('a[href^="http"]');for(let t of i){if(t.hostname===location.hostname||na(t)||t.hasAttribute("data-vb-analytics-wired"))continue;let e=encodeURIComponent(k.config?.siteId??"default"),s=`${ra("click")}?site=${e}&from=${encodeURIComponent(location.pathname)}`;t.hasAttribute("ping")||t.setAttribute("ping",s),t.addEventListener("click",()=>{if(Ee(k.config))return;let n=navigator.userAgent;/Firefox|Brave/.test(n)&&Ae("click",$s("link.outbound",{to:t.hostname,href:t.href}))}),t.setAttribute("data-vb-analytics-wired","")}}function Is(){if(!k.queue.length)return;let i=k.queue.splice(0);Ae("events",{site:k.config?.siteId,events:i})}function Jl(){document.visibilityState==="hidden"&&Is()}function Ql(){try{return window.top!==window.self}catch{return!0}}var k,ia,Zl,w,ot=D(()=>{k={config:null,queue:[]};ia=null;Zl={endpoint:"/api/analytics",siteId:"default",transport:"disabled",sampleRate:1,consent:null,context:null,urlMasks:null,autoPageView:!0,autoOutboundLinks:!0,autoDeclarative:!0,allowInIframe:!1};w={init(i={}){if(k.config)return;let t={...Zl,...i};if(k.config=t,Ql()&&!t.allowInIframe){t.transport="disabled",t.autoPageView=!1,t.autoOutboundLinks=!1,t.autoDeclarative=!1;return}t.transport==="disabled"&&(t.autoOutboundLinks=!1),t.autoDeclarative&&document.addEventListener("click",Xl,{capture:!0}),t.autoOutboundLinks&&(sa(),new MutationObserver(()=>sa()).observe(document.body,{childList:!0,subtree:!0})),t.autoPageView&&(oa(),Gl()),document.addEventListener("visibilitychange",Jl),window.addEventListener("pagehide",Is)},track(i,t={}){k.config&&(Ee(k.config)||aa()&&Ae("hit",$s(i,t)))},flush:Is,setConsent(i){try{i?sessionStorage.removeItem("vb_optout"):sessionStorage.setItem("vb_optout","1")}catch{}},get config(){return k.config?{...k.config}:null}}});var oh={};function sh(i,t,e){return i<=t?"good":i<=e?"needs-improvement":"poor"}function Se(i,t,e,s,n={}){w.track(i,{value:Math.round(t*1e3)/1e3,rating:sh(t,e,s),...n})}function nh(){let i=null,t=new PerformanceObserver(s=>{let n=s.getEntries();i=n[n.length-1]});try{t.observe({type:"largest-contentful-paint",buffered:!0})}catch{return}let e=()=>{i&&(Se("perf.lcp",i.startTime,2500,4e3),i=null)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function rh(){let i=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries()){let r=n;r.hadRecentInput||(i+=r.value)}});try{t.observe({type:"layout-shift",buffered:!0})}catch{return}let e=()=>{Se("perf.cls",i,.1,.25),i=0};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function ah(){let i=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.duration>i&&(i=n.duration)});try{t.observe({type:"event",durationThreshold:40,buffered:!0})}catch{return}let e=()=>{i!==0&&(Se("perf.inp",i,200,500),i=0)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function da(){try{let[i]=performance.getEntriesByType("navigation");if(!i||!i.responseStart)return;Se("perf.ttfb",i.responseStart,800,1800,{navigationType:i.type})}catch{}}var ua=D(()=>{ot();typeof window<"u"&&"PerformanceObserver"in window&&(nh(),rh(),ah(),document.readyState==="complete"?da():window.addEventListener("load",da,{once:!0}))});var lh={};function ch(i){if(typeof i!="string"||!i)return"";try{let t=new URL(i,location.origin);return t.pathname.split("/").pop()||t.pathname}catch{return i.split("/").pop()??i}}function fa(i){return typeof i!="string"?String(i??"").slice(0,Os):i.length>Os?i.slice(0,Os):i}var Os,pa=D(()=>{ot();Os=200;typeof window<"u"&&(window.addEventListener("error",i=>{i.target&&i.target!==window||w.track("error.js_runtime",{message:fa(i.message),source:ch(i.filename),line:i.lineno??0,col:i.colno??0})}),window.addEventListener("unhandledrejection",i=>{let t=i.reason,e=t instanceof Error?t.message:typeof t=="string"?t:JSON.stringify(t??null);w.track("error.unhandled_promise",{message:fa(e)})}))});var dh={};function ya(){let i=window.scrollY+window.innerHeight,t=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0);return t<=0?0:Math.min(100,Math.max(0,Math.round(i/t*100)))}function hh(){clearTimeout(ba),ba=setTimeout(()=>{let i=ya();i>Bs&&(Bs=i)},500)}function ga(){Ht==null&&(Ht=Date.now())}function wa(){Ht!=null&&(Ps+=Date.now()-Ht,Ht=null)}function va(){if(ma)return;ma=!0,wa();let i=Math.max(Bs,ya());i>0&&w.track("__scroll",{depth:i}),Ps>0&&w.track("__attention",{ms:Ps})}var Bs,Ht,Ps,ma,ba,Ea=D(()=>{ot();Bs=0,Ht=null,Ps=0,ma=!1,ba=null;typeof window<"u"&&(window.addEventListener("scroll",hh,{passive:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?ga():(wa(),va())}),window.addEventListener("pagehide",va),document.visibilityState==="visible"&&ga())});var Sa={};yt(Sa,{WizardController:()=>xe,initWizards:()=>Rs});function Fs(i){if(i.hasAttribute("data-wizard-enhanced"))return;let t=new xe(i);i.wizardController=t,i.wizardGoTo=e=>t.goTo(e),i.wizardNext=()=>t.next(),i.wizardPrev=()=>t.prev(),i.wizardReset=()=>t.reset()}function Rs(){document.querySelectorAll("form[data-wizard]").forEach(i=>{Fs(i)})}function Aa(){new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches("form[data-wizard]")&&Fs(n),n.querySelectorAll?.("form[data-wizard]:not([data-wizard-enhanced])").forEach(r=>{Fs(r)})}}).observe(document.documentElement,{childList:!0,subtree:!0})}var xe,xa=D(()=>{xe=class{#e;#t=[];#i=0;#s=null;#r=null;#n=null;#a=!1;#o="step";#c=null;#f="";#h=0;#p=0;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#e=t,this.#u()}#u(){if(this.#t=Array.from(this.#e.querySelectorAll("fieldset[data-wizard-step]")),this.#t.length===0){console.warn("Wizard form has no steps");return}this.#a=this.#e.hasAttribute("data-wizard-history"),this.#o=this.#e.getAttribute("data-wizard-validate")||"step",this.#l(),this.#s=this.#e.querySelector("[data-wizard-progress]"),this.#g(),this.#C(),this.#b(),this.#e.setAttribute("data-wizard-enhanced",""),this.#e.setAttribute("data-wizard-total",String(this.#t.length)),this.#B(),this.#S(),this.#q();let t=()=>{cancelAnimationFrame(this.#h),this.#h=requestAnimationFrame(()=>this.#A())};if(this.#e.addEventListener("change",t),this.#e.addEventListener("input",t),this.#c&&(this.#e.addEventListener("change",()=>this.#d()),this.#e.addEventListener("input",()=>this.#d())),this.#e.addEventListener("submit",e=>this.#v(e)),this.#e.addEventListener("reset",()=>{requestAnimationFrame(()=>this.reset())}),this.#a){let e=this.#N();e!==null&&e>=0&&e<this.#t.length&&(this.#i=e),window.addEventListener("hashchange",()=>{let s=this.#N();s!==null&&s!==this.#i&&this.goTo(s)})}this.#y(),this.#A(),this.#O()}#l(){let t=this.#e.getAttribute("data-wizard-persist");if(t){if(!this.#e.id){console.warn("Wizard persistence requires an id on the form element");return}this.#f=`vb-wizard:${this.#e.id}`,t==="local"?this.#c=localStorage:this.#c=sessionStorage}}#m(){if(!this.#c)return;let t={},e=new FormData(this.#e);for(let[s,n]of e.entries())t[s]!==void 0?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(n)):t[s]=n;try{this.#c.setItem(this.#f,JSON.stringify({step:this.#i,data:t}))}catch{}}#d(){this.#c&&(cancelAnimationFrame(this.#p),this.#p=requestAnimationFrame(()=>this.#m()))}#y(){if(this.#c)try{let t=this.#c.getItem(this.#f);if(!t)return;let e=JSON.parse(t);if(!e||typeof e!="object")return;if(e.data&&typeof e.data=="object")for(let[s,n]of Object.entries(e.data)){let r=this.#e.elements.namedItem(s);if(r)if(r instanceof RadioNodeList)r.value=n;else if(r instanceof HTMLInputElement)if(r.type==="checkbox"){let a=Array.isArray(n)?n:[n];r.checked=a.includes(r.value||"on")}else r.type==="radio"?r.checked=r.value===n:r.value=n;else(r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement)&&(r.value=n)}typeof e.step=="number"&&e.step>=0&&e.step<this.#t.length&&(this.#i=e.step)}catch{}}#w(){this.#c&&this.#c.removeItem(this.#f)}#v(t){let e=this.#k();this.#i===e.length-1&&(this.#$("wizard:complete"),this.#w())}#b(){this.#r=document.createElement("div"),this.#r.setAttribute("role","status"),this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#r.setAttribute("data-wizard-status",""),this.#e.prepend(this.#r)}#g(){let t=this.#e.getAttribute("data-wizard-steps");if(t){this.#n=document.querySelector(t);return}this.#n=this.#e.querySelector("nav.steps")}#C(){if(!this.#n)return;let t=this.#n.querySelector("ol");if(!(!t||t.children.length>0))for(let e of this.#t){let s=e.querySelector("legend"),n=document.createElement("li");n.textContent=s?.textContent||`Step ${this.#t.indexOf(e)+1}`,t.appendChild(n)}}#_(){if(!this.#n)return;let t=Array.from(this.#n.querySelectorAll("ol > li")),e=this.#k(),s=0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n],a=t[s];if(!a)break;if(r.hasAttribute("data-wizard-hidden")){a.setAttribute("hidden","");continue}else a.removeAttribute("hidden");let o=e.indexOf(r);if(a.removeAttribute("data-completed"),a.removeAttribute("aria-current"),a.removeAttribute("aria-disabled"),o<this.#i){a.setAttribute("data-completed",""),this.#M(a,o);let c=a.querySelector("a");if(c){let l=r.querySelector("legend")?.textContent||`Step ${o+1}`;c.setAttribute("aria-label",`Go to ${l} (completed)`)}}else o===this.#i?a.setAttribute("aria-current","step"):a.setAttribute("aria-disabled","true");s++}for(let n of t){if(n.hasAttribute("hidden"))continue;let r=n.querySelector("a, button")||n,a=n.hasAttribute("aria-current");r.setAttribute("tabindex",a?"0":"-1")}}#M(t,e){if(t.hasAttribute("data-wizard-nav-bound"))return;t.setAttribute("data-wizard-nav-bound","");let s=t.querySelector("a, button")||t;s.addEventListener("click",n=>{n.preventDefault(),this.goTo(e)}),s===t&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","0"),t.setAttribute("role","button"),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.goTo(e))}))}#S(){let t=this.#e.querySelector("[data-wizard-prev]"),e=this.#e.querySelector("[data-wizard-next]");t?.addEventListener("click",s=>{s.preventDefault(),this.prev()}),e?.addEventListener("click",s=>{s.preventDefault(),this.next()})}#B(){if(this.#e.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let e=document.createElement("button");e.type="button",e.setAttribute("data-wizard-prev",""),e.textContent="Back";let s=document.createElement("button");s.type="button",s.setAttribute("data-wizard-next",""),s.textContent="Next";let n=document.createElement("button");n.type="submit",n.textContent="Submit",t.append(e,s,n),this.#e.appendChild(t)}#q(){this.#n&&this.#n.addEventListener("keydown",t=>{if(!this.#n)return;let e=Array.from(this.#n.querySelectorAll("ol > li:not([hidden])")),s=t.target.closest("li"),n=s?e.indexOf(s):-1;if(n===-1)return;let r;switch(t.key){case"ArrowRight":case"ArrowDown":r=Math.min(n+1,e.length-1);break;case"ArrowLeft":case"ArrowUp":r=Math.max(n-1,0);break;case"Home":r=0;break;case"End":r=e.length-1;break;default:return}t.preventDefault();let a=e[n].querySelector("a, button")||e[n],o=e[r].querySelector("a, button")||e[r];a.setAttribute("tabindex","-1"),o.setAttribute("tabindex","0"),o.focus()})}#k(){return this.#t.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#I(){return this.#k()[this.#i]}#O(){let t=this.#k();this.#t.forEach(n=>{n.removeAttribute("data-wizard-active")});let e=t[this.#i];e&&e.setAttribute("data-wizard-active","");let s=this.#i+1;this.#e.setAttribute("data-wizard-current",String(s)),this.#e.setAttribute("data-wizard-total",String(t.length)),this.#i===t.length-1?this.#e.setAttribute("data-wizard-last",""):this.#e.removeAttribute("data-wizard-last"),this.#R(),this.#_(),this.#a&&this.#T(),this.#E(),this.#P()}#R(){if(!this.#s)return;let t=this.#k();this.#s.max=t.length,this.#s.value=this.#i+1}#T(){let t=`#step=${this.#i+1}`;window.location.hash!==t&&history.replaceState(null,"",t)}#N(){let e=window.location.hash.match(/step=(\d+)/);return e?parseInt(e[1],10)-1:null}#E(){if(!this.#r)return;let s=this.#I()?.querySelector("legend")?.textContent||`Step ${this.#i+1}`,n=this.#k();this.#r.textContent=`Now on step ${this.#i+1} of ${n.length}: ${s}`}#x(){if(this.#o==="none")return!0;let t=this.#I();if(!t||t.hasAttribute("data-wizard-optional"))return!0;let e=t.querySelectorAll("input, select, textarea"),s=!0;for(let n of e){let r=n;if(!r.checkValidity()){r.reportValidity(),s=!1;break}}return s}#A(){this.#t.forEach(e=>{let s=e.getAttribute("data-wizard-if");if(!s)return;this.#L(s)?e.removeAttribute("data-wizard-hidden"):e.setAttribute("data-wizard-hidden","")});let t=this.#k();this.#i>=t.length&&(this.#i=Math.max(0,t.length-1)),this.#O()}#L(t){return t.includes("||")?t.split("||").some(e=>this.#L(e.trim())):t.includes("&&")?t.split("&&").every(e=>this.#H(e.trim())):this.#H(t)}#H(t){let e=t.startsWith("!"),s=e?t.slice(1):t;if(s.includes(":")){let[o,c]=s.split(":"),h=c.startsWith("!"),l=h?c.slice(1):c,d=this.#F(o);return h?d!==l:d===l}let a=!!this.#F(s);return e?!a:a}#F(t){let e=this.#e.elements.namedItem(t);return e?e instanceof RadioNodeList?e.value:e instanceof HTMLInputElement?e.type==="checkbox"?e.checked?e.value||"true":"":e.value:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.value:"":""}#P(){let t=this.#I();if(!t||!t.hasAttribute("data-wizard-summary"))return;let e=t.querySelectorAll("[data-wizard-field]");if(e.length>0){for(let r of e){let a=r.getAttribute("data-wizard-field")||"";r.textContent=this.#F(a)||"\u2014"}return}let s=t.querySelector("[data-wizard-summary-list]");s||(s=document.createElement("dl"),s.setAttribute("data-wizard-summary-list",""),t.appendChild(s)),s.innerHTML="";let n=new Set;for(let r of this.#t){if(r===t||r.hasAttribute("data-wizard-hidden"))continue;let a=r.querySelectorAll("input, select, textarea");for(let o of a){let c=o.name;if(!c||n.has(c))continue;n.add(c);let h=this.#F(c);if(!h)continue;let l=this.#V(o),d=document.createElement("dt");d.textContent=l||c;let u=document.createElement("dd");u.textContent=h,s.append(d,u)}}}#V(t){if(t.id){let n=this.#e.querySelector(`label[for="${CSS.escape(t.id)}"]`);if(n)return n.textContent.trim()}let e=t.closest("label");if(e){let n=e.cloneNode(!0);n.querySelectorAll("input, select, textarea").forEach(a=>a.remove());let r=n.textContent.trim();if(r)return r}let s=t.closest("form-field");if(s){let n=s.querySelector("label");if(n)return n.textContent.trim()}return""}#$(t,e={}){this.#e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))}goTo(t){let e=this.#k();if(t<0||t>=e.length||t>this.#i&&!this.#x())return!1;let s=this.#i;return this.#i=t,this.#O(),this.#$("wizard:step-change",{from:s,to:t}),this.#d(),!0}next(){let t=this.#k();return this.#i>=t.length-1?!1:this.goTo(this.#i+1)}prev(){return this.#i<=0?!1:this.goTo(this.#i-1)}reset(){this.#i=0,this.#O(),this.#w(),this.#$("wizard:reset")}get currentStep(){return this.#i}get totalSteps(){return this.#k().length}get form(){return this.#e}};typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Rs(),Aa()}):(Rs(),Aa()))});var J=new Map,Ce=new Map;var Ks=null;function Xs(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if(Ks)return Ks;if(typeof document<"u"){let i=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of i){let e=t.getAttribute("src");if(e){let s=e.lastIndexOf("/");if(s!==-1)return e.slice(0,s)}}}return"/cdn"}var Ma=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),Na=new Set(["kawaii","memphis"]);function ke(i){return Na.has(i)}function Da(i,t){return`${t}/themes/${i}.css`}function Js(i,t){if(!ke(i))return Promise.resolve();if(Ce.has(i))return Ce.get(i);let e=import(`${t}/packs/${i}.full.js`).catch(()=>{});return Ce.set(i,e),e}function _a(i,t){let e=Xs(),s=()=>{(ke(t)||i.hasAttribute("data-vb-pack"))&&Js(t,e)};return i.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):i.getAttribute("data-vb-theme-state")==="ready"||i.sheet?(s(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{i.setAttribute("data-vb-theme-state","ready"),c(),s(),n(void 0)},o=()=>{i.setAttribute("data-vb-theme-state","error"),J.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{i.removeEventListener("load",a),i.removeEventListener("error",o)};i.addEventListener("load",a,{once:!0}),i.addEventListener("error",o,{once:!0})})}async function wt(i){if(!i||Ma.has(i))return;if(J.has(i))return J.get(i);if(typeof document<"u"){let s=document.querySelector(`link[data-vb-theme="${i}"]`);if(s){let n=_a(s,i);return J.set(i,n),n}}let t=Xs(),e=ke(i)?$a(i,t):Ia(i,t);return J.set(i,e),e}async function Ia(i,t){let e=Da(i,t);return new Promise((s,n)=>{let r=document.querySelector(`link[data-vb-theme-preload="${i}"]`);r&&r.remove();let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.setAttribute("data-vb-theme",i),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready"),s()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),J.delete(i),n(new Error(`Failed to load theme: ${i}`))},document.head.appendChild(a)})}function $a(i,t){let e=`${t}/packs/${i}.theme.css`,s=`${t}/packs/${i}.effects.css`;return new Promise((n,r)=>{let a=document.querySelector(`link[data-vb-theme-preload="${i}"]`);a&&a.remove();let o=document.createElement("link");o.rel="stylesheet",o.href=e,o.setAttribute("data-vb-theme",i),o.setAttribute("data-vb-pack",i),o.setAttribute("data-vb-theme-state","loading"),o.onload=()=>{o.setAttribute("data-vb-theme-state","ready");let c=document.createElement("link");c.rel="stylesheet",c.href=s,c.setAttribute("data-vb-pack-effects",i),document.head.appendChild(c),Js(i,t),n()},o.onerror=()=>{o.setAttribute("data-vb-theme-state","error"),o.remove(),J.delete(i),r(new Error(`Failed to load pack: ${i}`))},document.head.appendChild(o)})}var Zs=[{id:"default",name:"Default",swatchBg:"#3b82f6",seeds:{}},{id:"ocean",name:"Ocean",swatchBg:"#0891b2",seeds:{"--hue-primary":200,"--hue-secondary":180,"--hue-accent":45,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"45%","--chroma-secondary":.1,"--lightness-accent":"70%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"forest",name:"Forest",swatchBg:"#059669",seeds:{"--hue-primary":145,"--hue-secondary":90,"--hue-accent":30,"--lightness-primary":"45%","--chroma-primary":.15,"--lightness-secondary":"55%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"55%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"60%","--chroma-primary":.2,"--lightness-secondary":"55%","--chroma-secondary":.18,"--lightness-accent":"55%","--chroma-accent":.18},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.16}},{id:"rose",name:"Rose",swatchBg:"#e11d48",seeds:{"--hue-primary":350,"--hue-secondary":330,"--hue-accent":200,"--lightness-primary":"55%","--chroma-primary":.18,"--lightness-secondary":"50%","--chroma-secondary":.14,"--lightness-accent":"60%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.14}},{id:"lavender",name:"Lavender",swatchBg:"#a855f7",seeds:{"--hue-primary":280,"--hue-secondary":300,"--hue-accent":60,"--lightness-primary":"55%","--chroma-primary":.14,"--lightness-secondary":"50%","--chroma-secondary":.12,"--lightness-accent":"70%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.12}},{id:"coral",name:"Coral",swatchBg:"#f97316",seeds:{"--hue-primary":15,"--hue-secondary":25,"--hue-accent":180,"--lightness-primary":"60%","--chroma-primary":.18,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"55%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.15}},{id:"slate",name:"Slate",swatchBg:"#64748b",seeds:{"--hue-primary":220,"--hue-secondary":210,"--hue-accent":45,"--lightness-primary":"48%","--chroma-primary":.1,"--lightness-secondary":"45%","--chroma-secondary":.06,"--lightness-accent":"68%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.08}},{id:"emerald",name:"Emerald",swatchBg:"#10b981",seeds:{"--hue-primary":160,"--hue-secondary":140,"--hue-accent":30,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"48%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"amber",name:"Amber",swatchBg:"#f59e0b",seeds:{"--hue-primary":45,"--hue-secondary":30,"--hue-accent":240,"--lightness-primary":"60%","--chroma-primary":.16,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"52%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"68%","--chroma-primary":.14}},{id:"indigo",name:"Indigo",swatchBg:"#6366f1",seeds:{"--hue-primary":250,"--hue-secondary":270,"--hue-accent":35,"--lightness-primary":"48%","--chroma-primary":.18,"--lightness-secondary":"45%","--chroma-secondary":.14,"--lightness-accent":"68%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"62%","--chroma-primary":.14}}],Qs=[{id:"default",name:"Default",hue:210,shape:"balanced",character:"The default",swatchBg:"#3b82f6",tier:"core"},{id:"modern",name:"Modern",hue:270,shape:"rounded",character:"Vibrant & elevated",swatchBg:"#6366f1",tier:"core"},{id:"minimal",name:"Minimal",hue:240,shape:"sharp",character:"Clean & flat",swatchBg:"#71717a",tier:"core"},{id:"classic",name:"Classic",hue:220,shape:"subtle",character:"Serif & elegant",swatchBg:"#92400e",tier:"core"}],Te=[{id:"swiss",name:"Swiss",icon:"grid-3x3",character:"Precision grid",swatchBg:"#ff3e00",swatchFg:"white",tier:"showcase",category:"Design"},{id:"brutalist",name:"Brutalist",icon:"square",character:"Raw, industrial",swatchBg:"#1a1a1a",swatchFg:"#f5f5f5",tier:"showcase",category:"Design"},{id:"art-deco",name:"Art Deco",icon:"crown",character:"1920s luxury",swatchBg:"#1A1A1A",swatchFg:"#C9A84C",tier:"showcase",category:"Design"},{id:"editorial",name:"Editorial",icon:"newspaper",character:"Magazine elegance",swatchBg:"#1a1a1a",swatchFg:"#c9a227",tier:"showcase",category:"Content"},{id:"genai",name:"GenAI",icon:"sparkles",character:"AI aesthetic",swatchBg:"#1a0a2e",swatchFg:"#a855f7",tier:"showcase",category:"Modern"},{id:"glassmorphism",name:"Glass",icon:"glass-water",character:"Frosted surfaces",swatchBg:"#667eea",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"startup",name:"Startup",icon:"rocket",character:"SaaS energy",swatchBg:"#4f46e5",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"organic",name:"Organic",icon:"leaf",character:"Natural, handcrafted",swatchBg:"#2d5016",swatchFg:"#faf5e6",tier:"showcase",category:"Creative"},{id:"rough",name:"Rough",icon:"pencil",character:"Hand-drawn sketch",swatchBg:"#f5f0e8",swatchFg:"#3a3a3a",tier:"showcase",category:"Creative"},{id:"cyber",name:"Cyber",icon:"zap",character:"Neon futuristic",swatchBg:"#0a0a1a",swatchFg:"#00ff88",tier:"showcase",category:"Creative"},{id:"vaporwave",name:"Vaporwave",icon:"radio",character:"Neon dreamy",swatchBg:"#2b0040",swatchFg:"#ff6ad5",tier:"showcase",category:"Aesthetic"},{id:"neumorphism",name:"Neumorph",icon:"circle",character:"Soft embossed",swatchBg:"#e0e0e0",swatchFg:"#a0a0a0",tier:"showcase",category:"Aesthetic"},{id:"bauhaus",name:"Bauhaus",icon:"shapes",character:"Geometric",swatchBg:"#F1FAEE",swatchFg:"#E63946",tier:"showcase",category:"Aesthetic"},{id:"claymorphism",name:"Clay",icon:"circle-dot",character:"Puffy 3D",swatchBg:"#f0f0f5",swatchFg:"#FF6B9D",tier:"showcase",category:"Aesthetic"},{id:"alpha1999",name:"Alpha1999",icon:"orbit",character:"Space retro-fi",swatchBg:"#0a0a14",swatchFg:"#d4880f",tier:"showcase",category:"Signature"},{id:"super2026",name:"Super2026",icon:"triangle",character:"Supergraphic bold",swatchBg:"#f5f0e6",swatchFg:"#c23616",tier:"showcase",category:"Signature"},{id:"magna",name:"Magna",icon:"orbit",character:"Odyssey 2 retro",swatchBg:"#0d0b14",swatchFg:"#f97316",tier:"showcase",category:"Signature"},{id:"win9x",name:"Win9x",icon:"monitor",character:"Classic desktop",swatchBg:"#008080",swatchFg:"#c0c0c0",tier:"showcase",category:"OS Styles"},{id:"nes",name:"NES",icon:"joystick",character:"Console pixels",swatchBg:"#bcbcbc",swatchFg:"#e40521",tier:"showcase",category:"OS Styles"},{id:"8bit",name:"8-Bit",icon:"gamepad-2",character:"Retro pixel art",swatchBg:"#000080",swatchFg:"#ffff00",tier:"showcase",category:"OS Styles"}],Le=[{id:"nord",name:"Nord",icon:"snowflake",character:"Arctic calm",swatchBg:"#2E3440",swatchFg:"#81A1C1",tier:"community",category:"Editor Palettes"},{id:"solarized",name:"Solarized",icon:"sun-dim",character:"Engineered precision",swatchBg:"#002B36",swatchFg:"#268BD2",tier:"community",category:"Editor Palettes"},{id:"dracula",name:"Dracula",icon:"moon-star",character:"Dark elegance",swatchBg:"#282A36",swatchFg:"#BD93F9",tier:"community",category:"Editor Palettes"},{id:"catppuccin-mocha",name:"Catppuccin",icon:"coffee",character:"Warm pastels",swatchBg:"#1E1E2E",swatchFg:"#CBA6F7",tier:"community",category:"Editor Palettes"},{id:"catppuccin-latte",name:"Ctp Latte",icon:"coffee",character:"Cozy daytime",swatchBg:"#eff1f5",swatchFg:"#8839ef",tier:"community",category:"Editor Palettes"},{id:"catppuccin-frappe",name:"Ctp Frapp\xE9",icon:"coffee",character:"Cool twilight",swatchBg:"#303446",swatchFg:"#ca9ee6",tier:"community",category:"Editor Palettes"},{id:"catppuccin-macchiato",name:"Ctp Macchiato",icon:"coffee",character:"Deep blue",swatchBg:"#24273a",swatchFg:"#c6a0f6",tier:"community",category:"Editor Palettes"},{id:"gruvbox",name:"Gruvbox",icon:"palette",character:"Retro warmth",swatchBg:"#282828",swatchFg:"#ebdbb2",tier:"community",category:"Editor Palettes"},{id:"tokyo-night",name:"Tokyo Night",icon:"moon",character:"Night-owl vibes",swatchBg:"#1a1b26",swatchFg:"#7aa2f7",tier:"community",category:"Editor Palettes"},{id:"rose-pine",name:"Ros\xE9 Pine",icon:"flower-2",character:"Muted elegance",swatchBg:"#191724",swatchFg:"#ebbcba",tier:"community",category:"Editor Palettes"},{id:"cottagecore",name:"Cottagecore",icon:"flower-2",character:"Pastoral",swatchBg:"#fdf8f0",swatchFg:"#7d8c6d",tier:"community",category:"Niche"},{id:"terminal",name:"Terminal",icon:"terminal",character:"Retro CRT",swatchBg:"#0d1117",swatchFg:"#00ff00",tier:"community",category:"Niche"},{id:"clinical",name:"Clinical",icon:"heart-pulse",character:"Sterile precision",swatchBg:"#ffffff",swatchFg:"#0077b6",tier:"community",category:"Industry"},{id:"financial",name:"Financial",icon:"landmark",character:"Navy + gold",swatchBg:"#1b2a4a",swatchFg:"#c9a84c",tier:"community",category:"Industry"},{id:"government",name:"Government",icon:"shield",character:"Official",swatchBg:"#002868",swatchFg:"#bf0a30",tier:"community",category:"Industry"},{id:"dawn",name:"Dawn",icon:"sunrise",character:"Golden morning",swatchBg:"#fef3e2",swatchFg:"#d4a574",tier:"community",category:"Mood/Time"},{id:"dusk",name:"Dusk",icon:"sunset",character:"Twilight",swatchBg:"#1a1b2e",swatchFg:"#e5a858",tier:"community",category:"Mood/Time"},{id:"midnight",name:"Midnight",icon:"moon",character:"Deep night",swatchBg:"#0d1117",swatchFg:"#58a6ff",tier:"community",category:"Mood/Time"},{id:"high-noon",name:"High Noon",icon:"sun",character:"Maximum bright",swatchBg:"#ffffff",swatchFg:"#e63946",tier:"community",category:"Mood/Time"}],tn=[{id:"kawaii",name:"Kawaii",icon:"heart",character:"Cute aesthetic",swatchBg:"#ffb7c5",swatchFg:"#ff69b4",tier:"showcase",category:"Packs"},{id:"memphis",name:"Memphis",icon:"star",character:"Bold patterns",swatchBg:"#FFF8F0",swatchFg:"#d03040",tier:"showcase",category:"Packs"}];var ph=[...Te,...Le],mh=[...Qs,...Te,...Le,...tn],Z=i=>Te.filter(t=>t.category===i),en=[{label:"Style",themes:Qs,tier:"core"},{label:"Design",themes:Z("Design"),tier:"showcase"},{label:"Content",themes:Z("Content"),tier:"showcase"},{label:"Modern",themes:Z("Modern"),tier:"showcase"},{label:"Creative",themes:Z("Creative"),tier:"showcase"},{label:"Aesthetic",themes:Z("Aesthetic"),tier:"showcase"},{label:"Signature",themes:Z("Signature"),tier:"showcase"},{label:"OS Styles",themes:Z("OS Styles"),tier:"showcase"},{label:"Packs",themes:tn,tier:"showcase"},{label:"More Themes",themes:Le,tier:"community"}];W();var Wt="theme",jt="current",Q={mode:"auto",brand:"default",accent:"default",borderStyle:"",iconSet:"",fluid:"",backdrop:"",backdropChrome:"",pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""},rn=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],C=null,A={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let i=await E.get(Wt,jt);C=i?{...Q,...i}:{...Q};try{await wt(C.brand)}catch{C.brand="default"}return this.apply(C),this._watchSystemPreference(),this._watchRootAttributes(),this._watchCrossDocumentStorage(),C})(),this._initPromise)},_watchCrossDocumentStorage(){typeof window>"u"||window.addEventListener("storage",async i=>{if(i.key!==`vb:${Wt}:${jt}`||!i.newValue)return;let t;try{t=JSON.parse(i.newValue)?.data}catch{return}if(!t||typeof t!="object")return;let e={...Q,...C,...t};if(e.brand&&e.brand!==C?.brand)try{await wt(e.brand)}catch{e.brand="default"}C=e,this.apply(C||{})})},load(){return C?{...C}:{...Q}},save(i){let t={...C??Q,...i};return C=t,E.set(Wt,jt,t).catch(()=>{}),t},apply({mode:i="auto",brand:t="default",borderStyle:e="",iconSet:s="",fluid:n="",backdrop:r="",backdropChrome:a="",pageBgType:o="",pageBgColor:c="",pageBgGradStart:h="",pageBgGradEnd:l="",pageBgGradDir:d=""}={}){let u=document.documentElement;u.dataset.mode=i==="auto"?this.getEffectiveMode():i;let v=(u.dataset.theme||"").split(" ").filter(x=>x.startsWith("a11y-")),p=t!=="default"?[t,...v]:[...v];p.length?u.dataset.theme=p.join(" "):delete u.dataset.theme;let m=e||this._readCSSHint("--theme-border-style");m&&m!=="clean"?u.dataset.borderStyle=m:delete u.dataset.borderStyle;let y=s||this._readCSSHint("--theme-icon-set");if(y&&y!=="lucide"?u.dataset.iconSet=y:delete u.dataset.iconSet,n?u.dataset.fluid=n:delete u.dataset.fluid,r?u.dataset.backdrop=r:delete u.dataset.backdrop,a&&a!=="card"?u.dataset.backdropChrome=a:delete u.dataset.backdropChrome,o==="color"&&c)u.style.setProperty("--page-bg-color",c),u.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&h&&l){let x=d||"to bottom";u.style.setProperty("--page-bg-gradient",`linear-gradient(${x}, ${h}, ${l})`),u.style.removeProperty("--page-bg-color")}else u.style.removeProperty("--page-bg-color"),u.style.removeProperty("--page-bg-gradient");let S=this.load().accent||"default";this._applyAccent(S),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:i,brand:t,accent:S,borderStyle:m,iconSet:y,fluid:n,backdrop:r,backdropChrome:a,pageBgType:o,effectiveMode:this.getEffectiveMode()}}))},setMode(i){let t=this.save({mode:i});this.apply(t)},async setBrand(i){try{await wt(i)}catch(e){console.warn(`[VB] Theme "${i}" failed to load, using default`,e),i="default"}let t=this.save({brand:i});this.apply(t)},setAccent(i){this.save({accent:i}),this._applyAccent(i),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(i){let t=this.save({borderStyle:i});this.apply(t)},setIconSet(i){let t=this.save({iconSet:i});this.apply(t)},setFluid(i){let t=this.save({fluid:i});this.apply(t)},setBackdrop(i){let t=this.save({backdrop:i});this.apply(t)},setBackdropChrome(i){let t=this.save({backdropChrome:i});this.apply(t)},setPageBg({type:i="",color:t="",gradStart:e="",gradEnd:s="",gradDir:n=""}={}){let r=this.save({pageBgType:i,pageBgColor:t,pageBgGradStart:e,pageBgGradEnd:s,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:i}=this.load();return i!=="auto"?i:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},getState(){let{mode:i,brand:t,accent:e,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:h,pageBgGradStart:l,pageBgGradEnd:d,pageBgGradDir:u}=this.load();return{mode:i,brand:t,accent:e,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:h,pageBgGradStart:l,pageBgGradEnd:d,pageBgGradDir:u,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){C={...Q},E.remove(Wt,jt).catch(()=>{});let i=document.documentElement;i.style.removeProperty("--page-bg-color"),i.style.removeProperty("--page-bg-gradient");for(let t of rn)i.style.removeProperty(t);this.apply(Q)},_readCSSHint(i){return getComputedStyle(document.documentElement).getPropertyValue(i).trim()},_applyAccent(i){let t=document.documentElement,e=Zs.find(s=>s.id===i);for(let s of rn)t.style.removeProperty(s);if(!(!e||!e.seeds||Object.keys(e.seeds).length===0)){for(let[s,n]of Object.entries(e.seeds))t.style.setProperty(s,String(n));if(e.seedsDark&&this.getEffectiveMode()==="dark")for(let[s,n]of Object.entries(e.seedsDark))t.style.setProperty(s,String(n))}},_watchRootAttributes(){this._rootObserver||(this._rootObserver=new MutationObserver(i=>{for(let t of i)t.attributeName==="data-theme"?this._syncFromDataTheme():t.attributeName==="data-mode"&&this._syncFromDataMode()}),this._rootObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","data-mode"]}))},_syncFromDataTheme(){if(!C)return;let e=(document.documentElement.dataset.theme||"").split(/\s+/).filter(Boolean).find(s=>!s.startsWith("a11y-"))||"default";e!==C.brand&&(C.brand=e,wt(e).catch(()=>{}),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_syncFromDataMode(){if(!C)return;let i=document.documentElement.dataset.mode||"auto",t=C.mode==="auto"?this.getEffectiveMode():C.mode;i!==t&&(C.mode=i,window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_watchSystemPreference(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{let t=this.load();t.mode==="auto"&&this.apply(t)})}};var Oa=["layout-text","layout-reel","layout-canvas","dl-item"];Oa.forEach(i=>{customElements.get(i)||customElements.define(i,class extends HTMLElement{})});var Sh=window.matchMedia("(prefers-reduced-motion: reduce)");var an=new Map;function b(i,t,e={}){let s=e.priority??10,n={impl:t,bundle:e.bundle,contract:e.contract,priority:s},r=an.get(i);if(customElements.get(i)){if(!r||r.priority>=s){r&&r.priority===s&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=s){r.priority===s&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${r.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}an.set(i,n),customElements.define(i,t)}var g=class extends HTMLElement{#e=[];#t;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,s,n){t.addEventListener(e,s,n),this.#e.push(()=>t.removeEventListener(e,s,n))}setup(){}teardown(){}setState(t,e){this.#t||(this.#t=this.attachInternals());let s=this.#t.states;try{e?s.add(t):s.delete(t)}catch{let n=`--${t}`;e?s.add(n):s.delete(n)}}_adoptInternals(t){this.#t||(this.#t=t)}};var Ba=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],Ne=class extends g{#e=null;#t=null;#i=!1;setup(){return this.#e=this.querySelector("input, textarea, select"),this.#t=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),this.#e?(this.listen(this.#e,"blur",()=>this.validate()),this.listen(this.#e,"input",()=>{this.#i&&this.validate()}),!0):!1}teardown(){this.#e=null,this.#t=null,this.#i=!1}validate(){let t=this.#e;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let e=t.checkValidity();return e?(this.#s(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#t&&(this.#t.textContent="")):(this.#i=!0,this.#s("invalid"),t.setAttribute("aria-invalid","true"),this.#r(t.validity)),e}setError(t){this.#e&&(this.#e.setCustomValidity(t),this.#i=!0,this.#s("invalid"),this.#e.setAttribute("aria-invalid","true"),this.#t&&(this.#t.textContent=t))}clearError(){this.#e&&(this.#e.setCustomValidity(""),this.#s(null),this.#e.removeAttribute("aria-invalid"),this.#i=!1,this.#t&&(this.#t.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#e?.getAttribute("aria-label")??this.#e?.name??this.#e?.id??"Field"}get input(){return this.#e}#s(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#r(t){if(!this.#t)return;let e=this.#e;if(!(!e||!this.#t))for(let s of Ba){if(!t[s])continue;let n=`data-message-${s.toLowerCase()}`,r=e.getAttribute(n)??e.validationMessage;this.#t.textContent=r;return}}};b("form-field",Ne);function P(i){return document.startViewTransition?document.startViewTransition(i):i()}var Pa=0,De=class extends g{#e=[];#t=[];#i=!1;#s=0;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.#a(),this.#o(),this.#r(),!0)}teardown(){this.#e=[],this.#t=[],this.#i=!1}get tabs(){return this.#e.map((t,e)=>({id:t.id||void 0,label:t.querySelector("summary")?.textContent?.trim()||`Tab ${e+1}`,content:t.querySelector(":scope > :not(summary)")?.innerHTML||"",active:t.hasAttribute("open")}))}set tabs(t){let e=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let s=!1;for(let n of e){let r=document.createElement("details");n.id&&(r.id=n.id),n.active&&!s&&(r.setAttribute("open",""),s=!0);let a=document.createElement("summary");a.textContent=n.label||"",r.appendChild(a);let o=document.createElement("div");o.innerHTML=n.content||"",r.appendChild(o),this.appendChild(r)}!s&&this.firstElementChild&&this.firstElementChild.setAttribute("open",""),this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("tab-set:tabs-changed",{detail:{tabs:e,source:"property"},bubbles:!0}))}#r(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#i=!0;let t=++Pa,e=this.getAttribute("transition")||"fade",s=e==="slide"?"vt-tabs-slide":e==="scale"?"vt-tabs-scale":"vt-tabs";this.#e.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=s)}),this.#s=this.#e.findIndex(n=>n.open),this.#s===-1&&(this.#s=0)}#n(t){if(t===this.#s)return;let e=t>this.#s?"forward":"backward";document.documentElement.dataset.vtDirection=e,P(()=>{this.#e[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#a(){this.#e.forEach((t,e)=>{let s=this.#t[e],n=t.querySelector(":scope > :not(summary)");if(!s||!n)return;let r=s.id||`tab-${crypto.randomUUID().slice(0,8)}`,a=n.id||`panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,s.setAttribute("aria-controls",a),s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-selected",t.open?"true":"false"),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(s,"click",o=>{this.#i&&(o.preventDefault(),this.#n(e))}),this.listen(s,"keydown",o=>this.#h(o,e)),this.listen(t,"toggle",()=>this.#c(e))})}#o(){!this.#e.some(e=>e.open)&&this.#e.length>0&&(this.#e[0].open=!0,this.#f())}#c(t){this.#e[t].open&&(this.#s=t),this.#f(),this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t},bubbles:!0}))}#f(){this.#e.forEach((t,e)=>{let s=this.#t[e];s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-selected",t.open?"true":"false")})}#h(t,e){let{key:s}=t,n;switch(s){case"ArrowRight":n=(e+1)%this.#e.length;break;case"ArrowLeft":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#i?this.#n(n):this.#e[n].open=!0,this.#t[n].focus()}};b("tab-set",De);var _e=class i extends g{static#e=0;#t;#i=[];#s="Back to content";setup(){this.#t=++i.#e,this.hasAttribute("data-back-label")&&(this.#s=this.getAttribute("data-back-label")??this.#s),this.#r(),this.getAttribute("data-mode")==="sidenotes"?this.#o():this.#n()}#r(){let t=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#i=t.filter(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}#n(){if(this.#i.length===0)return;let t=document.createElement("ol");this.#i.forEach((e,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;this.#a(e,n,r,a);let o=this.#f(e,n,r,a);t.appendChild(o)}),this.appendChild(t)}#a(t,e,s,n){t.setAttribute("data-enhanced",""),t.id=s;let r=t.innerHTML,a=document.createElement("span");a.innerHTML=r;let o=document.createElement("a");o.href=`#${n}`,o.setAttribute("aria-describedby",n),o.textContent=`[${e}]`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#o(){if(this.#i.length===0)return;let t=[];if(this.#i.forEach((e,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;e.getAttribute("data-side")==="false"?(this.#a(e,n,r,a),t.push({ref:e,num:n,refId:r,noteId:a})):this.#c(e,n,r,a)}),t.length>0){let e=document.createElement("ol");for(let{ref:s,num:n,refId:r,noteId:a}of t)e.appendChild(this.#f(s,n,r,a));this.appendChild(e)}else this.hidden=!0}#c(t,e,s,n){let r=t.innerHTML;t.setAttribute("data-enhanced",""),t.setAttribute("data-side",""),t.id=s;let a=document.createElement("a");a.href=`#${n}`,a.setAttribute("aria-describedby",n),a.textContent=`[${e}]`;let o=document.createElement("aside");o.className="sidenote",o.id=n,o.setAttribute("role","note"),o.innerHTML=`<span class="sidenote-number">${e}.</span> ${r}`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#f(t,e,s,n){let r=document.createElement("li");r.id=n;let a=t.querySelector("span"),o=a?a.innerHTML:"",c=document.createElement("a");return c.href=`#${s}`,c.setAttribute("data-backref",""),c.setAttribute("aria-label",this.#s),c.textContent="\u21A9",r.innerHTML=o+" ",r.appendChild(c),r}},Ie=class extends HTMLElement{};b("foot-notes",_e);b("foot-note",Ie);var on=0,$e=class extends g{#e=[];#t=[];#i=[];#s=!1;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.#r(),this.#o(),this.#n(),!0)}teardown(){this.#e=[],this.#t=[],this.#i=[],this.#s=!1}get panels(){return this.#e.map((t,e)=>({id:t.id||void 0,summary:t.querySelector("summary")?.textContent?.trim()||`Panel ${e+1}`,content:this.#i[e]?.innerHTML||"",open:t.hasAttribute("open")}))}set panels(t){let e=Array.isArray(t)?t:[],n=this.hasAttribute("single")?`acc-${++on}`:null;for(;this.firstChild;)this.firstChild.remove();for(let r of e){let a=document.createElement("details");r.id&&(a.id=r.id),r.open&&a.setAttribute("open",""),n&&a.setAttribute("name",n);let o=document.createElement("summary");o.textContent=r.summary||"",a.appendChild(o);let c=document.createElement("div");c.innerHTML=r.content||"",a.appendChild(c),this.appendChild(a)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("accordion-wc:panels-changed",{detail:{panels:e,source:"property"},bubbles:!0}))}#r(){this.#i=this.#e.map(t=>{let e=t.querySelector("summary");if(!e)return null;let s=[...t.children].filter(n=>n!==e);if(s.length===1)return s[0];if(s.length>1){let n=document.createElement("div");for(let r of s)n.appendChild(r);return t.appendChild(n),n}return null})}#n(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#s=!0;let t=++on,e=this.getAttribute("transition")||"fade",s=e==="slide"?"vt-accordion-slide":e==="scale"?"vt-accordion-scale":"vt-accordion";this.#i.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=s)})}#a(t){P(()=>{t.open=!t.open})}#o(){this.#e.forEach((t,e)=>{let s=this.#t[e],n=this.#i[e];if(s){if(n){let r=s.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,a=n.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,n.id=a,s.setAttribute("aria-expanded",t.open?"true":"false"),s.setAttribute("aria-controls",a),n.setAttribute("aria-labelledby",r),n.setAttribute("role","region")}else s.setAttribute("aria-expanded",t.open?"true":"false");this.listen(s,"click",r=>{this.#s&&(r.preventDefault(),this.#a(t))}),this.listen(s,"keydown",r=>this.#f(r,e)),this.listen(t,"toggle",()=>this.#c(t,e))}})}#c(t,e){this.#t[e].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#e.forEach((n,r)=>{r!==e&&n.open&&(n.open=!1,this.#t[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:e,open:t.open},bubbles:!0}))}#f(t,e){let{key:s}=t,n;switch(s){case"ArrowDown":n=(e+1)%this.#e.length;break;case"ArrowUp":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#t[n].focus()}open(t){t<0||t>=this.#e.length||(this.#s&&!this.#e[t].open?P(()=>{this.#e[t].open=!0}):this.#e[t].open=!0)}close(t){t<0||t>=this.#e.length||(this.#s&&this.#e[t].open?P(()=>{this.#e[t].open=!1}):this.#e[t].open=!1)}toggle(t){t<0||t>=this.#e.length||(this.#s?this.#a(this.#e[t]):this.#e[t].open=!this.#e[t].open)}openAll(){this.hasAttribute("single")||this.#e.forEach(t=>{t.open=!0})}closeAll(){this.#e.forEach(t=>{t.open=!1})}};b("accordion-wc",$e);var qe=class extends g{#e=[];#t=[];static get observedAttributes(){return["position","max"]}setup(){this.setAttribute("role","region"),this.setAttribute("aria-label","Notifications"),this.setAttribute("aria-live","polite")}teardown(){this.#t.forEach(t=>{t._dismissTimer&&clearTimeout(t._dismissTimer)}),this.#e=[],this.#t=[]}show(t){let{message:e,variant:s="info",duration:n=this.#n(),dismissible:r=!0,action:a,onAction:o,source:c="api"}=t,h=this.#i({message:e,variant:s,dismissible:r,action:a,onAction:o}),l=this.#a();return this.#t.length>=l?this.#e.push({toast:h,duration:n}):this.#s(h,n),this.dispatchEvent(new CustomEvent("toast-msg:enqueued",{detail:{message:e,variant:s,duration:n,source:c},bubbles:!0})),h}get queue(){let t=this.#t.map(s=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"visible"})),e=this.#e.map(({toast:s})=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"queued"}));return[...t,...e]}#i({message:t,variant:e,dismissible:s,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("role",e==="error"||e==="warning"?"alert":"status"),a.setAttribute("data-variant",e);let o={info:"ⓘ",success:"✓",warning:"⚠",error:"✗"};return a.innerHTML=`
|
|
1
|
+
var $a=Object.defineProperty;var D=(i,t)=>()=>(i&&(t=i(i=0)),t);var yt=(i,t)=>{for(var e in t)$a(i,e,{get:t[e],enumerable:!0})};function Ha(){let i=globalThis.localStorage;if(!i)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return i.getItem(t)},async setRaw(t,e){i.setItem(t,e)},async removeRaw(t){i.removeItem(t)},async keys(t){let e=[];for(let s=0;s<i.length;s++){let n=i.key(s);n&&n.startsWith(t)&&e.push(n)}return e}}}function z(){return Ut||(Ut=Ha()),Ut}function Me(i,t){if(typeof i!="string"||!i)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${i}:${t}`}function rn(i){if(typeof i!="string"||!i)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${i}:`}function an(i){try{let t=JSON.parse(i);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var Ut,E,j=D(()=>{Ut=null;E={configure(i={}){Ut=i.backend??null},async set(i,t,e){let s={data:e,timestamp:Date.now()};await z().setRaw(Me(i,t),JSON.stringify(s))},async get(i,t,e){let s=await z().getRaw(Me(i,t));if(s==null)return null;let n=an(s);return!n||e?.maxAge!=null&&Date.now()-n.timestamp>e.maxAge?null:n.data},async remove(i,t){await z().removeRaw(Me(i,t))},async list(i){let t=rn(i),e=await z().keys(t),s=[];for(let n of e){let r=await z().getRaw(n);if(r==null)continue;let a=an(r);a&&s.push({key:n.slice(t.length),data:a.data,timestamp:a.timestamp})}return s},async clear(i){let t=rn(i),e=await z().keys(t);for(let s of e)await z().removeRaw(s)},async clearAll(){let i=await z().keys("vb:");for(let t of i)await z().removeRaw(t)},async setMany(i,t){for(let[e,s]of t)await E.set(i,e,s)}}});var qn={};yt(qn,{addDialogDismiss:()=>In,addFlickListener:()=>Nn,addLongPress:()=>_n,addPullToRefresh:()=>po,addSwipeListener:()=>Mn,haptic:()=>Zt,initGestures:()=>$n,makeSwipeable:()=>Dn});function Mn(i,t={}){let e=t.threshold??50,s=t.restraint??100,n=t.timeout??300,r=t.velocity??.5,a=t.minFlickDistance??10,o,c,h;function l(u){u.isPrimary&&(o=u.clientX,c=u.clientY,h=Date.now())}function d(u){if(!u.isPrimary)return;let f=u.clientX-o,v=u.clientY-c,p=Date.now()-h;if(p>n)return;let m=Math.abs(f),y=Math.abs(v),S=Math.max(m,y),C=p>0?S/p:0,B=C>=r&&S>=a,H;if((m>=e||B&&m>y)&&y<=s?H=f<0?"left":"right":(y>=e||B&&y>m)&&m<=s&&(H=v<0?"up":"down"),H){let zt=H==="left"||H==="right"?m:y;i.dispatchEvent(new CustomEvent(`swipe-${H}`,{bubbles:!0,detail:{distance:zt,duration:p,velocity:C,flick:B}}))}}return i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("pointerup",d,{passive:!0}),()=>{i.removeEventListener("pointerdown",l),i.removeEventListener("pointerup",d)}}function Nn(i,t={}){let e=t.minDistance??10,s=t.velocity??.6,n=t.timeout??250,r=t.restraint??80,a,o,c;function h(d){d.isPrimary&&(a=d.clientX,o=d.clientY,c=Date.now())}function l(d){if(!d.isPrimary)return;let u=d.clientX-a,f=d.clientY-o,v=Date.now()-c;if(v===0||v>n)return;let p=Math.abs(u),m=Math.abs(f),y=Math.max(p,m);if(y<e)return;let S=y/v;if(S<s)return;let C;if(p>m&&m<=r?C=u<0?"left":"right":m>p&&p<=r&&(C=f<0?"up":"down"),C){let B=C==="left"||C==="right"?p:m;i.dispatchEvent(new CustomEvent(`swipe-${C}`,{bubbles:!0,detail:{distance:B,duration:v,velocity:S,flick:!0}}))}}return i.addEventListener("pointerdown",h,{passive:!0}),i.addEventListener("pointerup",l,{passive:!0}),()=>{i.removeEventListener("pointerdown",h),i.removeEventListener("pointerup",l)}}function Dn(i,t={}){let e=t.threshold??100,s=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=s==="horizontal",a=0,o=0,c=!1;function h(p){!p.isPrimary||i.hasAttribute("data-dismissed")||(p.preventDefault(),c=!0,a=r?p.clientX:p.clientY,o=0,i.setPointerCapture(p.pointerId),i.setAttribute("data-swiping",""))}function l(p){if(!c||!p.isPrimary)return;o=(r?p.clientX:p.clientY)-a;let y=1-Math.min(Math.abs(o)/e,1)*.5;r?i.style.transform=`translateX(${o}px)`:i.style.transform=`translateY(${o}px)`,i.style.opacity=String(y)}function d(p){!c||!p.isPrimary||(c=!1,i.releasePointerCapture(p.pointerId),i.removeAttribute("data-swiping"),Math.abs(o)>=e?f(o>0?"right":"left"):v())}function u(p){!c||!p.isPrimary||(c=!1,i.releasePointerCapture(p.pointerId),i.removeAttribute("data-swiping"),v())}function f(p){let m=p==="right"?"100%":"-100%";i.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",i.style.transform=r?`translateX(${m})`:`translateY(${m})`,i.style.opacity="0",i.setAttribute("data-dismissed",""),Zt.dismiss(),i.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:p,distance:Math.abs(o)}})),n&&i.addEventListener("transitionend",()=>i.remove(),{once:!0})}function v(){i.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",i.style.transform="",i.style.opacity="",i.addEventListener("transitionend",()=>{i.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",h),i.addEventListener("pointermove",l),i.addEventListener("pointerup",d),i.addEventListener("pointercancel",u),()=>{i.removeEventListener("pointerdown",h),i.removeEventListener("pointermove",l),i.removeEventListener("pointerup",d),i.removeEventListener("pointercancel",u)}}function po(i,t,e={}){let s=e.threshold??70,n=e.maxPull??120,r=document.createElement("div");r.setAttribute("data-pull-indicator",""),r.setAttribute("aria-hidden","true");let a=document.createElement("div");a.setAttribute("data-pull-spinner",""),r.appendChild(a),i.prepend(r);let o=0,c=!1,h=!1;function l(m){!m.isPrimary||h||i.scrollTop<=0&&(o=m.clientY,c=!0)}function d(m){if(!c||!m.isPrimary||h)return;let y=m.clientY-o;if(y<=0){r.style.transform="",r.style.opacity="";return}let S=Math.min(y,n),C=S/s;r.style.transform=`translateY(${S}px)`,r.style.opacity=String(Math.min(C,1)),C>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function u(m){!c||!m.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!h?v():p())}function f(m){!c||!m.isPrimary||(c=!1,p())}async function v(){h=!0,r.removeAttribute("data-pull-ready"),r.setAttribute("data-pull-loading",""),r.style.transform=`translateY(${s}px)`,r.style.opacity="1";try{await t()}finally{h=!1,r.removeAttribute("data-pull-loading"),p()}}function p(){r.style.transition="transform 0.3s ease, opacity 0.3s ease",r.style.transform="",r.style.opacity="",r.removeAttribute("data-pull-ready"),r.addEventListener("transitionend",()=>{r.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("pointermove",d,{passive:!0}),i.addEventListener("pointerup",u,{passive:!0}),i.addEventListener("pointercancel",f,{passive:!0}),()=>{i.removeEventListener("pointerdown",l),i.removeEventListener("pointermove",d),i.removeEventListener("pointerup",u),i.removeEventListener("pointercancel",f),r.remove()}}function _n(i,t,e={}){let s=e.duration??500,n=e.hapticFeedback??!0,r=e.blockContextMenu??!0,a=null;function o(l){l.isPrimary&&(a=setTimeout(()=>{n&&Zt.tap(),t(l),a=null},s))}function c(){a&&(clearTimeout(a),a=null)}function h(l){r&&l.preventDefault()}return i.addEventListener("pointerdown",o,{passive:!0}),i.addEventListener("pointermove",c,{passive:!0}),i.addEventListener("pointerup",c,{passive:!0}),i.addEventListener("pointercancel",c,{passive:!0}),i.addEventListener("contextmenu",h),()=>{c(),i.removeEventListener("pointerdown",o),i.removeEventListener("pointermove",c),i.removeEventListener("pointerup",c),i.removeEventListener("pointercancel",c),i.removeEventListener("contextmenu",h)}}function In(i,t={}){let e=t.threshold??80,s=0,n=0,r=!1;function a(u){if(!u.isPrimary||!i.open)return;let f=u.target;f.closest("a, button, input, select, textarea, [contenteditable]")&&!f.closest("header")||(r=!0,s=u.clientY,n=0,i.setPointerCapture(u.pointerId),i.style.transition="none")}function o(u){if(!r||!u.isPrimary)return;if(n=u.clientY-s,n<=0){i.style.transform="",i.style.opacity="";return}let v=1-Math.min(n/e,1)*.4;i.style.transform=`translateY(${n}px)`,i.style.opacity=String(v)}function c(u){!r||!u.isPrimary||(r=!1,i.releasePointerCapture(u.pointerId),n>=e?l():d())}function h(u){!r||!u.isPrimary||(r=!1,i.releasePointerCapture(u.pointerId),d())}function l(){i.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",i.style.transform="translateY(100%)",i.style.opacity="0",Zt.dismiss(),i.addEventListener("transitionend",()=>{i.style.transition="",i.style.transform="",i.style.opacity="",i.close("dismiss")},{once:!0})}function d(){i.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",i.style.transform="",i.style.opacity="",i.addEventListener("transitionend",()=>{i.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",a),i.addEventListener("pointermove",o),i.addEventListener("pointerup",c),i.addEventListener("pointercancel",h),()=>{i.removeEventListener("pointerdown",a),i.removeEventListener("pointermove",o),i.removeEventListener("pointerup",c),i.removeEventListener("pointercancel",h)}}function $n(i=document){let t=[];for(let e of i.querySelectorAll('[data-gesture="swipe"]'))t.push(Mn(e));for(let e of i.querySelectorAll('[data-gesture="flick"]'))t.push(Nn(e));for(let e of i.querySelectorAll('[data-gesture="dismiss"]'))t.push(Dn(e));for(let e of i.querySelectorAll('[data-gesture="long-press"]'))t.push(_n(e,()=>{e.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let e of i.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(In(e));return()=>t.forEach(e=>e())}var Zt,On=D(()=>{Zt={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};$n()});var re={};yt(re,{destroyStickyManager:()=>Wo,initStickyManager:()=>Ei});function it(){let i=document.documentElement;if(!i.hasAttribute("data-sticky"))return;let t=document.querySelector("header");t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",wi=!0);let e=document.querySelector("header[data-sticky]"),s=e?e.getBoundingClientRect().height:0;i.style.setProperty("--sticky-offset",`${s}px`)}function Jn(){it()}function Ei(){if(ne)return;ne=!0,it(),requestAnimationFrame(it),document.fonts?.ready?.then(it),window.addEventListener("resize",it,{passive:!0}),document.addEventListener("toggle",Jn,!0),yi=new ResizeObserver(it);let i=document.querySelector("header[data-sticky]");i&&yi.observe(i)}function Wo(){if(ne){if(ne=!1,window.removeEventListener("resize",it),document.removeEventListener("toggle",Jn,!0),yi?.disconnect(),wi){let i=document.querySelector("header[data-sticky]");i&&delete i.dataset.sticky,wi=!1}document.documentElement.style.removeProperty("--sticky-offset")}}var ne,yi,wi,Mt=D(()=>{ne=!1,wi=!1});var Qn={};yt(Qn,{SoundManager:()=>jo});var Zn,Ai,jo,tr=D(()=>{Zn="vb-sound",Ai={enabled:!1,volume:.5},jo={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let i=this._load();return this._enabled=i.enabled,this._volume=i.volume,this._initialized=!0,this},_getContext(){return this._ctx||(this._ctx=new(window.AudioContext||window.webkitAudioContext)),this._ctx.state==="suspended"&&this._ctx.resume(),this._ctx},_load(){try{let i=localStorage.getItem(Zn);return i?{...Ai,...JSON.parse(i)}:{...Ai}}catch{return{...Ai}}},_save(i){try{let t=this._load();localStorage.setItem(Zn,JSON.stringify({...t,...i}))}catch{}},_playTone(i,t,e="sine"){if(!this._enabled)return;let s=this._getContext(),n=s.createOscillator(),r=s.createGain();n.connect(r),r.connect(s.destination),n.frequency.value=i,n.type=e,r.gain.value=this._volume*.3,n.start(),r.gain.exponentialRampToValueAtTime(.01,s.currentTime+t),n.stop(s.currentTime+t)},enable(){this._enabled=!0,this._save({enabled:!0}),this.play("click")},disable(){this._enabled=!1,this._save({enabled:!1})},toggle(){return this._enabled?this.disable():this.enable(),this._enabled},isEnabled(){return this._enabled},setVolume(i){this._volume=Math.max(0,Math.min(1,i)),this._save({volume:this._volume})},getVolume(){return this._volume},play(i){if(this._enabled)switch(i){case"click":this._playTone(800,.1);break;case"success":this._playTone(523,.1),setTimeout(()=>this._playTone(659,.1),100),setTimeout(()=>this._playTone(784,.15),200);break;case"error":this._playTone(200,.15,"sawtooth"),setTimeout(()=>this._playTone(180,.2,"sawtooth"),150);break;case"notification":this._playTone(880,.1),setTimeout(()=>this._playTone(1100,.15),100);break;case"soft":this._playTone(600,.05);break;case"tick":this._playTone(1200,.02,"square");break}},getState(){return{enabled:this._enabled,volume:this._volume}}}});function Yo(i,t){if(!t)return i;let e=i??new URLSearchParams;for(let[s,n]of Object.entries(t))n!=null&&e.set(s,String(n));return e}async function Go(i){if((i.headers.get("content-type")??"").includes("application/json"))try{return await i.json()}catch{return null}try{return await i.text()}catch{return null}}function er(i){return i.endsWith("/")?i.slice(0,-1):i}var F,U,st,xi=D(()=>{F={baseUrl:"/go",headers:{},services:{}},U=class extends Error{constructor(t,e,s,n){super(`VBService(${s}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=e,this.role=s,this.path=n}};st=class i{static configure(t={}){F={baseUrl:t.baseUrl??F.baseUrl,headers:{...F.headers,...t.headers??{}},services:{...F.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");return F.services[t]?er(F.services[t]):F.baseUrl?`${er(F.baseUrl)}/${t}`:`/go/${t}`}static _reset(){F={baseUrl:"/go",headers:{},services:{}}}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,e){return this.#e("GET",t,{params:e})}async post(t,e){return this.#e("POST",t,{body:e})}async patch(t,e){return this.#e("PATCH",t,{body:e})}async delete(t){return this.#e("DELETE",t,{})}async#e(t,e,s){let n=i.resolve(this.role),r=e?e.startsWith("/")?e:`/${e}`:"",a=new URL(`${n}${r}`,globalThis.location?.origin??"http://localhost"),o=Yo(a.searchParams,s.params);o&&(a.search=o.toString());let c={method:t,headers:{...F.headers}};s.body!==void 0&&(c.body=JSON.stringify(s.body),c.headers["content-type"]="application/json");let h=a.toString(),l=await fetch(h,c),d=await Go(l);if(!l.ok)throw new U(l.status,d,this.role,`${r||"/"}`);return d}}});function ae(i){let t=2166136261;for(let e=0;e<i.length;e++)t^=i.charCodeAt(e),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Zo(){return"hn-"+crypto.randomUUID().slice(0,8)}function Qo(i,t){return getComputedStyle(i).getPropertyValue(`--highlight-${t}`).trim()}function tc(i){if(nt){Dt++;return}nt=new CSSStyleSheet;let t=i.map(e=>`::highlight(hn-${e}) { background-color: var(--highlight-${e}); text-decoration-line: underline; text-decoration-color: var(--highlight-${e}); text-underline-offset: 2px; }`).join(`
|
|
2
|
+
`);nt.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,nt],Dt=1}function ec(){Dt--,Dt<=0&&nt&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(i=>i!==nt),nt=null,Dt=0)}function ki(i){X||(X=document.createElement("div"),X.setAttribute("aria-live","polite"),X.setAttribute("aria-atomic","true"),X.className="hn-sr-only",document.body.appendChild(X)),X.textContent="",requestAnimationFrame(()=>{X.textContent=i})}function sr(i,t,e){let s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){if(s.currentNode===t)return n+e;n+=(s.currentNode.textContent??"").length}return-1}function pt(i,t,e){let s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT),n=0,r=null,a=0,o=null,c=0;for(;s.nextNode();){let h=s.currentNode,l=(h.textContent??"").length;if(!r&&n+l>t&&(r=h,a=t-n),n+l>=e){o=h,c=e-n;break}n+=l}if(!r||!o)return null;try{let h=document.createRange();return h.setStart(r,Math.min(a,(r.textContent??"").length)),h.setEnd(o,Math.min(c,(o.textContent??"").length)),h}catch{return null}}function Ni(i){if(Ti.has(i))return Ti.get(i);let t=new Mi(i);return Ti.set(i,t),t}function nr(i=document){i.querySelectorAll(Li).forEach(t=>{t.hasAttribute("data-highlights-init")||Ni(t)})}var Li,ir,Xo,Jo,nt,Dt,X,Mi,Ti,ic,rr=D(()=>{j();Li="[data-highlights]",ir="highlights",Xo=["yellow","green","blue","pink"],Jo=typeof CSS<"u"&&"highlights"in CSS;nt=null,Dt=0;X=null;Mi=class{#e;#t;#i;#s;#r=[];#n=!Jo;#a;#o;#c=!1;#f=[];constructor(t){this.#e=t,this.#s=t.hasAttribute("data-highlights-readonly");let e=t.dataset.highlights;this.#t=e&&e!==""?e:location.pathname;let s=t.dataset.highlightsColors;this.#i=s?s.split(",").map(n=>n.trim()).filter(Boolean):[...Xo],this.#n||tc(this.#i),this.#d(),this.#s||(this.#a=this.#h.bind(this),this.#o=this.#p.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#o)),t.setAttribute("data-highlights-init",""),this.#l().then(()=>{this.#c||this.#d()})}get colors(){return[...this.#i]}get element(){return this.#e}getHighlights(){return this.#r.map(t=>({...t}))}removeHighlight(t){let e=this.#r.findIndex(s=>s.id===t);e<0||(this.#r.splice(e,1),this.#m(),this.#d(),this.#g("highlights:removed",{id:t}),ki("Highlight removed"))}clearAll(){this.#r=[],this.#m(),this.#d()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#r})}importHighlights(t){try{let e=typeof t=="string"?JSON.parse(t):t;if(!e.highlights||!Array.isArray(e.highlights))return;this.#r=e.highlights,this.#m(),this.#d()}catch{}}destroy(){if(!this.#c){if(this.#c=!0,this.#a&&this.#e.removeEventListener("pointerup",this.#a),this.#o&&this.#e.removeEventListener("click",this.#o),this.#n)this.#e.querySelectorAll("mark[data-hn-id]").forEach(t=>{let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.normalize()});else{for(let t of this.#i)CSS.highlights.delete(`hn-${t}`);ec()}this.#v(),this.#e.removeAttribute("data-highlights-init")}}#h(){requestAnimationFrame(()=>{if(this.#c)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0);this.#e.contains(e.commonAncestorContainer)&&this.#g("highlights:selected",{text:t.toString().trim(),rect:e.getBoundingClientRect()})})}#p(t){let e=t.target.closest?.(".hn-margin-annotation");if(e){let n=e.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#g("highlights:clicked",{id:n,highlight:{...r}}),this.#g("highlights:request-note",{id:n,highlight:{...r},controller:this});return}}let s=t.target.closest?.("mark[data-hn-id]");if(s){let n=s.dataset.hnId,r=this.#r.find(a=>a.id===n);if(r){this.#g("highlights:clicked",{id:n,highlight:{...r}});return}}if(!this.#n){let n=this.#u(t.clientX,t.clientY);n&&this.#g("highlights:clicked",{id:n.id,highlight:{...n}})}}findHighlightRect(t){let e=this.#r.find(r=>r.id===t);if(!e)return null;let s=pt(this.#e,e.startOffset,e.endOffset);if(!s)return null;let n=s.getClientRects();return n.length?n[0]:null}#u(t,e){for(let s of this.#r){let n=pt(this.#e,s.startOffset,s.endOffset);if(!n)continue;let r=n.getClientRects();for(let a of r)if(t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom)return s}return null}_createFromSelection(t){let e=window.getSelection();if(!e||e.isCollapsed)return;let s=e.getRangeAt(0);if(!this.#e.contains(s.commonAncestorContainer))return;let n=sr(this.#e,s.startContainer,s.startOffset),r=sr(this.#e,s.endContainer,s.endOffset);if(n<0||r<0||n>=r)return;let a=e.toString().trim(),o={id:Zo(),startOffset:n,endOffset:r,text:a,color:t,note:"",created:Date.now()};this.#r.push(o),this.#m(),this.#d(),e.removeAllRanges(),this.#g("highlights:added",{id:o.id,text:a,color:t,note:""}),ki("Highlight added")}_changeColor(t,e){let s=this.#r.find(n=>n.id===t);s&&(s.color=e,this.#m(),this.#d())}_updateNote(t,e){let s=this.#r.find(n=>n.id===t);s&&(s.note=e,this.#m(),this.#b(),this.#g("highlights:note-changed",{id:t,note:e}),ki("Note saved"))}async#l(){let t=await E.get(ir,this.#t);if(!t||!Array.isArray(t.highlights))return;let e=ae(this.#e.textContent);t.contentHash&&t.contentHash!==e?(this.#r=t.highlights.filter(s=>{let n=pt(this.#e,s.startOffset,s.endOffset);return n?n.toString().trim()===s.text:!1}),this.#m()):this.#r=t.highlights}#m(){let t={version:1,contentHash:ae(this.#e.textContent),highlights:this.#r};E.set(ir,this.#t,t).catch(()=>{})}#d(){this.#n?this.#w():this.#y(),this.#b()}#y(){let t=new Map;for(let e of this.#i)t.set(e,[]);for(let e of this.#r){let s=pt(this.#e,e.startOffset,e.endOffset);s&&t.has(e.color)&&t.get(e.color).push(s)}for(let[e,s]of t){let n=`hn-${e}`;s.length===0?CSS.highlights.delete(n):CSS.highlights.set(n,new Highlight(...s))}}#w(){this.#e.querySelectorAll("mark[data-hn-id]").forEach(e=>{let s=e.parentNode;for(;e.firstChild;)s.insertBefore(e.firstChild,e);s.removeChild(e)}),this.#e.normalize();let t=[...this.#r].sort((e,s)=>s.startOffset-e.startOffset);for(let e of t){let s=pt(this.#e,e.startOffset,e.endOffset);if(!s)continue;let n=Qo(this.#e,e.color),r=document.createElement("mark");r.dataset.hnId=e.id,r.dataset.hnColor=e.color,n&&(r.style.backgroundColor=n,r.style.textDecorationColor=n);try{s.surroundContents(r)}catch{let a=s.extractContents();r.appendChild(a),s.insertNode(r)}}}#v(){for(let t of this.#f)t.remove();this.#f=[]}#b(){if(this.#v(),this.#r.length===0)return;getComputedStyle(this.#e).position==="static"&&(this.#e.style.position="relative");for(let e of this.#r){let s=pt(this.#e,e.startOffset,e.endOffset);if(!s)continue;let n=s.getClientRects();if(n.length===0)continue;let r=n[0],a=this.#e.getBoundingClientRect(),o=r.top-a.top,c=document.createElement("span");c.className="hn-margin-annotation",c.dataset.hnId=e.id,c.setAttribute("aria-hidden","true"),c.style.top=`${o}px`,e.note?(c.innerHTML='<span class="hn-note-indicator">*</span> You highlighted',c.classList.add("hn-has-note")):c.textContent="You highlighted",this.#e.appendChild(c),this.#f.push(c)}}#g(t,e={}){this.#e.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}},Ti=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>nr()):nr();ic=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Li)&&Ni(s),s.querySelectorAll(Li).forEach(n=>{n.hasAttribute("data-highlights-init")||Ni(n)})}});ic.observe(document.documentElement,{childList:!0,subtree:!0})});var Bi={};yt(Bi,{currentHash:()=>Oi,initPageWatch:()=>$i,readWatch:()=>oe,removeWatch:()=>or,writeWatch:()=>_t});function ar(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function sc(i){if(!ar())return null;try{let t=new st("notify"),e={url:i.url,type:"page-watch",notify:["panel"]},s=await t.post("/subscribe",e);return typeof s?.id=="string"?s.id:null}catch(t){let e=t instanceof U?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",e),null}}async function nc(i){if(!(!i||!ar()))try{await new st("notify").delete(`/subscribe/${encodeURIComponent(i)}`)}catch(t){let e=t instanceof U?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",e)}}function rc(){return document.querySelector("main")||document.querySelector("article")||document.body}function It(){return location.pathname||"/"}function Oi(){let i=rc();return i?ae(i.textContent||""):""}function ac(){return document.title||It()}async function oe(){return await E.get(qi,It())}async function _t(i){await E.set(qi,It(),i)}async function or(){await E.remove(qi,It())}function Di(i,t){i.setAttribute("aria-pressed",t?"true":"false"),i.dataset.watching="",t||delete i.dataset.watching;let e=i.querySelector("icon-wc");e&&e.setAttribute("name",t?"bookmark-check":"bookmark");let s=[...i.childNodes].find(n=>n.nodeType===Node.TEXT_NODE&&(n.textContent||"").trim());s&&!i.hasAttribute("data-watch-label-locked")&&(s.textContent=t?"Watching":"Watch for updates"),i.setAttribute("title",t?"Stop watching this page":"Watch this page for content updates")}async function Ii(i){if(i.hasAttribute("data-watch-page-init"))return;i.setAttribute("data-watch-page-init",""),i.setAttribute("type",i.getAttribute("type")||"button");let t=await oe();Di(i,!!t),i.addEventListener("click",async e=>{e.preventDefault();let s=await oe();if(s)await or(),Di(i,!1),i.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:s.url,subscriptionId:s.subscriptionId}})),nc(s.subscriptionId);else{let n={url:It(),title:ac(),contentHash:Oi(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await _t(n),Di(i,!0),i.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:n}}));let r=await sc(n);r&&await _t({...n,subscriptionId:r})}})}async function oc(){let i=await oe();if(!i)return;let t=Oi(),e=new Date().toISOString(),s=i.contentHash,n={...i,lastChecked:e};if(t&&t!==s){n.contentHash=t,n.lastChanged=e,await _t(n);let r={id:`page-watch:${i.url}:${t}`,type:"watch",title:`Updated: ${i.title}`,body:"Content changed since your last visit.",url:i.url,date:e,read:!1,dismissed:!1,priority:"normal"};document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}}))}else await _t(n)}function $i(i=document){for(let t of i.querySelectorAll(_i))Ii(t);oc()}var _i,qi,cc,Pi=D(()=>{j();xi();rr();_i="[data-watch-page]",qi="watches";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>$i()):$i();cc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches?.(_i)&&Ii(s),s.querySelectorAll?.(_i).forEach(n=>Ii(n))}});cc.observe(document.documentElement,{childList:!0,subtree:!0})});function Ee(i){try{if(sessionStorage.getItem("vb_optout")==="1")return!0}catch{}if(navigator.globalPrivacyControl===!0||navigator.doNotTrack==="1")return!0;if(typeof i.consent=="function")try{return i.consent()===!1}catch{return!0}return!1}function ha(i){return i?.closest?.("[data-vb-no-track]")!=null}function Zl(){let{dataset:i}=document.documentElement,t={};for(let e of Object.keys(i)){let s=i[e];s!=null&&s!==""&&(t[e]=s)}return t}function Ql(){let i={};for(let e of document.querySelectorAll('meta[name^="vb:"]')){let s=e.getAttribute("name")?.slice(3),n=e.getAttribute("content")?.trim();s&&n&&(i[s]=n)}let t=[];for(let e of document.querySelectorAll('meta[name="concept"]')){let s=e.getAttribute("content")?.trim();s&&t.push(s)}return t.length&&(i.concepts=t),i}function th(i,t){if(!t?.length)return i;for(let{pattern:e,replace:s}of t)if(e.test(i))return i.replace(e,s);return i}function eh(i,t){let e=JSON.stringify(t);if(typeof navigator.sendBeacon=="function"){let s=new Blob([e],{type:"application/json"});if(navigator.sendBeacon(i,s))return!0}try{return fetch(i,{method:"POST",body:e,keepalive:!0,headers:{"content-type":"application/json"}}),!0}catch{return!1}}function da(i){return`${(k.config?.endpoint??"/api/analytics").replace(/\/+$/,"")}/${i}`}function Os(i,t){let e=k.config;if(!e)throw new Error("analytics: buildEnvelope called before init");let s=th(location.pathname+location.search,e.urlMasks),n=typeof e.context=="function"?e.context()??{}:{};return{name:i,ts:Date.now(),site:e.siteId,path:s,referrer:document.referrer||"",context:{...Zl(),...Ql(),...n},props:t??{}}}function Ae(i,t){let e=k.config;return!e||e.transport==="disabled"?!1:e.transport==="console"?(console.log("%c[vb:analytics]","color:#0aa;font-weight:600",i,t),!0):eh(da(i),t)}function ua(){let i=k.config?.sampleRate??1;return i>=1?!0:Math.random()<i}function fa(){if(!k.config||Ee(k.config)||document.documentElement.hasAttribute("data-vb-no-track")||!ua())return;let i=location.pathname+location.search;i!==ca&&(ca=i,Ae("hit",Os("page.view",{})))}function ih(){let i,t=()=>{clearTimeout(i),i=setTimeout(fa,100)},e=history.pushState.bind(history);history.pushState=function(...n){e(...n),t()};let s=history.replaceState.bind(history);history.replaceState=function(...n){s(...n),t()},window.addEventListener("popstate",t)}function sh(i){let t={};for(let[e,s]of Object.entries(i.dataset)){if(e==="vbEvent"||!e.startsWith("vbEvent"))continue;let n=e.slice(7).replace(/^./,r=>r.toLowerCase());t[n]=s}return t}function nh(i){if(!k.config||Ee(k.config))return;let e=i.target?.closest?.("[data-vb-event]");if(!e||ha(e))return;let s=e.dataset.vbEvent;s&&w.track(s,sh(e))}function la(){let i=document.querySelectorAll('a[href^="http"]');for(let t of i){if(t.hostname===location.hostname||ha(t)||t.hasAttribute("data-vb-analytics-wired"))continue;let e=encodeURIComponent(k.config?.siteId??"default"),s=`${da("click")}?site=${e}&from=${encodeURIComponent(location.pathname)}`;t.hasAttribute("ping")||t.setAttribute("ping",s),t.addEventListener("click",()=>{if(Ee(k.config))return;let n=navigator.userAgent;/Firefox|Brave/.test(n)&&Ae("click",Os("link.outbound",{to:t.hostname,href:t.href}))}),t.setAttribute("data-vb-analytics-wired","")}}function qs(){if(!k.queue.length)return;let i=k.queue.splice(0);Ae("events",{site:k.config?.siteId,events:i})}function rh(){document.visibilityState==="hidden"&&qs()}function oh(){try{return window.top!==window.self}catch{return!0}}var k,ca,ah,w,ot=D(()=>{k={config:null,queue:[]};ca=null;ah={endpoint:"/api/analytics",siteId:"default",transport:"disabled",sampleRate:1,consent:null,context:null,urlMasks:null,autoPageView:!0,autoOutboundLinks:!0,autoDeclarative:!0,allowInIframe:!1};w={init(i={}){if(k.config)return;let t={...ah,...i};if(k.config=t,oh()&&!t.allowInIframe){t.transport="disabled",t.autoPageView=!1,t.autoOutboundLinks=!1,t.autoDeclarative=!1;return}t.transport==="disabled"&&(t.autoOutboundLinks=!1),t.autoDeclarative&&document.addEventListener("click",nh,{capture:!0}),t.autoOutboundLinks&&(la(),new MutationObserver(()=>la()).observe(document.body,{childList:!0,subtree:!0})),t.autoPageView&&(fa(),ih()),document.addEventListener("visibilitychange",rh),window.addEventListener("pagehide",qs)},track(i,t={}){k.config&&(Ee(k.config)||ua()&&Ae("hit",Os(i,t)))},flush:qs,setConsent(i){try{i?sessionStorage.removeItem("vb_optout"):sessionStorage.setItem("vb_optout","1")}catch{}},get config(){return k.config?{...k.config}:null}}});var mh={};function dh(i,t,e){return i<=t?"good":i<=e?"needs-improvement":"poor"}function Se(i,t,e,s,n={}){w.track(i,{value:Math.round(t*1e3)/1e3,rating:dh(t,e,s),...n})}function uh(){let i=null,t=new PerformanceObserver(s=>{let n=s.getEntries();i=n[n.length-1]});try{t.observe({type:"largest-contentful-paint",buffered:!0})}catch{return}let e=()=>{i&&(Se("perf.lcp",i.startTime,2500,4e3),i=null)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function fh(){let i=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries()){let r=n;r.hadRecentInput||(i+=r.value)}});try{t.observe({type:"layout-shift",buffered:!0})}catch{return}let e=()=>{Se("perf.cls",i,.1,.25),i=0};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function ph(){let i=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.duration>i&&(i=n.duration)});try{t.observe({type:"event",durationThreshold:40,buffered:!0})}catch{return}let e=()=>{i!==0&&(Se("perf.inp",i,200,500),i=0)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function ga(){try{let[i]=performance.getEntriesByType("navigation");if(!i||!i.responseStart)return;Se("perf.ttfb",i.responseStart,800,1800,{navigationType:i.type})}catch{}}var va=D(()=>{ot();typeof window<"u"&&"PerformanceObserver"in window&&(uh(),fh(),ph(),document.readyState==="complete"?ga():window.addEventListener("load",ga,{once:!0}))});var gh={};function bh(i){if(typeof i!="string"||!i)return"";try{let t=new URL(i,location.origin);return t.pathname.split("/").pop()||t.pathname}catch{return i.split("/").pop()??i}}function ya(i){return typeof i!="string"?String(i??"").slice(0,Ps):i.length>Ps?i.slice(0,Ps):i}var Ps,wa=D(()=>{ot();Ps=200;typeof window<"u"&&(window.addEventListener("error",i=>{i.target&&i.target!==window||w.track("error.js_runtime",{message:ya(i.message),source:bh(i.filename),line:i.lineno??0,col:i.colno??0})}),window.addEventListener("unhandledrejection",i=>{let t=i.reason,e=t instanceof Error?t.message:typeof t=="string"?t:JSON.stringify(t??null);w.track("error.unhandled_promise",{message:ya(e)})}))});var yh={};function Ca(){let i=window.scrollY+window.innerHeight,t=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0);return t<=0?0:Math.min(100,Math.max(0,Math.round(i/t*100)))}function vh(){clearTimeout(Aa),Aa=setTimeout(()=>{let i=Ca();i>Fs&&(Fs=i)},500)}function Sa(){Ht==null&&(Ht=Date.now())}function ka(){Ht!=null&&(Rs+=Date.now()-Ht,Ht=null)}function xa(){if(Ea)return;Ea=!0,ka();let i=Math.max(Fs,Ca());i>0&&w.track("__scroll",{depth:i}),Rs>0&&w.track("__attention",{ms:Rs})}var Fs,Ht,Rs,Ea,Aa,Ta=D(()=>{ot();Fs=0,Ht=null,Rs=0,Ea=!1,Aa=null;typeof window<"u"&&(window.addEventListener("scroll",vh,{passive:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?Sa():(ka(),xa())}),window.addEventListener("pagehide",xa),document.visibilityState==="visible"&&Sa())});var Ma={};yt(Ma,{WizardController:()=>xe,initWizards:()=>zs});function Hs(i){if(i.hasAttribute("data-wizard-enhanced"))return;let t=new xe(i);i.wizardController=t,i.wizardGoTo=e=>t.goTo(e),i.wizardNext=()=>t.next(),i.wizardPrev=()=>t.prev(),i.wizardReset=()=>t.reset()}function zs(){document.querySelectorAll("form[data-wizard]").forEach(i=>{Hs(i)})}function La(){new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches("form[data-wizard]")&&Hs(n),n.querySelectorAll?.("form[data-wizard]:not([data-wizard-enhanced])").forEach(r=>{Hs(r)})}}).observe(document.documentElement,{childList:!0,subtree:!0})}var xe,Na=D(()=>{xe=class{#e;#t=[];#i=0;#s=null;#r=null;#n=null;#a=!1;#o="step";#c=null;#f="";#h=0;#p=0;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#e=t,this.#u()}#u(){if(this.#t=Array.from(this.#e.querySelectorAll("fieldset[data-wizard-step]")),this.#t.length===0){console.warn("Wizard form has no steps");return}this.#a=this.#e.hasAttribute("data-wizard-history"),this.#o=this.#e.getAttribute("data-wizard-validate")||"step",this.#l(),this.#s=this.#e.querySelector("[data-wizard-progress]"),this.#g(),this.#C(),this.#b(),this.#e.setAttribute("data-wizard-enhanced",""),this.#e.setAttribute("data-wizard-total",String(this.#t.length)),this.#B(),this.#S(),this.#q();let t=()=>{cancelAnimationFrame(this.#h),this.#h=requestAnimationFrame(()=>this.#A())};if(this.#e.addEventListener("change",t),this.#e.addEventListener("input",t),this.#c&&(this.#e.addEventListener("change",()=>this.#d()),this.#e.addEventListener("input",()=>this.#d())),this.#e.addEventListener("submit",e=>this.#v(e)),this.#e.addEventListener("reset",()=>{requestAnimationFrame(()=>this.reset())}),this.#a){let e=this.#N();e!==null&&e>=0&&e<this.#t.length&&(this.#i=e),window.addEventListener("hashchange",()=>{let s=this.#N();s!==null&&s!==this.#i&&this.goTo(s)})}this.#y(),this.#A(),this.#O()}#l(){let t=this.#e.getAttribute("data-wizard-persist");if(t){if(!this.#e.id){console.warn("Wizard persistence requires an id on the form element");return}this.#f=`vb-wizard:${this.#e.id}`,t==="local"?this.#c=localStorage:this.#c=sessionStorage}}#m(){if(!this.#c)return;let t={},e=new FormData(this.#e);for(let[s,n]of e.entries())t[s]!==void 0?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(n)):t[s]=n;try{this.#c.setItem(this.#f,JSON.stringify({step:this.#i,data:t}))}catch{}}#d(){this.#c&&(cancelAnimationFrame(this.#p),this.#p=requestAnimationFrame(()=>this.#m()))}#y(){if(this.#c)try{let t=this.#c.getItem(this.#f);if(!t)return;let e=JSON.parse(t);if(!e||typeof e!="object")return;if(e.data&&typeof e.data=="object")for(let[s,n]of Object.entries(e.data)){let r=this.#e.elements.namedItem(s);if(r)if(r instanceof RadioNodeList)r.value=n;else if(r instanceof HTMLInputElement)if(r.type==="checkbox"){let a=Array.isArray(n)?n:[n];r.checked=a.includes(r.value||"on")}else r.type==="radio"?r.checked=r.value===n:r.value=n;else(r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement)&&(r.value=n)}typeof e.step=="number"&&e.step>=0&&e.step<this.#t.length&&(this.#i=e.step)}catch{}}#w(){this.#c&&this.#c.removeItem(this.#f)}#v(t){let e=this.#k();this.#i===e.length-1&&(this.#$("wizard:complete"),this.#w())}#b(){this.#r=document.createElement("div"),this.#r.setAttribute("role","status"),this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#r.setAttribute("data-wizard-status",""),this.#e.prepend(this.#r)}#g(){let t=this.#e.getAttribute("data-wizard-steps");if(t){this.#n=document.querySelector(t);return}this.#n=this.#e.querySelector("nav.steps")}#C(){if(!this.#n)return;let t=this.#n.querySelector("ol");if(!(!t||t.children.length>0))for(let e of this.#t){let s=e.querySelector("legend"),n=document.createElement("li");n.textContent=s?.textContent||`Step ${this.#t.indexOf(e)+1}`,t.appendChild(n)}}#_(){if(!this.#n)return;let t=Array.from(this.#n.querySelectorAll("ol > li")),e=this.#k(),s=0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n],a=t[s];if(!a)break;if(r.hasAttribute("data-wizard-hidden")){a.setAttribute("hidden","");continue}else a.removeAttribute("hidden");let o=e.indexOf(r);if(a.removeAttribute("data-completed"),a.removeAttribute("aria-current"),a.removeAttribute("aria-disabled"),o<this.#i){a.setAttribute("data-completed",""),this.#M(a,o);let c=a.querySelector("a");if(c){let l=r.querySelector("legend")?.textContent||`Step ${o+1}`;c.setAttribute("aria-label",`Go to ${l} (completed)`)}}else o===this.#i?a.setAttribute("aria-current","step"):a.setAttribute("aria-disabled","true");s++}for(let n of t){if(n.hasAttribute("hidden"))continue;let r=n.querySelector("a, button")||n,a=n.hasAttribute("aria-current");r.setAttribute("tabindex",a?"0":"-1")}}#M(t,e){if(t.hasAttribute("data-wizard-nav-bound"))return;t.setAttribute("data-wizard-nav-bound","");let s=t.querySelector("a, button")||t;s.addEventListener("click",n=>{n.preventDefault(),this.goTo(e)}),s===t&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","0"),t.setAttribute("role","button"),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.goTo(e))}))}#S(){let t=this.#e.querySelector("[data-wizard-prev]"),e=this.#e.querySelector("[data-wizard-next]");t?.addEventListener("click",s=>{s.preventDefault(),this.prev()}),e?.addEventListener("click",s=>{s.preventDefault(),this.next()})}#B(){if(this.#e.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let e=document.createElement("button");e.type="button",e.setAttribute("data-wizard-prev",""),e.textContent="Back";let s=document.createElement("button");s.type="button",s.setAttribute("data-wizard-next",""),s.textContent="Next";let n=document.createElement("button");n.type="submit",n.textContent="Submit",t.append(e,s,n),this.#e.appendChild(t)}#q(){this.#n&&this.#n.addEventListener("keydown",t=>{if(!this.#n)return;let e=Array.from(this.#n.querySelectorAll("ol > li:not([hidden])")),s=t.target.closest("li"),n=s?e.indexOf(s):-1;if(n===-1)return;let r;switch(t.key){case"ArrowRight":case"ArrowDown":r=Math.min(n+1,e.length-1);break;case"ArrowLeft":case"ArrowUp":r=Math.max(n-1,0);break;case"Home":r=0;break;case"End":r=e.length-1;break;default:return}t.preventDefault();let a=e[n].querySelector("a, button")||e[n],o=e[r].querySelector("a, button")||e[r];a.setAttribute("tabindex","-1"),o.setAttribute("tabindex","0"),o.focus()})}#k(){return this.#t.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#I(){return this.#k()[this.#i]}#O(){let t=this.#k();this.#t.forEach(n=>{n.removeAttribute("data-wizard-active")});let e=t[this.#i];e&&e.setAttribute("data-wizard-active","");let s=this.#i+1;this.#e.setAttribute("data-wizard-current",String(s)),this.#e.setAttribute("data-wizard-total",String(t.length)),this.#i===t.length-1?this.#e.setAttribute("data-wizard-last",""):this.#e.removeAttribute("data-wizard-last"),this.#R(),this.#_(),this.#a&&this.#T(),this.#E(),this.#P()}#R(){if(!this.#s)return;let t=this.#k();this.#s.max=t.length,this.#s.value=this.#i+1}#T(){let t=`#step=${this.#i+1}`;window.location.hash!==t&&history.replaceState(null,"",t)}#N(){let e=window.location.hash.match(/step=(\d+)/);return e?parseInt(e[1],10)-1:null}#E(){if(!this.#r)return;let s=this.#I()?.querySelector("legend")?.textContent||`Step ${this.#i+1}`,n=this.#k();this.#r.textContent=`Now on step ${this.#i+1} of ${n.length}: ${s}`}#x(){if(this.#o==="none")return!0;let t=this.#I();if(!t||t.hasAttribute("data-wizard-optional"))return!0;let e=t.querySelectorAll("input, select, textarea"),s=!0;for(let n of e){let r=n;if(!r.checkValidity()){r.reportValidity(),s=!1;break}}return s}#A(){this.#t.forEach(e=>{let s=e.getAttribute("data-wizard-if");if(!s)return;this.#L(s)?e.removeAttribute("data-wizard-hidden"):e.setAttribute("data-wizard-hidden","")});let t=this.#k();this.#i>=t.length&&(this.#i=Math.max(0,t.length-1)),this.#O()}#L(t){return t.includes("||")?t.split("||").some(e=>this.#L(e.trim())):t.includes("&&")?t.split("&&").every(e=>this.#H(e.trim())):this.#H(t)}#H(t){let e=t.startsWith("!"),s=e?t.slice(1):t;if(s.includes(":")){let[o,c]=s.split(":"),h=c.startsWith("!"),l=h?c.slice(1):c,d=this.#F(o);return h?d!==l:d===l}let a=!!this.#F(s);return e?!a:a}#F(t){let e=this.#e.elements.namedItem(t);return e?e instanceof RadioNodeList?e.value:e instanceof HTMLInputElement?e.type==="checkbox"?e.checked?e.value||"true":"":e.value:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.value:"":""}#P(){let t=this.#I();if(!t||!t.hasAttribute("data-wizard-summary"))return;let e=t.querySelectorAll("[data-wizard-field]");if(e.length>0){for(let r of e){let a=r.getAttribute("data-wizard-field")||"";r.textContent=this.#F(a)||"\u2014"}return}let s=t.querySelector("[data-wizard-summary-list]");s||(s=document.createElement("dl"),s.setAttribute("data-wizard-summary-list",""),t.appendChild(s)),s.innerHTML="";let n=new Set;for(let r of this.#t){if(r===t||r.hasAttribute("data-wizard-hidden"))continue;let a=r.querySelectorAll("input, select, textarea");for(let o of a){let c=o.name;if(!c||n.has(c))continue;n.add(c);let h=this.#F(c);if(!h)continue;let l=this.#V(o),d=document.createElement("dt");d.textContent=l||c;let u=document.createElement("dd");u.textContent=h,s.append(d,u)}}}#V(t){if(t.id){let n=this.#e.querySelector(`label[for="${CSS.escape(t.id)}"]`);if(n)return n.textContent.trim()}let e=t.closest("label");if(e){let n=e.cloneNode(!0);n.querySelectorAll("input, select, textarea").forEach(a=>a.remove());let r=n.textContent.trim();if(r)return r}let s=t.closest("form-field");if(s){let n=s.querySelector("label");if(n)return n.textContent.trim()}return""}#$(t,e={}){this.#e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))}goTo(t){let e=this.#k();if(t<0||t>=e.length||t>this.#i&&!this.#x())return!1;let s=this.#i;return this.#i=t,this.#O(),this.#$("wizard:step-change",{from:s,to:t}),this.#d(),!0}next(){let t=this.#k();return this.#i>=t.length-1?!1:this.goTo(this.#i+1)}prev(){return this.#i<=0?!1:this.goTo(this.#i-1)}reset(){this.#i=0,this.#O(),this.#w(),this.#$("wizard:reset")}get currentStep(){return this.#i}get totalSteps(){return this.#k().length}get form(){return this.#e}};typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{zs(),La()}):(zs(),La()))});var Z=new Map,Ce=new Map;var Js=null;function Zs(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if(Js)return Js;if(typeof document<"u"){let i=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of i){let e=t.getAttribute("src");if(e){let s=e.lastIndexOf("/");if(s!==-1)return e.slice(0,s)}}}return"/cdn"}var qa=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),Oa=new Set(["kawaii","memphis"]);function ke(i){return Oa.has(i)}function Ba(i,t){return`${t}/themes/${i}.css`}function Qs(i,t){if(!ke(i))return Promise.resolve();if(Ce.has(i))return Ce.get(i);let e=import(`${t}/packs/${i}.full.js`).catch(()=>{});return Ce.set(i,e),e}function Pa(i,t){let e=Zs(),s=()=>{(ke(t)||i.hasAttribute("data-vb-pack"))&&Qs(t,e)};return i.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):i.getAttribute("data-vb-theme-state")==="ready"||i.sheet?(s(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{i.setAttribute("data-vb-theme-state","ready"),c(),s(),n(void 0)},o=()=>{i.setAttribute("data-vb-theme-state","error"),Z.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{i.removeEventListener("load",a),i.removeEventListener("error",o)};i.addEventListener("load",a,{once:!0}),i.addEventListener("error",o,{once:!0})})}async function wt(i){if(!i||qa.has(i))return;if(Z.has(i))return Z.get(i);if(typeof document<"u"){let s=document.querySelector(`link[data-vb-theme="${i}"]`);if(s){let n=Pa(s,i);return Z.set(i,n),n}}let t=Zs(),e=ke(i)?Ra(i,t):Fa(i,t);return Z.set(i,e),e}async function Fa(i,t){let e=Ba(i,t);return new Promise((s,n)=>{let r=document.querySelector(`link[data-vb-theme-preload="${i}"]`);r&&r.remove();let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.setAttribute("data-vb-theme",i),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready"),s()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),Z.delete(i),n(new Error(`Failed to load theme: ${i}`))},document.head.appendChild(a)})}function Ra(i,t){let e=`${t}/packs/${i}.theme.css`,s=`${t}/packs/${i}.effects.css`;return new Promise((n,r)=>{let a=document.querySelector(`link[data-vb-theme-preload="${i}"]`);a&&a.remove();let o=document.createElement("link");o.rel="stylesheet",o.href=e,o.setAttribute("data-vb-theme",i),o.setAttribute("data-vb-pack",i),o.setAttribute("data-vb-theme-state","loading"),o.onload=()=>{o.setAttribute("data-vb-theme-state","ready");let c=document.createElement("link");c.rel="stylesheet",c.href=s,c.setAttribute("data-vb-pack-effects",i),document.head.appendChild(c),Qs(i,t),n()},o.onerror=()=>{o.setAttribute("data-vb-theme-state","error"),o.remove(),Z.delete(i),r(new Error(`Failed to load pack: ${i}`))},document.head.appendChild(o)})}var tn=[{id:"default",name:"Default",swatchBg:"#3b82f6",seeds:{}},{id:"ocean",name:"Ocean",swatchBg:"#0891b2",seeds:{"--hue-primary":200,"--hue-secondary":180,"--hue-accent":45,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"45%","--chroma-secondary":.1,"--lightness-accent":"70%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"forest",name:"Forest",swatchBg:"#059669",seeds:{"--hue-primary":145,"--hue-secondary":90,"--hue-accent":30,"--lightness-primary":"45%","--chroma-primary":.15,"--lightness-secondary":"55%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"55%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"60%","--chroma-primary":.2,"--lightness-secondary":"55%","--chroma-secondary":.18,"--lightness-accent":"55%","--chroma-accent":.18},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.16}},{id:"rose",name:"Rose",swatchBg:"#e11d48",seeds:{"--hue-primary":350,"--hue-secondary":330,"--hue-accent":200,"--lightness-primary":"55%","--chroma-primary":.18,"--lightness-secondary":"50%","--chroma-secondary":.14,"--lightness-accent":"60%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.14}},{id:"lavender",name:"Lavender",swatchBg:"#a855f7",seeds:{"--hue-primary":280,"--hue-secondary":300,"--hue-accent":60,"--lightness-primary":"55%","--chroma-primary":.14,"--lightness-secondary":"50%","--chroma-secondary":.12,"--lightness-accent":"70%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.12}},{id:"coral",name:"Coral",swatchBg:"#f97316",seeds:{"--hue-primary":15,"--hue-secondary":25,"--hue-accent":180,"--lightness-primary":"60%","--chroma-primary":.18,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"55%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.15}},{id:"slate",name:"Slate",swatchBg:"#64748b",seeds:{"--hue-primary":220,"--hue-secondary":210,"--hue-accent":45,"--lightness-primary":"48%","--chroma-primary":.1,"--lightness-secondary":"45%","--chroma-secondary":.06,"--lightness-accent":"68%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.08}},{id:"emerald",name:"Emerald",swatchBg:"#10b981",seeds:{"--hue-primary":160,"--hue-secondary":140,"--hue-accent":30,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"48%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"amber",name:"Amber",swatchBg:"#f59e0b",seeds:{"--hue-primary":45,"--hue-secondary":30,"--hue-accent":240,"--lightness-primary":"60%","--chroma-primary":.16,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"52%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"68%","--chroma-primary":.14}},{id:"indigo",name:"Indigo",swatchBg:"#6366f1",seeds:{"--hue-primary":250,"--hue-secondary":270,"--hue-accent":35,"--lightness-primary":"48%","--chroma-primary":.18,"--lightness-secondary":"45%","--chroma-secondary":.14,"--lightness-accent":"68%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"62%","--chroma-primary":.14}}],en=[{id:"default",name:"Default",hue:210,shape:"balanced",character:"The default",swatchBg:"#3b82f6",tier:"core"},{id:"modern",name:"Modern",hue:270,shape:"rounded",character:"Vibrant & elevated",swatchBg:"#6366f1",tier:"core"},{id:"minimal",name:"Minimal",hue:240,shape:"sharp",character:"Clean & flat",swatchBg:"#71717a",tier:"core"},{id:"classic",name:"Classic",hue:220,shape:"subtle",character:"Serif & elegant",swatchBg:"#92400e",tier:"core"}],Te=[{id:"swiss",name:"Swiss",icon:"grid-3x3",character:"Precision grid",swatchBg:"#ff3e00",swatchFg:"white",tier:"showcase",category:"Design"},{id:"brutalist",name:"Brutalist",icon:"square",character:"Raw, industrial",swatchBg:"#1a1a1a",swatchFg:"#f5f5f5",tier:"showcase",category:"Design"},{id:"art-deco",name:"Art Deco",icon:"crown",character:"1920s luxury",swatchBg:"#1A1A1A",swatchFg:"#C9A84C",tier:"showcase",category:"Design"},{id:"editorial",name:"Editorial",icon:"newspaper",character:"Magazine elegance",swatchBg:"#1a1a1a",swatchFg:"#c9a227",tier:"showcase",category:"Content"},{id:"genai",name:"GenAI",icon:"sparkles",character:"AI aesthetic",swatchBg:"#1a0a2e",swatchFg:"#a855f7",tier:"showcase",category:"Modern"},{id:"glassmorphism",name:"Glass",icon:"glass-water",character:"Frosted surfaces",swatchBg:"#667eea",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"startup",name:"Startup",icon:"rocket",character:"SaaS energy",swatchBg:"#4f46e5",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"organic",name:"Organic",icon:"leaf",character:"Natural, handcrafted",swatchBg:"#2d5016",swatchFg:"#faf5e6",tier:"showcase",category:"Creative"},{id:"rough",name:"Rough",icon:"pencil",character:"Hand-drawn sketch",swatchBg:"#f5f0e8",swatchFg:"#3a3a3a",tier:"showcase",category:"Creative"},{id:"cyber",name:"Cyber",icon:"zap",character:"Neon futuristic",swatchBg:"#0a0a1a",swatchFg:"#00ff88",tier:"showcase",category:"Creative"},{id:"journal",name:"Journal",icon:"notebook-pen",character:"Dot-grid bullet journal",swatchBg:"#f3ecdc",swatchFg:"#27313f",tier:"showcase",category:"Creative"},{id:"vaporwave",name:"Vaporwave",icon:"radio",character:"Neon dreamy",swatchBg:"#2b0040",swatchFg:"#ff6ad5",tier:"showcase",category:"Aesthetic"},{id:"neumorphism",name:"Neumorph",icon:"circle",character:"Soft embossed",swatchBg:"#e0e0e0",swatchFg:"#a0a0a0",tier:"showcase",category:"Aesthetic"},{id:"bauhaus",name:"Bauhaus",icon:"shapes",character:"Geometric",swatchBg:"#F1FAEE",swatchFg:"#E63946",tier:"showcase",category:"Aesthetic"},{id:"claymorphism",name:"Clay",icon:"circle-dot",character:"Puffy 3D",swatchBg:"#f0f0f5",swatchFg:"#FF6B9D",tier:"showcase",category:"Aesthetic"},{id:"alpha1999",name:"Alpha1999",icon:"orbit",character:"Space retro-fi",swatchBg:"#0a0a14",swatchFg:"#d4880f",tier:"showcase",category:"Signature"},{id:"super2026",name:"Super2026",icon:"triangle",character:"Supergraphic bold",swatchBg:"#f5f0e6",swatchFg:"#c23616",tier:"showcase",category:"Signature"},{id:"magna",name:"Magna",icon:"orbit",character:"Odyssey 2 retro",swatchBg:"#0d0b14",swatchFg:"#f97316",tier:"showcase",category:"Signature"},{id:"win9x",name:"Win9x",icon:"monitor",character:"Classic desktop",swatchBg:"#008080",swatchFg:"#c0c0c0",tier:"showcase",category:"OS Styles"},{id:"nes",name:"NES",icon:"joystick",character:"Console pixels",swatchBg:"#bcbcbc",swatchFg:"#e40521",tier:"showcase",category:"OS Styles"},{id:"8bit",name:"8-Bit",icon:"gamepad-2",character:"Retro pixel art",swatchBg:"#000080",swatchFg:"#ffff00",tier:"showcase",category:"OS Styles"}],Le=[{id:"nord",name:"Nord",icon:"snowflake",character:"Arctic calm",swatchBg:"#2E3440",swatchFg:"#81A1C1",tier:"community",category:"Editor Palettes"},{id:"solarized",name:"Solarized",icon:"sun-dim",character:"Engineered precision",swatchBg:"#002B36",swatchFg:"#268BD2",tier:"community",category:"Editor Palettes"},{id:"dracula",name:"Dracula",icon:"moon-star",character:"Dark elegance",swatchBg:"#282A36",swatchFg:"#BD93F9",tier:"community",category:"Editor Palettes"},{id:"catppuccin-mocha",name:"Catppuccin",icon:"coffee",character:"Warm pastels",swatchBg:"#1E1E2E",swatchFg:"#CBA6F7",tier:"community",category:"Editor Palettes"},{id:"catppuccin-latte",name:"Ctp Latte",icon:"coffee",character:"Cozy daytime",swatchBg:"#eff1f5",swatchFg:"#8839ef",tier:"community",category:"Editor Palettes"},{id:"catppuccin-frappe",name:"Ctp Frapp\xE9",icon:"coffee",character:"Cool twilight",swatchBg:"#303446",swatchFg:"#ca9ee6",tier:"community",category:"Editor Palettes"},{id:"catppuccin-macchiato",name:"Ctp Macchiato",icon:"coffee",character:"Deep blue",swatchBg:"#24273a",swatchFg:"#c6a0f6",tier:"community",category:"Editor Palettes"},{id:"gruvbox",name:"Gruvbox",icon:"palette",character:"Retro warmth",swatchBg:"#282828",swatchFg:"#ebdbb2",tier:"community",category:"Editor Palettes"},{id:"tokyo-night",name:"Tokyo Night",icon:"moon",character:"Night-owl vibes",swatchBg:"#1a1b26",swatchFg:"#7aa2f7",tier:"community",category:"Editor Palettes"},{id:"rose-pine",name:"Ros\xE9 Pine",icon:"flower-2",character:"Muted elegance",swatchBg:"#191724",swatchFg:"#ebbcba",tier:"community",category:"Editor Palettes"},{id:"cottagecore",name:"Cottagecore",icon:"flower-2",character:"Pastoral",swatchBg:"#fdf8f0",swatchFg:"#7d8c6d",tier:"community",category:"Niche"},{id:"terminal",name:"Terminal",icon:"terminal",character:"Retro CRT",swatchBg:"#0d1117",swatchFg:"#00ff00",tier:"community",category:"Niche"},{id:"clinical",name:"Clinical",icon:"heart-pulse",character:"Sterile precision",swatchBg:"#ffffff",swatchFg:"#0077b6",tier:"community",category:"Industry"},{id:"financial",name:"Financial",icon:"landmark",character:"Navy + gold",swatchBg:"#1b2a4a",swatchFg:"#c9a84c",tier:"community",category:"Industry"},{id:"government",name:"Government",icon:"shield",character:"Official",swatchBg:"#002868",swatchFg:"#bf0a30",tier:"community",category:"Industry"},{id:"dawn",name:"Dawn",icon:"sunrise",character:"Golden morning",swatchBg:"#fef3e2",swatchFg:"#d4a574",tier:"community",category:"Mood/Time"},{id:"dusk",name:"Dusk",icon:"sunset",character:"Twilight",swatchBg:"#1a1b2e",swatchFg:"#e5a858",tier:"community",category:"Mood/Time"},{id:"midnight",name:"Midnight",icon:"moon",character:"Deep night",swatchBg:"#0d1117",swatchFg:"#58a6ff",tier:"community",category:"Mood/Time"},{id:"high-noon",name:"High Noon",icon:"sun",character:"Maximum bright",swatchBg:"#ffffff",swatchFg:"#e63946",tier:"community",category:"Mood/Time"}],sn=[{id:"kawaii",name:"Kawaii",icon:"heart",character:"Cute aesthetic",swatchBg:"#ffb7c5",swatchFg:"#ff69b4",tier:"showcase",category:"Packs"},{id:"memphis",name:"Memphis",icon:"star",character:"Bold patterns",swatchBg:"#FFF8F0",swatchFg:"#d03040",tier:"showcase",category:"Packs"}];var Ah=[...Te,...Le],Sh=[...en,...Te,...Le,...sn],Q=i=>Te.filter(t=>t.category===i),nn=[{label:"Style",themes:en,tier:"core"},{label:"Design",themes:Q("Design"),tier:"showcase"},{label:"Content",themes:Q("Content"),tier:"showcase"},{label:"Modern",themes:Q("Modern"),tier:"showcase"},{label:"Creative",themes:Q("Creative"),tier:"showcase"},{label:"Aesthetic",themes:Q("Aesthetic"),tier:"showcase"},{label:"Signature",themes:Q("Signature"),tier:"showcase"},{label:"OS Styles",themes:Q("OS Styles"),tier:"showcase"},{label:"Packs",themes:sn,tier:"showcase"},{label:"More Themes",themes:Le,tier:"community"}];j();var Wt="theme",jt="current",V={mode:"auto",brand:"default",accent:"default",borderStyle:"",iconSet:"",fluid:"",backdrop:"",backdropChrome:"",pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""};function za(i,t){return i?i.brand||V.brand:(t||"").split(/\s+/).find(s=>s&&!s.startsWith("a11y-"))||V.brand}var on=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],x=null,A={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let i=await E.get(Wt,jt);x=i?{...V,...i}:{...V},x.brand=za(i,document.documentElement.dataset.theme);try{await wt(x.brand)}catch{x.brand="default"}return this.apply(x),this._watchSystemPreference(),this._watchRootAttributes(),this._watchCrossDocumentStorage(),x})(),this._initPromise)},_watchCrossDocumentStorage(){typeof window>"u"||window.addEventListener("storage",async i=>{if(i.key!==`vb:${Wt}:${jt}`||!i.newValue)return;let t;try{t=JSON.parse(i.newValue)?.data}catch{return}if(!t||typeof t!="object")return;let e={...V,...x,...t};if(e.brand&&e.brand!==x?.brand)try{await wt(e.brand)}catch{e.brand="default"}x=e,this.apply(x||{})})},load(){return x?{...x}:{...V}},save(i){let t={...x??V,...i};return x=t,E.set(Wt,jt,t).catch(()=>{}),t},apply({mode:i="auto",brand:t="default",borderStyle:e="",iconSet:s="",fluid:n="",backdrop:r="",backdropChrome:a="",pageBgType:o="",pageBgColor:c="",pageBgGradStart:h="",pageBgGradEnd:l="",pageBgGradDir:d=""}={}){let u=document.documentElement;u.dataset.mode=i==="auto"?this.getEffectiveMode():i;let v=(u.dataset.theme||"").split(" ").filter(C=>C.startsWith("a11y-")),p=t!=="default"?[t,...v]:[...v];p.length?u.dataset.theme=p.join(" "):delete u.dataset.theme;let m=e||this._readCSSHint("--theme-border-style");m&&m!=="clean"?u.dataset.borderStyle=m:delete u.dataset.borderStyle;let y=s||this._readCSSHint("--theme-icon-set");if(y&&y!=="lucide"?u.dataset.iconSet=y:delete u.dataset.iconSet,n?u.dataset.fluid=n:delete u.dataset.fluid,r?u.dataset.backdrop=r:delete u.dataset.backdrop,a&&a!=="card"?u.dataset.backdropChrome=a:delete u.dataset.backdropChrome,o==="color"&&c)u.style.setProperty("--page-bg-color",c),u.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&h&&l){let C=d||"to bottom";u.style.setProperty("--page-bg-gradient",`linear-gradient(${C}, ${h}, ${l})`),u.style.removeProperty("--page-bg-color")}else u.style.removeProperty("--page-bg-color"),u.style.removeProperty("--page-bg-gradient");let S=this.load().accent||"default";this._applyAccent(S),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:i,brand:t,accent:S,borderStyle:m,iconSet:y,fluid:n,backdrop:r,backdropChrome:a,pageBgType:o,effectiveMode:this.getEffectiveMode()}}))},setMode(i){let t=this.save({mode:i});this.apply(t)},async setBrand(i){try{await wt(i)}catch(e){console.warn(`[VB] Theme "${i}" failed to load, using default`,e),i="default"}let t=this.save({brand:i});this.apply(t)},setAccent(i){this.save({accent:i}),this._applyAccent(i),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(i){let t=this.save({borderStyle:i});this.apply(t)},setIconSet(i){let t=this.save({iconSet:i});this.apply(t)},setFluid(i){let t=this.save({fluid:i});this.apply(t)},setBackdrop(i){let t=this.save({backdrop:i});this.apply(t)},setBackdropChrome(i){let t=this.save({backdropChrome:i});this.apply(t)},setPageBg({type:i="",color:t="",gradStart:e="",gradEnd:s="",gradDir:n=""}={}){let r=this.save({pageBgType:i,pageBgColor:t,pageBgGradStart:e,pageBgGradEnd:s,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:i}=this.load();return i!=="auto"?i:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},getState(){let{mode:i,brand:t,accent:e,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:h,pageBgGradStart:l,pageBgGradEnd:d,pageBgGradDir:u}=this.load();return{mode:i,brand:t,accent:e,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:h,pageBgGradStart:l,pageBgGradEnd:d,pageBgGradDir:u,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){x={...V},E.remove(Wt,jt).catch(()=>{});let i=document.documentElement;i.style.removeProperty("--page-bg-color"),i.style.removeProperty("--page-bg-gradient");for(let t of on)i.style.removeProperty(t);this.apply(V)},_readCSSHint(i){return getComputedStyle(document.documentElement).getPropertyValue(i).trim()},_applyAccent(i){let t=document.documentElement,e=tn.find(s=>s.id===i);for(let s of on)t.style.removeProperty(s);if(!(!e||!e.seeds||Object.keys(e.seeds).length===0)){for(let[s,n]of Object.entries(e.seeds))t.style.setProperty(s,String(n));if(e.seedsDark&&this.getEffectiveMode()==="dark")for(let[s,n]of Object.entries(e.seedsDark))t.style.setProperty(s,String(n))}},_watchRootAttributes(){this._rootObserver||(this._rootObserver=new MutationObserver(i=>{for(let t of i)t.attributeName==="data-theme"?this._syncFromDataTheme():t.attributeName==="data-mode"&&this._syncFromDataMode()}),this._rootObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","data-mode"]}))},_syncFromDataTheme(){if(!x)return;let e=(document.documentElement.dataset.theme||"").split(/\s+/).filter(Boolean).find(s=>!s.startsWith("a11y-"))||"default";e!==x.brand&&(x.brand=e,wt(e).catch(()=>{}),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_syncFromDataMode(){if(!x)return;let i=document.documentElement.dataset.mode||"auto",t=x.mode==="auto"?this.getEffectiveMode():x.mode;i!==t&&(x.mode=i,window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_watchSystemPreference(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{let t=this.load();t.mode==="auto"&&this.apply(t)})}};var Va=["layout-text","layout-reel","layout-canvas","dl-item"];Va.forEach(i=>{customElements.get(i)||customElements.define(i,class extends HTMLElement{})});var Dh=window.matchMedia("(prefers-reduced-motion: reduce)");var cn=new Map;function b(i,t,e={}){let s=e.priority??10,n={impl:t,bundle:e.bundle,contract:e.contract,priority:s},r=cn.get(i);if(customElements.get(i)){if(!r||r.priority>=s){r&&r.priority===s&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=s){r.priority===s&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${r.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}cn.set(i,n),customElements.define(i,t)}var g=class extends HTMLElement{#e=[];#t;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,s,n){t.addEventListener(e,s,n),this.#e.push(()=>t.removeEventListener(e,s,n))}setup(){}teardown(){}setState(t,e){this.#t||(this.#t=this.attachInternals());let s=this.#t.states;try{e?s.add(t):s.delete(t)}catch{let n=`--${t}`;e?s.add(n):s.delete(n)}}_adoptInternals(t){this.#t||(this.#t=t)}};var Ua=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],Ne=class extends g{#e=null;#t=null;#i=!1;setup(){return this.#e=this.querySelector("input, textarea, select"),this.#t=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),this.#e?(this.listen(this.#e,"blur",()=>this.validate()),this.listen(this.#e,"input",()=>{this.#i&&this.validate()}),!0):!1}teardown(){this.#e=null,this.#t=null,this.#i=!1}validate(){let t=this.#e;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let e=t.checkValidity();return e?(this.#s(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#t&&(this.#t.textContent="")):(this.#i=!0,this.#s("invalid"),t.setAttribute("aria-invalid","true"),this.#r(t.validity)),e}setError(t){this.#e&&(this.#e.setCustomValidity(t),this.#i=!0,this.#s("invalid"),this.#e.setAttribute("aria-invalid","true"),this.#t&&(this.#t.textContent=t))}clearError(){this.#e&&(this.#e.setCustomValidity(""),this.#s(null),this.#e.removeAttribute("aria-invalid"),this.#i=!1,this.#t&&(this.#t.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#e?.getAttribute("aria-label")??this.#e?.name??this.#e?.id??"Field"}get input(){return this.#e}#s(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#r(t){if(!this.#t)return;let e=this.#e;if(!(!e||!this.#t))for(let s of Ua){if(!t[s])continue;let n=`data-message-${s.toLowerCase()}`,r=e.getAttribute(n)??e.validationMessage;this.#t.textContent=r;return}}};b("form-field",Ne);function P(i){return document.startViewTransition?document.startViewTransition(i):i()}var Wa=0,De=class extends g{#e=[];#t=[];#i=!1;#s=0;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.#a(),this.#o(),this.#r(),!0)}teardown(){this.#e=[],this.#t=[],this.#i=!1}get tabs(){return this.#e.map((t,e)=>({id:t.id||void 0,label:t.querySelector("summary")?.textContent?.trim()||`Tab ${e+1}`,content:t.querySelector(":scope > :not(summary)")?.innerHTML||"",active:t.hasAttribute("open")}))}set tabs(t){let e=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let s=!1;for(let n of e){let r=document.createElement("details");n.id&&(r.id=n.id),n.active&&!s&&(r.setAttribute("open",""),s=!0);let a=document.createElement("summary");a.textContent=n.label||"",r.appendChild(a);let o=document.createElement("div");o.innerHTML=n.content||"",r.appendChild(o),this.appendChild(r)}!s&&this.firstElementChild&&this.firstElementChild.setAttribute("open",""),this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("tab-set:tabs-changed",{detail:{tabs:e,source:"property"},bubbles:!0}))}#r(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#i=!0;let t=++Wa,e=this.getAttribute("transition")||"fade",s=e==="slide"?"vt-tabs-slide":e==="scale"?"vt-tabs-scale":"vt-tabs";this.#e.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=s)}),this.#s=this.#e.findIndex(n=>n.open),this.#s===-1&&(this.#s=0)}#n(t){if(t===this.#s)return;let e=t>this.#s?"forward":"backward";document.documentElement.dataset.vtDirection=e,P(()=>{this.#e[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#a(){this.#e.forEach((t,e)=>{let s=this.#t[e],n=t.querySelector(":scope > :not(summary)");if(!s||!n)return;let r=s.id||`tab-${crypto.randomUUID().slice(0,8)}`,a=n.id||`panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,s.setAttribute("aria-controls",a),s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-selected",t.open?"true":"false"),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(s,"click",o=>{this.#i&&(o.preventDefault(),this.#n(e))}),this.listen(s,"keydown",o=>this.#h(o,e)),this.listen(t,"toggle",()=>this.#c(e))})}#o(){!this.#e.some(e=>e.open)&&this.#e.length>0&&(this.#e[0].open=!0,this.#f())}#c(t){this.#e[t].open&&(this.#s=t),this.#f(),this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t},bubbles:!0}))}#f(){this.#e.forEach((t,e)=>{let s=this.#t[e];s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-selected",t.open?"true":"false")})}#h(t,e){let{key:s}=t,n;switch(s){case"ArrowRight":n=(e+1)%this.#e.length;break;case"ArrowLeft":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#i?this.#n(n):this.#e[n].open=!0,this.#t[n].focus()}};b("tab-set",De);var _e=class i extends g{static#e=0;#t;#i=[];#s="Back to content";setup(){this.#t=++i.#e,this.hasAttribute("data-back-label")&&(this.#s=this.getAttribute("data-back-label")??this.#s),this.#r(),this.getAttribute("data-mode")==="sidenotes"?this.#o():this.#n()}#r(){let t=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#i=t.filter(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}#n(){if(this.#i.length===0)return;let t=document.createElement("ol");this.#i.forEach((e,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;this.#a(e,n,r,a);let o=this.#f(e,n,r,a);t.appendChild(o)}),this.appendChild(t)}#a(t,e,s,n){t.setAttribute("data-enhanced",""),t.id=s;let r=t.innerHTML,a=document.createElement("span");a.innerHTML=r;let o=document.createElement("a");o.href=`#${n}`,o.setAttribute("aria-describedby",n),o.textContent=`[${e}]`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#o(){if(this.#i.length===0)return;let t=[];if(this.#i.forEach((e,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;e.getAttribute("data-side")==="false"?(this.#a(e,n,r,a),t.push({ref:e,num:n,refId:r,noteId:a})):this.#c(e,n,r,a)}),t.length>0){let e=document.createElement("ol");for(let{ref:s,num:n,refId:r,noteId:a}of t)e.appendChild(this.#f(s,n,r,a));this.appendChild(e)}else this.hidden=!0}#c(t,e,s,n){let r=t.innerHTML;t.setAttribute("data-enhanced",""),t.setAttribute("data-side",""),t.id=s;let a=document.createElement("a");a.href=`#${n}`,a.setAttribute("aria-describedby",n),a.textContent=`[${e}]`;let o=document.createElement("aside");o.className="sidenote",o.id=n,o.setAttribute("role","note"),o.innerHTML=`<span class="sidenote-number">${e}.</span> ${r}`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#f(t,e,s,n){let r=document.createElement("li");r.id=n;let a=t.querySelector("span"),o=a?a.innerHTML:"",c=document.createElement("a");return c.href=`#${s}`,c.setAttribute("data-backref",""),c.setAttribute("aria-label",this.#s),c.textContent="\u21A9",r.innerHTML=o+" ",r.appendChild(c),r}},Ie=class extends HTMLElement{};b("foot-notes",_e);b("foot-note",Ie);var ln=0,$e=class extends g{#e=[];#t=[];#i=[];#s=!1;setup(){return this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0?!1:(this.#r(),this.#o(),this.#n(),!0)}teardown(){this.#e=[],this.#t=[],this.#i=[],this.#s=!1}get panels(){return this.#e.map((t,e)=>({id:t.id||void 0,summary:t.querySelector("summary")?.textContent?.trim()||`Panel ${e+1}`,content:this.#i[e]?.innerHTML||"",open:t.hasAttribute("open")}))}set panels(t){let e=Array.isArray(t)?t:[],n=this.hasAttribute("single")?`acc-${++ln}`:null;for(;this.firstChild;)this.firstChild.remove();for(let r of e){let a=document.createElement("details");r.id&&(a.id=r.id),r.open&&a.setAttribute("open",""),n&&a.setAttribute("name",n);let o=document.createElement("summary");o.textContent=r.summary||"",a.appendChild(o);let c=document.createElement("div");c.innerHTML=r.content||"",a.appendChild(c),this.appendChild(a)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("accordion-wc:panels-changed",{detail:{panels:e,source:"property"},bubbles:!0}))}#r(){this.#i=this.#e.map(t=>{let e=t.querySelector("summary");if(!e)return null;let s=[...t.children].filter(n=>n!==e);if(s.length===1)return s[0];if(s.length>1){let n=document.createElement("div");for(let r of s)n.appendChild(r);return t.appendChild(n),n}return null})}#n(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#s=!0;let t=++ln,e=this.getAttribute("transition")||"fade",s=e==="slide"?"vt-accordion-slide":e==="scale"?"vt-accordion-scale":"vt-accordion";this.#i.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=s)})}#a(t){P(()=>{t.open=!t.open})}#o(){this.#e.forEach((t,e)=>{let s=this.#t[e],n=this.#i[e];if(s){if(n){let r=s.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,a=n.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,n.id=a,s.setAttribute("aria-expanded",t.open?"true":"false"),s.setAttribute("aria-controls",a),n.setAttribute("aria-labelledby",r),n.setAttribute("role","region")}else s.setAttribute("aria-expanded",t.open?"true":"false");this.listen(s,"click",r=>{this.#s&&(r.preventDefault(),this.#a(t))}),this.listen(s,"keydown",r=>this.#f(r,e)),this.listen(t,"toggle",()=>this.#c(t,e))}})}#c(t,e){this.#t[e].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#e.forEach((n,r)=>{r!==e&&n.open&&(n.open=!1,this.#t[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:e,open:t.open},bubbles:!0}))}#f(t,e){let{key:s}=t,n;switch(s){case"ArrowDown":n=(e+1)%this.#e.length;break;case"ArrowUp":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#t[n].focus()}open(t){t<0||t>=this.#e.length||(this.#s&&!this.#e[t].open?P(()=>{this.#e[t].open=!0}):this.#e[t].open=!0)}close(t){t<0||t>=this.#e.length||(this.#s&&this.#e[t].open?P(()=>{this.#e[t].open=!1}):this.#e[t].open=!1)}toggle(t){t<0||t>=this.#e.length||(this.#s?this.#a(this.#e[t]):this.#e[t].open=!this.#e[t].open)}openAll(){this.hasAttribute("single")||this.#e.forEach(t=>{t.open=!0})}closeAll(){this.#e.forEach(t=>{t.open=!1})}};b("accordion-wc",$e);var qe=class extends g{#e=[];#t=[];static get observedAttributes(){return["position","max"]}setup(){this.setAttribute("role","region"),this.setAttribute("aria-label","Notifications"),this.setAttribute("aria-live","polite")}teardown(){this.#t.forEach(t=>{t._dismissTimer&&clearTimeout(t._dismissTimer)}),this.#e=[],this.#t=[]}show(t){let{message:e,variant:s="info",duration:n=this.#n(),dismissible:r=!0,action:a,onAction:o,source:c="api"}=t,h=this.#i({message:e,variant:s,dismissible:r,action:a,onAction:o}),l=this.#a();return this.#t.length>=l?this.#e.push({toast:h,duration:n}):this.#s(h,n),this.dispatchEvent(new CustomEvent("toast-msg:enqueued",{detail:{message:e,variant:s,duration:n,source:c},bubbles:!0})),h}get queue(){let t=this.#t.map(s=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"visible"})),e=this.#e.map(({toast:s})=>({message:s.querySelector(".message")?.textContent||"",variant:s.getAttribute("data-variant")||"info",state:"queued"}));return[...t,...e]}#i({message:t,variant:e,dismissible:s,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("role",e==="error"||e==="warning"?"alert":"status"),a.setAttribute("data-variant",e);let o={info:"ⓘ",success:"✓",warning:"⚠",error:"✗"};return a.innerHTML=`
|
|
3
3
|
<span class="icon" aria-hidden="true">${o[e]||o.info}</span>
|
|
4
4
|
<span class="message">${this.#o(t)}</span>
|
|
5
5
|
${n?`<button type="button" class="action">${this.#o(n)}</button>`:""}
|
|
6
6
|
${s?'<button type="button" class="close" aria-label="Dismiss">✕</button>':""}
|
|
7
|
-
`,s&&a.querySelector(".close")?.addEventListener("click",()=>{this.#r(a)}),n&&r&&a.querySelector(".action")?.addEventListener("click",()=>{r(),this.#r(a)}),a}#s(t,e){this.appendChild(t),this.#t.push(t),requestAnimationFrame(()=>{t.setAttribute("data-state","visible")}),e>0&&(t._dismissTimer=setTimeout(()=>{this.#r(t)},e)),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#r(t){if(!this.contains(t))return;t._dismissTimer&&clearTimeout(t._dismissTimer),t.setAttribute("data-state","hiding");let e=()=>{t.removeEventListener("animationend",e),t.remove();let s=this.#t.indexOf(t);if(s>-1&&this.#t.splice(s,1),this.#e.length>0){let{toast:n,duration:r}=this.#e.shift();this.#s(n,r)}this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))};t.addEventListener("animationend",e),setTimeout(()=>{this.contains(t)&&e()},300)}dismissAll(){this.#e=[],[...this.#t].forEach(t=>this.#r(t))}#n(){let t=this.getAttribute("duration");return t!==null?parseInt(t,10):5e3}#a(){let t=this.getAttribute("max");return t!==null?parseInt(t,10):5}#o(t){let e=document.createElement("div");return e.textContent=t,e.innerHTML}};b("toast-msg",qe);var Oe=CSS.supports("anchor-name","--x"),Fa=CSS.supports("position-area","bottom"),Ra=0,Be=class extends g{#e=null;#t=null;#i=null;#s=null;setup(){this.id||(this.id=`pop-over-${++Ra}`);let t=this.dataset.mode||"auto";this.hasAttribute("popover")||this.setAttribute("popover",t),this.#r(),this.#n(),this.#i=e=>{let s=e.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${s}`,{detail:{state:e.newState},bubbles:!0,composed:!0})),!Oe&&e.newState==="open"&&this.#e&&this.#o()},this.listen(this,"beforetoggle",this.#i),Oe||(this.#s=()=>{this.matches(":popover-open")&&this.#e&&this.#o()},this.listen(window,"resize",this.#s),this.listen(window,"scroll",this.#s,{capture:!0,passive:!0}))}show(){this.matches(":popover-open")||this.showPopover()}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#r(){let t=this.dataset.anchor;t?this.#e=document.getElementById(t)||document.querySelector(t):this.#e=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#n(){if(!(!this.#e||!Oe)&&(this.#t=`--pop-over-anchor-${this.id}`,this.#e.style.setProperty("anchor-name",this.#t),this.style.setProperty("position-anchor",this.#t),this.setAttribute("data-anchor-name",this.#t||""),!Fa)){let t=this.dataset.position||"bottom";this.#a(t)}}#a(t){let e="var(--_pop-over-offset, var(--size-xs))",s={top:{bottom:`calc(anchor(top) + ${e})`,left:"anchor(left)"},bottom:{top:`calc(anchor(bottom) + ${e})`,left:"anchor(left)"},left:{right:`calc(anchor(left) + ${e})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${e})`,top:"anchor(top)"}},n=t.split("-")[0],r=s[n]||s.bottom;Object.entries(r).forEach(([a,o])=>this.style.setProperty(a,o))}#o(){if(!this.#e)return;let t=this.#e.getBoundingClientRect(),e=this.dataset.position||"bottom",s=this.#c(),n,r;switch(e.split("-")[0]){case"top":n=t.top-this.offsetHeight-s,r=t.left;break;case"left":n=t.top,r=t.left-this.offsetWidth-s;break;case"right":n=t.top,r=t.right+s;break;default:n=t.bottom+s,r=t.left;break}e.endsWith("-end")&&(e.startsWith("top")||e.startsWith("bottom")?r=t.right-this.offsetWidth:n=t.bottom-this.offsetHeight),this.style.position="fixed",this.style.top=`${Math.round(n)}px`,this.style.left=`${Math.round(r)}px`,this.style.margin="0"}#c(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset]??t.xs}};b("pop-over",Be);var Ha=new Set(["BUTTON","A","AREA"]);function cn(i){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?Ha.has(i.tagName):!1}var Yt=0,Pe=class extends g{#e=null;#t=null;#i;#s;#r=!1;#n=!1;#a;setup(){this.#r=this.getAttribute("variant")==="card",this.#r?this.#c():this.#o()}#o(){if(this.#e=this.querySelector(":scope > :not(template)"),!this.#e)return;this.#n=cn(this.#e);let t=this.querySelector(":scope > template[data-tooltip]"),e=this.getAttribute("content"),s=this.#e.getAttribute("title");if(!t&&!e&&!s)return;s&&(this.#a=s,this.#e.removeAttribute("title"));let n=this.getAttribute("position")||"top";this.#e.id||(this.#e.id=`tooltip-trigger-${++Yt}`);let r=document.createElement("pop-over");r.className="tooltip",r.setAttribute("role","tooltip"),r.dataset.mode="hint",r.dataset.anchor=this.#e.id,r.dataset.tooltipPosition=n,r.id=`tooltip-${++Yt}`,t?r.innerHTML=t.innerHTML:r.textContent=e||s;let a=document.createElement("span");a.className="tooltip-arrow",a.setAttribute("aria-hidden","true"),r.appendChild(a),this.appendChild(r),this.#t=r,this.#n?(this.#e.setAttribute("interestfor",r.id),this.#e.hasAttribute("aria-describedby")||this.#e.setAttribute("aria-describedby",r.id)):(this.#e.setAttribute("aria-describedby",r.id),this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#h),this.listen(this.#e,"focus",this.#p),this.listen(this.#e,"blur",this.#u),this.listen(r,"mouseenter",this.#l),this.listen(r,"mouseleave",this.#h)),this.listen(r,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(r,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}#c(){this.#e=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");if(!this.#e||!t)return;this.#n=cn(this.#e),this.#e.id||(this.#e.id=`tooltip-trigger-${++Yt}`);let e=document.createElement("pop-over");e.className="hover-card",e.dataset.mode="manual",e.dataset.anchor=this.#e.id,e.dataset.position=this.getAttribute("position")||"bottom",e.id=`hc-${++Yt}`,e.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(e),this.#t=e,this.#n?this.#e.setAttribute("interestfor",e.id):(this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#h),this.listen(this.#e,"focus",this.#p),this.listen(this.#e,"blur",this.#h),this.listen(e,"mouseenter",this.#l),this.listen(e,"mouseleave",this.#h),this.listen(document,"keydown",this.#m)),this.listen(e,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(e,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}teardown(){this.#e&&(this.#n&&this.#e.removeAttribute("interestfor"),this.#a&&(this.#e.setAttribute("title",this.#a),this.#a=void 0)),this.#t&&(this.#t.remove(),this.#t=null),clearTimeout(this.#i),clearTimeout(this.#s)}#f=()=>{clearTimeout(this.#s);let t=this.#r?300:200,e=parseInt(this.getAttribute("delay")||String(t),10);this.setState("show-pending",!0),this.#i=setTimeout(()=>{this.setState("show-pending",!1),this.show()},e)};#h=()=>{clearTimeout(this.#i),this.setState("show-pending",!1);let t=this.#r?200:100;this.#s=setTimeout(()=>this.hide(),t)};#p=()=>{clearTimeout(this.#s),this.show()};#u=()=>{clearTimeout(this.#i),this.setState("show-pending",!1),this.hide()};#l=()=>{clearTimeout(this.#s)};#m=t=>{t.key==="Escape"&&this.isVisible&&this.hide()};show(){!this.#t||this.isVisible||(typeof this.#t.show=="function"?this.#t.show():this.#t.showPopover())}hide(){!this.#t||!this.isVisible||(typeof this.#t.hide=="function"?this.#t.hide():this.#t.hidePopover())}get isVisible(){return this.#t?.matches(":popover-open")??!1}};b("tool-tip",Pe);var Fe=0,Re=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=!1;#o=null;setup(){let t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button");if(!t)return!1;this.#e=t;let e=this.querySelector('menu, ul[role="menu"]');if(!e)return!1;this.#t=e,this.#a=this.hasAttribute("hover"),this.#e.id||(this.#e.id=`dropdown-trigger-${++Fe}`);let s=this.querySelector(":scope > pop-over[data-dropdown-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-dropdown-host",""),this.#i.id=`dropdown-${++Fe}`,this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e.setAttribute("aria-haspopup","menu"),this.#e.setAttribute("aria-expanded","false"),this.#t.id||(this.#t.id=`dropdown-menu-${++Fe}`),this.#e.setAttribute("aria-controls",this.#t.id),this.#t.setAttribute("role","menu"),this.#c(),this.#a?(this.listen(this,"mouseenter",this.#h),this.listen(this,"mouseleave",this.#p),this.listen(this.#e,"focus",this.#u),this.listen(this.#e,"blur",this.#l)):this.listen(this.#e,"click",this.#f),this.listen(this.#e,"keydown",this.#m),this.listen(this.#t,"keydown",this.#d),this.listen(this.#i,"pop-over:hide",this.#b),this.listen(this.#i,"pop-over:show",this.#v),this.#a&&this.listen(document,"keydown",this.#y),!0}teardown(){this.#o&&clearTimeout(this.#o)}get items(){if(!this.#t)return[];let t=[];for(let e of this.#t.querySelectorAll(":scope > li")){if(e.matches('[role="separator"]')||e.querySelector("hr")){t.push({separator:!0});continue}let s=e.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let e=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of e){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else{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.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("drop-down:items-changed",{detail:{items:e,source:"property"},bubbles:!0}))}#c(){this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#s.forEach(t=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",t.addEventListener("click",this.#w)}),this.#t.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#f=t=>{t.stopPropagation(),this.toggle()};#h=()=>{this.#o&&(clearTimeout(this.#o),this.#o=null,this.setState("hover-grace-pending",!1)),this.open()};#p=()=>{this.setState("hover-grace-pending",!0),this.#o=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.close()},100)};#u=()=>{this.#o&&(clearTimeout(this.#o),this.#o=null,this.setState("hover-grace-pending",!1)),this.open()};#l=t=>{this.#t?.contains(t.relatedTarget)||(this.setState("hover-grace-pending",!0),this.#o=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.contains(document.activeElement)||this.close()},100))};#m=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#g(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#g(this.#s.length-1);break}};#d=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#g(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#g(this.#r-1);break;case"Home":t.preventDefault(),this.#g(0);break;case"End":t.preventDefault(),this.#g(this.#s.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break}};#y=t=>{t.key==="Escape"&&this.#n&&(t.preventDefault(),this.close(),this.#e?.focus())};#w=t=>{t.defaultPrevented||(this.close(),this.#e?.focus())};#v=()=>{this.#n||(this.#n=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0})))};#b=()=>{this.#n&&(this.#n=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#g(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())}open(){this.#n||!this.#i||this.#i.show()}close(){!this.#n||!this.#i||this.#i.hide()}toggle(){this.#n?this.close():this.open()}get isOpen(){return this.#n}};b("drop-down",Re);var ln=`
|
|
7
|
+
`,s&&a.querySelector(".close")?.addEventListener("click",()=>{this.#r(a)}),n&&r&&a.querySelector(".action")?.addEventListener("click",()=>{r(),this.#r(a)}),a}#s(t,e){this.appendChild(t),this.#t.push(t),requestAnimationFrame(()=>{t.setAttribute("data-state","visible")}),e>0&&(t._dismissTimer=setTimeout(()=>{this.#r(t)},e)),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#r(t){if(!this.contains(t))return;t._dismissTimer&&clearTimeout(t._dismissTimer),t.setAttribute("data-state","hiding");let e=()=>{t.removeEventListener("animationend",e),t.remove();let s=this.#t.indexOf(t);if(s>-1&&this.#t.splice(s,1),this.#e.length>0){let{toast:n,duration:r}=this.#e.shift();this.#s(n,r)}this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))};t.addEventListener("animationend",e),setTimeout(()=>{this.contains(t)&&e()},300)}dismissAll(){this.#e=[],[...this.#t].forEach(t=>this.#r(t))}#n(){let t=this.getAttribute("duration");return t!==null?parseInt(t,10):5e3}#a(){let t=this.getAttribute("max");return t!==null?parseInt(t,10):5}#o(t){let e=document.createElement("div");return e.textContent=t,e.innerHTML}};b("toast-msg",qe);var Oe=CSS.supports("anchor-name","--x"),ja=CSS.supports("position-area","bottom"),Ya=0,Be=class extends g{#e=null;#t=null;#i=null;#s=null;setup(){this.id||(this.id=`pop-over-${++Ya}`);let t=this.dataset.mode||"auto";this.hasAttribute("popover")||this.setAttribute("popover",t),this.#r(),this.#n(),this.#i=e=>{let s=e.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${s}`,{detail:{state:e.newState},bubbles:!0,composed:!0})),!Oe&&e.newState==="open"&&this.#e&&this.#o()},this.listen(this,"beforetoggle",this.#i),Oe||(this.#s=()=>{this.matches(":popover-open")&&this.#e&&this.#o()},this.listen(window,"resize",this.#s),this.listen(window,"scroll",this.#s,{capture:!0,passive:!0}))}show(){this.matches(":popover-open")||this.showPopover()}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#r(){let t=this.dataset.anchor;t?this.#e=document.getElementById(t)||document.querySelector(t):this.#e=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#n(){if(!(!this.#e||!Oe)&&(this.#t=`--pop-over-anchor-${this.id}`,this.#e.style.setProperty("anchor-name",this.#t),this.style.setProperty("position-anchor",this.#t),this.setAttribute("data-anchor-name",this.#t||""),!ja)){let t=this.dataset.position||"bottom";this.#a(t)}}#a(t){let e="var(--_pop-over-offset, var(--size-xs))",s={top:{bottom:`calc(anchor(top) + ${e})`,left:"anchor(left)"},bottom:{top:`calc(anchor(bottom) + ${e})`,left:"anchor(left)"},left:{right:`calc(anchor(left) + ${e})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${e})`,top:"anchor(top)"}},n=t.split("-")[0],r=s[n]||s.bottom;Object.entries(r).forEach(([a,o])=>this.style.setProperty(a,o))}#o(){if(!this.#e)return;let t=this.#e.getBoundingClientRect(),e=this.dataset.position||"bottom",s=this.#c(),n,r;switch(e.split("-")[0]){case"top":n=t.top-this.offsetHeight-s,r=t.left;break;case"left":n=t.top,r=t.left-this.offsetWidth-s;break;case"right":n=t.top,r=t.right+s;break;default:n=t.bottom+s,r=t.left;break}e.endsWith("-end")&&(e.startsWith("top")||e.startsWith("bottom")?r=t.right-this.offsetWidth:n=t.bottom-this.offsetHeight),this.style.position="fixed",this.style.top=`${Math.round(n)}px`,this.style.left=`${Math.round(r)}px`,this.style.margin="0"}#c(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset]??t.xs}};b("pop-over",Be);var Ga=new Set(["BUTTON","A","AREA"]);function hn(i){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?Ga.has(i.tagName):!1}var Yt=0,Pe=class extends g{#e=null;#t=null;#i;#s;#r=!1;#n=!1;#a;setup(){this.#r=this.getAttribute("variant")==="card",this.#r?this.#c():this.#o()}#o(){if(this.#e=this.querySelector(":scope > :not(template)"),!this.#e)return;this.#n=hn(this.#e);let t=this.querySelector(":scope > template[data-tooltip]"),e=this.getAttribute("content"),s=this.#e.getAttribute("title");if(!t&&!e&&!s)return;s&&(this.#a=s,this.#e.removeAttribute("title"));let n=this.getAttribute("position")||"top";this.#e.id||(this.#e.id=`tooltip-trigger-${++Yt}`);let r=document.createElement("pop-over");r.className="tooltip",r.setAttribute("role","tooltip"),r.dataset.mode="hint",r.dataset.anchor=this.#e.id,r.dataset.tooltipPosition=n,r.id=`tooltip-${++Yt}`,t?r.innerHTML=t.innerHTML:r.textContent=e||s;let a=document.createElement("span");a.className="tooltip-arrow",a.setAttribute("aria-hidden","true"),r.appendChild(a),this.appendChild(r),this.#t=r,this.#n?(this.#e.setAttribute("interestfor",r.id),this.#e.hasAttribute("aria-describedby")||this.#e.setAttribute("aria-describedby",r.id)):(this.#e.setAttribute("aria-describedby",r.id),this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#h),this.listen(this.#e,"focus",this.#p),this.listen(this.#e,"blur",this.#u),this.listen(r,"mouseenter",this.#l),this.listen(r,"mouseleave",this.#h)),this.listen(r,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(r,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}#c(){this.#e=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");if(!this.#e||!t)return;this.#n=hn(this.#e),this.#e.id||(this.#e.id=`tooltip-trigger-${++Yt}`);let e=document.createElement("pop-over");e.className="hover-card",e.dataset.mode="manual",e.dataset.anchor=this.#e.id,e.dataset.position=this.getAttribute("position")||"bottom",e.id=`hc-${++Yt}`,e.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(e),this.#t=e,this.#n?this.#e.setAttribute("interestfor",e.id):(this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#h),this.listen(this.#e,"focus",this.#p),this.listen(this.#e,"blur",this.#h),this.listen(e,"mouseenter",this.#l),this.listen(e,"mouseleave",this.#h),this.listen(document,"keydown",this.#m)),this.listen(e,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(e,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}teardown(){this.#e&&(this.#n&&this.#e.removeAttribute("interestfor"),this.#a&&(this.#e.setAttribute("title",this.#a),this.#a=void 0)),this.#t&&(this.#t.remove(),this.#t=null),clearTimeout(this.#i),clearTimeout(this.#s)}#f=()=>{clearTimeout(this.#s);let t=this.#r?300:200,e=parseInt(this.getAttribute("delay")||String(t),10);this.setState("show-pending",!0),this.#i=setTimeout(()=>{this.setState("show-pending",!1),this.show()},e)};#h=()=>{clearTimeout(this.#i),this.setState("show-pending",!1);let t=this.#r?200:100;this.#s=setTimeout(()=>this.hide(),t)};#p=()=>{clearTimeout(this.#s),this.show()};#u=()=>{clearTimeout(this.#i),this.setState("show-pending",!1),this.hide()};#l=()=>{clearTimeout(this.#s)};#m=t=>{t.key==="Escape"&&this.isVisible&&this.hide()};show(){!this.#t||this.isVisible||(typeof this.#t.show=="function"?this.#t.show():this.#t.showPopover())}hide(){!this.#t||!this.isVisible||(typeof this.#t.hide=="function"?this.#t.hide():this.#t.hidePopover())}get isVisible(){return this.#t?.matches(":popover-open")??!1}};b("tool-tip",Pe);var Fe=0,Re=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=!1;#o=null;setup(){let t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button");if(!t)return!1;this.#e=t;let e=this.querySelector('menu, ul[role="menu"]');if(!e)return!1;this.#t=e,this.#a=this.hasAttribute("hover"),this.#e.id||(this.#e.id=`dropdown-trigger-${++Fe}`);let s=this.querySelector(":scope > pop-over[data-dropdown-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-dropdown-host",""),this.#i.id=`dropdown-${++Fe}`,this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#i.dataset.mode=this.#a?"manual":"auto",this.#i.dataset.position=this.getAttribute("position")||"bottom-start",this.#i.dataset.anchor=this.#e.id,this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e.setAttribute("aria-haspopup","menu"),this.#e.setAttribute("aria-expanded","false"),this.#t.id||(this.#t.id=`dropdown-menu-${++Fe}`),this.#e.setAttribute("aria-controls",this.#t.id),this.#t.setAttribute("role","menu"),this.#c(),this.#a?(this.listen(this,"mouseenter",this.#h),this.listen(this,"mouseleave",this.#p),this.listen(this.#e,"focus",this.#u),this.listen(this.#e,"blur",this.#l)):this.listen(this.#e,"click",this.#f),this.listen(this.#e,"keydown",this.#m),this.listen(this.#t,"keydown",this.#d),this.listen(this.#i,"pop-over:hide",this.#b),this.listen(this.#i,"pop-over:show",this.#v),this.#a&&this.listen(document,"keydown",this.#y),!0}teardown(){this.#o&&clearTimeout(this.#o)}get items(){if(!this.#t)return[];let t=[];for(let e of this.#t.querySelectorAll(":scope > li")){if(e.matches('[role="separator"]')||e.querySelector("hr")){t.push({separator:!0});continue}let s=e.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let e=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of e){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else{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.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("drop-down:items-changed",{detail:{items:e,source:"property"},bubbles:!0}))}#c(){this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#s.forEach(t=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",t.addEventListener("click",this.#w)}),this.#t.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#f=t=>{t.stopPropagation(),this.toggle()};#h=()=>{this.#o&&(clearTimeout(this.#o),this.#o=null,this.setState("hover-grace-pending",!1)),this.open()};#p=()=>{this.setState("hover-grace-pending",!0),this.#o=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.close()},100)};#u=()=>{this.#o&&(clearTimeout(this.#o),this.#o=null,this.setState("hover-grace-pending",!1)),this.open()};#l=t=>{this.#t?.contains(t.relatedTarget)||(this.setState("hover-grace-pending",!0),this.#o=setTimeout(()=>{this.setState("hover-grace-pending",!1),this.contains(document.activeElement)||this.close()},100))};#m=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#g(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#g(this.#s.length-1);break}};#d=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#g(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#g(this.#r-1);break;case"Home":t.preventDefault(),this.#g(0);break;case"End":t.preventDefault(),this.#g(this.#s.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break}};#y=t=>{t.key==="Escape"&&this.#n&&(t.preventDefault(),this.close(),this.#e?.focus())};#w=t=>{t.defaultPrevented||(this.close(),this.#e?.focus())};#v=()=>{this.#n||(this.#n=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0})))};#b=()=>{this.#n&&(this.#n=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#g(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())}open(){this.#n||!this.#i||this.#i.show()}close(){!this.#n||!this.#i||this.#i.hide()}toggle(){this.#n?this.close():this.open()}get isOpen(){return this.#n}};b("drop-down",Re);function dn({basePath:i,set:t,name:e}){return`${i}/${t}/${e}.svg`}function un(i,t=document){let e=i.getAttribute("data-icon-set");if(e)return e;let s=i.closest("[data-icon-set]")?.getAttribute("data-icon-set");return s||t.documentElement.dataset.iconSet||"lucide"}function fn(i=document){return i.documentElement.dataset.iconPath||"/cdn/icons"}function ze(i){let t=i.getAttribute("data-icon");if(!t){i.style.removeProperty("--vb-icon");return}let e=dn({basePath:fn(document),set:un(i,document),name:t});i.style.setProperty("--vb-icon",`url("${e}")`)}function He(i=document){for(let t of i.querySelectorAll("[data-icon]"))ze(t)}var pn=!1;function Ka(){if(pn)return;pn=!0,He(),new MutationObserver(t=>{for(let e of t)if(e.type==="attributes"){let s=e.target;s.hasAttribute&&s.hasAttribute("data-icon")&&ze(s),e.attributeName==="data-icon-set"&&He(s)}else for(let s of e.addedNodes){if(s.nodeType!==1)continue;let n=s;n.hasAttribute("data-icon")&&ze(n),He(n)}}).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-icon","data-icon-set"]})}typeof document<"u"&&Ka();var mn=`
|
|
8
8
|
:host {
|
|
9
9
|
display: inline-flex;
|
|
10
10
|
align-items: center;
|
|
@@ -65,10 +65,10 @@ svg {
|
|
|
65
65
|
:host([hidden]) {
|
|
66
66
|
display: none;
|
|
67
67
|
}
|
|
68
|
-
`;var Et=new Map,At=new Map,
|
|
69
|
-
<style>${
|
|
68
|
+
`;var Et=new Map,At=new Map,Ve=class i extends HTMLElement{static#e=new Set;static#t=null;static#i(){i.#t||(i.#t=new MutationObserver(t=>{for(let e of t)if(e.attributeName==="data-icon-set")for(let s of i.#e)s.hasAttribute("set")||(s.render(),s.loadIcon())}),i.#t?.observe(document.documentElement,{attributes:!0,attributeFilter:["data-icon-set"]}))}static get observedAttributes(){return["name","set","size","label"]}constructor(){super(),this.attachShadow({mode:"open"})}get name(){return this.getAttribute("name")||""}get set(){return this.getAttribute("set")||document.documentElement.dataset.iconSet||"lucide"}get size(){return this.getAttribute("size")||"md"}get label(){return this.getAttribute("label")}get basePath(){return this.getAttribute("base-path")||document.documentElement.dataset.iconPath||"/cdn/icons"}get iconPath(){return`${this.basePath}/${this.set}/${this.name}.svg`}render(){this.shadowRoot.innerHTML=`
|
|
69
|
+
<style>${mn}</style>
|
|
70
70
|
<slot></slot>
|
|
71
|
-
`}async loadIcon(){if(!this.name){this.setError("No icon name specified");return}let t=`${this.set}/${this.name}`;if(Et.has(t)){this.displayIcon(Et.get(t));return}try{let e=await this.#s(this.set,t);this.displayIcon(e)}catch(e){let s="lucide";if(this.set!==s){let n=`${s}/${this.name}`;if(Et.has(n)){this.displayIcon(Et.get(n));return}try{let r=await this.#s(s,n);this.displayIcon(r);return}catch{}}this.setError(e.message)}}async#s(t,e){return At.has(e)||At.set(e,this.#r(t).then(s=>(Et.set(e,s),At.delete(e),s)).catch(s=>{throw At.delete(e),s})),At.get(e)}async#r(t){let e=`${this.basePath}/${t}/${this.name}.svg`,s=await fetch(e);if(!s.ok)throw new Error(`Icon not found: ${this.name}`);let n=await s.text();if(!n.includes("<svg"))throw new Error(`Invalid SVG: ${this.name}`);return n}displayIcon(t){let n=new DOMParser().parseFromString(t,"image/svg+xml").querySelector("svg");if(!n){this.setError("Invalid SVG content");return}n.removeAttribute("width"),n.removeAttribute("height"),this.label?(n.setAttribute("role","img"),n.setAttribute("aria-label",this.label)):n.setAttribute("aria-hidden","true"),this.removeAttribute("data-error");let r=this.shadowRoot?.querySelector("slot");r&&r.replaceWith(n)}setError(t){this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let e=this.shadowRoot?.querySelector("slot");e&&(e.textContent="")}connectedCallback(){i.#e.add(this),i.#i(),this.render(),this.loadIcon(),this._onThemeChange=()=>{let t=this.shadowRoot?.querySelector("svg");t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this._onThemeChange),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),i.#e.delete(this),this._onThemeChange&&window.removeEventListener("vb:theme-change",this._onThemeChange)}attributeChangedCallback(t,e,s){if(e!==s&&this.isConnected){if(t==="name"||t==="set")this.render(),this.loadIcon();else if(t==="label"){let n=this.shadowRoot?.querySelector("svg");n&&(s?(n.setAttribute("role","img"),n.setAttribute("aria-label",s)):(n.removeAttribute("role"),n.setAttribute("aria-hidden","true")))}}}};b("icon-wc",He);var Ve="[data-copy], [data-copy-target], [data-paste-target]",za="Copied to clipboard",Va="Pasted from clipboard",ze=new WeakMap;async function St(i,t={}){if(i==null||i==="")return!1;let{button:e,announceMessage:s=za,duration:n=1500}=t;try{await navigator.clipboard.writeText(i)}catch{return!1}return dn({button:e,duration:n,announceMessage:s,eventDetail:{text:i}}),!0}function dn({button:i,duration:t,announceMessage:e,eventDetail:s,state:n="copied",eventName:r="copy"}){if(i){i.dataset.state=n;let a=ze.get(i);a&&clearTimeout(a),ze.set(i,setTimeout(()=>{delete i.dataset.state,ze.delete(i)},t)),i.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:s}))}ja(e,i??document.body)}async function Ua(i,t={}){let{button:e,announceMessage:s=Va,duration:n=1500}=t,r;try{r=await navigator.clipboard.readText()}catch{return null}return i&&("value"in i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement)?i.value=r:i.textContent=r,i.dispatchEvent(new Event("input",{bubbles:!0}))),dn({button:e,duration:n,announceMessage:s,eventDetail:{text:r},state:"pasted",eventName:"paste"}),r}function hn(i=document){i.querySelectorAll(Ve).forEach(Ue)}function Ue(i){i.hasAttribute("data-copy-init")||(i.setAttribute("data-copy-init",""),i.addEventListener("click",()=>{if(i.dataset.pasteTarget){let e=document.querySelector(i.dataset.pasteTarget);if(!e)return;Ua(e,{button:i});return}let t=Wa(i);t&&St(t,{button:i})}))}function Wa(i){if(i.dataset.copy)return i.dataset.copy;if(i.dataset.copyTarget){let t=document.querySelector(i.dataset.copyTarget);if(!t)return"";let e=i.dataset.copyAttr;return e?t.getAttribute(e)??"":t.textContent??""}return""}function ja(i,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="visually-hidden",e.textContent=i,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>hn()):hn();var Ya=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Ve)&&Ue(s),s.querySelectorAll(Ve).forEach(n=>Ue(n))}});Ya.observe(document.documentElement,{childList:!0,subtree:!0});var We=class extends g{#e;#t=new WeakSet;setup(){this.#i(),this.#e=new MutationObserver(t=>{for(let e of t)e.type==="childList"&&this.#i()}),this.#e.observe(this,{childList:!0,subtree:!0})}teardown(){this.#e?.disconnect()}#i(){let e=(this.getAttribute("levels")||"h2,h3").split(",").map(n=>n.trim()).join(","),s=this.querySelectorAll(e);for(let n of s)this.#t.has(n)||(this.#s(n),this.#t.add(n))}#s(t){if(t.closest("dialog, [data-toc-ignore]")||t.hasAttribute("data-toc-ignore")||(t.id||(t.id=this.#r(t.textContent)),t.querySelector(".heading-anchor")))return;let e=document.createElement("a");e.className="heading-anchor",e.href=`#${t.id}`,e.setAttribute("aria-label",`Link to ${t.textContent.trim()}`),e.innerHTML='<icon-wc name="link" size="sm"></icon-wc>',e.addEventListener("click",s=>{s.preventDefault(),this.#n(t,e)}),t.appendChild(e),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#r(t){let e=t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").substring(0,50),s=e,n=1;for(;document.getElementById(s);)s=`${e}-${n}`,n++;return s}async#n(t,e){let s=new URL(window.location.href);if(s.hash=t.id,window.history.pushState(null,"",s),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),await St(s.href,{button:e,announceMessage:"Link copied to clipboard"})){let r=e.innerHTML;e.innerHTML='<icon-wc name="check" size="sm"></icon-wc>',e.classList.add("copied"),setTimeout(()=>{e.innerHTML=r,e.classList.remove("copied")},1500)}this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:s.href}}))}};b("heading-links",We);var je=class extends g{#e;#t=[];#i=new Map;#s;#r;#n;#a=!1;setup(){requestAnimationFrame(()=>this.#o())}get entries(){return this.#t.map(t=>({id:t.id||void 0,text:t.textContent?.trim()||"",level:parseInt(t.tagName.slice(1),10)||0}))}teardown(){this.#e?.disconnect(),clearTimeout(this.#n)}#o(){this.#a=this.#c(),this.#a?this.#f():this.#w(),this.#g(),this.#h(),this.#l()}#c(){return this.querySelector("nav, details")!==null}#f(){this.#r=this.querySelector("details");let t=this.querySelectorAll('a[href^="#"]');for(let e of t){let s=e.getAttribute("href");if(!s)continue;let n=s.slice(1);if(n){let r=document.getElementById(n);r&&(this.#t.push(r),this.#i.set(n,e),e.classList.contains("link")||e.classList.add("link"),e.addEventListener("click",a=>{a.preventDefault(),this.#b(r)}))}}}#h(){this.#s=window.matchMedia("(min-width: 64rem)"),this.listen(this.#s,"change",this.#p),this.listen(window,"resize",this.#u)}#p=t=>{t.matches&&this.#r&&(this.#r.open=!0)};#u=()=>{clearTimeout(this.#n),this.#n=setTimeout(()=>this.#d(),150)};#l(){this.listen(window,"hashchange",this.#m),this.#d()}#m=()=>{this.#d()};#d(){let t=window.location.hash.slice(1);t&&this.#i.has(t)&&this.#y(t)}#y(t){for(let s of this.#i.values())s.classList.remove("active"),s.removeAttribute("aria-current");let e=this.#i.get(t);e&&(e.classList.add("active"),e.setAttribute("aria-current","true"))}#w(){let t=(this.getAttribute("levels")||"h2,h3").split(",").map(l=>l.trim().toLowerCase()),e=this.getAttribute("scope")||"main",s=this.getAttribute("title")||"On this page",n=document.querySelector(e);if(!n||(this.#t=Array.from(n.querySelectorAll(t.join(","))).filter(l=>l.id).filter(l=>!l.hasAttribute("data-toc-ignore")&&!l.closest("[data-toc-ignore]")),this.#t.length===0))return;let r={depth:-1,children:[]},a=[r];for(let l of this.#t){let d=t.indexOf(l.tagName.toLowerCase());for(;a[a.length-1].depth>=d;)a.pop();let u={heading:l,depth:d,children:[]};a[a.length-1].children.push(u),a.push(u)}let o=l=>{let d=document.createElement("ul");d.className="list";for(let u of l){let f=document.createElement("li");f.className="item",f.dataset.level=String(u.depth);let v=document.createElement("a");v.href=`#${u.heading.id}`,v.className="link",v.textContent=this.#v(u.heading),v.addEventListener("click",p=>{p.preventDefault(),this.#b(u.heading)}),f.appendChild(v),u.children.length&&f.appendChild(o(u.children)),d.appendChild(f),this.#i.set(u.heading.id,v)}return d};this.#r=document.createElement("details"),this.#r.className="details",this.#r.open=!0;let c=document.createElement("summary");c.className="summary",c.textContent=s,this.#r.appendChild(c);let h=document.createElement("nav");h.className="nav",h.setAttribute("aria-label",s),h.appendChild(o(r.children)),this.#r.appendChild(h),this.appendChild(this.#r)}#v(t){let e=t.cloneNode(!0);return e.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),e.textContent.trim()}#b(t){let e=new URL(window.location.href);e.hash=t.id,window.history.pushState(null,"",e),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#g(){if(this.#t.length===0)return;let t=new Set;this.#e=new IntersectionObserver(e=>{for(let s of e)s.isIntersecting?t.add(s.target.id):t.delete(s.target.id);this.#C(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let e of this.#t)this.#e.observe(e)}#C(t){for(let e of this.#t)if(t.has(e.id)){this.#y(e.id);return}this.#d()}refresh(){this.#a||(this.innerHTML=""),this.#i.clear(),this.#t=[],this.#e?.disconnect(),this.#o()}};b("page-toc",je);function Gt({newItems:i,nodes:t,keyOf:e,renderItem:s,containerFor:n}){let r=[],a=[],o=[],c=new Set;for(let l of i)c.add(e(l));for(let[l,d]of[...t])c.has(l)||(d.remove(),t.delete(l),o.push(l));let h=new Map;for(let l of i){let d=e(l),u=t.get(d)||null,f=n(l,u);h.has(f)||h.set(f,[]),h.get(f)?.push({item:l,key:d,existing:u})}for(let[l,d]of h)for(let u=0;u<d.length;u++){let{item:f,key:v,existing:p}=d[u],m=p;m?(m.parentElement!==l||l.children[u]!==m)&&a.push(v):(m=s(f),t.set(v,m),r.push(v));let y=l.children[u];y!==m&&l.insertBefore(m,y||null)}return{added:r,moved:a,removed:o}}var Ye=class i extends g{#e;#t;#i=[];#s=[];#r=[];#n=-1;#a=null;#o=1;#c=0;#f=null;#h=null;#p=null;#u="";#l=null;#m=null;#d=[];#y=new Map;#w=[];setup(){return this.#e=this.querySelector(":scope > table"),!this.#e||(this.#t=this.#e.querySelector("tbody"),!this.#t)?!1:(this.#v(),!0)}teardown(){this.#k(),this.#i=[],this.#s=[],this.#r=[]}#v(){this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#r=[...this.#s],this.#w=[...this.#e.tHead?.rows[0]?.cells||[]].map(e=>({key:e.getAttribute("data-key")||e.textContent.trim().toLowerCase(),label:e.textContent.trim(),sort:e.getAttribute("data-sort")||void 0})),this.#y.clear(),this.#d=[];for(let e of this.#s){let s=e.getAttribute("data-id")||e.getAttribute("data-key");s&&(this.#y.set(s,e),this.#d.push({id:s}))}this.#_(),this.#M(),this.#q(),this.#I(),this.#e.hasAttribute("data-filterable")&&this.#L();let t=this.#e.getAttribute("data-paginate");t&&(this.#c=parseInt(t,10),this.#c>0&&this.#P()),this.#V(),this.#D(),this.#K()}get rows(){return this.#d}set rows(t){let e=t||[],s=Gt({newItems:e,nodes:this.#y,keyOf:n=>n.id,renderItem:n=>this._renderRow(n),containerFor:()=>this.#t});this.#d=e,this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#M(),this.#q(),this.#F(this.#u),this.dispatchEvent(new CustomEvent("data-table:rows-changed",{detail:{rows:e,added:s.added,moved:s.moved,removed:s.removed,source:"api"},bubbles:!0}))}get columns(){return this.#w}_renderRow(t){let e=this;if(typeof e.renderRow=="function"){let n=e.renderRow(t,this.#w);if(!(n instanceof Element))throw new Error("data-table: renderRow must return an Element");return n.hasAttribute("data-id")||n.setAttribute("data-id",String(t.id)),n}let s=document.createElement("tr");s.setAttribute("data-id",String(t.id));for(let n of this.#w){let r=document.createElement("td"),a=t[n.key];r.textContent=a==null?"":String(a),s.appendChild(r)}return s}#b=[];#g=[];#C=[];#_(){let t=[...this.#e.tHead?.rows[0]?.cells||[]];this.#b=t.map(e=>{let s=parseFloat(e.getAttribute("data-weight"));return Number.isFinite(s)?s:null}),this.#g=t.map(e=>e.getAttribute("data-rollup")||null),this.#C=t.map(e=>e.getAttribute("data-heatmap")||null)}#M(){if(this.#g.some(Boolean))for(let t=0;t<this.#g.length;t++){let e=this.#g[t];if(e)for(let s of this.#s){let n=s.children[t];if(!n)continue;let r=this.#S(s,t,e),a=i.#B(r);n.textContent=a,n.setAttribute("data-rollup-value",String(r)),n.hasAttribute("data-sort-value")||n.setAttribute("data-sort-value",String(r))}}}#S(t,e,s){let n=[...t.children],r=0,a=0,o=-1/0,c=0,h=1,l=!1;for(let d=0;d<n.length;d++){if(d===e||this.#g[d])continue;let u=n[d].getAttribute("data-sort-value")??n[d].textContent??"",f=parseFloat(u);if(!Number.isFinite(f))continue;r+=f,a++,f>o&&(o=f),h*=f,l=!0;let v=this.#b[d];v!==null&&(c+=f*v)}switch(s){case"sum":return r;case"avg":return a?r/a:0;case"max":return o===-1/0?0:o;case"weighted-sum":return c;case"product":return l?h:0;default:return r}}static#B(t){return Number.isFinite(t)?Number.isInteger(t)?String(t):(Math.round(t*100)/100).toString():""}#q(){if(this.#C.some(Boolean))for(let t=0;t<this.#C.length;t++){let e=this.#C[t];if(!e)continue;let s=this.#s.map(c=>{let h=c.children[t];if(!h)return null;let l=h.getAttribute("data-rollup-value")??h.getAttribute("data-sort-value")??h.textContent??"",d=parseFloat(l);return Number.isFinite(d)?d:null}),n=s.filter(c=>c!==null);if(!n.length)continue;let r=Math.min(...n),o=Math.max(...n)-r||1;for(let c=0;c<this.#s.length;c++){let h=this.#s[c].children[t];if(!h)continue;let l=s[c];if(l===null){h.removeAttribute("data-heat-level");continue}let d=(l-r)/o;e==="low-good"&&(d=1-d);let u=d<.34?"low":d<.67?"mid":"high";h.setAttribute("data-heat-level",u)}}}#k(){this.#p&&clearTimeout(this.#p),this.#f?.parentElement?.remove(),this.#h?.remove()}#I(){this.#e.querySelectorAll("thead th[data-sort]").forEach((e,s)=>{let n=e.getAttribute("data-sort"),r=this.#O(e);this.#i.push({th:e,sortType:n,columnIndex:r}),e.setAttribute("tabindex","0"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e.dataset.columnIndex=r,this.listen(e,"click",this.#R),this.listen(e,"keydown",this.#T)})}#O(t){return[...t.parentElement.children].indexOf(t)}#R=t=>{let e=t.currentTarget,s=parseInt(e.dataset.columnIndex,10);this.#E(s)};#T=t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let e=t.currentTarget,s=parseInt(e.dataset.columnIndex,10);this.#E(s)}};#N(t,e,s){let n=this.#r;if(n.length<2)return!0;let r=s==="asc"?1:-1;for(let a=1;a<n.length;a++){let o=this.#A(n[a-1].children[t],e),c=this.#A(n[a].children[t],e);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#E(t){let e=this.#i.find(n=>n.columnIndex===t);if(!e)return;let s;this.#n===t?s=this.#a==="asc"?"desc":"asc":this.#N(t,e.sortType,"asc")?s="desc":s="asc",this.#i.forEach(({th:n})=>{n.setAttribute("aria-sort","none")}),e.th.setAttribute("aria-sort",s==="asc"?"ascending":"descending"),this.#n=t,this.#a=s,this.#x(t,s,e.sortType),this.#o=1,this.#K(),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:s,columnName:e.th.textContent.trim()},bubbles:!0}))}#x(t,e,s){let n=e==="asc"?1:-1;this.#r.sort((r,a)=>{let o=r.children[t],c=a.children[t];if(!o||!c)return 0;let h=this.#A(o,s),l=this.#A(c,s),d=0;switch(s){case"number":d=h-l;break;case"date":d=h-l;break;default:d=h.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"});break}return d*n})}#A(t,e){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(e){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#L(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let e=document.createElement("input");e.type="search",e.setAttribute("data-filter-input",""),e.setAttribute("placeholder","Filter table..."),e.setAttribute("aria-label","Filter table rows"),t.appendChild(e),this.insertBefore(t,this.#e),this.#f=e,this.listen(e,"input",this.#H)}#H=t=>{let e=t.target.value;this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>{this.#F(e)},150)};#F(t){if(this.#u=t.toLowerCase().trim(),this.#u===""?this.#r=[...this.#s]:this.#r=this.#s.filter(e=>[...e.children].some(n=>(n.getAttribute("data-filter-value")??n.textContent).toLowerCase().includes(this.#u))),this.#n>=0&&this.#a){let e=this.#i.find(s=>s.columnIndex===this.#n);e&&this.#x(this.#n,this.#a,e.sortType)}this.#o=1,this.#K(),this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#u,count:this.#r.length},bubbles:!0}))}#P(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label","Table pagination"),this.appendChild(t),this.#h=t}#V(){this.listen(this.#e,"click",this.#$)}#$=t=>{let e=t.target.closest('[data-action="toggle-expand"]');if(!e)return;let s=e.closest("tr[data-expandable]");if(!s)return;let n=s.hasAttribute("data-state-expanded"),r=s.nextElementSibling;n?(s.removeAttribute("data-state-expanded"),e.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(s.setAttribute("data-state-expanded",""),e.setAttribute("aria-expanded","true"),r?.hasAttribute("data-expand-content")&&(r.hidden=!1,r.removeAttribute("aria-hidden"))),this.dispatchEvent(new CustomEvent("data-table:expand",{detail:{row:s,expanded:!n},bubbles:!0}))};#D(){this.#l=this.#e.querySelector('thead [data-action="select-all"]'),this.#l&&this.listen(this.#l,"change",this.#z),this.listen(this.#t,"change",this.#W),this.#m=this.querySelector("[data-selected-count]"),this.#Y()}#z=t=>{let e=t.target.checked;this.#t.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');e?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#U(),this.#G()};#W=t=>{let e=t.target.closest('[data-action="select-row"]');if(!e)return;let s=e.closest("tr[data-selectable]");s&&(e.checked?s.setAttribute("data-state-selected",""):s.removeAttribute("data-state-selected"),this.#Y(),this.#G())};#Y(){if(!this.#l){this.#U();return}let t=this.#t.querySelectorAll("tr[data-selectable]"),e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]"),s=t.length,n=e.length;n===0?(this.#l.checked=!1,this.#l.indeterminate=!1):n===s?(this.#l.checked=!0,this.#l.indeterminate=!1):(this.#l.checked=!1,this.#l.indeterminate=!0),this.#U()}#U(){let e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#m&&(this.#m.textContent=e)}#G(){let t=[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")];this.dispatchEvent(new CustomEvent("data-table:selection",{detail:{count:t.length,rows:t},bubbles:!0}))}#j(){if(!this.#h||this.#c<=0)return;let t=this.#h,e=Math.ceil(this.#r.length/this.#c);if(t.innerHTML="",e<=1)return;let s=document.createElement("button");s.type="button",s.textContent="Previous",s.setAttribute("data-pagination-prev",""),s.disabled=this.#o===1,s.addEventListener("click",()=>this.goToPage(this.#o-1)),t.appendChild(s),this.#X(e).forEach(a=>{if(a==="..."){let o=document.createElement("span");o.textContent="...",o.setAttribute("data-pagination-ellipsis",""),t.appendChild(o)}else{let o=document.createElement("button");o.type="button",o.textContent=a,o.setAttribute("data-pagination-page",""),a===this.#o&&(o.setAttribute("aria-current","page"),o.setAttribute("data-current","")),o.addEventListener("click",()=>this.goToPage(a)),t.appendChild(o)}});let r=document.createElement("button");r.type="button",r.textContent="Next",r.setAttribute("data-pagination-next",""),r.disabled=this.#o===e,r.addEventListener("click",()=>this.goToPage(this.#o+1)),t.appendChild(r)}#X(t){let e=this.#o,s=[];if(t<=7)for(let n=1;n<=t;n++)s.push(n);else{s.push(1),e>3&&s.push("...");let n=Math.max(2,e-1),r=Math.min(t-1,e+1);for(let a=n;a<=r;a++)s.push(a);e<t-2&&s.push("..."),s.push(t)}return s}#K(){this.#s.forEach(e=>{e.setAttribute("data-state-hidden","")});let t;if(this.#c>0){let e=(this.#o-1)*this.#c,s=e+this.#c;t=this.#r.slice(e,s)}else t=this.#r;t.forEach(e=>{e.removeAttribute("data-state-hidden"),this.#t.appendChild(e);let s=e.nextElementSibling?.hasAttribute?.("data-expand-content")?e.nextElementSibling:this.#J(e);s&&this.#t.appendChild(s)}),this.#r.forEach(e=>{if(e.hasAttribute("data-state-hidden")){this.#t.appendChild(e);let s=this.#J(e);s&&this.#t.appendChild(s)}}),this.#s.forEach(e=>{if(!this.#r.includes(e)){this.#t.appendChild(e);let s=this.#J(e);s&&this.#t.appendChild(s)}}),this.#j()}#J(t){if(!t.hasAttribute("data-expandable"))return null;let e=t.nextElementSibling;return e?.hasAttribute("data-expand-content")?e:null}goToPage(t){let e=Math.ceil(this.#r.length/this.#c),s=Math.max(1,Math.min(t,e));s!==this.#o&&(this.#o=s,this.#K(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#o},bubbles:!0})))}setFilter(t){this.#f&&(this.#f.value=t),this.#F(t)}refresh(){if(this.#s=[...this.#t.querySelectorAll(":scope > tr")],this.#u?this.#F(this.#u):this.#r=[...this.#s],this.#n>=0&&this.#a){let e=this.#i.find(s=>s.columnIndex===this.#n);e&&this.#x(this.#n,this.#a,e.sortType)}let t=Math.max(1,Math.ceil(this.#r.length/this.#c));this.#o>t&&(this.#o=t),this.#K()}get currentPage(){return this.#o}get totalPages(){return this.#c<=0?1:Math.ceil(this.#r.length/this.#c)}get filteredCount(){return this.#r.length}get totalCount(){return this.#s.length}getSelectedRows(){return this.#t?[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};b("data-table",Ye);var ct=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),xt={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}};function un(i){let t=ct?xt.mac:xt.other;return i.split("+").map(e=>{let s=e.trim().toLowerCase();return t[s]??s.toUpperCase()}).join(ct?"":"+")}function fn(i){let t=i.toLowerCase().split("+").map(s=>s.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function pn(i,t){if(i.key.toLowerCase()!==t.key)return!1;let e,s;return ct?(e=t.meta,s=t.ctrl):(e=!1,s=t.meta||t.ctrl),!(e!==i.metaKey||s!==i.ctrlKey||t.shift!==i.shiftKey||t.alt!==i.altKey)}var Ga=new Set(["INPUT","TEXTAREA","SELECT"]),lt=[],mn=!1;function Ka(i){let t=Ga.has(i.target.tagName)||i.target.isContentEditable;for(let e of lt)if(!(t&&!e.global)&&pn(i,e.descriptor)){i.preventDefault(),e.callback(i);return}}function Xa(){mn||(document.addEventListener("keydown",Ka),mn=!0)}function Kt(i,t,e={}){Xa();let s=fn(i),n={combo:i,descriptor:s,callback:t,global:e.global===!0};return lt.find(a=>a.combo===i)&&console.warn(`[hotkey-bind] Shortcut "${i}" already bound. Last-connected-wins.`),lt.unshift(n),function(){let o=lt.indexOf(n);o!==-1&<.splice(o,1)}}function bn(){return lt.map(i=>i.combo)}var Ge=class i extends g{static#e=150;static#t=8;#i=null;#s=null;#r=null;#n=null;#a=[];#o=-1;#c=!1;#f=null;#h=null;#p=null;setup(){this.#u(),this.#l()}teardown(){this.#c&&(document.body.style.overflow="",this.removeAttribute("open"),this.#c=!1),this.#p?.(),this.#B()}get value(){return this.#r?.value??""}set value(t){if(!this.#r)return;let e=t==null?"":String(t);this.#r.value!==e&&(this.#r.value=e,this.#r.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new CustomEvent("site-search:change",{detail:{value:e,source:"api"},bubbles:!0})))}get results(){return[...this.#a]}#u(){this.#i=this.querySelector(":scope > [data-trigger]"),this.#i||(this.#i=this.querySelector(":scope > button")),this.#i||(this.#i=document.createElement("button"),this.#i.setAttribute("data-trigger",""),this.#i.innerHTML=`
|
|
71
|
+
`}async loadIcon(){if(!this.name){this.setError("No icon name specified");return}let t=`${this.set}/${this.name}`;if(Et.has(t)){this.displayIcon(Et.get(t));return}try{let e=await this.#s(this.set,t);this.displayIcon(e)}catch(e){let s="lucide";if(this.set!==s){let n=`${s}/${this.name}`;if(Et.has(n)){this.displayIcon(Et.get(n));return}try{let r=await this.#s(s,n);this.displayIcon(r);return}catch{}}this.setError(e.message)}}async#s(t,e){return At.has(e)||At.set(e,this.#r(t).then(s=>(Et.set(e,s),At.delete(e),s)).catch(s=>{throw At.delete(e),s})),At.get(e)}async#r(t){let e=`${this.basePath}/${t}/${this.name}.svg`,s=await fetch(e);if(!s.ok)throw new Error(`Icon not found: ${this.name}`);let n=await s.text();if(!n.includes("<svg"))throw new Error(`Invalid SVG: ${this.name}`);return n}displayIcon(t){let n=new DOMParser().parseFromString(t,"image/svg+xml").querySelector("svg");if(!n){this.setError("Invalid SVG content");return}n.removeAttribute("width"),n.removeAttribute("height"),this.label?(n.setAttribute("role","img"),n.setAttribute("aria-label",this.label)):n.setAttribute("aria-hidden","true"),this.removeAttribute("data-error");let r=this.shadowRoot?.querySelector("slot");r&&r.replaceWith(n)}setError(t){this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let e=this.shadowRoot?.querySelector("slot");e&&(e.textContent="")}connectedCallback(){i.#e.add(this),i.#i(),this.render(),this.loadIcon(),this._onThemeChange=()=>{let t=this.shadowRoot?.querySelector("svg");t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this._onThemeChange),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),i.#e.delete(this),this._onThemeChange&&window.removeEventListener("vb:theme-change",this._onThemeChange)}attributeChangedCallback(t,e,s){if(e!==s&&this.isConnected){if(t==="name"||t==="set")this.render(),this.loadIcon();else if(t==="label"){let n=this.shadowRoot?.querySelector("svg");n&&(s?(n.setAttribute("role","img"),n.setAttribute("aria-label",s)):(n.removeAttribute("role"),n.setAttribute("aria-hidden","true")))}}}};b("icon-wc",Ve);var We="[data-copy], [data-copy-target], [data-paste-target]",Xa="Copied to clipboard",Ja="Pasted from clipboard",Ue=new WeakMap;async function St(i,t={}){if(i==null||i==="")return!1;let{button:e,announceMessage:s=Xa,duration:n=1500}=t;try{await navigator.clipboard.writeText(i)}catch{return!1}return gn({button:e,duration:n,announceMessage:s,eventDetail:{text:i}}),!0}function gn({button:i,duration:t,announceMessage:e,eventDetail:s,state:n="copied",eventName:r="copy"}){if(i){i.dataset.state=n;let a=Ue.get(i);a&&clearTimeout(a),Ue.set(i,setTimeout(()=>{delete i.dataset.state,Ue.delete(i)},t)),i.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:s}))}to(e,i??document.body)}async function Za(i,t={}){let{button:e,announceMessage:s=Ja,duration:n=1500}=t,r;try{r=await navigator.clipboard.readText()}catch{return null}return i&&("value"in i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement)?i.value=r:i.textContent=r,i.dispatchEvent(new Event("input",{bubbles:!0}))),gn({button:e,duration:n,announceMessage:s,eventDetail:{text:r},state:"pasted",eventName:"paste"}),r}function bn(i=document){i.querySelectorAll(We).forEach(je)}function je(i){i.hasAttribute("data-copy-init")||(i.setAttribute("data-copy-init",""),i.addEventListener("click",()=>{if(i.dataset.pasteTarget){let e=document.querySelector(i.dataset.pasteTarget);if(!e)return;Za(e,{button:i});return}let t=Qa(i);t&&St(t,{button:i})}))}function Qa(i){if(i.dataset.copy)return i.dataset.copy;if(i.dataset.copyTarget){let t=document.querySelector(i.dataset.copyTarget);if(!t)return"";let e=i.dataset.copyAttr;return e?t.getAttribute(e)??"":t.textContent??""}return""}function to(i,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="visually-hidden",e.textContent=i,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>bn()):bn();var eo=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(We)&&je(s),s.querySelectorAll(We).forEach(n=>je(n))}});eo.observe(document.documentElement,{childList:!0,subtree:!0});var Ye=class extends g{#e;#t=new WeakSet;setup(){this.#i(),this.#e=new MutationObserver(t=>{for(let e of t)e.type==="childList"&&this.#i()}),this.#e.observe(this,{childList:!0,subtree:!0})}teardown(){this.#e?.disconnect()}#i(){let e=(this.getAttribute("levels")||"h2,h3").split(",").map(n=>n.trim()).join(","),s=this.querySelectorAll(e);for(let n of s)this.#t.has(n)||(this.#s(n),this.#t.add(n))}#s(t){if(t.closest("dialog, [data-toc-ignore]")||t.hasAttribute("data-toc-ignore")||(t.id||(t.id=this.#r(t.textContent)),t.querySelector(".heading-anchor")))return;let e=document.createElement("a");e.className="heading-anchor",e.href=`#${t.id}`,e.setAttribute("aria-label",`Link to ${t.textContent.trim()}`),e.innerHTML='<icon-wc name="link" size="sm"></icon-wc>',e.addEventListener("click",s=>{s.preventDefault(),this.#n(t,e)}),t.appendChild(e),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#r(t){let e=t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").substring(0,50),s=e,n=1;for(;document.getElementById(s);)s=`${e}-${n}`,n++;return s}async#n(t,e){let s=new URL(window.location.href);if(s.hash=t.id,window.history.pushState(null,"",s),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),await St(s.href,{button:e,announceMessage:"Link copied to clipboard"})){let r=e.innerHTML;e.innerHTML='<icon-wc name="check" size="sm"></icon-wc>',e.classList.add("copied"),setTimeout(()=>{e.innerHTML=r,e.classList.remove("copied")},1500)}this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:s.href}}))}};b("heading-links",Ye);var Ge=class extends g{#e;#t=[];#i=new Map;#s;#r;#n;#a=!1;setup(){requestAnimationFrame(()=>this.#o())}get entries(){return this.#t.map(t=>({id:t.id||void 0,text:t.textContent?.trim()||"",level:parseInt(t.tagName.slice(1),10)||0}))}teardown(){this.#e?.disconnect(),clearTimeout(this.#n)}#o(){this.#a=this.#c(),this.#a?this.#f():this.#w(),this.#g(),this.#h(),this.#l()}#c(){return this.querySelector("nav, details")!==null}#f(){this.#r=this.querySelector("details");let t=this.querySelectorAll('a[href^="#"]');for(let e of t){let s=e.getAttribute("href");if(!s)continue;let n=s.slice(1);if(n){let r=document.getElementById(n);r&&(this.#t.push(r),this.#i.set(n,e),e.classList.contains("link")||e.classList.add("link"),e.addEventListener("click",a=>{a.preventDefault(),this.#b(r)}))}}}#h(){this.#s=window.matchMedia("(min-width: 64rem)"),this.listen(this.#s,"change",this.#p),this.listen(window,"resize",this.#u)}#p=t=>{t.matches&&this.#r&&(this.#r.open=!0)};#u=()=>{clearTimeout(this.#n),this.#n=setTimeout(()=>this.#d(),150)};#l(){this.listen(window,"hashchange",this.#m),this.#d()}#m=()=>{this.#d()};#d(){let t=window.location.hash.slice(1);t&&this.#i.has(t)&&this.#y(t)}#y(t){for(let s of this.#i.values())s.classList.remove("active"),s.removeAttribute("aria-current");let e=this.#i.get(t);e&&(e.classList.add("active"),e.setAttribute("aria-current","true"))}#w(){let t=(this.getAttribute("levels")||"h2,h3").split(",").map(l=>l.trim().toLowerCase()),e=this.getAttribute("scope")||"main",s=this.getAttribute("title")||"On this page",n=document.querySelector(e);if(!n||(this.#t=Array.from(n.querySelectorAll(t.join(","))).filter(l=>l.id).filter(l=>!l.hasAttribute("data-toc-ignore")&&!l.closest("[data-toc-ignore]")),this.#t.length===0))return;let r={depth:-1,children:[]},a=[r];for(let l of this.#t){let d=t.indexOf(l.tagName.toLowerCase());for(;a[a.length-1].depth>=d;)a.pop();let u={heading:l,depth:d,children:[]};a[a.length-1].children.push(u),a.push(u)}let o=l=>{let d=document.createElement("ul");d.className="list";for(let u of l){let f=document.createElement("li");f.className="item",f.dataset.level=String(u.depth);let v=document.createElement("a");v.href=`#${u.heading.id}`,v.className="link",v.textContent=this.#v(u.heading),v.addEventListener("click",p=>{p.preventDefault(),this.#b(u.heading)}),f.appendChild(v),u.children.length&&f.appendChild(o(u.children)),d.appendChild(f),this.#i.set(u.heading.id,v)}return d};this.#r=document.createElement("details"),this.#r.className="details",this.#r.open=!0;let c=document.createElement("summary");c.className="summary",c.textContent=s,this.#r.appendChild(c);let h=document.createElement("nav");h.className="nav",h.setAttribute("aria-label",s),h.appendChild(o(r.children)),this.#r.appendChild(h),this.appendChild(this.#r)}#v(t){let e=t.cloneNode(!0);return e.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),e.textContent.trim()}#b(t){let e=new URL(window.location.href);e.hash=t.id,window.history.pushState(null,"",e),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#g(){if(this.#t.length===0)return;let t=new Set;this.#e=new IntersectionObserver(e=>{for(let s of e)s.isIntersecting?t.add(s.target.id):t.delete(s.target.id);this.#C(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let e of this.#t)this.#e.observe(e)}#C(t){for(let e of this.#t)if(t.has(e.id)){this.#y(e.id);return}this.#d()}refresh(){this.#a||(this.innerHTML=""),this.#i.clear(),this.#t=[],this.#e?.disconnect(),this.#o()}};b("page-toc",Ge);function Gt({newItems:i,nodes:t,keyOf:e,renderItem:s,containerFor:n}){let r=[],a=[],o=[],c=new Set;for(let l of i)c.add(e(l));for(let[l,d]of[...t])c.has(l)||(d.remove(),t.delete(l),o.push(l));let h=new Map;for(let l of i){let d=e(l),u=t.get(d)||null,f=n(l,u);h.has(f)||h.set(f,[]),h.get(f)?.push({item:l,key:d,existing:u})}for(let[l,d]of h)for(let u=0;u<d.length;u++){let{item:f,key:v,existing:p}=d[u],m=p;m?(m.parentElement!==l||l.children[u]!==m)&&a.push(v):(m=s(f),t.set(v,m),r.push(v));let y=l.children[u];y!==m&&l.insertBefore(m,y||null)}return{added:r,moved:a,removed:o}}var Ke=class i extends g{#e;#t;#i=[];#s=[];#r=[];#n=-1;#a=null;#o=1;#c=0;#f=null;#h=null;#p=null;#u="";#l=null;#m=null;#d=[];#y=new Map;#w=[];setup(){return this.#e=this.querySelector(":scope > table"),!this.#e||(this.#t=this.#e.querySelector("tbody"),!this.#t)?!1:(this.#v(),!0)}teardown(){this.#k(),this.#i=[],this.#s=[],this.#r=[]}#v(){this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#r=[...this.#s],this.#w=[...this.#e.tHead?.rows[0]?.cells||[]].map(e=>({key:e.getAttribute("data-key")||e.textContent.trim().toLowerCase(),label:e.textContent.trim(),sort:e.getAttribute("data-sort")||void 0})),this.#y.clear(),this.#d=[];for(let e of this.#s){let s=e.getAttribute("data-id")||e.getAttribute("data-key");s&&(this.#y.set(s,e),this.#d.push({id:s}))}this.#_(),this.#M(),this.#q(),this.#I(),this.#e.hasAttribute("data-filterable")&&this.#L();let t=this.#e.getAttribute("data-paginate");t&&(this.#c=parseInt(t,10),this.#c>0&&this.#P()),this.#V(),this.#D(),this.#K()}get rows(){return this.#d}set rows(t){let e=t||[],s=Gt({newItems:e,nodes:this.#y,keyOf:n=>n.id,renderItem:n=>this._renderRow(n),containerFor:()=>this.#t});this.#d=e,this.#s=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#M(),this.#q(),this.#F(this.#u),this.dispatchEvent(new CustomEvent("data-table:rows-changed",{detail:{rows:e,added:s.added,moved:s.moved,removed:s.removed,source:"api"},bubbles:!0}))}get columns(){return this.#w}_renderRow(t){let e=this;if(typeof e.renderRow=="function"){let n=e.renderRow(t,this.#w);if(!(n instanceof Element))throw new Error("data-table: renderRow must return an Element");return n.hasAttribute("data-id")||n.setAttribute("data-id",String(t.id)),n}let s=document.createElement("tr");s.setAttribute("data-id",String(t.id));for(let n of this.#w){let r=document.createElement("td"),a=t[n.key];r.textContent=a==null?"":String(a),s.appendChild(r)}return s}#b=[];#g=[];#C=[];#_(){let t=[...this.#e.tHead?.rows[0]?.cells||[]];this.#b=t.map(e=>{let s=parseFloat(e.getAttribute("data-weight"));return Number.isFinite(s)?s:null}),this.#g=t.map(e=>e.getAttribute("data-rollup")||null),this.#C=t.map(e=>e.getAttribute("data-heatmap")||null)}#M(){if(this.#g.some(Boolean))for(let t=0;t<this.#g.length;t++){let e=this.#g[t];if(e)for(let s of this.#s){let n=s.children[t];if(!n)continue;let r=this.#S(s,t,e),a=i.#B(r);n.textContent=a,n.setAttribute("data-rollup-value",String(r)),n.hasAttribute("data-sort-value")||n.setAttribute("data-sort-value",String(r))}}}#S(t,e,s){let n=[...t.children],r=0,a=0,o=-1/0,c=0,h=1,l=!1;for(let d=0;d<n.length;d++){if(d===e||this.#g[d])continue;let u=n[d].getAttribute("data-sort-value")??n[d].textContent??"",f=parseFloat(u);if(!Number.isFinite(f))continue;r+=f,a++,f>o&&(o=f),h*=f,l=!0;let v=this.#b[d];v!==null&&(c+=f*v)}switch(s){case"sum":return r;case"avg":return a?r/a:0;case"max":return o===-1/0?0:o;case"weighted-sum":return c;case"product":return l?h:0;default:return r}}static#B(t){return Number.isFinite(t)?Number.isInteger(t)?String(t):(Math.round(t*100)/100).toString():""}#q(){if(this.#C.some(Boolean))for(let t=0;t<this.#C.length;t++){let e=this.#C[t];if(!e)continue;let s=this.#s.map(c=>{let h=c.children[t];if(!h)return null;let l=h.getAttribute("data-rollup-value")??h.getAttribute("data-sort-value")??h.textContent??"",d=parseFloat(l);return Number.isFinite(d)?d:null}),n=s.filter(c=>c!==null);if(!n.length)continue;let r=Math.min(...n),o=Math.max(...n)-r||1;for(let c=0;c<this.#s.length;c++){let h=this.#s[c].children[t];if(!h)continue;let l=s[c];if(l===null){h.removeAttribute("data-heat-level");continue}let d=(l-r)/o;e==="low-good"&&(d=1-d);let u=d<.34?"low":d<.67?"mid":"high";h.setAttribute("data-heat-level",u)}}}#k(){this.#p&&clearTimeout(this.#p),this.#f?.parentElement?.remove(),this.#h?.remove()}#I(){this.#e.querySelectorAll("thead th[data-sort]").forEach((e,s)=>{let n=e.getAttribute("data-sort"),r=this.#O(e);this.#i.push({th:e,sortType:n,columnIndex:r}),e.setAttribute("tabindex","0"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e.dataset.columnIndex=r,this.listen(e,"click",this.#R),this.listen(e,"keydown",this.#T)})}#O(t){return[...t.parentElement.children].indexOf(t)}#R=t=>{let e=t.currentTarget,s=parseInt(e.dataset.columnIndex,10);this.#E(s)};#T=t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let e=t.currentTarget,s=parseInt(e.dataset.columnIndex,10);this.#E(s)}};#N(t,e,s){let n=this.#r;if(n.length<2)return!0;let r=s==="asc"?1:-1;for(let a=1;a<n.length;a++){let o=this.#A(n[a-1].children[t],e),c=this.#A(n[a].children[t],e);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#E(t){let e=this.#i.find(n=>n.columnIndex===t);if(!e)return;let s;this.#n===t?s=this.#a==="asc"?"desc":"asc":this.#N(t,e.sortType,"asc")?s="desc":s="asc",this.#i.forEach(({th:n})=>{n.setAttribute("aria-sort","none")}),e.th.setAttribute("aria-sort",s==="asc"?"ascending":"descending"),this.#n=t,this.#a=s,this.#x(t,s,e.sortType),this.#o=1,this.#K(),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:s,columnName:e.th.textContent.trim()},bubbles:!0}))}#x(t,e,s){let n=e==="asc"?1:-1;this.#r.sort((r,a)=>{let o=r.children[t],c=a.children[t];if(!o||!c)return 0;let h=this.#A(o,s),l=this.#A(c,s),d=0;switch(s){case"number":d=h-l;break;case"date":d=h-l;break;default:d=h.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"});break}return d*n})}#A(t,e){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(e){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#L(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let e=document.createElement("input");e.type="search",e.setAttribute("data-filter-input",""),e.setAttribute("placeholder","Filter table..."),e.setAttribute("aria-label","Filter table rows"),t.appendChild(e),this.insertBefore(t,this.#e),this.#f=e,this.listen(e,"input",this.#H)}#H=t=>{let e=t.target.value;this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>{this.#F(e)},150)};#F(t){if(this.#u=t.toLowerCase().trim(),this.#u===""?this.#r=[...this.#s]:this.#r=this.#s.filter(e=>[...e.children].some(n=>(n.getAttribute("data-filter-value")??n.textContent).toLowerCase().includes(this.#u))),this.#n>=0&&this.#a){let e=this.#i.find(s=>s.columnIndex===this.#n);e&&this.#x(this.#n,this.#a,e.sortType)}this.#o=1,this.#K(),this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#u,count:this.#r.length},bubbles:!0}))}#P(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label","Table pagination"),this.appendChild(t),this.#h=t}#V(){this.listen(this.#e,"click",this.#$)}#$=t=>{let e=t.target.closest('[data-action="toggle-expand"]');if(!e)return;let s=e.closest("tr[data-expandable]");if(!s)return;let n=s.hasAttribute("data-state-expanded"),r=s.nextElementSibling;n?(s.removeAttribute("data-state-expanded"),e.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(s.setAttribute("data-state-expanded",""),e.setAttribute("aria-expanded","true"),r?.hasAttribute("data-expand-content")&&(r.hidden=!1,r.removeAttribute("aria-hidden"))),this.dispatchEvent(new CustomEvent("data-table:expand",{detail:{row:s,expanded:!n},bubbles:!0}))};#D(){this.#l=this.#e.querySelector('thead [data-action="select-all"]'),this.#l&&this.listen(this.#l,"change",this.#z),this.listen(this.#t,"change",this.#W),this.#m=this.querySelector("[data-selected-count]"),this.#Y()}#z=t=>{let e=t.target.checked;this.#t.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');e?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#U(),this.#G()};#W=t=>{let e=t.target.closest('[data-action="select-row"]');if(!e)return;let s=e.closest("tr[data-selectable]");s&&(e.checked?s.setAttribute("data-state-selected",""):s.removeAttribute("data-state-selected"),this.#Y(),this.#G())};#Y(){if(!this.#l){this.#U();return}let t=this.#t.querySelectorAll("tr[data-selectable]"),e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]"),s=t.length,n=e.length;n===0?(this.#l.checked=!1,this.#l.indeterminate=!1):n===s?(this.#l.checked=!0,this.#l.indeterminate=!1):(this.#l.checked=!1,this.#l.indeterminate=!0),this.#U()}#U(){let e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#m&&(this.#m.textContent=e)}#G(){let t=[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")];this.dispatchEvent(new CustomEvent("data-table:selection",{detail:{count:t.length,rows:t},bubbles:!0}))}#j(){if(!this.#h||this.#c<=0)return;let t=this.#h,e=Math.ceil(this.#r.length/this.#c);if(t.innerHTML="",e<=1)return;let s=document.createElement("button");s.type="button",s.textContent="Previous",s.setAttribute("data-pagination-prev",""),s.disabled=this.#o===1,s.addEventListener("click",()=>this.goToPage(this.#o-1)),t.appendChild(s),this.#X(e).forEach(a=>{if(a==="..."){let o=document.createElement("span");o.textContent="...",o.setAttribute("data-pagination-ellipsis",""),t.appendChild(o)}else{let o=document.createElement("button");o.type="button",o.textContent=a,o.setAttribute("data-pagination-page",""),a===this.#o&&(o.setAttribute("aria-current","page"),o.setAttribute("data-current","")),o.addEventListener("click",()=>this.goToPage(a)),t.appendChild(o)}});let r=document.createElement("button");r.type="button",r.textContent="Next",r.setAttribute("data-pagination-next",""),r.disabled=this.#o===e,r.addEventListener("click",()=>this.goToPage(this.#o+1)),t.appendChild(r)}#X(t){let e=this.#o,s=[];if(t<=7)for(let n=1;n<=t;n++)s.push(n);else{s.push(1),e>3&&s.push("...");let n=Math.max(2,e-1),r=Math.min(t-1,e+1);for(let a=n;a<=r;a++)s.push(a);e<t-2&&s.push("..."),s.push(t)}return s}#K(){this.#s.forEach(e=>{e.setAttribute("data-state-hidden","")});let t;if(this.#c>0){let e=(this.#o-1)*this.#c,s=e+this.#c;t=this.#r.slice(e,s)}else t=this.#r;t.forEach(e=>{e.removeAttribute("data-state-hidden"),this.#t.appendChild(e);let s=e.nextElementSibling?.hasAttribute?.("data-expand-content")?e.nextElementSibling:this.#J(e);s&&this.#t.appendChild(s)}),this.#r.forEach(e=>{if(e.hasAttribute("data-state-hidden")){this.#t.appendChild(e);let s=this.#J(e);s&&this.#t.appendChild(s)}}),this.#s.forEach(e=>{if(!this.#r.includes(e)){this.#t.appendChild(e);let s=this.#J(e);s&&this.#t.appendChild(s)}}),this.#j()}#J(t){if(!t.hasAttribute("data-expandable"))return null;let e=t.nextElementSibling;return e?.hasAttribute("data-expand-content")?e:null}goToPage(t){let e=Math.ceil(this.#r.length/this.#c),s=Math.max(1,Math.min(t,e));s!==this.#o&&(this.#o=s,this.#K(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#o},bubbles:!0})))}setFilter(t){this.#f&&(this.#f.value=t),this.#F(t)}refresh(){if(this.#s=[...this.#t.querySelectorAll(":scope > tr")],this.#u?this.#F(this.#u):this.#r=[...this.#s],this.#n>=0&&this.#a){let e=this.#i.find(s=>s.columnIndex===this.#n);e&&this.#x(this.#n,this.#a,e.sortType)}let t=Math.max(1,Math.ceil(this.#r.length/this.#c));this.#o>t&&(this.#o=t),this.#K()}get currentPage(){return this.#o}get totalPages(){return this.#c<=0?1:Math.ceil(this.#r.length/this.#c)}get filteredCount(){return this.#r.length}get totalCount(){return this.#s.length}getSelectedRows(){return this.#t?[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};b("data-table",Ke);var ct=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),xt={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}};function vn(i){let t=ct?xt.mac:xt.other;return i.split("+").map(e=>{let s=e.trim().toLowerCase();return t[s]??s.toUpperCase()}).join(ct?"":"+")}function yn(i){let t=i.toLowerCase().split("+").map(s=>s.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function wn(i,t){if(i.key.toLowerCase()!==t.key)return!1;let e,s;return ct?(e=t.meta,s=t.ctrl):(e=!1,s=t.meta||t.ctrl),!(e!==i.metaKey||s!==i.ctrlKey||t.shift!==i.shiftKey||t.alt!==i.altKey)}var io=new Set(["INPUT","TEXTAREA","SELECT"]),lt=[],En=!1;function so(i){let t=io.has(i.target.tagName)||i.target.isContentEditable;for(let e of lt)if(!(t&&!e.global)&&wn(i,e.descriptor)){i.preventDefault(),e.callback(i);return}}function no(){En||(document.addEventListener("keydown",so),En=!0)}function Kt(i,t,e={}){no();let s=yn(i),n={combo:i,descriptor:s,callback:t,global:e.global===!0};return lt.find(a=>a.combo===i)&&console.warn(`[hotkey-bind] Shortcut "${i}" already bound. Last-connected-wins.`),lt.unshift(n),function(){let o=lt.indexOf(n);o!==-1&<.splice(o,1)}}function An(){return lt.map(i=>i.combo)}var Xe=class i extends g{static#e=150;static#t=8;#i=null;#s=null;#r=null;#n=null;#a=[];#o=-1;#c=!1;#f=null;#h=null;#p=null;setup(){this.#u(),this.#l()}teardown(){this.#c&&(document.body.style.overflow="",this.removeAttribute("open"),this.#c=!1),this.#p?.(),this.#B()}get value(){return this.#r?.value??""}set value(t){if(!this.#r)return;let e=t==null?"":String(t);this.#r.value!==e&&(this.#r.value=e,this.#r.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new CustomEvent("site-search:change",{detail:{value:e,source:"api"},bubbles:!0})))}get results(){return[...this.#a]}#u(){this.#i=this.querySelector(":scope > [data-trigger]"),this.#i||(this.#i=this.querySelector(":scope > button")),this.#i||(this.#i=document.createElement("button"),this.#i.setAttribute("data-trigger",""),this.#i.innerHTML=`
|
|
72
72
|
<icon-wc name="search" label="Search"></icon-wc>
|
|
73
73
|
`,this.prepend(this.#i)),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("div"),this.#s.className="dialog",this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Site search"),this.#s.id=`search-dialog-${crypto.randomUUID().slice(0,8)}`,this.#i.setAttribute("aria-controls",this.#s.id),this.#s.innerHTML=`
|
|
74
74
|
<div class="backdrop"></div>
|
|
@@ -101,7 +101,7 @@ svg {
|
|
|
101
101
|
</span>
|
|
102
102
|
</div>
|
|
103
103
|
</div>
|
|
104
|
-
`,this.appendChild(this.#s),this.#r=this.#s.querySelector(".input"),this.#n=this.#s.querySelector(".results")}#l(){this.#i.addEventListener("click",this.#m),
|
|
104
|
+
`,this.appendChild(this.#s),this.#r=this.#s.querySelector(".input"),this.#n=this.#s.querySelector(".results")}#l(){this.#i.addEventListener("click",this.#m),An().includes("meta+k")||(this.#p=Kt("meta+k",()=>{this.#c?this.close():this.open()},{global:!0})),this.listen(document,"keydown",this.#d),this.#s.querySelector(".backdrop")?.addEventListener("click",()=>this.close()),this.#r.addEventListener("input",this.#y),this.#r.addEventListener("keydown",this.#w),this.#n.addEventListener("click",this.#v)}#m=t=>{t.stopPropagation(),this.open()};#d=t=>{t.key==="Escape"&&this.#c&&(t.preventDefault(),this.close())};#y=()=>{this.#B(),this.setState("input-debounce-pending",!0),this.#h=setTimeout(()=>{this.setState("input-debounce-pending",!1),this.#g(this.#r.value)},i.#e)};#w=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#M(this.#o+1);break;case"ArrowUp":t.preventDefault(),this.#M(this.#o-1);break;case"Enter":t.preventDefault(),this.#o>=0&&this.#a[this.#o]&&this.#S(this.#a[this.#o]);break}};#v=t=>{let e=t.target.closest("[data-result-index]");if(e){let s=parseInt(e.dataset.resultIndex,10);this.#a[s]&&this.#S(this.#a[s])}};async#b(){if(!this.#f)try{this.#f=await import("/pagefind/pagefind.js"),await this.#f.options({excerptLength:20})}catch{console.warn("Pagefind not available. Run `npm run search:index` to build the search index."),this.#f=null}}async#g(t){if(!t.trim()){this.#C([]);return}if(await this.#b(),!this.#f){this.#_();return}try{this.#n.innerHTML='<div class="loading">Searching...</div>';let e=await this.#f.search(t),s=await Promise.all(e.results.slice(0,i.#t).map(n=>n.data()));this.#a=s,this.#C(s)}catch(e){console.error("Search error:",e),this.#n.innerHTML='<div class="error">Search error. Please try again.</div>'}}#C(t){if(this.#o=-1,t.length===0){this.#r.value.trim()?this.#n.innerHTML='<div class="empty">No results found</div>':this.#n.innerHTML="";return}this.#n.innerHTML=t.map((e,s)=>`
|
|
105
105
|
<a
|
|
106
106
|
id="search-result-${s}"
|
|
107
107
|
href="${e.url}"
|
|
@@ -118,7 +118,7 @@ svg {
|
|
|
118
118
|
Search index not found.<br>
|
|
119
119
|
Run <code>npm run search:index</code> after building.
|
|
120
120
|
</div>
|
|
121
|
-
`}#M(t){if(this.#a.length===0)return;t<0&&(t=this.#a.length-1),t>=this.#a.length&&(t=0);let e=this.#n.querySelector("[data-active]");e&&e.removeAttribute("data-active"),this.#r?.removeAttribute("aria-activedescendant"),this.#o=t;let s=this.#n.querySelector(`[data-result-index="${t}"]`);s&&(s.setAttribute("data-active",""),this.#r?.setAttribute("aria-activedescendant",s.id),s.scrollIntoView({block:"nearest"}))}#S(t){t.url&&(this.close(),window.location.href=t.url)}#B(){this.#h&&(clearTimeout(this.#h),this.#h=null,this.setState("input-debounce-pending",!1))}open(){this.#c||(this.#c=!0,this.setAttribute("open",""),this.#i?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",requestAnimationFrame(()=>{this.#r?.focus(),this.#r?.select()}),this.#b(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0})))}close(){this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#B(),this.#r.value="",this.#r?.removeAttribute("aria-activedescendant"),this.#a=[],this.#o=-1,this.#n.innerHTML="",this.#i?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0})))}get isOpen(){return this.#c}};b("site-search",
|
|
121
|
+
`}#M(t){if(this.#a.length===0)return;t<0&&(t=this.#a.length-1),t>=this.#a.length&&(t=0);let e=this.#n.querySelector("[data-active]");e&&e.removeAttribute("data-active"),this.#r?.removeAttribute("aria-activedescendant"),this.#o=t;let s=this.#n.querySelector(`[data-result-index="${t}"]`);s&&(s.setAttribute("data-active",""),this.#r?.setAttribute("aria-activedescendant",s.id),s.scrollIntoView({block:"nearest"}))}#S(t){t.url&&(this.close(),window.location.href=t.url)}#B(){this.#h&&(clearTimeout(this.#h),this.#h=null,this.setState("input-debounce-pending",!1))}open(){this.#c||(this.#c=!0,this.setAttribute("open",""),this.#i?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",requestAnimationFrame(()=>{this.#r?.focus(),this.#r?.select()}),this.#b(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0})))}close(){this.#c&&(this.#c=!1,this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#B(),this.#r.value="",this.#r?.removeAttribute("aria-activedescendant"),this.#a=[],this.#o=-1,this.#n.innerHTML="",this.#i?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0})))}get isOpen(){return this.#c}};b("site-search",Xe);function Je(i){if(!i||typeof i!="string")return"";let t=document.createElement("template");return t.innerHTML=i,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(n=>n.remove()),t.content.querySelectorAll("*").forEach(n=>{for(let r of[...n.attributes]){if(r.name.startsWith("on")){n.removeAttribute(r.name);continue}if(["href","src","action","formaction","xlink:href"].includes(r.name)){let a=r.value.trim().toLowerCase();(a.startsWith("javascript:")||a.startsWith("data:text/html"))&&n.removeAttribute(r.name);continue}(r.name==="srcdoc"||r.name==="data"&&n.tagName==="OBJECT")&&n.removeAttribute(r.name)}}),t.innerHTML}var ro=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*|\[\d+\])*$/;function Sn(i){return!i||typeof i!="string"?!1:ro.test(i.trim())}function Ct(i,t){if(!Sn(t)){console.warn(`[card-list] Unsafe property path rejected: "${t}"`);return}let s=t.replace(/\[(\d+)\]/g,".$1").split("."),n=i;for(let r of s){if(n==null)return;n=n[r]}return n}function ao(i){return i?i.split(",").map(t=>{let[e,s]=t.split(":").map(n=>n.trim());return{attr:e,path:s}}).filter(({attr:t,path:e})=>t&&e):[]}var Ze=class extends g{#e=null;#t=[];#i="id";#s=new Map;static get observedAttributes(){return["src","data-items","data-key"]}setup(){if(this.#e=this.querySelector("template"),!this.#e)return console.warn("[card-list] No template found"),!1;this.#i=this.getAttribute("data-key")||"id";let t=this.getAttribute("data-items");if(t){try{this.#t=JSON.parse(t),this.#n()}catch(s){console.error("[card-list] Invalid JSON in data-items:",s)}return}let e=this.getAttribute("src");return e&&this.#r(e),!0}attributeChangedCallback(t,e,s){if(e!==s)if(t==="data-items"&&s)try{this.#t=JSON.parse(s),this.#n()}catch(n){console.error("[card-list] Invalid JSON in data-items:",n)}else t==="src"&&s?this.#r(s):t==="data-key"&&(this.#i=s||"id",this.#n())}async#r(t){try{this.setAttribute("data-loading","");let e=await fetch(t);if(!e.ok)throw new Error(`HTTP ${e.status}`);let s=await e.json();this.#t=Array.isArray(s)?s:s.items||s.data||[],this.#n()}catch(e){console.error("[card-list] Fetch error:",e),this.setAttribute("data-error",e.message)}finally{this.removeAttribute("data-loading")}}#n(t="internal"){if(!this.#e)return;if([...this.#e.content.children].length!==1){this.querySelectorAll(":scope > :not(template)").forEach(r=>r.remove()),this.#s.clear();let n=document.createDocumentFragment();for(let r of this.#t){let a=this.#e.content.cloneNode(!0);this.#a(a,r),n.appendChild(a)}this.appendChild(n)}else{let s=Gt({newItems:this.#t,nodes:this.#s,keyOf:r=>r?.[this.#i],renderItem:r=>{if(!this.#e)throw new Error("card-list: missing template");let o=this.#e.content.cloneNode(!0).firstElementChild;return this.#a(o,r),o},containerFor:()=>this}),n=new Set(s.added);for(let r of this.#t){let a=r?.[this.#i];if(n.has(a))continue;let o=this.#s.get(a);o&&this.#a(o,r)}}this.dispatchEvent(new CustomEvent("card-list:rendered",{detail:{count:this.#t.length},bubbles:!0})),this.dispatchEvent(new CustomEvent("card-list:items-changed",{detail:{items:this.#t,source:t},bubbles:!0}))}#a(t,e){t.querySelectorAll("[data-field]").forEach(s=>{let n=s.getAttribute("data-field"),r=Ct(e,n);s.textContent=r??""}),t.querySelectorAll("[data-field-attr]").forEach(s=>{let n=ao(s.getAttribute("data-field-attr"));for(let{attr:r,path:a}of n){if(!Sn(a))continue;let o=Ct(e,a);o!=null&&s.setAttribute(r,o)}}),t.querySelectorAll("[data-field-html]").forEach(s=>{let n=s.getAttribute("data-field-html"),r=Ct(e,n);s.innerHTML=Je(r)}),t.querySelectorAll("[data-field-if]").forEach(s=>{let n=s.getAttribute("data-field-if");Ct(e,n)||s.remove()}),t.querySelectorAll("[data-field-unless]").forEach(s=>{let n=s.getAttribute("data-field-unless");Ct(e,n)&&s.remove()})}get items(){return this.#t}set items(t){this.#t=Array.isArray(t)?t:[],this.#n("api")}setItems(t){this.items=t}getItems(){return[...this.#t]}};b("card-list",Ze);var xn=`
|
|
122
122
|
:host {
|
|
123
123
|
--_padding: var(--score-card-padding, var(--size-l, 1.5rem));
|
|
124
124
|
--_radius: var(--score-card-radius, var(--radius-m, 0.5rem));
|
|
@@ -303,8 +303,8 @@ svg {
|
|
|
303
303
|
background: color-mix(in oklch, var(--_muted) 18%, transparent);
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
`;var
|
|
307
|
-
<style>${
|
|
306
|
+
`;var oo=new Set(["up","down","flat"]),Cn=["change","sparkline","description","icon"],co=`
|
|
307
|
+
<style>${xn}</style>
|
|
308
308
|
<div class="card" part="card">
|
|
309
309
|
<span class="title" part="title"><slot name="title"></slot></span>
|
|
310
310
|
<span class="value" part="value"><slot name="value"><slot></slot></slot></span>
|
|
@@ -313,7 +313,7 @@ svg {
|
|
|
313
313
|
<span class="description" part="description"><slot name="description" data-slot="description"></slot></span>
|
|
314
314
|
<span class="icon" part="icon"><slot name="icon" data-slot="icon"></slot></span>
|
|
315
315
|
</div>
|
|
316
|
-
`,Je=class extends g{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of yn){let e=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,e)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=to;for(let e of yn){let s=t.querySelector(`slot[name="${e}"]`);s?.addEventListener("slotchange",()=>this.#e(e,s)),this.#e(e,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,e){let s=!!e&&e.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#t(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let e of Qa)this.setState(`trend-${e}`,e===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};b("score-card",Je);var eo=0;function Jt(i,t){return i.matches("content-swap")?t:`data-${t}`}function Xt(i){i.style.viewTransitionName||(i.style.viewTransitionName=`content-swap-${++eo}`);let t=i.querySelector(':scope > [data-face="front"]'),e=i.querySelector(':scope > [data-face="back"]');if(!t||!e)return;let s=[];function n(o,c,h,l){o.addEventListener(c,h,l),s.push(()=>o.removeEventListener(c,h,l))}let r=[...i.querySelectorAll("[data-swap]")].filter(o=>o!==i&&o.closest("content-swap, [data-swap]")===i);return r.length===0?(i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.getAttribute("aria-label")||i.setAttribute("aria-label","Toggle content"),n(i,"click",()=>tt(i,"pointer")),n(i,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),tt(i,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),tt(i,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),tt(i,"keyboard"))})}),i.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(n(i,"swipe-left",()=>tt(i,"pointer")),n(i,"swipe-right",()=>tt(i,"pointer"))),An(i,t,e),()=>{for(let o of s)o();s.length=0}}function An(i,t,e){let s=i.hasAttribute(Jt(i,"swapped"));t.inert=s,e.inert=!s}function io(i){return{front:i.querySelector(':scope > [data-face="front"]'),back:i.querySelector(':scope > [data-face="back"]')}}function kt(i,t,e="api"){let{front:s,back:n}=io(i);if(!s||!n)return;let r=Jt(i,"swapped");if(t&&i.hasAttribute(r)||!t&&!i.hasAttribute(r))return;let a=()=>{t?i.setAttribute(r,""):i.removeAttribute(r),An(i,s,n),so(i,e);let h=t?n:s,l=h.querySelector("[autofocus]");l?l.focus():e==="keyboard"&&no(h)},o=h=>{let l=i;typeof l.setState=="function"&&l.setState("transition-running",h)};o(!0);let c=P(a);c&&c.finished&&typeof c.finished.finally=="function"?c.finished.finally(()=>o(!1)):o(!1)}function tt(i,t="api"){kt(i,!i.hasAttribute(Jt(i,"swapped")),t)}function so(i,t="internal"){i.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:i.hasAttribute(Jt(i,"swapped")),source:t},bubbles:!0}))}function no(i){let t=i.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var Ze=class extends g{#e=null;setup(){this.#e=Xt(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){kt(this,!0)}unflip(){kt(this,!1)}toggle(){tt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){kt(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){kt(this,!!t)}};b("content-swap",Ze);function wn(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(i=>{i.querySelector(":scope > [data-face]")&&(Xt(i),i.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",wn):wn();var En=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(Xt(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(Xt(n),n.setAttribute("data-swap-init",""))})}});document.body?En.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{En.observe(document.body,{childList:!0,subtree:!0})});var Qe=class extends g{#e=null;#t=!1;#i=null;setup(){this.hasAttribute("role")||this.setAttribute("role","navigation"),this.#n("pathname"),this.listen(window,"popstate",this.#r)}get items(){return this.#e?this.#e.map(t=>({...t})):Array.from(this.#s()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let e=t.map(s=>({...s}));this.#e&&this.#h(this.#e,e)||(this.#e=e,this.#c(e),this.#n(this.#t?"property":"pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#t)return this.#i;for(let t of this.#s())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let e=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#t&&(this.#t=!1,this.#i=null,this.#n("pathname"))}refresh(){this.#t||this.#n("pathname")}#s(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#r=()=>{this.#t||this.#n("popstate")};#n(t){let e=this.current,s=this.#a();this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,e=Array.from(this.#s());if(e.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of e){let h=c.getAttribute("href");if(!h||/^[a-z]+:/i.test(h)||h.startsWith("//"))continue;let l=h.split("?")[0].split("#")[0];if(l===t&&n==null){n=c;continue}!s&&l!=="/"&&(t===l||t.startsWith(l.replace(/\/$/,"")+"/"))&&l.length>a&&(r=c,a=l.length)}let o=n||r;return o?o.getAttribute("data-route")||o.getAttribute("href"):null}#o(t){let e=this.#s();for(let s of e){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#c(t){this.#s().forEach(n=>n.remove());let s=document.createDocumentFragment();for(let n of t)s.appendChild(this.#f(n));this.appendChild(s)}#f(t){let e=document.createElement("a");if(e.href=t.href||"#",t.route&&e.setAttribute("data-route",t.route),t.external&&(e.target="_blank",e.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),e.appendChild(s)}if(e.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",e.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),e.appendChild(s)}return e}#h(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(e[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==e[s][r[a]])return!1}return!0}};b("nav-bar",Qe);var ao=0,ti=class extends g{#e;#t=[];#i;#s;#r;#n;#a;#o=null;#c=0;#f=!1;#h=!1;#p=null;get currentIndex(){return this.#c}get slideCount(){return this.#t.length}get playing(){return this.#o!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#f=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#h=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#h&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0"),this.#e.setAttribute("aria-label","Slides"),t.forEach((r,a)=>{r.setAttribute("role","group"),r.setAttribute("aria-roledescription","slide"),r.setAttribute("aria-label",`${a+1} of ${t.length}`),this.#e.appendChild(r)}),this.#t=[...this.#e.children],this.#i=document.createElement("button"),this.#i.className="carousel-prev",this.#i.setAttribute("aria-label","Previous slide"),this.#i.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#r=document.createElement("div"),this.#r.className="carousel-indicators",this.#r.setAttribute("aria-label","Slide indicators"),this.#t.forEach((r,a)=>{let o=document.createElement("button");o.className="carousel-dot",o.setAttribute("aria-label",`Go to slide ${a+1}`),o.setAttribute("aria-current",a===0?"true":"false"),this.listen(o,"click",()=>this.goTo(a)),this.#r.appendChild(o)})),this.#n=document.createElement("div"),this.#n.className="carousel-live",this.#n.setAttribute("aria-live","polite"),this.#n.setAttribute("aria-atomic","true"),this.appendChild(this.#i),this.appendChild(this.#e),this.appendChild(this.#s),this.#r&&this.appendChild(this.#r),this.appendChild(this.#n),this.listen(this.#i,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#y),this.#h){let r=++ao,a=this.getAttribute("transition")||"fade",o=a==="slide"?"vt-carousel-slide":a==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${r}`,this.#e.style.viewTransitionClass=o}this.#h&&Promise.resolve().then(()=>(Nn(),Mn)).then(({addSwipeListener:r})=>{this.#p=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#h||(this.#a=new IntersectionObserver(this.#d,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)));let n=this.#v()??(Number(this.getAttribute("start"))||0);if(this.#h){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#l(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);return this.#m(),this.hasAttribute("autoplay")&&!this.#f&&this.#w(),!0}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#p&&(this.#p(),this.#p=null),this.#t=[],this.#h=!1}get slides(){return this.#t.map((t,e)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${e+1} of ${this.#t.length}`}))}set slides(t){let e=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of e){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:e,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#t.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#t.length-1)}goTo(t,e=!0){if(!(t<0||t>=this.#t.length)){if(this.#h)if(e&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,P(()=>{this.#u(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#u(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=e&&!this.#f?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#l(t)}}#u(t){this.#t.forEach((e,s)=>{e.hidden=s!==t})}play(){if(this.#o||this.#f)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#o=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#o&&(clearInterval(this.#o),this.#o=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#g()}#l(t){this.#c=t,this.#m(),this.#b(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:t,slide:this.#t[t]},bubbles:!0}))}#m(){let t=this.hasAttribute("loop"),e=this.#c===0,s=this.#c===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&e),this.#s&&(this.#s.disabled=!t&&s),this.#r){let n=this.#r.children;for(let r=0;r<n.length;r++){let a=r===this.#c;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#d=t=>{for(let e of t)if(e.isIntersecting){let s=this.#t.indexOf(e.target);s!==-1&&s!==this.#c&&this.#l(s)}};#y=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#w(){this.play(),this.listen(this,"mouseenter",()=>this.pause()),this.listen(this,"mouseleave",()=>{this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"focusin",()=>this.pause()),this.listen(this,"focusout",t=>{!this.contains(t.relatedTarget)&&this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"touchstart",()=>this.pause(),{passive:!0})}#v(){let t=this.getAttribute("persist");if(!t)return null;try{let e=localStorage.getItem(`carousel:${t}`);return e!==null?Number(e):null}catch{return null}}#b(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#g(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",ti);function Dn(i,t,e){"role"in ElementInternals.prototype?t.role=e:i.setAttribute("role",e)}var oo=0,ei=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#o=!1;#c="";#f="";#h="";#p;#u;#l=[];constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}get#m(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#t=t;let e=this.querySelector("ul, ol");if(!e)return!1;if(this.#i=e,this.#m){let o=this.querySelector(":scope > .tags-input-area");if(!o){o=document.createElement("div"),o.className="tags-input-area";let h=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(o,h)}this.#p=o,this.#t.parentNode!==this.#p&&this.#p.appendChild(this.#t);let c=this.querySelector(":scope > [data-combobox-live]");c||(c=document.createElement("div"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),c.setAttribute("data-combobox-live",""),c.className="visually-hidden",this.appendChild(c)),this.#u=c}let s=this.getAttribute("placeholder");s&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",s);let n=`cb${++oo}`;this.#i.id||(this.#i.id=`combobox-listbox-${n}`),Dn(this.#t,this.#e,"combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#i.id),this.#t.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#m&&this.#i.setAttribute("aria-multiselectable","true");let r=this.#m?this.#p:this.#t;r.id||(r.id=`combobox-anchor-${n}`);let a=this.querySelector(":scope > pop-over[data-combobox-host]");if(a?this.#s=a:(this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-combobox-host",""),this.#s.id=`combobox-pop-${n}`,this.#s.dataset.mode="manual",this.#s.dataset.position="bottom-start",this.#s.dataset.anchor=r.id,this.#s.appendChild(this.#i),this.appendChild(this.#s)),this.#s.dataset.anchor=r.id,this.#i.parentElement!==this.#s&&this.#s.appendChild(this.#i),this.#d(),!this.#m){let o=this.getAttribute("value");o&&this.#T(o,!1),this.#h=this.#c}return this.listen(this.#t,"input",this.#g),this.listen(this.#t,"keydown",this.#C),this.listen(this.#t,"focus",this.#_),this.listen(this.#t,"click",this.#M),this.listen(this.#i,"click",this.#S),this.listen(this.#i,"pointerdown",this.#B),this.listen(document,"click",this.#q),this.listen(this.#s,"pop-over:hide",this.#x),this.#A(),this.#L(),this.#E(),!0}teardown(){}#d(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,e)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${e}`)}),this.#n=[...this.#r]}#y(t,e){if(this.#l.some(o=>o.value===t))return;let s=this.#v();if(s&&this.#l.length>=s)return;this.#l.push({value:t,label:e});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=e+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${e}`),r.innerHTML="×",r.addEventListener("click",o=>{o.stopPropagation(),this.#w(t)}),n.appendChild(r),this.#p.insertBefore(n,this.#t);let a=this.#r.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#b(`${e} added`),this.#t.value="",this.#k(""),this.#A(),this.#L(),this.#H(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#E())}#w(t){let e=this.#l.findIndex(o=>o.value===t);if(e===-1)return;let s=this.#l.splice(e,1)[0],n=this.#p.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#r.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#b(`${s.label} removed`),this.#v()&&this.#t.disabled&&(this.#t.disabled=!1),this.#k(this.#t.value.trim()),this.#A(),this.#L(),this.#H(),this.#t.focus()}#v(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#b(t){this.#u&&(this.#u.textContent="",requestAnimationFrame(()=>{this.#u.textContent=t}))}#g=()=>{let t=this.#t.value.trim();if(!this.#m&&this.#c){let e=this.#i.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),this.#c="",this.#f="",this.removeAttribute("value"),this.#A(),this.#L()}this.#k(t),this.#N()};#C=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a-1);break;case"Home":this.#o&&(t.preventDefault(),this.#I(0));break;case"End":this.#o&&(t.preventDefault(),this.#I(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#o&&this.#a>=0&&this.#n[this.#a]){let e=this.#n[this.#a];this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e)}else if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){let e=this.#t.value.trim();this.#y(e,e)}break;case"Backspace":if(this.#m&&!this.#t.value&&this.#l.length>0){let e=this.#l[this.#l.length-1];this.#w(e.value)}break;case",":if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let e=this.#t.value.trim();this.#y(e,e)}break;case"Escape":this.#o&&(t.preventDefault(),t.stopPropagation(),this.#E(),this.#t.focus());break;case"Tab":this.#o&&this.#E();break}};#_=()=>{this.#m?(this.#k(this.#t.value.trim()),this.#N()):(this.#t.value||!this.#c)&&(this.#k(this.#t.value.trim()),this.#N())};#M=()=>{this.#o||(this.#k(this.#t.value.trim()),this.#N())};#S=t=>{let e=t.target.closest("li[data-value]");e&&this.#n.includes(e)&&(this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e))};#B=t=>{t.preventDefault()};#q=t=>{this.#o&&!this.contains(t.target)&&this.#E()};#k(t){let e=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#m?new Set(this.#l.map(r=>r.value)):null;this.#n=[],this.#r.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?e==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#O(),this.setState("no-matches",this.#n.length===0)}#I(t){if(this.#n.length===0)return;t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#a>=0&&this.#n[this.#a]&&this.#n[this.#a].removeAttribute("data-active"),this.#a=t;let e=this.#n[t];e.setAttribute("data-active",""),e.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",e.id)}#O(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t,e="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();this.#c!==s&&(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#c=s,this.#f=n,this.#t.value=n,this.setAttribute("value",s),this.#A(),this.#L(),this.#E(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:e}})))}#T(t,e=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(e?this.#R(n,s):(n.setAttribute("aria-selected","true"),this.#c=t,this.#f=n.textContent.trim(),this.#t.value=this.#f,this.setAttribute("value",t)))}#N(){this.#o||(this.#o=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#E(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#x=()=>{this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#A(){if(this.#m)if(this.#l.length>0){let t=new FormData,e=this.getAttribute("name")||"";for(let s of this.#l)t.append(e,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#c?this.#e.setFormValue(this.#c,this.#f):this.#e.setFormValue(null)}#L(){this.hasAttribute("required")?this.#m?this.#l.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#c?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({})}#H(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#l.map(t=>t.value),labels:this.#l.map(t=>t.label)}}))}formResetCallback(){this.#m?(this.#p.querySelectorAll(".tag").forEach(t=>t.remove()),this.#l=[],this.#t.value="",this.#t.disabled=!1):(this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value")),this.#r.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#n=[...this.#r],this.#a=-1,this.#O(),this.#E(),!this.#m&&this.#h&&this.#T(this.#h,!1),this.#A(),this.#L()}formStateRestoreCallback(t){t&&(this.#m||(this.#T(t,!1),this.#A(),this.#L()))}get value(){return this.#c}set value(t){t?this.#T(t):(this.#r.forEach(e=>e.setAttribute("aria-selected","false")),this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value"),this.#A(),this.#L())}get label(){return this.#f}get values(){return this.#l.map(t=>t.value)}get labels(){return this.#l.map(t=>t.label)}static get observedAttributes(){return["value"]}attributeChangedCallback(t,e,s){t==="value"&&this.#t&&s!==this.#c&&s&&(this.#T(s,!1),this.#A(),this.#L())}};b("combo-box",ei);function co(){try{let i=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return i.hourCycle==="h12"||i.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function $(i){return String(i).padStart(2,"0")}function ht(i){if(!i)return null;let t=i.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function Tt(i,t,e,s){return s?`${$(i)}:${$(t)}:${$(e)}`:`${$(i)}:${$(t)}`}function lo(i,t,e,s,n){if(n==="12h"){let r=i>=12?"PM":"AM",a=i%12||12;return s?`${a}:${$(t)}:${$(e)} ${r}`:`${a}:${$(t)} ${r}`}return Tt(i,t,e,s)}function _n(i){let t=i.trim();if(!t)return null;let e=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;e&&(s=e[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,e.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let h=a;if(s){if(h<1||h>12)return null;s==="AM"?h=h===12?0:h:h=h===12?12:h+12}else if(h<0||h>23)return null;return{h,m:o,s:c}}function ho(i,t,e){return i>e?t:i<t?e:i}var ii=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#o;#c;#f;#h=0;#p=0;#u=0;#l="AM";#m=null;#d=null;#y=60;#w;#v=0;#b=!1;#g;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#y=Number(this.#t.getAttribute("step"))||60,this.#f=this.#y<60,this.#m=ht(this.#t.getAttribute("min")),this.#d=ht(this.#t.getAttribute("max")),this.#c=this.getAttribute("data-format")||co();let t=ht(this.#t.value);return t&&(this.#h=t.h,this.#p=t.m,this.#u=t.s),this.#w=this.#t.value,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#C(),this.#_(),this.#H(),this.#F(),this.#P(),this.#V(),this.listen(document,"click",this.#k),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}#C(){this.#s=document.createElement("div"),this.#s.className="time-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="time-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","listbox"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a time\u2026"),this.#s.appendChild(this.#i),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label","Toggle time spinner"),this.#r.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#r.appendChild(t),this.#s.appendChild(this.#r),this.appendChild(this.#s),this.listen(this.#r,"click",e=>{e.stopPropagation(),this.#b?this.#q():this.#B(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"keydown",this.#I),this.listen(this.#i,"blur",this.#O)}#_(){this.#g=`tp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="time-panel",this.#n.id=this.#g,this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Time spinners"),this.#i.setAttribute("aria-controls",this.#g);let t=this.#c==="12h"?1:0,e=this.#c==="12h"?12:23,s=this.#M("Hours",t,e,1);this.#n.appendChild(s.el),this.#a.push(s),this.#n.appendChild(this.#S());let n=this.#y>=60?Math.max(1,Math.round(this.#y/60)):1,r=this.#M("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#f){this.#n.appendChild(this.#S());let a=this.#M("Seconds",0,59,this.#y);this.#n.appendChild(a.el),this.#a.push(a)}this.#c==="12h"&&(this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="period-toggle",this.#o.setAttribute("aria-label","Toggle AM/PM"),this.#o.textContent=this.#l,this.#n.appendChild(this.#o),this.listen(this.#o,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#o.textContent=this.#l,this.#h=this.#$(this.#D(),this.#l),this.#L()}),this.listen(this.#o,"keydown",a=>{let o=a;o.key==="ArrowLeft"&&(o.preventDefault(),this.#z(this.#a.length-1)),o.key==="Escape"&&(o.preventDefault(),this.#q(),this.#i.focus())})),this.appendChild(this.#n)}#M(t,e,s,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(e)),r.setAttribute("aria-valuemax",String(s)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="▲";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="▼",r.appendChild(a),r.appendChild(o),r.appendChild(c);let h={el:r,valueEl:o,label:t,min:e,max:s,step:n};return this.listen(a,"click",()=>{this.#x(h,n)}),this.listen(c,"click",()=>{this.#x(h,-n)}),this.listen(r,"keydown",l=>{this.#R(l,h)}),this.listen(r,"focus",()=>{this.#v=this.#a.indexOf(h)}),h}#S(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#B(){this.#b||(this.#b=!0,this.#n.setAttribute("data-open",""),this.#i.setAttribute("aria-expanded","true"))}#q(){this.#b&&(this.#b=!1,this.#n.removeAttribute("data-open"),this.#i.setAttribute("aria-expanded","false"))}#k=t=>{this.#b&&!this.contains(t.target)&&this.#q()};#I=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let e=_n(this.#i.value);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()),this.#F(),this.#b&&this.#q();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#B(),requestAnimationFrame(()=>this.#z(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#q(),this.#F();return;case"Tab":this.#b&&this.#q();return}};#O=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let s=_n(e);s&&(this.#h=s.h,this.#p=s.m,this.#u=s.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u}})))}this.#F(),this.#b&&this.#q(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#R=(t,e)=>{let s=this.#a.indexOf(e);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(e,e.step);break;case"ArrowDown":t.preventDefault(),this.#x(e,-e.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#o&&this.#o.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#x(e,e.step*(e.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(e,-e.step*(e.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#A(e,e.min);break;case"End":t.preventDefault(),this.#A(e,e.max);break;case"Escape":t.preventDefault(),this.#q(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#E(t.key,e))}};#T="";#N=0;#E(t,e){clearTimeout(this.#N),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>e.max){let n=Math.min(Math.max(s,e.min),e.max);this.#A(e,n),this.#T=""}else this.#N=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,e.min),e.max);this.#A(e,r),this.#T=""},800)}#x(t,e){let s;t.label==="Hours"?s=this.#c==="12h"?this.#D():this.#h:t.label==="Minutes"?s=this.#p:s=this.#u;let n=ho(s+e,t.min,t.max);this.#A(t,n)}#A(t,e){t.label==="Hours"?this.#c==="12h"?this.#h=this.#$(e,this.#l):this.#h=e:t.label==="Minutes"?this.#p=e:this.#u=e,this.#L()}#L(t="internal"){this.#H(),this.#F(),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u,source:t}}))}#H(){let t=this.#c==="12h"?this.#D():this.#h;this.#a[0].valueEl.textContent=$(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#c==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=$(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#f&&this.#a[2]&&(this.#a[2].valueEl.textContent=$(this.#u),this.#a[2].el.setAttribute("aria-valuenow",String(this.#u))),this.#o&&(this.#o.textContent=this.#l)}#F(){this.#h!==void 0&&(this.#i.value=lo(this.#h,this.#p,this.#u,this.#f,this.#c))}#P(){let t=Tt(this.#h,this.#p,this.#u,this.#f);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#V(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#i||this);return}this.#e.setValidity({})}#$(t,e){return e==="AM"?t===12?0:t:t===12?12:t+12}#D(){if(this.#c==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=ht(this.#w);t?(this.#h=t.h,this.#p=t.m,this.#u=t.s):(this.#h=0,this.#p=0,this.#u=0),this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()}formStateRestoreCallback(t){if(!t)return;let e=ht(t);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L())}get value(){return Tt(this.#h,this.#p,this.#u,this.#f)}set value(t){let e=ht(t);e&&(e.h===this.#h&&e.m===this.#p&&e.s===this.#u||(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L("api")))}};b("time-picker",ii);var Qt="popover"in HTMLElement.prototype;var uo=["Su","Mo","Tu","We","Th","Fr","Sa"],fo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ri=["january","february","march","april","may","june","july","august","september","october","november","december"];function _(i){let t=i.getFullYear(),e=String(i.getMonth()+1).padStart(2,"0"),s=String(i.getDate()).padStart(2,"0");return`${t}-${e}-${s}`}function q(i){if(!i)return null;let[t,e,s]=i.split("-").map(Number);return new Date(t,e-1,s)}function te(i,t){return new Date(i,t+1,0).getDate()}function po(){try{let i=new Intl.Locale(navigator.language);if(i.weekInfo)return i.weekInfo.firstDay%7}catch{}return 0}function mo(i){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(i)}catch{return _(i)}}function ee(i,t){return i&&t&&i.getFullYear()===t.getFullYear()&&i.getMonth()===t.getMonth()&&i.getDate()===t.getDate()}function bo(){let i=new Map;ri.forEach((t,e)=>{i.set(t,e),i.set(t.slice(0,3),e)});try{for(let t=0;t<12;t++){let e=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),s=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");i.set(e,t),i.set(s,t)}}catch{}return i}var si=bo();function ni(i){let t=i.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=q(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=q(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let e=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(e);if(s){let a=si.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=si.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=si.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var ai=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h=!1;#p=!1;#u=null;#l=null;#m=new Date().getFullYear();#d=new Date().getMonth();#y=null;#w=null;#v=new Map;#b=new Map;#g=null;#C=0;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#y=q(this.#t.getAttribute("min")),this.#w=q(this.#t.getAttribute("max")),this.#C=po();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#v.set(r,a||"")});let e=this.getAttribute("data-highlight-dates");e&&e.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||"")}),this.#u=q(this.#t.value),this.#g=this.#t.value;let s=new Date;return this.#w&&s>this.#w&&(s=this.#w),this.#y&&s<this.#y&&(s=this.#y),this.#m=this.#u?this.#u.getFullYear():s.getFullYear(),this.#d=this.#u?this.#u.getMonth():s.getMonth(),this.#l=this.#u||s,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#T(),this.#D(),this.#z(),this.#p=Qt,this.#p&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#P),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}teardown(){window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}#_(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="date-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a date\u2026"),this.#r.appendChild(this.#i),this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="date-trigger-icon",this.#s.setAttribute("aria-label","Toggle calendar"),this.#s.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#s.appendChild(t),this.#r.appendChild(this.#s),this.appendChild(this.#r),this.listen(this.#s,"click",e=>{e.stopPropagation(),this.#h?this.#E():this.#N(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#L),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#F)}#M(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="calendar",this.#n.id=this.#a,this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-modal","false"),this.#n.setAttribute("aria-label","Choose date"),this.#n.hidden=!0,this.#i.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let e=document.createElement("button");e.type="button",e.className="calendar-nav",e.setAttribute("aria-label","Previous month");let s=document.createElement("icon-wc");s.setAttribute("name","chevron-left"),s.setAttribute("size","sm"),s.setAttribute("aria-hidden","true"),e.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#f=document.createElement("select"),this.#f.className="calendar-year",this.#f.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#c),n.appendChild(this.#f);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(e),t.appendChild(n),t.appendChild(r),this.#n.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),h=document.createElement("tr");for(let l=0;l<7;l++){let d=(this.#C+l)%7,u=document.createElement("th");u.setAttribute("abbr",fo[d]),u.setAttribute("scope","col"),u.textContent=uo[d],h.appendChild(u)}c.appendChild(h),o.appendChild(c),this.#o=document.createElement("tbody"),o.appendChild(this.#o),this.#n.appendChild(o),this.appendChild(this.#n),this.#S(),this.listen(e,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#f,"change",()=>{this.#m=Number(this.#f.value);let l=te(this.#m,this.#d),d=Math.min(this.#l?.getDate()??1,l);this.#l=new Date(this.#m,this.#d,d),this.#S()}),this.listen(this.#o,"click",this.#V),this.listen(this.#n,"keydown",this.#$)}#S(){try{this.#c.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#m,this.#d,1))}catch{this.#c.textContent=ri[this.#d].charAt(0).toUpperCase()+ri[this.#d].slice(1)}this.#f.querySelector(`option[value="${this.#m}"]`)||this.#k(),this.#f.value=String(this.#m),this.#o.innerHTML="";let t=te(this.#m,this.#d),s=(new Date(this.#m,this.#d,1).getDay()-this.#C+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<s;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#m,this.#d,o),h=_(c),l=document.createElement("td"),d=document.createElement("button");d.type="button",d.setAttribute("data-date",h),d.textContent=String(o),ee(c,n)&&d.setAttribute("aria-current","date"),ee(c,this.#u)&&d.setAttribute("aria-selected","true");let u=this.#q(c,h);if(u.disabled&&(d.setAttribute("aria-disabled","true"),d.setAttribute("disabled",""),u.reason&&d.setAttribute("data-disabled-reason",u.reason)),this.#b.has(h)){let f=this.#b.get(h);d.setAttribute("data-highlight",f||"")}ee(c,this.#l)?(d.setAttribute("tabindex","0"),ee(c,this.#u)||d.setAttribute("data-focused","")):d.setAttribute("tabindex","-1"),l.appendChild(d),r.appendChild(l),(s+o)%7===0&&(this.#o.appendChild(r),r=document.createElement("tr"))}let a=(s+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#o.appendChild(r)}}#B(t,e){return this.#q(t,e).disabled}#q(t,e){return this.#v.has(e)?{disabled:!0,reason:this.#v.get(e)}:this.#y&&t<this.#y?{disabled:!0,reason:null}:this.#w&&t>this.#w?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#k(){this.#f.innerHTML="";let t=new Date().getFullYear(),e=this.#y?this.#y.getFullYear():t-100,s=this.#w?this.#w.getFullYear():t+10;for(let n=e;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#f.appendChild(r)}}#I(t){this.#d+=t,this.#d>11?(this.#d=0,this.#m++):this.#d<0&&(this.#d=11,this.#m--);let e=te(this.#m,this.#d),s=Math.min(this.#l?.getDate()??1,e);this.#l=new Date(this.#m,this.#d,s),this.#S(),this.#R(this.#l)}#O(t,e="internal"){let s=_(t);this.#B(t,s)||this.#u&&_(this.#u)===s||(this.#u=t,this.#l=t,this.#T(),this.#D(),this.#z(),this.#S(),this.#E(),this.#i.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:s,date:new Date(t),source:e}})))}#R(t){let e=_(t),s=this.#o.querySelector(`[data-date="${e}"]`);s&&(this.#o.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#u?this.#i.value=mo(this.#u):this.#i.value=""}#N(){if(!this.#h){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#n.hidden=!1,this.#l&&(this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth()),this.#S(),this.#p){try{this.#n.showPopover()}catch{}this.#x(),window.addEventListener("scroll",this.#A,{capture:!0,passive:!0}),window.addEventListener("resize",this.#A,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#E(){if(this.#h){if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#n.hidden=!0,this.#p){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#x(){if(!this.#p)return;let t=this.#r.getBoundingClientRect(),e=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,h;o<e.height&&c>o?(h=t.top-e.height-s,this.#n.dataset.placement="top"):(h=t.bottom+s,delete this.#n.dataset.placement);let l=t.left;l+e.width>a-n&&(l=a-e.width-n),l<n&&(l=n),this.#n.style.setProperty("--calendar-top",`${h}px`),this.#n.style.setProperty("--calendar-left",`${l}px`)}#A=()=>{this.#h&&this.#x()};#L=()=>{let t=this.#i.value,{date:e,partial:s}=ni(t);if(e)this.#l=e,this.#m=e.getFullYear(),this.#d=e.getMonth(),this.#S();else if(s){this.#m=s.year,this.#d=s.month;let n=te(s.year,s.month),r=Math.min(this.#l?.getDate()??1,n);this.#l=new Date(s.year,s.month,r),this.#S()}!this.#h&&t.length>0&&this.#N()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:e}=ni(this.#i.value);e&&!this.#B(e,_(e))&&this.#O(e);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#N(),requestAnimationFrame(()=>this.#R(this.#l));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#h&&this.#E(),this.#T();return;case"Tab":this.#h&&this.#E();return}};#F=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let{date:s}=ni(e);s&&!this.#B(s,_(s))&&(this.#u=s,this.#l=s,this.#D(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:_(s),date:new Date(s)}})))}this.#T(),this.#h&&this.#E(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#P=t=>{this.#h&&!this.contains(t.target)&&this.#E()};#V=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.hasAttribute("disabled"))return;let n=q(s.getAttribute("data-date"));n&&this.#O(n)};#$=t=>{if(t.key==="Tab"){this.#E();return}let e=this.#l;if(!e)return;let s;switch(t.key){case"ArrowRight":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);break;case"ArrowLeft":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);break;case"ArrowDown":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+7);break;case"ArrowUp":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(e.getFullYear()+1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()+1,e.getDate());break;case"PageUp":t.shiftKey?s=new Date(e.getFullYear()-1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()-1,e.getDate());break;case"Home":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+this.#C);break;case"End":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-e.getDay()+this.#C));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#O(e);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#E(),this.#i.focus();return;default:return}t.preventDefault(),t.stopPropagation(),s&&(this.#y&&s<this.#y&&(s=this.#y),this.#w&&s>this.#w&&(s=this.#w),this.#l=s,(s.getMonth()!==this.#d||s.getFullYear()!==this.#m)&&(this.#d=s.getMonth(),this.#m=s.getFullYear(),this.#S()),this.#R(s))};#D(){let t=this.#u?_(this.#u):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#z(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#u?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#i||this):this.#e.setValidity({})}formResetCallback(){this.#u=q(this.#g);let t=new Date;this.#l=this.#u||t,this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth(),this.#T(),this.#D(),this.#z(),this.#h&&this.#S()}formStateRestoreCallback(t){t&&(this.#u=q(t),this.#u&&(this.#l=this.#u,this.#m=this.#u.getFullYear(),this.#d=this.#u.getMonth(),this.#T(),this.#D(),this.#z()))}get value(){return this.#u?_(this.#u):""}set value(t){let e=q(t);e&&this.#O(e,"api")}get min(){return this.#y?_(this.#y):""}set min(t){this.#y=t?q(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#w?_(this.#w):""}set max(t){this.#w=t?q(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};b("date-picker",ai);function dt(i,t,e){t/=100,e/=100;let s=a=>(a+i/30)%12,n=t*Math.min(e,1-e),r=a=>e-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function ie(i,t,e){i/=255,t/=255,e/=255;let s=Math.max(i,t,e),n=Math.min(i,t,e),r=(s+n)/2,a=0,o=0;if(s!==n){let c=s-n;switch(o=r>.5?c/(2-s-n):c/(s+n),s){case i:a=((t-e)/c+(t<e?6:0))/6;break;case t:a=((e-i)/c+2)/6;break;case e:a=((i-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function go(i){i=i.replace(/^#/,""),i.length===3&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);let t=parseInt(i,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function vo(i,t,e){return"#"+[i,t,e].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function j(i){let{r:t,g:e,b:s}=go(i);return ie(t,e,s)}function Y(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return vo(s,n,r)}function T(i,t,e){return Math.max(t,Math.min(e,i))}function oi(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function ci(i){let t=i<=.0031308?i*12.92:1.055*Math.pow(i,.4166666666666667)-.055;return Math.round(T(t,0,1)*255)}function yo(i,t,e){let s=oi(i),n=oi(t),r=oi(e),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,h=Math.cbrt(a),l=Math.cbrt(o),d=Math.cbrt(c),u=.2104542553*h+.793617785*l-.0040720468*d,f=1.9779984951*h-2.428592205*l+.4505937099*d,v=.0259040371*h+.7827717662*l-.808675766*d,p=Math.sqrt(f*f+v*v),m=Math.atan2(v,f)*180/Math.PI;return m<0&&(m+=360),p<1e-4&&(m=0),{L:u,C:p,H:m}}function wo(i,t,e){let s=e*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=i+.3963377774*n+.2158037573*r,o=i-.1055613458*n-.0638541728*r,c=i-.0894841775*n-1.291485548*r,h=a**3,l=o**3,d=c**3,u=4.0767416621*h-3.3077115913*l+.2309699292*d,f=-1.2684380046*h+2.6097574011*l-.3413193965*d,v=-.0041960863*h-.7034186147*l+1.707614701*d;return{r:ci(u),g:ci(f),b:ci(v)}}function li(i,t,e){let s=dt(i,t,e);return yo(s.r,s.g,s.b)}function In(i,t,e){let{r:s,g:n,b:r}=wo(i,t,e);return ie(s,n,r)}function Eo(i,t,e){return Y(i,t,e)}function Ao(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return`rgb(${s} ${n} ${r})`}function So(i,t,e){return`hsl(${i}deg ${t}% ${e}%)`}function xo(i,t,e){let{L:s,C:n,H:r}=li(i,t,e);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function $n(i,t,e,s){switch(i){case"rgb":return Ao(t,e,s);case"hsl":return So(t,e,s);case"oklch":return xo(t,e,s);default:return Eo(t,e,s)}}var ut=["hex","rgb","hsl","oklch"],Co="hex",hi=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h;#p={};#u=Co;#l;#m;#d;#y=!1;#w=!1;#v=0;#b=100;#g=50;#C;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;let t=this.getAttribute("format");t&&ut.includes(t)&&(this.#u=t);let e=this.#t.value||"#000000";this.#C=e;let s=j(e);return this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#D(),this.#j(),this.#w=Qt,this.#w&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#G),(this.#t.disabled||this.hasAttribute("disabled"))&&this.setAttribute("data-disabled",""),!0}teardown(){window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}#_(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("span"),this.#s.className="color-swatch",this.#r=document.createElement("span"),this.#r.className="color-hex",this.#i.appendChild(this.#s),this.#i.appendChild(this.#r),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#y?this.#W():this.#z()})}#M(){this.#n=document.createElement("div"),this.#n.className="color-panel",this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("tabindex","0"),this.#o=document.createElement("div"),this.#o.className="color-area-thumb",this.#a.appendChild(this.#o),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#c.appendChild(this.#f),t.appendChild(this.#c),this.#n.appendChild(t);let e=document.createElement("div");e.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#h=document.createElement("select"),this.#h.className="color-format-select";for(let o of ut){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#h.appendChild(c)}this.#h.value=this.#u,s.appendChild(n),s.appendChild(this.#h),e.appendChild(s),this.#n.appendChild(e),this.listen(this.#h,"change",this.#q),this.#p.hex=this.#S("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#p.rgb=this.#S("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#p.hsl=this.#S("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#p.oklch=this.#S("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of ut)this.#n.appendChild(this.#p[o].wrapper);this.#B();let r=this.querySelector(":scope > datalist");if(r){this.#l=document.createElement("div"),this.#l.className="color-swatches",this.#l.setAttribute("role","listbox"),this.#l.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("role","option"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#l.appendChild(c)}this.#n.appendChild(this.#l),this.listen(this.#l,"click",this.#F)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-eyedropper",this.#m.setAttribute("aria-label","Pick color from screen"),this.#m.textContent="\u{1F4A7}",a.appendChild(this.#m),this.listen(this.#m,"click",this.#P)),this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-copy",this.#d.setAttribute("aria-label","Copy hex value"),this.#d.textContent="Copy",a.appendChild(this.#d),this.listen(this.#d,"click",this.#V),this.#n.appendChild(a),this.appendChild(this.#n),this.listen(this.#a,"pointerdown",this.#k),this.listen(this.#a,"keydown",this.#O),this.listen(this.#c,"pointerdown",this.#R),this.listen(this.#c,"keydown",this.#N);for(let o of ut){let c=o==="hex"?this.#x:o==="rgb"?this.#A:o==="hsl"?this.#L:this.#H;for(let{el:h}of this.#p[o].inputs)this.listen(h,"change",c)}}#S(t,e){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of e){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#B(){for(let t of ut)this.#p[t].wrapper.hidden=t!==this.#u;this.#d&&this.#d.setAttribute("aria-label",`Copy ${this.#u.toUpperCase()} value`)}#q=()=>{let t=this.#h.value;ut.includes(t)&&(this.#u=t,this.#B(),this.#D())};#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let e=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",e),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",e),this.#a.addEventListener("pointerup",s)};#I(t){let e=this.#a.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1),n=T((t.clientY-e.top)/e.height,0,1);this.#b=Math.round(s*100),this.#g=Math.round((1-n)*100),this.#$()}#O=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#b=T(this.#b+e,0,100);break;case"ArrowLeft":t.preventDefault(),this.#b=T(this.#b-e,0,100);break;case"ArrowUp":t.preventDefault(),this.#g=T(this.#g+e,0,100);break;case"ArrowDown":t.preventDefault(),this.#g=T(this.#g-e,0,100);break;default:return}this.#$()};#R=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#T(t);let e=n=>this.#T(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",e),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",e),this.#c.addEventListener("pointerup",s)};#T(t){let e=this.#c.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1);this.#v=Math.round(s*360),this.#$()}#N=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+e)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-e+361)%361;break;default:return}this.#$()};#E(t,e){return this.#p[t].inputs.find(s=>s.channel===e)?.el}#x=()=>{let t=this.#E("hex","hex");if(!t)return;let e=t.value.trim();if(e.startsWith("#")||(e="#"+e),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){let s=j(e);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}};#A=()=>{let t=T(Number(this.#E("rgb","r").value)||0,0,255),e=T(Number(this.#E("rgb","g").value)||0,0,255),s=T(Number(this.#E("rgb","b").value)||0,0,255),n=ie(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#L=()=>{let t=T(Number(this.#E("hsl","h").value)||0,0,360)%361,e=T(Number(this.#E("hsl","s").value)||0,0,100),s=T(Number(this.#E("hsl","l").value)||0,0,100);this.#v=t,this.#b=e,this.#g=s,this.#$()};#H=()=>{let t=T(Number(this.#E("oklch","oL").value)||0,0,100)/100,e=T(Number(this.#E("oklch","oC").value)||0,0,.4),s=T(Number(this.#E("oklch","oH").value)||0,0,360),n=In(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#F=t=>{let e=t.target.closest("button[data-color]");if(!e)return;let s=e.getAttribute("data-color"),n=j(s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#P=async()=>{try{let e=await new window.EyeDropper().open(),s=j(e.sRGBHex);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}catch{}};#V=()=>{let t=$n(this.#u,this.#v,this.#b,this.#g);St(t,{button:this.#d,announceMessage:"Color copied"})};#$(t="internal"){this.#D(),this.#j();let e=Y(this.#v,this.#b,this.#g),s=dt(this.#v,this.#b,this.#g);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:e,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:this.#v,s:this.#b,l:this.#g},source:t}}))}#D(){let t=Y(this.#v,this.#b,this.#g),e=dt(this.#v,this.#b,this.#g),s=Y(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#o.style.insetInlineStart=`${this.#b}%`,this.#o.style.insetBlockStart=`${100-this.#g}%`,this.#o.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#b}%, Lightness ${this.#g}%`),this.#f.style.insetInlineStart=`${this.#v/360*100}%`,this.#c.setAttribute("aria-valuenow",String(this.#v)),this.#c.setAttribute("aria-valuetext",`Hue ${this.#v}\xB0`);let n=(a,o,c)=>{let h=this.#E(a,o);h&&(h.value=String(c))};n("hex","hex",t),n("rgb","r",e.r),n("rgb","g",e.g),n("rgb","b",e.b),n("hsl","h",this.#v),n("hsl","s",this.#b),n("hsl","l",this.#g);let r=li(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=Y(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 e=j(t);this.#v=e.h,this.#b=e.s,this.#g=e.l,this.#D(),this.#j()}get value(){return Y(this.#v,this.#b,this.#g)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let e=Y(this.#v,this.#b,this.#g).toLowerCase(),s=t.toLowerCase();if(e===s||e===s.toLowerCase())return;let n=j(t);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$("api")}};b("color-picker",hi);var ko='<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>',To='<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 Lo(i){if(!i)return[];let t=i.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(e=>{let s=e.trim();return{value:s,label:s}})}function Mo(i){return i?i.split(",").map(t=>t.trim()).filter(Boolean):[]}function No(i){let t=Math.max(0,Math.round(i)),e=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return e>0?`${e}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Do(i,t){let e=Number(i)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(e);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${e<0?"-":""}${a.format(r)} ${s[n]}`}function _o(){return document.documentElement.lang||void 0}function di(i){let t=String(i),e=t.indexOf(".");return e<0?0:t.length-e-1}var ui=class extends g{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#o;#c;#f="";#h=!1;#p=!1;#u;#l;#m;#d;#y;#w;#v;#b;#g;#C=0;#_=0;#M=!1;#S=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#B(),this.#q(),this.#O();let t=this.getAttribute("value");this.#m=t,this.#P(t??this.#I(),"init")}attributeChangedCallback(t,e,s){!this.isConnected||!this.#d||(t==="value"?this.#P(s??this.#I(),"attr"):(t==="disabled"||t==="readonly")&&this.#E())}#B(){this.hasAttribute("data-options")?this.#t="enum":this.hasAttribute("data-values")?this.#t="token":this.hasAttribute("data-format")||this.hasAttribute("data-suffix")?this.#t="formatted":(this.#t="numeric",console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/concepts/numeric-inputs/'))}#q(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#s=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#r=Number(this.getAttribute("data-step"))||1,this.#n=Mo(this.getAttribute("data-values")),this.#a=Lo(this.getAttribute("data-options")),this.#o=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#c=this.getAttribute("data-currency")||"USD",this.#f=this.getAttribute("data-suffix")||"",this.#h=this.hasAttribute("data-show-label"),this.#p=this.hasAttribute("data-accelerate"),this.#u=_o(),this.#g=this.#k()}#k(){if(!this.#o)return null;let t=di(this.#r);return this.#o==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#o==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#c}):this.#o==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#t==="enum"?this.#a[0]?.value??"":this.#t==="token"?this.#n[0]??"":"0"}#O(){this.replaceChildren(),this.#v=document.createElement("button"),this.#v.type="button",this.#v.className="stepper-dec",this.#v.setAttribute("aria-label","Decrease"),this.#v.setAttribute("tabindex","-1"),this.#v.innerHTML=ko,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=To,this.#d=document.createElement("span"),this.#d.className="stepper-value",this.#d.setAttribute("role","spinbutton"),this.#d.setAttribute("tabindex","0"),this.#y=document.createElement("span"),this.#y.className="stepper-value-display",this.#d.appendChild(this.#y),this.#w=new Set;for(let t of this.#z())this.#W(t);this.appendChild(this.#v),this.appendChild(this.#d),this.appendChild(this.#b),this.#R(this.#v,-1),this.#R(this.#b,1),this.listen(this.#d,"keydown",this.#T),this.#E()}#R(t,e){if(this.listen(t,"click",n=>{if(this.#S){this.#S=!1,n.preventDefault();return}this.#x(e,1)}),!this.#p)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#N()||(this.#M=!1,this.#C=window.setTimeout(()=>{this.#M=!0,this.#_=window.setInterval(()=>this.#x(e,1),100),this.#C=window.setTimeout(()=>{window.clearInterval(this.#_),this.#_=window.setInterval(()=>this.#x(e,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#C),window.clearInterval(this.#_),this.#C=0,this.#_=0,this.#M&&(this.#S=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T=t=>{if(!this.#N())switch(t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#x(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#x(-1,1);break;case"PageUp":t.preventDefault(),this.#x(1,10);break;case"PageDown":t.preventDefault(),this.#x(-1,10);break;case"Home":t.preventDefault(),this.#A("min");break;case"End":t.preventDefault(),this.#A("max");break;default:}};#N(){return this.hasAttribute("disabled")||this.hasAttribute("readonly")}#E(){let t=this.hasAttribute("disabled");this.#v.disabled=t,this.#b.disabled=t,this.#d.setAttribute("aria-disabled",String(t)),t?this.#d.removeAttribute("tabindex"):this.#d.setAttribute("tabindex","0")}#x(t,e){if(this.#N())return;let s=this.#L(t,e);s===null||s===this.#l||this.#P(s,"step")}#A(t){if(this.#t==="enum"){let s=t==="min"?0:this.#a.length-1;this.#P(this.#a[s]?.value,"step");return}if(this.#t==="token"){let s=t==="min"?0:this.#n.length-1;this.#P(this.#n[s],"step");return}let e=t==="min"?this.#i===-1/0?this.#l:this.#i:this.#s===1/0?this.#l:this.#s;this.#P(String(e),"step")}#L(t,e){if(this.#t==="enum"){let c=this.#a.findIndex(d=>d.value===this.#l),h=c===-1?0:c,l=Math.min(this.#a.length-1,Math.max(0,h+t*e));return this.#a[l]?.value}if(this.#t==="token"){let h=this.#H(this.#l);h===-1&&(h=this.#F(this.#l));let l=Math.min(this.#n.length-1,Math.max(0,h+t*e));return this.#n[l]}let s=Number(this.#l)||0,n=di(this.#r),r=s+t*this.#r*e,a=Number(r.toFixed(n)),o=Math.min(this.#s,Math.max(this.#i,a));return String(o)}#H(t){if(t==null)return-1;let e=this.#n.indexOf(String(t));if(e!==-1)return e;let s=Number(t);if(Number.isFinite(s)){let n=this.#n.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#F(t){let e=Number(t);if(!Number.isFinite(e))return 0;let s=0,n=1/0;return this.#n.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-e);c<n&&(n=c,s=a)}),s}#P(t,e){let s=this.#V(t),n=s!==this.#l;this.#l=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#$(),this.#Y(),this.#U(),this.#X(),this.#K(),n&&e!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#V(t){if(t==null)return this.#I();if(this.#t==="enum"){let n=String(t);return this.#a.find(a=>a.value===n)?n:this.#a[0]?.value??""}if(this.#t==="token")return String(t);let e=Number(t);if(!Number.isFinite(e))return String(this.#i===-1/0?0:this.#i);let s=di(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,e)).toFixed(s)))}#$(){let t=this.#D();this.#y.textContent=t,this.#W(t)}#D(t=this.#l){if(this.#t==="enum")return this.#a.find(s=>s.value===t)?.label??t??"";if(this.#t==="token"){let e=this.#h?String(t).replace(/^--/,""):String(t);return this.#f?`${e}${this.#f}`:e}if(this.#t==="formatted"){let e=Number(t)||0;if(this.#o==="duration")return No(e);if(this.#o==="bytes")return Do(e,this.#u);if(this.#g){let s=this.#o==="percent"?e/100:e,n=this.#g.format(s);return this.#f&&this.#o==="number"?`${n}${this.#f}`:n}return this.#f?`${e}${this.#f}`:String(e)}return String(t??"")}#z(){if(this.#t==="enum")return this.#a.map(s=>this.#D(s.value));if(this.#t==="token")return this.#n.map(s=>this.#D(s));let t=new Set,e=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&e(this.#i),this.#s!==1/0&&e(this.#s),e(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)e(n);if(this.#o==="bytes")for(let n of[999,999e3,999e6,999e9])e(n)}return[...t].map(s=>this.#D(String(s)))}#W(t){let e=String(t??"");if(!e||this.#w.has(e))return;this.#w.add(e);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=e,this.#d.appendChild(s)}recomputeWidth(){if(this.#d){this.#d.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#w=new Set;for(let t of this.#z())this.#W(t)}}#Y(){if(this.#t==="enum"){let e=this.#a.findIndex(s=>s.value===this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#a.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}if(this.#t==="token"){let e=this.#H(this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#n.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}let t=Number(this.#l)||0;this.#i!==-1/0?this.#d.setAttribute("aria-valuemin",String(this.#i)):this.#d.removeAttribute("aria-valuemin"),this.#s!==1/0?this.#d.setAttribute("aria-valuemax",String(this.#s)):this.#d.removeAttribute("aria-valuemax"),this.#d.setAttribute("aria-valuenow",String(t)),this.#d.setAttribute("aria-valuetext",this.#D())}#U(){let t=this.#G(),e=this.#j();this.#v.disabled=t||this.hasAttribute("disabled"),this.#b.disabled=e||this.hasAttribute("disabled")}#G(){return this.#t==="enum"?this.#l===this.#a[0]?.value:this.#t==="token"?this.#H(this.#l)===0:this.#i!==-1/0&&Number(this.#l)<=this.#i}#j(){return this.#t==="enum"?this.#l===this.#a[this.#a.length-1]?.value:this.#t==="token"?this.#H(this.#l)===this.#n.length-1:this.#s!==1/0&&Number(this.#l)>=this.#s}#X(){this.#e.setFormValue(String(this.#l??""))}#K(){this.setState("at-min",this.#G()),this.setState("at-max",this.#j())}formResetCallback(){this.#P(this.#m??this.#I(),"reset")}formStateRestoreCallback(t){t!=null&&this.#P(t,"restore")}get displayText(){return this.#y?.textContent??""}get value(){return this.#l==null?"":String(this.#l)}set value(t){String(t)!==String(this.#l)&&this.#P(t,"api")}get form(){return this.#e.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#e.validity}get validationMessage(){return this.#e.validationMessage}checkValidity(){return this.#e.checkValidity()}reportValidity(){return this.#e.reportValidity()}};b("stepper-wc",ui);var Io=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),fi=class extends g{static observedAttributes=["data-variant","data-live"];#e;setup(){let t=document.createElement("span");for(t.className="status-dot",t.setAttribute("aria-hidden","true"),this.#e=document.createElement("span"),this.#e.className="status-label";this.firstChild;)this.#e.appendChild(this.firstChild);this.appendChild(t),this.appendChild(this.#e),this.#t(),this.#i(),this.#r()}attributeChangedCallback(t,e,s){!this.isConnected||e===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:e}}))):t==="data-live"&&this.#t())}#t(){this.getAttribute("data-live")==="off"?(this.removeAttribute("role"),this.removeAttribute("aria-live")):(this.hasAttribute("role")||this.setAttribute("role","status"),this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"))}#i(){let t=this.getAttribute("data-variant");t&&(Io.has(t)||this.#s(t)||console.info(`[status-wc] data-variant="${t}" is not a built-in; add a CSS rule (status-wc[data-variant="${t}"] { --status-dot-color: \u2026; }) or use a built-in.`))}#s(t){let e=this.querySelector(".status-dot");if(!e)return!0;let s=getComputedStyle(e).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),e=this.hasAttribute("aria-label");!t&&!e&&console.warn("[status-wc] needs slot text or aria-label for accessibility.")}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};b("status-wc",fi);var qn=0,pi=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),e=this.querySelector('menu, ul[role="menu"]');if(!t||!e)return!1;this.#e=t,this.#t=e;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++qn}`,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-${++qn}`),this.#t.querySelectorAll(":scope > li[data-group]").forEach(n=>{n.setAttribute("role","presentation"),n.classList.add("ctx-group-label")}),this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(n=>!n.disabled&&!n.hasAttribute("data-disabled")),this.#s.forEach(n=>{n.setAttribute("role","menuitem"),n.setAttribute("tabindex","-1"),n.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",this.listen(n,"click",this.#h);let r=n.getAttribute("data-shortcut");if(r){let a=document.createElement("kbd");a.className="ctx-kbd",a.textContent=un(r),n.appendChild(a);let o=Kt(r,()=>n.click());this.#a.push(o)}}),this.#t.querySelectorAll('li:empty:not([data-group]), [role="separator"], hr').forEach(n=>{n.setAttribute("role","separator")}),this.listen(this.#e,"contextmenu",this.#o),this.listen(this.#t,"keydown",this.#f),this.listen(window,"scroll",this.#u,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#p),!0}teardown(){this.#a.forEach(t=>t()),this.#a=[]}get items(){if(!this.#t)return[];let t=[];for(let e of this.#t.querySelectorAll(":scope > li")){if(e.hasAttribute("data-group")){t.push({group:e.textContent.trim()});continue}if(e.matches(':empty, [role="separator"]')||e.querySelector("hr")){t.push({separator:!0});continue}let s=e.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,shortcut:s.getAttribute("data-shortcut")||void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let e=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of e){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&(a.tagName==="BUTTON"?a.disabled=!0:a.setAttribute("data-disabled","")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:e,source:"property"},bubbles:!0}))}#o=t=>{t.preventDefault(),this.#c(t.clientX,t.clientY)};#c(t,e){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${e}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let s=this.#i.getBoundingClientRect(),n=t+s.width>window.innerWidth?t-s.width:t,r=e+s.height>window.innerHeight?e-s.height:e;this.#i.style.top=`${Math.max(0,r)}px`,this.#i.style.left=`${Math.max(0,n)}px`}),this.#r=-1,this.#l(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#i?.hide(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))}#f=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#l(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#l(this.#r-1);break;case"Home":t.preventDefault(),this.#l(0);break;case"End":t.preventDefault(),this.#l(this.#s.length-1);break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break;case"Tab":this.close();break}};#h=()=>{this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:this.#s[this.#r]}}))};#p=()=>{this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#u=()=>{this.#n&&this.close()};#l(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}get isOpen(){return this.#n}};b("context-menu",pi);var mi=class extends g{#e;#t;#i=null;#s=!1;setup(){if(this.#s)return;let t=this.getAttribute("src");return t?(this.#i===null&&(this.#i=this.innerHTML),this.hasAttribute("lazy")?this.#n():this.#a(t),!0):!1}teardown(){this.#e?.disconnect(),this.#t?.abort()}get src(){return this.getAttribute("src")||""}set src(t){let e=t==null?"":String(t);this.src!==e&&(e?this.setAttribute("src",e):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:e,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,s){t==="src"&&s&&e!==s&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#r()?this.#n():this.#a(s))}#r(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#n(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){this.#e.disconnect();let s=this.getAttribute("src");s&&this.#a(s)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let e=await fetch(t,{signal:this.#t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);let s=await e.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=s:n==="append"?this.insertAdjacentHTML("beforeend",s):n==="prepend"&&this.insertAdjacentHTML("afterbegin",s),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#s=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:s}}))}catch(e){if(e.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#i!==null&&!this.#s&&(this.innerHTML=this.#i),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:e.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",mi);W();var On="environment",Bn="preferences",bi={timeOfDay:!1,seasonal:!1},$o=900*1e3,G={...bi};function et(i,t,e){return i+(t-i)*Math.min(1,Math.max(0,e))}var Lt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let i=await E.get(On,Bn);G=i?{...bi,...i}:{...bi},(G.timeOfDay||G.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...G}},save(i){return G={...G,...i},E.set(On,Bn,G).catch(()=>{}),{...G}},setTimeOverride(i){this._timeOverride=i,this._hasActiveSource()&&this._update()},setMonthOverride(i){this._monthOverride=i,this._hasActiveSource()&&this._update()},setSource(i,t){let e=this.save({[i]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(i){let t=i||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent");let t=i.getAttribute("data-theme");if(t){let e=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(e)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let i=this.load(),t=0;i.timeOfDay&&(t+=this._getTimeOfDayOffset()),i.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let i=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return i<5?-20:i<7?et(-20,20,(i-5)/2):i<10?et(20,5,(i-7)/3):i<14?et(5,0,(i-10)/4):i<17?et(0,-5,(i-14)/3):i<19?et(-5,15,(i-17)/2):i<21?et(15,-10,(i-19)/2):et(-10,-20,(i-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let i=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(i+6)%12:i;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),$o))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var se=null;function Fn(){return"0.1.4-199c7c25"}function qo(){let i=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of i){let s=e.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function Rn(){return se||(se=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),se}function Hn(i){return new Promise((t,e)=>{navigator.serviceWorker?.controller?Pn(navigator.serviceWorker.controller,i,t,e):Rn().then(s=>{let n=s.active||s.waiting||s.installing;n?Pn(n,i,t,e):e(new Error("No active service worker"))}).catch(e)})}function Pn(i,t,e,s){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),i.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function zn(){return Hn("GET_STATUS")}async function Vn(){return Hn("CLEAR_CACHE")}async function Un(){let i=await Rn();return await i.update(),{updated:!!i.waiting}}function Oo(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Oo()){let i=qo();window.addEventListener("load",()=>{se=navigator.serviceWorker.register(i).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}W();var ft=null,O="settings",Nt={motionFx:!0,sounds:!1},Ei=class extends g{#e=null;#t=null;#i=!1;#s=[];#r={...Nt};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#o(),this.#v(),this.#g(),this.#V(),this.listen(window,"vb:theme-change",this.#P),this.listen(window,"vb:extensions-change",this.#P),this.listen(window,"vb:a11y-themes-change",this.#P)}teardown(){}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let e=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],e.push(E.set(O,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...Nt,...t.extensions},e.push(E.set(O,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,e.push(E.set(O,"sticky",this.#n?"on":"off"))),Promise.all(e).then(()=>{this.#V?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#o(){let[t,e,s]=await Promise.all([E.get(O,"a11y"),E.get(O,"extensions"),E.get(O,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...Nt,...e??{}},this.#n=s==="on"}#c(t){return t!==""&&t!==void 0}#f(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#p(){return this.#n}#u(t){return t!==""&&t!==void 0}#l(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#m(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let e=t.split(/\s+/);for(let s of e)if(s==="stretch"||s==="integrated")return s;return"card"}#y(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,e){let s=[];return t&&t!=="card"&&s.push(t),e&&s.push("fixed"),s.join(" ")||"card"}#v(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#b(),this.appendChild(this.#t)}#b(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:h,pageBgGradDir:l}=A.getState(),d=this.#W(),u=this.#X(),f=this.#c(s),v=this.#f(s),p=this.#u(n),m=this.#l(n);return`
|
|
316
|
+
`,Qe=class extends g{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of Cn){let e=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#e(t,e)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=co;for(let e of Cn){let s=t.querySelector(`slot[name="${e}"]`);s?.addEventListener("slotchange",()=>this.#e(e,s)),this.#e(e,s)}}this.#t(),this.#i(),this.#s()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#t():t==="loading"&&this.#i())}#e(t,e){let s=!!e&&e.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#t(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let e of oo)this.setState(`trend-${e}`,e===t)}#i(){this.setState("loading",this.hasAttribute("loading"))}#s(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};b("score-card",Qe);var lo=0;function Jt(i,t){return i.matches("content-swap")?t:`data-${t}`}function Xt(i){i.style.viewTransitionName||(i.style.viewTransitionName=`content-swap-${++lo}`);let t=i.querySelector(':scope > [data-face="front"]'),e=i.querySelector(':scope > [data-face="back"]');if(!t||!e)return;let s=[];function n(o,c,h,l){o.addEventListener(c,h,l),s.push(()=>o.removeEventListener(c,h,l))}let r=[...i.querySelectorAll("[data-swap]")].filter(o=>o!==i&&o.closest("content-swap, [data-swap]")===i);return r.length===0?(i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.getAttribute("aria-label")||i.setAttribute("aria-label","Toggle content"),n(i,"click",()=>tt(i,"pointer")),n(i,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),tt(i,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),tt(i,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),tt(i,"keyboard"))})}),i.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(n(i,"swipe-left",()=>tt(i,"pointer")),n(i,"swipe-right",()=>tt(i,"pointer"))),Ln(i,t,e),()=>{for(let o of s)o();s.length=0}}function Ln(i,t,e){let s=i.hasAttribute(Jt(i,"swapped"));t.inert=s,e.inert=!s}function ho(i){return{front:i.querySelector(':scope > [data-face="front"]'),back:i.querySelector(':scope > [data-face="back"]')}}function kt(i,t,e="api"){let{front:s,back:n}=ho(i);if(!s||!n)return;let r=Jt(i,"swapped");if(t&&i.hasAttribute(r)||!t&&!i.hasAttribute(r))return;let a=()=>{t?i.setAttribute(r,""):i.removeAttribute(r),Ln(i,s,n),uo(i,e);let h=t?n:s,l=h.querySelector("[autofocus]");l?l.focus():e==="keyboard"&&fo(h)},o=h=>{let l=i;typeof l.setState=="function"&&l.setState("transition-running",h)};o(!0);let c=P(a);c&&c.finished&&typeof c.finished.finally=="function"?c.finished.finally(()=>o(!1)):o(!1)}function tt(i,t="api"){kt(i,!i.hasAttribute(Jt(i,"swapped")),t)}function uo(i,t="internal"){i.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:i.hasAttribute(Jt(i,"swapped")),source:t},bubbles:!0}))}function fo(i){let t=i.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var ti=class extends g{#e=null;setup(){this.#e=Xt(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){kt(this,!0)}unflip(){kt(this,!1)}toggle(){tt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){kt(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){kt(this,!!t)}};b("content-swap",ti);function kn(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(i=>{i.querySelector(":scope > [data-face]")&&(Xt(i),i.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",kn):kn();var Tn=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(Xt(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(Xt(n),n.setAttribute("data-swap-init",""))})}});document.body?Tn.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Tn.observe(document.body,{childList:!0,subtree:!0})});var ei=class extends g{#e=null;#t=!1;#i=null;setup(){this.hasAttribute("role")||this.setAttribute("role","navigation"),this.#n("pathname"),this.listen(window,"popstate",this.#r)}get items(){return this.#e?this.#e.map(t=>({...t})):Array.from(this.#s()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let e=t.map(s=>({...s}));this.#e&&this.#h(this.#e,e)||(this.#e=e,this.#c(e),this.#n(this.#t?"property":"pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#t)return this.#i;for(let t of this.#s())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let e=this.current,s=t==null?null:String(t);this.#t=!0,this.#i=s,this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#t&&(this.#t=!1,this.#i=null,this.#n("pathname"))}refresh(){this.#t||this.#n("pathname")}#s(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#r=()=>{this.#t||this.#n("popstate")};#n(t){let e=this.current,s=this.#a();this.#o(s),e!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:e,source:t},bubbles:!0,composed:!0}))}#a(){let t=window.location.pathname,e=Array.from(this.#s());if(e.length===0)return null;let s=this.getAttribute("data-match")==="exact",n=null,r=null,a=-1;for(let c of e){let h=c.getAttribute("href");if(!h||/^[a-z]+:/i.test(h)||h.startsWith("//"))continue;let l=h.split("?")[0].split("#")[0];if(l===t&&n==null){n=c;continue}!s&&l!=="/"&&(t===l||t.startsWith(l.replace(/\/$/,"")+"/"))&&l.length>a&&(r=c,a=l.length)}let o=n||r;return o?o.getAttribute("data-route")||o.getAttribute("href"):null}#o(t){let e=this.#s();for(let s of e){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#c(t){this.#s().forEach(n=>n.remove());let s=document.createDocumentFragment();for(let n of t)s.appendChild(this.#f(n));this.appendChild(s)}#f(t){let e=document.createElement("a");if(e.href=t.href||"#",t.route&&e.setAttribute("data-route",t.route),t.external&&(e.target="_blank",e.rel="noopener noreferrer"),t.icon){let s=document.createElement("icon-wc");s.setAttribute("name",String(t.icon)),s.setAttribute("size","sm"),e.appendChild(s)}if(e.appendChild(document.createTextNode(t.label||"")),t.external){let s=document.createElement("span");s.className="sr-only",s.textContent=" (opens in new tab)",e.appendChild(s)}if(t.badge!=null){let s=document.createElement("span");s.className="badge",s.textContent=String(t.badge),e.appendChild(s)}return e}#h(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(e[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==e[s][r[a]])return!1}return!0}};b("nav-bar",ei);var mo=0,ii=class extends g{#e;#t=[];#i;#s;#r;#n;#a;#o=null;#c=0;#f=!1;#h=!1;#p=null;get currentIndex(){return this.#c}get slideCount(){return this.#t.length}get playing(){return this.#o!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#f=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#h=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#h&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0"),this.#e.setAttribute("aria-label","Slides"),t.forEach((r,a)=>{r.setAttribute("role","group"),r.setAttribute("aria-roledescription","slide"),r.setAttribute("aria-label",`${a+1} of ${t.length}`),this.#e.appendChild(r)}),this.#t=[...this.#e.children],this.#i=document.createElement("button"),this.#i.className="carousel-prev",this.#i.setAttribute("aria-label","Previous slide"),this.#i.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#r=document.createElement("div"),this.#r.className="carousel-indicators",this.#r.setAttribute("aria-label","Slide indicators"),this.#t.forEach((r,a)=>{let o=document.createElement("button");o.className="carousel-dot",o.setAttribute("aria-label",`Go to slide ${a+1}`),o.setAttribute("aria-current",a===0?"true":"false"),this.listen(o,"click",()=>this.goTo(a)),this.#r.appendChild(o)})),this.#n=document.createElement("div"),this.#n.className="carousel-live",this.#n.setAttribute("aria-live","polite"),this.#n.setAttribute("aria-atomic","true"),this.appendChild(this.#i),this.appendChild(this.#e),this.appendChild(this.#s),this.#r&&this.appendChild(this.#r),this.appendChild(this.#n),this.listen(this.#i,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#y),this.#h){let r=++mo,a=this.getAttribute("transition")||"fade",o=a==="slide"?"vt-carousel-slide":a==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${r}`,this.#e.style.viewTransitionClass=o}this.#h&&Promise.resolve().then(()=>(On(),qn)).then(({addSwipeListener:r})=>{this.#p=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#h||(this.#a=new IntersectionObserver(this.#d,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)));let n=this.#v()??(Number(this.getAttribute("start"))||0);if(this.#h){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#l(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);return this.#m(),this.hasAttribute("autoplay")&&!this.#f&&this.#w(),!0}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#p&&(this.#p(),this.#p=null),this.#t=[],this.#h=!1}get slides(){return this.#t.map((t,e)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${e+1} of ${this.#t.length}`}))}set slides(t){let e=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of e){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:e,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#t.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#t.length-1)}goTo(t,e=!0){if(!(t<0||t>=this.#t.length)){if(this.#h)if(e&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,P(()=>{this.#u(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#u(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=e&&!this.#f?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#l(t)}}#u(t){this.#t.forEach((e,s)=>{e.hidden=s!==t})}play(){if(this.#o||this.#f)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#o=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#o&&(clearInterval(this.#o),this.#o=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#g()}#l(t){this.#c=t,this.#m(),this.#b(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:t,slide:this.#t[t]},bubbles:!0}))}#m(){let t=this.hasAttribute("loop"),e=this.#c===0,s=this.#c===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&e),this.#s&&(this.#s.disabled=!t&&s),this.#r){let n=this.#r.children;for(let r=0;r<n.length;r++){let a=r===this.#c;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#d=t=>{for(let e of t)if(e.isIntersecting){let s=this.#t.indexOf(e.target);s!==-1&&s!==this.#c&&this.#l(s)}};#y=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#w(){this.play(),this.listen(this,"mouseenter",()=>this.pause()),this.listen(this,"mouseleave",()=>{this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"focusin",()=>this.pause()),this.listen(this,"focusout",t=>{!this.contains(t.relatedTarget)&&this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"touchstart",()=>this.pause(),{passive:!0})}#v(){let t=this.getAttribute("persist");if(!t)return null;try{let e=localStorage.getItem(`carousel:${t}`);return e!==null?Number(e):null}catch{return null}}#b(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#g(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",ii);function Bn(i,t,e){"role"in ElementInternals.prototype?t.role=e:i.setAttribute("role",e)}var bo=0,si=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r=[];#n=[];#a=-1;#o=!1;#c="";#f="";#h="";#p;#u;#l=[];constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}get#m(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#t=t;let e=this.querySelector("ul, ol");if(!e)return!1;if(this.#i=e,this.#m){let o=this.querySelector(":scope > .tags-input-area");if(!o){o=document.createElement("div"),o.className="tags-input-area";let h=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(o,h)}this.#p=o,this.#t.parentNode!==this.#p&&this.#p.appendChild(this.#t);let c=this.querySelector(":scope > [data-combobox-live]");c||(c=document.createElement("div"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),c.setAttribute("data-combobox-live",""),c.className="visually-hidden",this.appendChild(c)),this.#u=c}let s=this.getAttribute("placeholder");s&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",s);let n=`cb${++bo}`;this.#i.id||(this.#i.id=`combobox-listbox-${n}`),Bn(this.#t,this.#e,"combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#i.id),this.#t.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#m&&this.#i.setAttribute("aria-multiselectable","true");let r=this.#m?this.#p:this.#t;r.id||(r.id=`combobox-anchor-${n}`);let a=this.querySelector(":scope > pop-over[data-combobox-host]");if(a?this.#s=a:(this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-combobox-host",""),this.#s.id=`combobox-pop-${n}`,this.#s.dataset.mode="manual",this.#s.dataset.position="bottom-start",this.#s.dataset.anchor=r.id,this.#s.appendChild(this.#i),this.appendChild(this.#s)),this.#s.dataset.anchor=r.id,this.#i.parentElement!==this.#s&&this.#s.appendChild(this.#i),this.#d(),!this.#m){let o=this.getAttribute("value");o&&this.#T(o,!1),this.#h=this.#c}return this.listen(this.#t,"input",this.#g),this.listen(this.#t,"keydown",this.#C),this.listen(this.#t,"focus",this.#_),this.listen(this.#t,"click",this.#M),this.listen(this.#i,"click",this.#S),this.listen(this.#i,"pointerdown",this.#B),this.listen(document,"click",this.#q),this.listen(this.#s,"pop-over:hide",this.#x),this.#A(),this.#L(),this.#E(),!0}teardown(){}#d(){this.#r=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,e)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${e}`)}),this.#n=[...this.#r]}#y(t,e){if(this.#l.some(o=>o.value===t))return;let s=this.#v();if(s&&this.#l.length>=s)return;this.#l.push({value:t,label:e});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=e+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${e}`),r.innerHTML="×",r.addEventListener("click",o=>{o.stopPropagation(),this.#w(t)}),n.appendChild(r),this.#p.insertBefore(n,this.#t);let a=this.#r.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#b(`${e} added`),this.#t.value="",this.#k(""),this.#A(),this.#L(),this.#H(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#E())}#w(t){let e=this.#l.findIndex(o=>o.value===t);if(e===-1)return;let s=this.#l.splice(e,1)[0],n=this.#p.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#r.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#b(`${s.label} removed`),this.#v()&&this.#t.disabled&&(this.#t.disabled=!1),this.#k(this.#t.value.trim()),this.#A(),this.#L(),this.#H(),this.#t.focus()}#v(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#b(t){this.#u&&(this.#u.textContent="",requestAnimationFrame(()=>{this.#u.textContent=t}))}#g=()=>{let t=this.#t.value.trim();if(!this.#m&&this.#c){let e=this.#i.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),this.#c="",this.#f="",this.removeAttribute("value"),this.#A(),this.#L()}this.#k(t),this.#N()};#C=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a+1);break;case"ArrowUp":t.preventDefault(),this.#o||this.#N(),this.#I(this.#a-1);break;case"Home":this.#o&&(t.preventDefault(),this.#I(0));break;case"End":this.#o&&(t.preventDefault(),this.#I(this.#n.length-1));break;case"Enter":if(t.preventDefault(),this.#o&&this.#a>=0&&this.#n[this.#a]){let e=this.#n[this.#a];this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e)}else if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){let e=this.#t.value.trim();this.#y(e,e)}break;case"Backspace":if(this.#m&&!this.#t.value&&this.#l.length>0){let e=this.#l[this.#l.length-1];this.#w(e.value)}break;case",":if(this.#m&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let e=this.#t.value.trim();this.#y(e,e)}break;case"Escape":this.#o&&(t.preventDefault(),t.stopPropagation(),this.#E(),this.#t.focus());break;case"Tab":this.#o&&this.#E();break}};#_=()=>{this.#m?(this.#k(this.#t.value.trim()),this.#N()):(this.#t.value||!this.#c)&&(this.#k(this.#t.value.trim()),this.#N())};#M=()=>{this.#o||(this.#k(this.#t.value.trim()),this.#N())};#S=t=>{let e=t.target.closest("li[data-value]");e&&this.#n.includes(e)&&(this.#m?this.#y(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e))};#B=t=>{t.preventDefault()};#q=t=>{this.#o&&!this.contains(t.target)&&this.#E()};#k(t){let e=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#m?new Set(this.#l.map(r=>r.value)):null;this.#n=[],this.#r.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?e==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#n.push(r)}),this.#a=-1,this.#O(),this.setState("no-matches",this.#n.length===0)}#I(t){if(this.#n.length===0)return;t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#a>=0&&this.#n[this.#a]&&this.#n[this.#a].removeAttribute("data-active"),this.#a=t;let e=this.#n[t];e.setAttribute("data-active",""),e.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",e.id)}#O(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t,e="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();this.#c!==s&&(this.#r.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#c=s,this.#f=n,this.#t.value=n,this.setAttribute("value",s),this.#A(),this.#L(),this.#E(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:e}})))}#T(t,e=!0,s="api"){let n=this.#r.find(r=>r.getAttribute("data-value")===t);n&&(e?this.#R(n,s):(n.setAttribute("aria-selected","true"),this.#c=t,this.#f=n.textContent.trim(),this.#t.value=this.#f,this.setAttribute("value",t)))}#N(){this.#o||(this.#o=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#E(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.#s?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#x=()=>{this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#a=-1,this.#O(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#A(){if(this.#m)if(this.#l.length>0){let t=new FormData,e=this.getAttribute("name")||"";for(let s of this.#l)t.append(e,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#c?this.#e.setFormValue(this.#c,this.#f):this.#e.setFormValue(null)}#L(){this.hasAttribute("required")?this.#m?this.#l.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#c?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({})}#H(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#l.map(t=>t.value),labels:this.#l.map(t=>t.label)}}))}formResetCallback(){this.#m?(this.#p.querySelectorAll(".tag").forEach(t=>t.remove()),this.#l=[],this.#t.value="",this.#t.disabled=!1):(this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value")),this.#r.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#n=[...this.#r],this.#a=-1,this.#O(),this.#E(),!this.#m&&this.#h&&this.#T(this.#h,!1),this.#A(),this.#L()}formStateRestoreCallback(t){t&&(this.#m||(this.#T(t,!1),this.#A(),this.#L()))}get value(){return this.#c}set value(t){t?this.#T(t):(this.#r.forEach(e=>e.setAttribute("aria-selected","false")),this.#c="",this.#f="",this.#t.value="",this.removeAttribute("value"),this.#A(),this.#L())}get label(){return this.#f}get values(){return this.#l.map(t=>t.value)}get labels(){return this.#l.map(t=>t.label)}static get observedAttributes(){return["value"]}attributeChangedCallback(t,e,s){t==="value"&&this.#t&&s!==this.#c&&s&&(this.#T(s,!1),this.#A(),this.#L())}};b("combo-box",si);function go(){try{let i=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return i.hourCycle==="h12"||i.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function $(i){return String(i).padStart(2,"0")}function ht(i){if(!i)return null;let t=i.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function Tt(i,t,e,s){return s?`${$(i)}:${$(t)}:${$(e)}`:`${$(i)}:${$(t)}`}function vo(i,t,e,s,n){if(n==="12h"){let r=i>=12?"PM":"AM",a=i%12||12;return s?`${a}:${$(t)}:${$(e)} ${r}`:`${a}:${$(t)} ${r}`}return Tt(i,t,e,s)}function Pn(i){let t=i.trim();if(!t)return null;let e=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;e&&(s=e[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,e.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let h=a;if(s){if(h<1||h>12)return null;s==="AM"?h=h===12?0:h:h=h===12?12:h+12}else if(h<0||h>23)return null;return{h,m:o,s:c}}function yo(i,t,e){return i>e?t:i<t?e:i}var ni=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a=[];#o;#c;#f;#h=0;#p=0;#u=0;#l="AM";#m=null;#d=null;#y=60;#w;#v=0;#b=!1;#g;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#y=Number(this.#t.getAttribute("step"))||60,this.#f=this.#y<60,this.#m=ht(this.#t.getAttribute("min")),this.#d=ht(this.#t.getAttribute("max")),this.#c=this.getAttribute("data-format")||go();let t=ht(this.#t.value);return t&&(this.#h=t.h,this.#p=t.m,this.#u=t.s),this.#w=this.#t.value,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#C(),this.#_(),this.#H(),this.#F(),this.#P(),this.#V(),this.listen(document,"click",this.#k),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}#C(){this.#s=document.createElement("div"),this.#s.className="time-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="time-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","listbox"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a time\u2026"),this.#s.appendChild(this.#i),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label","Toggle time spinner"),this.#r.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#r.appendChild(t),this.#s.appendChild(this.#r),this.appendChild(this.#s),this.listen(this.#r,"click",e=>{e.stopPropagation(),this.#b?this.#q():this.#B(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"keydown",this.#I),this.listen(this.#i,"blur",this.#O)}#_(){this.#g=`tp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="time-panel",this.#n.id=this.#g,this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Time spinners"),this.#i.setAttribute("aria-controls",this.#g);let t=this.#c==="12h"?1:0,e=this.#c==="12h"?12:23,s=this.#M("Hours",t,e,1);this.#n.appendChild(s.el),this.#a.push(s),this.#n.appendChild(this.#S());let n=this.#y>=60?Math.max(1,Math.round(this.#y/60)):1,r=this.#M("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#f){this.#n.appendChild(this.#S());let a=this.#M("Seconds",0,59,this.#y);this.#n.appendChild(a.el),this.#a.push(a)}this.#c==="12h"&&(this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="period-toggle",this.#o.setAttribute("aria-label","Toggle AM/PM"),this.#o.textContent=this.#l,this.#n.appendChild(this.#o),this.listen(this.#o,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#o.textContent=this.#l,this.#h=this.#$(this.#D(),this.#l),this.#L()}),this.listen(this.#o,"keydown",a=>{let o=a;o.key==="ArrowLeft"&&(o.preventDefault(),this.#z(this.#a.length-1)),o.key==="Escape"&&(o.preventDefault(),this.#q(),this.#i.focus())})),this.appendChild(this.#n)}#M(t,e,s,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(e)),r.setAttribute("aria-valuemax",String(s)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="▲";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="▼",r.appendChild(a),r.appendChild(o),r.appendChild(c);let h={el:r,valueEl:o,label:t,min:e,max:s,step:n};return this.listen(a,"click",()=>{this.#x(h,n)}),this.listen(c,"click",()=>{this.#x(h,-n)}),this.listen(r,"keydown",l=>{this.#R(l,h)}),this.listen(r,"focus",()=>{this.#v=this.#a.indexOf(h)}),h}#S(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#B(){this.#b||(this.#b=!0,this.#n.setAttribute("data-open",""),this.#i.setAttribute("aria-expanded","true"))}#q(){this.#b&&(this.#b=!1,this.#n.removeAttribute("data-open"),this.#i.setAttribute("aria-expanded","false"))}#k=t=>{this.#b&&!this.contains(t.target)&&this.#q()};#I=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let e=Pn(this.#i.value);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()),this.#F(),this.#b&&this.#q();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#B(),requestAnimationFrame(()=>this.#z(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#q(),this.#F();return;case"Tab":this.#b&&this.#q();return}};#O=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let s=Pn(e);s&&(this.#h=s.h,this.#p=s.m,this.#u=s.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u}})))}this.#F(),this.#b&&this.#q(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#R=(t,e)=>{let s=this.#a.indexOf(e);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(e,e.step);break;case"ArrowDown":t.preventDefault(),this.#x(e,-e.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#z(s+1):this.#o&&this.#o.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#z(s-1);break;case"PageUp":t.preventDefault(),this.#x(e,e.step*(e.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(e,-e.step*(e.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#A(e,e.min);break;case"End":t.preventDefault(),this.#A(e,e.max);break;case"Escape":t.preventDefault(),this.#q(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#E(t.key,e))}};#T="";#N=0;#E(t,e){clearTimeout(this.#N),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>e.max){let n=Math.min(Math.max(s,e.min),e.max);this.#A(e,n),this.#T=""}else this.#N=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,e.min),e.max);this.#A(e,r),this.#T=""},800)}#x(t,e){let s;t.label==="Hours"?s=this.#c==="12h"?this.#D():this.#h:t.label==="Minutes"?s=this.#p:s=this.#u;let n=yo(s+e,t.min,t.max);this.#A(t,n)}#A(t,e){t.label==="Hours"?this.#c==="12h"?this.#h=this.#$(e,this.#l):this.#h=e:t.label==="Minutes"?this.#p=e:this.#u=e,this.#L()}#L(t="internal"){this.#H(),this.#F(),this.#P(),this.#V(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:Tt(this.#h,this.#p,this.#u,this.#f),hours:this.#h,minutes:this.#p,seconds:this.#u,source:t}}))}#H(){let t=this.#c==="12h"?this.#D():this.#h;this.#a[0].valueEl.textContent=$(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#c==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=$(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#f&&this.#a[2]&&(this.#a[2].valueEl.textContent=$(this.#u),this.#a[2].el.setAttribute("aria-valuenow",String(this.#u))),this.#o&&(this.#o.textContent=this.#l)}#F(){this.#h!==void 0&&(this.#i.value=vo(this.#h,this.#p,this.#u,this.#f,this.#c))}#P(){let t=Tt(this.#h,this.#p,this.#u,this.#f);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#V(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#i||this);return}this.#e.setValidity({})}#$(t,e){return e==="AM"?t===12?0:t:t===12?12:t+12}#D(){if(this.#c==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#z(t){this.#a[t]?.el.focus()}formResetCallback(){let t=ht(this.#w);t?(this.#h=t.h,this.#p=t.m,this.#u=t.s):(this.#h=0,this.#p=0,this.#u=0),this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L()}formStateRestoreCallback(t){if(!t)return;let e=ht(t);e&&(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L())}get value(){return Tt(this.#h,this.#p,this.#u,this.#f)}set value(t){let e=ht(t);e&&(e.h===this.#h&&e.m===this.#p&&e.s===this.#u||(this.#h=e.h,this.#p=e.m,this.#u=e.s,this.#c==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#L("api")))}};b("time-picker",ni);var Qt="popover"in HTMLElement.prototype;var wo=["Su","Mo","Tu","We","Th","Fr","Sa"],Eo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],oi=["january","february","march","april","may","june","july","august","september","october","november","december"];function _(i){let t=i.getFullYear(),e=String(i.getMonth()+1).padStart(2,"0"),s=String(i.getDate()).padStart(2,"0");return`${t}-${e}-${s}`}function q(i){if(!i)return null;let[t,e,s]=i.split("-").map(Number);return new Date(t,e-1,s)}function te(i,t){return new Date(i,t+1,0).getDate()}function Ao(){try{let i=new Intl.Locale(navigator.language);if(i.weekInfo)return i.weekInfo.firstDay%7}catch{}return 0}function So(i){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(i)}catch{return _(i)}}function ee(i,t){return i&&t&&i.getFullYear()===t.getFullYear()&&i.getMonth()===t.getMonth()&&i.getDate()===t.getDate()}function xo(){let i=new Map;oi.forEach((t,e)=>{i.set(t,e),i.set(t.slice(0,3),e)});try{for(let t=0;t<12;t++){let e=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),s=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");i.set(e,t),i.set(s,t)}}catch{}return i}var ri=xo();function ai(i){let t=i.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=q(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=q(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let e=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(e);if(s){let a=ri.get(s[1].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[2]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let n=/^(\d{1,2})\s+([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(n),s){let a=ri.get(s[2].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[1]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let r=/^([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(r),s){let a=ri.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var ci=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h=!1;#p=!1;#u=null;#l=null;#m=new Date().getFullYear();#d=new Date().getMonth();#y=null;#w=null;#v=new Map;#b=new Map;#g=null;#C=0;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#y=q(this.#t.getAttribute("min")),this.#w=q(this.#t.getAttribute("max")),this.#C=Ao();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#v.set(r,a||"")});let e=this.getAttribute("data-highlight-dates");e&&e.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||"")}),this.#u=q(this.#t.value),this.#g=this.#t.value;let s=new Date;return this.#w&&s>this.#w&&(s=this.#w),this.#y&&s<this.#y&&(s=this.#y),this.#m=this.#u?this.#u.getFullYear():s.getFullYear(),this.#d=this.#u?this.#u.getMonth():s.getMonth(),this.#l=this.#u||s,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#T(),this.#D(),this.#z(),this.#p=Qt,this.#p&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#P),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0),!0}teardown(){window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}#_(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="date-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a date\u2026"),this.#r.appendChild(this.#i),this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="date-trigger-icon",this.#s.setAttribute("aria-label","Toggle calendar"),this.#s.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#s.appendChild(t),this.#r.appendChild(this.#s),this.appendChild(this.#r),this.listen(this.#s,"click",e=>{e.stopPropagation(),this.#h?this.#E():this.#N(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#L),this.listen(this.#i,"keydown",this.#H),this.listen(this.#i,"blur",this.#F)}#M(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="calendar",this.#n.id=this.#a,this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-modal","false"),this.#n.setAttribute("aria-label","Choose date"),this.#n.hidden=!0,this.#i.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let e=document.createElement("button");e.type="button",e.className="calendar-nav",e.setAttribute("aria-label","Previous month");let s=document.createElement("icon-wc");s.setAttribute("name","chevron-left"),s.setAttribute("size","sm"),s.setAttribute("aria-hidden","true"),e.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#f=document.createElement("select"),this.#f.className="calendar-year",this.#f.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#c),n.appendChild(this.#f);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(e),t.appendChild(n),t.appendChild(r),this.#n.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),h=document.createElement("tr");for(let l=0;l<7;l++){let d=(this.#C+l)%7,u=document.createElement("th");u.setAttribute("abbr",Eo[d]),u.setAttribute("scope","col"),u.textContent=wo[d],h.appendChild(u)}c.appendChild(h),o.appendChild(c),this.#o=document.createElement("tbody"),o.appendChild(this.#o),this.#n.appendChild(o),this.appendChild(this.#n),this.#S(),this.listen(e,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#f,"change",()=>{this.#m=Number(this.#f.value);let l=te(this.#m,this.#d),d=Math.min(this.#l?.getDate()??1,l);this.#l=new Date(this.#m,this.#d,d),this.#S()}),this.listen(this.#o,"click",this.#V),this.listen(this.#n,"keydown",this.#$)}#S(){try{this.#c.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#m,this.#d,1))}catch{this.#c.textContent=oi[this.#d].charAt(0).toUpperCase()+oi[this.#d].slice(1)}this.#f.querySelector(`option[value="${this.#m}"]`)||this.#k(),this.#f.value=String(this.#m),this.#o.innerHTML="";let t=te(this.#m,this.#d),s=(new Date(this.#m,this.#d,1).getDay()-this.#C+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<s;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#m,this.#d,o),h=_(c),l=document.createElement("td"),d=document.createElement("button");d.type="button",d.setAttribute("data-date",h),d.textContent=String(o),ee(c,n)&&d.setAttribute("aria-current","date"),ee(c,this.#u)&&d.setAttribute("aria-selected","true");let u=this.#q(c,h);if(u.disabled&&(d.setAttribute("aria-disabled","true"),d.setAttribute("disabled",""),u.reason&&d.setAttribute("data-disabled-reason",u.reason)),this.#b.has(h)){let f=this.#b.get(h);d.setAttribute("data-highlight",f||"")}ee(c,this.#l)?(d.setAttribute("tabindex","0"),ee(c,this.#u)||d.setAttribute("data-focused","")):d.setAttribute("tabindex","-1"),l.appendChild(d),r.appendChild(l),(s+o)%7===0&&(this.#o.appendChild(r),r=document.createElement("tr"))}let a=(s+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#o.appendChild(r)}}#B(t,e){return this.#q(t,e).disabled}#q(t,e){return this.#v.has(e)?{disabled:!0,reason:this.#v.get(e)}:this.#y&&t<this.#y?{disabled:!0,reason:null}:this.#w&&t>this.#w?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#k(){this.#f.innerHTML="";let t=new Date().getFullYear(),e=this.#y?this.#y.getFullYear():t-100,s=this.#w?this.#w.getFullYear():t+10;for(let n=e;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#f.appendChild(r)}}#I(t){this.#d+=t,this.#d>11?(this.#d=0,this.#m++):this.#d<0&&(this.#d=11,this.#m--);let e=te(this.#m,this.#d),s=Math.min(this.#l?.getDate()??1,e);this.#l=new Date(this.#m,this.#d,s),this.#S(),this.#R(this.#l)}#O(t,e="internal"){let s=_(t);this.#B(t,s)||this.#u&&_(this.#u)===s||(this.#u=t,this.#l=t,this.#T(),this.#D(),this.#z(),this.#S(),this.#E(),this.#i.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:s,date:new Date(t),source:e}})))}#R(t){let e=_(t),s=this.#o.querySelector(`[data-date="${e}"]`);s&&(this.#o.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#u?this.#i.value=So(this.#u):this.#i.value=""}#N(){if(!this.#h){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#n.hidden=!1,this.#l&&(this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth()),this.#S(),this.#p){try{this.#n.showPopover()}catch{}this.#x(),window.addEventListener("scroll",this.#A,{capture:!0,passive:!0}),window.addEventListener("resize",this.#A,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#E(){if(this.#h){if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#n.hidden=!0,this.#p){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#A,{capture:!0}),window.removeEventListener("resize",this.#A)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#x(){if(!this.#p)return;let t=this.#r.getBoundingClientRect(),e=this.#n.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,h;o<e.height&&c>o?(h=t.top-e.height-s,this.#n.dataset.placement="top"):(h=t.bottom+s,delete this.#n.dataset.placement);let l=t.left;l+e.width>a-n&&(l=a-e.width-n),l<n&&(l=n),this.#n.style.setProperty("--calendar-top",`${h}px`),this.#n.style.setProperty("--calendar-left",`${l}px`)}#A=()=>{this.#h&&this.#x()};#L=()=>{let t=this.#i.value,{date:e,partial:s}=ai(t);if(e)this.#l=e,this.#m=e.getFullYear(),this.#d=e.getMonth(),this.#S();else if(s){this.#m=s.year,this.#d=s.month;let n=te(s.year,s.month),r=Math.min(this.#l?.getDate()??1,n);this.#l=new Date(s.year,s.month,r),this.#S()}!this.#h&&t.length>0&&this.#N()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:e}=ai(this.#i.value);e&&!this.#B(e,_(e))&&this.#O(e);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#N(),requestAnimationFrame(()=>this.#R(this.#l));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#h&&this.#E(),this.#T();return;case"Tab":this.#h&&this.#E();return}};#F=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let{date:s}=ai(e);s&&!this.#B(s,_(s))&&(this.#u=s,this.#l=s,this.#D(),this.#z(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:_(s),date:new Date(s)}})))}this.#T(),this.#h&&this.#E(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#P=t=>{this.#h&&!this.contains(t.target)&&this.#E()};#V=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.hasAttribute("disabled"))return;let n=q(s.getAttribute("data-date"));n&&this.#O(n)};#$=t=>{if(t.key==="Tab"){this.#E();return}let e=this.#l;if(!e)return;let s;switch(t.key){case"ArrowRight":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);break;case"ArrowLeft":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);break;case"ArrowDown":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+7);break;case"ArrowUp":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(e.getFullYear()+1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()+1,e.getDate());break;case"PageUp":t.shiftKey?s=new Date(e.getFullYear()-1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()-1,e.getDate());break;case"Home":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+this.#C);break;case"End":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-e.getDay()+this.#C));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#O(e);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#E(),this.#i.focus();return;default:return}t.preventDefault(),t.stopPropagation(),s&&(this.#y&&s<this.#y&&(s=this.#y),this.#w&&s>this.#w&&(s=this.#w),this.#l=s,(s.getMonth()!==this.#d||s.getFullYear()!==this.#m)&&(this.#d=s.getMonth(),this.#m=s.getFullYear(),this.#S()),this.#R(s))};#D(){let t=this.#u?_(this.#u):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#z(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#u?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#i||this):this.#e.setValidity({})}formResetCallback(){this.#u=q(this.#g);let t=new Date;this.#l=this.#u||t,this.#m=this.#l.getFullYear(),this.#d=this.#l.getMonth(),this.#T(),this.#D(),this.#z(),this.#h&&this.#S()}formStateRestoreCallback(t){t&&(this.#u=q(t),this.#u&&(this.#l=this.#u,this.#m=this.#u.getFullYear(),this.#d=this.#u.getMonth(),this.#T(),this.#D(),this.#z()))}get value(){return this.#u?_(this.#u):""}set value(t){let e=q(t);e&&this.#O(e,"api")}get min(){return this.#y?_(this.#y):""}set min(t){this.#y=t?q(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#w?_(this.#w):""}set max(t){this.#w=t?q(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};b("date-picker",ci);function dt(i,t,e){t/=100,e/=100;let s=a=>(a+i/30)%12,n=t*Math.min(e,1-e),r=a=>e-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function ie(i,t,e){i/=255,t/=255,e/=255;let s=Math.max(i,t,e),n=Math.min(i,t,e),r=(s+n)/2,a=0,o=0;if(s!==n){let c=s-n;switch(o=r>.5?c/(2-s-n):c/(s+n),s){case i:a=((t-e)/c+(t<e?6:0))/6;break;case t:a=((e-i)/c+2)/6;break;case e:a=((i-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function Co(i){i=i.replace(/^#/,""),i.length===3&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);let t=parseInt(i,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function ko(i,t,e){return"#"+[i,t,e].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function Y(i){let{r:t,g:e,b:s}=Co(i);return ie(t,e,s)}function G(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return ko(s,n,r)}function T(i,t,e){return Math.max(t,Math.min(e,i))}function li(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function hi(i){let t=i<=.0031308?i*12.92:1.055*Math.pow(i,.4166666666666667)-.055;return Math.round(T(t,0,1)*255)}function To(i,t,e){let s=li(i),n=li(t),r=li(e),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,h=Math.cbrt(a),l=Math.cbrt(o),d=Math.cbrt(c),u=.2104542553*h+.793617785*l-.0040720468*d,f=1.9779984951*h-2.428592205*l+.4505937099*d,v=.0259040371*h+.7827717662*l-.808675766*d,p=Math.sqrt(f*f+v*v),m=Math.atan2(v,f)*180/Math.PI;return m<0&&(m+=360),p<1e-4&&(m=0),{L:u,C:p,H:m}}function Lo(i,t,e){let s=e*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=i+.3963377774*n+.2158037573*r,o=i-.1055613458*n-.0638541728*r,c=i-.0894841775*n-1.291485548*r,h=a**3,l=o**3,d=c**3,u=4.0767416621*h-3.3077115913*l+.2309699292*d,f=-1.2684380046*h+2.6097574011*l-.3413193965*d,v=-.0041960863*h-.7034186147*l+1.707614701*d;return{r:hi(u),g:hi(f),b:hi(v)}}function di(i,t,e){let s=dt(i,t,e);return To(s.r,s.g,s.b)}function Fn(i,t,e){let{r:s,g:n,b:r}=Lo(i,t,e);return ie(s,n,r)}function Mo(i,t,e){return G(i,t,e)}function No(i,t,e){let{r:s,g:n,b:r}=dt(i,t,e);return`rgb(${s} ${n} ${r})`}function Do(i,t,e){return`hsl(${i}deg ${t}% ${e}%)`}function _o(i,t,e){let{L:s,C:n,H:r}=di(i,t,e);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function Rn(i,t,e,s){switch(i){case"rgb":return No(t,e,s);case"hsl":return Do(t,e,s);case"oklch":return _o(t,e,s);default:return Mo(t,e,s)}}var ut=["hex","rgb","hsl","oklch"],Io="hex",ui=class extends g{static formAssociated=!0;#e;#t;#i;#s;#r;#n;#a;#o;#c;#f;#h;#p={};#u=Io;#l;#m;#d;#y=!1;#w=!1;#v=0;#b=100;#g=50;#C;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;let t=this.getAttribute("format");t&&ut.includes(t)&&(this.#u=t);let e=this.#t.value||"#000000";this.#C=e;let s=Y(e);return this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#_(),this.#M(),this.#D(),this.#j(),this.#w=Qt,this.#w&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#G),(this.#t.disabled||this.hasAttribute("disabled"))&&this.setAttribute("data-disabled",""),!0}teardown(){window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}#_(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#s=document.createElement("span"),this.#s.className="color-swatch",this.#r=document.createElement("span"),this.#r.className="color-hex",this.#i.appendChild(this.#s),this.#i.appendChild(this.#r),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#y?this.#W():this.#z()})}#M(){this.#n=document.createElement("div"),this.#n.className="color-panel",this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("tabindex","0"),this.#o=document.createElement("div"),this.#o.className="color-area-thumb",this.#a.appendChild(this.#o),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#f=document.createElement("div"),this.#f.className="color-hue-thumb",this.#c.appendChild(this.#f),t.appendChild(this.#c),this.#n.appendChild(t);let e=document.createElement("div");e.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#h=document.createElement("select"),this.#h.className="color-format-select";for(let o of ut){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#h.appendChild(c)}this.#h.value=this.#u,s.appendChild(n),s.appendChild(this.#h),e.appendChild(s),this.#n.appendChild(e),this.listen(this.#h,"change",this.#q),this.#p.hex=this.#S("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#p.rgb=this.#S("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#p.hsl=this.#S("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#p.oklch=this.#S("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of ut)this.#n.appendChild(this.#p[o].wrapper);this.#B();let r=this.querySelector(":scope > datalist");if(r){this.#l=document.createElement("div"),this.#l.className="color-swatches",this.#l.setAttribute("role","listbox"),this.#l.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("role","option"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#l.appendChild(c)}this.#n.appendChild(this.#l),this.listen(this.#l,"click",this.#F)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-eyedropper",this.#m.setAttribute("aria-label","Pick color from screen"),this.#m.textContent="\u{1F4A7}",a.appendChild(this.#m),this.listen(this.#m,"click",this.#P)),this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-copy",this.#d.setAttribute("aria-label","Copy hex value"),this.#d.textContent="Copy",a.appendChild(this.#d),this.listen(this.#d,"click",this.#V),this.#n.appendChild(a),this.appendChild(this.#n),this.listen(this.#a,"pointerdown",this.#k),this.listen(this.#a,"keydown",this.#O),this.listen(this.#c,"pointerdown",this.#R),this.listen(this.#c,"keydown",this.#N);for(let o of ut){let c=o==="hex"?this.#x:o==="rgb"?this.#A:o==="hsl"?this.#L:this.#H;for(let{el:h}of this.#p[o].inputs)this.listen(h,"change",c)}}#S(t,e){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of e){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#B(){for(let t of ut)this.#p[t].wrapper.hidden=t!==this.#u;this.#d&&this.#d.setAttribute("aria-label",`Copy ${this.#u.toUpperCase()} value`)}#q=()=>{let t=this.#h.value;ut.includes(t)&&(this.#u=t,this.#B(),this.#D())};#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let e=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",e),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",e),this.#a.addEventListener("pointerup",s)};#I(t){let e=this.#a.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1),n=T((t.clientY-e.top)/e.height,0,1);this.#b=Math.round(s*100),this.#g=Math.round((1-n)*100),this.#$()}#O=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#b=T(this.#b+e,0,100);break;case"ArrowLeft":t.preventDefault(),this.#b=T(this.#b-e,0,100);break;case"ArrowUp":t.preventDefault(),this.#g=T(this.#g+e,0,100);break;case"ArrowDown":t.preventDefault(),this.#g=T(this.#g-e,0,100);break;default:return}this.#$()};#R=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#T(t);let e=n=>this.#T(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",e),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",e),this.#c.addEventListener("pointerup",s)};#T(t){let e=this.#c.getBoundingClientRect(),s=T((t.clientX-e.left)/e.width,0,1);this.#v=Math.round(s*360),this.#$()}#N=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#v=(this.#v+e)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#v=(this.#v-e+361)%361;break;default:return}this.#$()};#E(t,e){return this.#p[t].inputs.find(s=>s.channel===e)?.el}#x=()=>{let t=this.#E("hex","hex");if(!t)return;let e=t.value.trim();if(e.startsWith("#")||(e="#"+e),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){let s=Y(e);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}};#A=()=>{let t=T(Number(this.#E("rgb","r").value)||0,0,255),e=T(Number(this.#E("rgb","g").value)||0,0,255),s=T(Number(this.#E("rgb","b").value)||0,0,255),n=ie(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#L=()=>{let t=T(Number(this.#E("hsl","h").value)||0,0,360)%361,e=T(Number(this.#E("hsl","s").value)||0,0,100),s=T(Number(this.#E("hsl","l").value)||0,0,100);this.#v=t,this.#b=e,this.#g=s,this.#$()};#H=()=>{let t=T(Number(this.#E("oklch","oL").value)||0,0,100)/100,e=T(Number(this.#E("oklch","oC").value)||0,0,.4),s=T(Number(this.#E("oklch","oH").value)||0,0,360),n=Fn(t,e,s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#F=t=>{let e=t.target.closest("button[data-color]");if(!e)return;let s=e.getAttribute("data-color"),n=Y(s);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$()};#P=async()=>{try{let e=await new window.EyeDropper().open(),s=Y(e.sRGBHex);this.#v=s.h,this.#b=s.s,this.#g=s.l,this.#$()}catch{}};#V=()=>{let t=Rn(this.#u,this.#v,this.#b,this.#g);St(t,{button:this.#d,announceMessage:"Color copied"})};#$(t="internal"){this.#D(),this.#j();let e=G(this.#v,this.#b,this.#g),s=dt(this.#v,this.#b,this.#g);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:e,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:this.#v,s:this.#b,l:this.#g},source:t}}))}#D(){let t=G(this.#v,this.#b,this.#g),e=dt(this.#v,this.#b,this.#g),s=G(this.#v,100,50);this.#s.style.background=t,this.#r.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#o.style.insetInlineStart=`${this.#b}%`,this.#o.style.insetBlockStart=`${100-this.#g}%`,this.#o.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#b}%, Lightness ${this.#g}%`),this.#f.style.insetInlineStart=`${this.#v/360*100}%`,this.#c.setAttribute("aria-valuenow",String(this.#v)),this.#c.setAttribute("aria-valuetext",`Hue ${this.#v}\xB0`);let n=(a,o,c)=>{let h=this.#E(a,o);h&&(h.value=String(c))};n("hex","hex",t),n("rgb","r",e.r),n("rgb","g",e.g),n("rgb","b",e.b),n("hsl","h",this.#v),n("hsl","s",this.#b),n("hsl","l",this.#g);let r=di(this.#v,this.#b,this.#g);n("oklch","oL",(r.L*100).toFixed(1)),n("oklch","oC",r.C.toFixed(3)),n("oklch","oH",r.H.toFixed(1))}#z(){if(!this.#y){if(this.#y=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#w){this.#Y();try{this.#n.showPopover()}catch{}window.addEventListener("scroll",this.#U,{capture:!0,passive:!0}),window.addEventListener("resize",this.#U,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#W(){if(this.#y){if(this.#y=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#w){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#U,{capture:!0}),window.removeEventListener("resize",this.#U)}this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}}#Y(){if(!this.#w)return;let t=this.#i.getBoundingClientRect();this.#n.style.setProperty("--panel-top",`${t.bottom+4}px`),this.#n.style.setProperty("--panel-left",`${t.left}px`)}#U=()=>{this.#y&&this.#Y()};#G=t=>{this.#y&&!this.contains(t.target)&&this.#W()};#j(){let t=G(this.#v,this.#b,this.#g);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){let t=Y(this.#C);this.#v=t.h,this.#b=t.s,this.#g=t.l,this.#D(),this.#j()}formStateRestoreCallback(t){if(!t)return;let e=Y(t);this.#v=e.h,this.#b=e.s,this.#g=e.l,this.#D(),this.#j()}get value(){return G(this.#v,this.#b,this.#g)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let e=G(this.#v,this.#b,this.#g).toLowerCase(),s=t.toLowerCase();if(e===s||e===s.toLowerCase())return;let n=Y(t);this.#v=n.h,this.#b=n.s,this.#g=n.l,this.#$("api")}};b("color-picker",ui);var $o='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',qo='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function Oo(i){if(!i)return[];let t=i.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(e=>{let s=e.trim();return{value:s,label:s}})}function Bo(i){return i?i.split(",").map(t=>t.trim()).filter(Boolean):[]}function Po(i){let t=Math.max(0,Math.round(i)),e=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return e>0?`${e}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Fo(i,t){let e=Number(i)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(e);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${e<0?"-":""}${a.format(r)} ${s[n]}`}function Ro(){return document.documentElement.lang||void 0}function fi(i){let t=String(i),e=t.indexOf(".");return e<0?0:t.length-e-1}var pi=class extends g{static formAssociated=!0;static observedAttributes=["value","disabled","readonly"];#e;#t;#i=-1/0;#s=1/0;#r=1;#n=[];#a=[];#o;#c;#f="";#h=!1;#p=!1;#u;#l;#m;#d;#y;#w;#v;#b;#g;#C=0;#_=0;#M=!1;#S=!1;constructor(){super(),this.#e=this.attachInternals(),this._adoptInternals(this.#e)}setup(){this.#B(),this.#q(),this.#O();let t=this.getAttribute("value");this.#m=t,this.#P(t??this.#I(),"init")}attributeChangedCallback(t,e,s){!this.isConnected||!this.#d||(t==="value"?this.#P(s??this.#I(),"attr"):(t==="disabled"||t==="readonly")&&this.#E())}#B(){this.hasAttribute("data-options")?this.#t="enum":this.hasAttribute("data-values")?this.#t="token":this.hasAttribute("data-format")||this.hasAttribute("data-suffix")?this.#t="formatted":(this.#t="numeric",console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/concepts/numeric-inputs/'))}#q(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#s=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#r=Number(this.getAttribute("data-step"))||1,this.#n=Bo(this.getAttribute("data-values")),this.#a=Oo(this.getAttribute("data-options")),this.#o=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#c=this.getAttribute("data-currency")||"USD",this.#f=this.getAttribute("data-suffix")||"",this.#h=this.hasAttribute("data-show-label"),this.#p=this.hasAttribute("data-accelerate"),this.#u=Ro(),this.#g=this.#k()}#k(){if(!this.#o)return null;let t=fi(this.#r);return this.#o==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#o==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#c}):this.#o==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#t==="enum"?this.#a[0]?.value??"":this.#t==="token"?this.#n[0]??"":"0"}#O(){this.replaceChildren(),this.#v=document.createElement("button"),this.#v.type="button",this.#v.className="stepper-dec",this.#v.setAttribute("aria-label","Decrease"),this.#v.setAttribute("tabindex","-1"),this.#v.innerHTML=$o,this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="stepper-inc",this.#b.setAttribute("aria-label","Increase"),this.#b.setAttribute("tabindex","-1"),this.#b.innerHTML=qo,this.#d=document.createElement("span"),this.#d.className="stepper-value",this.#d.setAttribute("role","spinbutton"),this.#d.setAttribute("tabindex","0"),this.#y=document.createElement("span"),this.#y.className="stepper-value-display",this.#d.appendChild(this.#y),this.#w=new Set;for(let t of this.#z())this.#W(t);this.appendChild(this.#v),this.appendChild(this.#d),this.appendChild(this.#b),this.#R(this.#v,-1),this.#R(this.#b,1),this.listen(this.#d,"keydown",this.#T),this.#E()}#R(t,e){if(this.listen(t,"click",n=>{if(this.#S){this.#S=!1,n.preventDefault();return}this.#x(e,1)}),!this.#p)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#N()||(this.#M=!1,this.#C=window.setTimeout(()=>{this.#M=!0,this.#_=window.setInterval(()=>this.#x(e,1),100),this.#C=window.setTimeout(()=>{window.clearInterval(this.#_),this.#_=window.setInterval(()=>this.#x(e,5),50)},1e3)},500))});let s=()=>{window.clearTimeout(this.#C),window.clearInterval(this.#_),this.#C=0,this.#_=0,this.#M&&(this.#S=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T=t=>{if(!this.#N())switch(t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#x(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#x(-1,1);break;case"PageUp":t.preventDefault(),this.#x(1,10);break;case"PageDown":t.preventDefault(),this.#x(-1,10);break;case"Home":t.preventDefault(),this.#A("min");break;case"End":t.preventDefault(),this.#A("max");break;default:}};#N(){return this.hasAttribute("disabled")||this.hasAttribute("readonly")}#E(){let t=this.hasAttribute("disabled");this.#v.disabled=t,this.#b.disabled=t,this.#d.setAttribute("aria-disabled",String(t)),t?this.#d.removeAttribute("tabindex"):this.#d.setAttribute("tabindex","0")}#x(t,e){if(this.#N())return;let s=this.#L(t,e);s===null||s===this.#l||this.#P(s,"step")}#A(t){if(this.#t==="enum"){let s=t==="min"?0:this.#a.length-1;this.#P(this.#a[s]?.value,"step");return}if(this.#t==="token"){let s=t==="min"?0:this.#n.length-1;this.#P(this.#n[s],"step");return}let e=t==="min"?this.#i===-1/0?this.#l:this.#i:this.#s===1/0?this.#l:this.#s;this.#P(String(e),"step")}#L(t,e){if(this.#t==="enum"){let c=this.#a.findIndex(d=>d.value===this.#l),h=c===-1?0:c,l=Math.min(this.#a.length-1,Math.max(0,h+t*e));return this.#a[l]?.value}if(this.#t==="token"){let h=this.#H(this.#l);h===-1&&(h=this.#F(this.#l));let l=Math.min(this.#n.length-1,Math.max(0,h+t*e));return this.#n[l]}let s=Number(this.#l)||0,n=fi(this.#r),r=s+t*this.#r*e,a=Number(r.toFixed(n)),o=Math.min(this.#s,Math.max(this.#i,a));return String(o)}#H(t){if(t==null)return-1;let e=this.#n.indexOf(String(t));if(e!==-1)return e;let s=Number(t);if(Number.isFinite(s)){let n=this.#n.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#F(t){let e=Number(t);if(!Number.isFinite(e))return 0;let s=0,n=1/0;return this.#n.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-e);c<n&&(n=c,s=a)}),s}#P(t,e){let s=this.#V(t),n=s!==this.#l;this.#l=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#$(),this.#Y(),this.#U(),this.#X(),this.#K(),n&&e!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#V(t){if(t==null)return this.#I();if(this.#t==="enum"){let n=String(t);return this.#a.find(a=>a.value===n)?n:this.#a[0]?.value??""}if(this.#t==="token")return String(t);let e=Number(t);if(!Number.isFinite(e))return String(this.#i===-1/0?0:this.#i);let s=fi(this.#r);return String(Number(Math.min(this.#s,Math.max(this.#i,e)).toFixed(s)))}#$(){let t=this.#D();this.#y.textContent=t,this.#W(t)}#D(t=this.#l){if(this.#t==="enum")return this.#a.find(s=>s.value===t)?.label??t??"";if(this.#t==="token"){let e=this.#h?String(t).replace(/^--/,""):String(t);return this.#f?`${e}${this.#f}`:e}if(this.#t==="formatted"){let e=Number(t)||0;if(this.#o==="duration")return Po(e);if(this.#o==="bytes")return Fo(e,this.#u);if(this.#g){let s=this.#o==="percent"?e/100:e,n=this.#g.format(s);return this.#f&&this.#o==="number"?`${n}${this.#f}`:n}return this.#f?`${e}${this.#f}`:String(e)}return String(t??"")}#z(){if(this.#t==="enum")return this.#a.map(s=>this.#D(s.value));if(this.#t==="token")return this.#n.map(s=>this.#D(s));let t=new Set,e=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&e(this.#i),this.#s!==1/0&&e(this.#s),e(Number(this.getAttribute("value"))||0),this.#s===1/0){let s=[10,100,1e3,1e4];for(let n of s)e(n);if(this.#o==="bytes")for(let n of[999,999e3,999e6,999e9])e(n)}return[...t].map(s=>this.#D(String(s)))}#W(t){let e=String(t??"");if(!e||this.#w.has(e))return;this.#w.add(e);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=e,this.#d.appendChild(s)}recomputeWidth(){if(this.#d){this.#d.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#w=new Set;for(let t of this.#z())this.#W(t)}}#Y(){if(this.#t==="enum"){let e=this.#a.findIndex(s=>s.value===this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#a.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}if(this.#t==="token"){let e=this.#H(this.#l);this.#d.setAttribute("aria-valuemin","1"),this.#d.setAttribute("aria-valuemax",String(this.#n.length)),this.#d.setAttribute("aria-valuenow",String((e===-1?0:e)+1)),this.#d.setAttribute("aria-valuetext",this.#D());return}let t=Number(this.#l)||0;this.#i!==-1/0?this.#d.setAttribute("aria-valuemin",String(this.#i)):this.#d.removeAttribute("aria-valuemin"),this.#s!==1/0?this.#d.setAttribute("aria-valuemax",String(this.#s)):this.#d.removeAttribute("aria-valuemax"),this.#d.setAttribute("aria-valuenow",String(t)),this.#d.setAttribute("aria-valuetext",this.#D())}#U(){let t=this.#G(),e=this.#j();this.#v.disabled=t||this.hasAttribute("disabled"),this.#b.disabled=e||this.hasAttribute("disabled")}#G(){return this.#t==="enum"?this.#l===this.#a[0]?.value:this.#t==="token"?this.#H(this.#l)===0:this.#i!==-1/0&&Number(this.#l)<=this.#i}#j(){return this.#t==="enum"?this.#l===this.#a[this.#a.length-1]?.value:this.#t==="token"?this.#H(this.#l)===this.#n.length-1:this.#s!==1/0&&Number(this.#l)>=this.#s}#X(){this.#e.setFormValue(String(this.#l??""))}#K(){this.setState("at-min",this.#G()),this.setState("at-max",this.#j())}formResetCallback(){this.#P(this.#m??this.#I(),"reset")}formStateRestoreCallback(t){t!=null&&this.#P(t,"restore")}get displayText(){return this.#y?.textContent??""}get value(){return this.#l==null?"":String(this.#l)}set value(t){String(t)!==String(this.#l)&&this.#P(t,"api")}get form(){return this.#e.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#e.validity}get validationMessage(){return this.#e.validationMessage}checkValidity(){return this.#e.checkValidity()}reportValidity(){return this.#e.reportValidity()}};b("stepper-wc",pi);var Ho=new Set(["live","recording","streaming","error","online","running","away","paused","busy","offline","stopped"]),mi=class extends g{static observedAttributes=["data-variant","data-live"];#e;setup(){let t=document.createElement("span");for(t.className="status-dot",t.setAttribute("aria-hidden","true"),this.#e=document.createElement("span"),this.#e.className="status-label";this.firstChild;)this.#e.appendChild(this.firstChild);this.appendChild(t),this.appendChild(this.#e),this.#t(),this.#i(),this.#r()}attributeChangedCallback(t,e,s){!this.isConnected||e===s||(t==="data-variant"?(this.#i(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:e}}))):t==="data-live"&&this.#t())}#t(){this.getAttribute("data-live")==="off"?(this.removeAttribute("role"),this.removeAttribute("aria-live")):(this.hasAttribute("role")||this.setAttribute("role","status"),this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"))}#i(){let t=this.getAttribute("data-variant");t&&(Ho.has(t)||this.#s(t)||console.info(`[status-wc] data-variant="${t}" is not a built-in; add a CSS rule (status-wc[data-variant="${t}"] { --status-dot-color: \u2026; }) or use a built-in.`))}#s(t){let e=this.querySelector(".status-dot");if(!e)return!0;let s=getComputedStyle(e).getPropertyValue("--status-dot-color").trim();return s&&s!==""}#r(){let t=this.#e?.textContent.trim(),e=this.hasAttribute("aria-label");!t&&!e&&console.warn("[status-wc] needs slot text or aria-label for accessibility.")}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};b("status-wc",mi);var Hn=0,bi=class extends g{#e;#t;#i;#s=[];#r=-1;#n=!1;#a=[];setup(){let t=this.querySelector(":scope > [data-trigger]"),e=this.querySelector('menu, ul[role="menu"]');if(!t||!e)return!1;this.#e=t,this.#t=e;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");return s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Hn}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#t),this.appendChild(this.#i)),this.#t.parentElement!==this.#i&&this.#i.appendChild(this.#t),this.#e?.setAttribute("aria-expanded","false"),this.#t.setAttribute("role","menu"),this.#t.id||(this.#t.id=`ctx-menu-list-${++Hn}`),this.#t.querySelectorAll(":scope > li[data-group]").forEach(n=>{n.setAttribute("role","presentation"),n.classList.add("ctx-group-label")}),this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(n=>!n.disabled&&!n.hasAttribute("data-disabled")),this.#s.forEach(n=>{n.setAttribute("role","menuitem"),n.setAttribute("tabindex","-1"),n.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",this.listen(n,"click",this.#h);let r=n.getAttribute("data-shortcut");if(r){let a=document.createElement("kbd");a.className="ctx-kbd",a.textContent=vn(r),n.appendChild(a);let o=Kt(r,()=>n.click());this.#a.push(o)}}),this.#t.querySelectorAll('li:empty:not([data-group]), [role="separator"], hr').forEach(n=>{n.setAttribute("role","separator")}),this.listen(this.#e,"contextmenu",this.#o),this.listen(this.#t,"keydown",this.#f),this.listen(window,"scroll",this.#u,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#p),!0}teardown(){this.#a.forEach(t=>t()),this.#a=[]}get items(){if(!this.#t)return[];let t=[];for(let e of this.#t.querySelectorAll(":scope > li")){if(e.hasAttribute("data-group")){t.push({group:e.textContent.trim()});continue}if(e.matches(':empty, [role="separator"]')||e.querySelector("hr")){t.push({separator:!0});continue}let s=e.querySelector('button, a, [role="menuitem"]');s&&t.push({label:s.textContent.trim().replace(/\s+/g," "),value:s.getAttribute("data-value")||void 0,href:s.tagName==="A"?s.getAttribute("href"):void 0,shortcut:s.getAttribute("data-shortcut")||void 0,disabled:s.disabled||s.hasAttribute("data-disabled")||void 0})}return t}set items(t){let e=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of e){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&(a.tagName==="BUTTON"?a.disabled=!0:a.setAttribute("data-disabled","")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:e,source:"property"},bubbles:!0}))}#o=t=>{t.preventDefault(),this.#c(t.clientX,t.clientY)};#c(t,e){this.#n=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#i.style.top=`${e}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let s=this.#i.getBoundingClientRect(),n=t+s.width>window.innerWidth?t-s.width:t,r=e+s.height>window.innerHeight?e-s.height:e;this.#i.style.top=`${Math.max(0,r)}px`,this.#i.style.left=`${Math.max(0,n)}px`}),this.#r=-1,this.#l(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#i?.hide(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))}#f=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#l(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#l(this.#r-1);break;case"Home":t.preventDefault(),this.#l(0);break;case"End":t.preventDefault(),this.#l(this.#s.length-1);break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break;case"Tab":this.close();break}};#h=()=>{this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:this.#s[this.#r]}}))};#p=()=>{this.#n&&(this.#n=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#u=()=>{this.#n&&this.close()};#l(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}get isOpen(){return this.#n}};b("context-menu",bi);var gi=class extends g{#e;#t;#i=null;#s=!1;setup(){if(this.#s)return;let t=this.getAttribute("src");return t?(this.#i===null&&(this.#i=this.innerHTML),this.hasAttribute("lazy")?this.#n():this.#a(t),!0):!1}teardown(){this.#e?.disconnect(),this.#t?.abort()}get src(){return this.getAttribute("src")||""}set src(t){let e=t==null?"":String(t);this.src!==e&&(e?this.setAttribute("src",e):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:e,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,s){t==="src"&&s&&e!==s&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#r()?this.#n():this.#a(s))}#r(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#n(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){this.#e.disconnect();let s=this.getAttribute("src");s&&this.#a(s)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let e=await fetch(t,{signal:this.#t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);let s=await e.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=s:n==="append"?this.insertAdjacentHTML("beforeend",s):n==="prepend"&&this.insertAdjacentHTML("afterbegin",s),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#s=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:s}}))}catch(e){if(e.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#i!==null&&!this.#s&&(this.innerHTML=this.#i),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:e.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",gi);j();var zn="environment",Vn="preferences",vi={timeOfDay:!1,seasonal:!1},zo=900*1e3,K={...vi};function et(i,t,e){return i+(t-i)*Math.min(1,Math.max(0,e))}var Lt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let i=await E.get(zn,Vn);K=i?{...vi,...i}:{...vi},(K.timeOfDay||K.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...K}},save(i){return K={...K,...i},E.set(zn,Vn,K).catch(()=>{}),{...K}},setTimeOverride(i){this._timeOverride=i,this._hasActiveSource()&&this._update()},setMonthOverride(i){this._monthOverride=i,this._hasActiveSource()&&this._update()},setSource(i,t){let e=this.save({[i]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(i){let t=i||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent");let t=i.getAttribute("data-theme");if(t){let e=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(e)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let i=this.load(),t=0;i.timeOfDay&&(t+=this._getTimeOfDayOffset()),i.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let i=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return i<5?-20:i<7?et(-20,20,(i-5)/2):i<10?et(20,5,(i-7)/3):i<14?et(5,0,(i-10)/4):i<17?et(0,-5,(i-14)/3):i<19?et(-5,15,(i-17)/2):i<21?et(15,-10,(i-19)/2):et(-10,-20,(i-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let i=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(i+6)%12:i;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),zo))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var se=null;function Wn(){return"0.3.0-2e045630"}function Vo(){let i=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of i){let s=e.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function jn(){return se||(se=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),se}function Yn(i){return new Promise((t,e)=>{navigator.serviceWorker?.controller?Un(navigator.serviceWorker.controller,i,t,e):jn().then(s=>{let n=s.active||s.waiting||s.installing;n?Un(n,i,t,e):e(new Error("No active service worker"))}).catch(e)})}function Un(i,t,e,s){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),i.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function Gn(){return Yn("GET_STATUS")}async function Kn(){return Yn("CLEAR_CACHE")}async function Xn(){let i=await jn();return await i.update(),{updated:!!i.waiting}}function Uo(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Uo()){let i=Vo();window.addEventListener("load",()=>{se=navigator.serviceWorker.register(i).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}j();var ft=null,O="settings",Nt={motionFx:!0,sounds:!1},Si=class extends g{#e=null;#t=null;#i=!1;#s=[];#r={...Nt};#n=!1;setup(){return this.#a(),!0}async#a(){await this.#o(),this.#v(),this.#g(),this.#V(),this.listen(window,"vb:theme-change",this.#P),this.listen(window,"vb:extensions-change",this.#P),this.listen(window,"vb:a11y-themes-change",this.#P)}teardown(){}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#r},sticky:this.#n}}set data(t){if(!t||typeof t!="object")return;let e=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],e.push(E.set(O,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#r={...Nt,...t.extensions},e.push(E.set(O,"extensions",this.#r))),t.sticky!=null&&(this.#n=!!t.sticky,e.push(E.set(O,"sticky",this.#n?"on":"off"))),Promise.all(e).then(()=>{this.#V?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#o(){let[t,e,s]=await Promise.all([E.get(O,"a11y"),E.get(O,"extensions"),E.get(O,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#r={...Nt,...e??{}},this.#n=s==="on"}#c(t){return t!==""&&t!==void 0}#f(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#p(){return this.#n}#u(t){return t!==""&&t!==void 0}#l(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#m(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#d(t){if(!t)return"card";let e=t.split(/\s+/);for(let s of e)if(s==="stretch"||s==="integrated")return s;return"card"}#y(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,e){let s=[];return t&&t!=="card"&&s.push(t),e&&s.push("fixed"),s.join(" ")||"card"}#v(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#b(),this.appendChild(this.#t)}#b(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:h,pageBgGradDir:l}=A.getState(),d=this.#W(),u=this.#X(),f=this.#c(s),v=this.#f(s),p=this.#u(n),m=this.#l(n);return`
|
|
317
317
|
<header class="settings-header">
|
|
318
318
|
<strong>Settings</strong>
|
|
319
319
|
<button type="button" class="settings-close" aria-label="Close settings">
|
|
@@ -339,7 +339,7 @@ svg {
|
|
|
339
339
|
|
|
340
340
|
<label class="settings-label" for="settings-theme">Theme</label>
|
|
341
341
|
<select id="settings-theme" name="settings-theme">
|
|
342
|
-
${
|
|
342
|
+
${nn.map(y=>`
|
|
343
343
|
<optgroup label="${y.label}">
|
|
344
344
|
${y.themes.map(S=>`
|
|
345
345
|
<option value="${S.id}" ${e===S.id?"selected":""}>${S.name}</option>
|
|
@@ -493,7 +493,7 @@ svg {
|
|
|
493
493
|
<details name="settings">
|
|
494
494
|
<summary>System</summary>
|
|
495
495
|
<div class="settings-section system-info">
|
|
496
|
-
<p class="system-version">Vanilla Breeze <code>v${
|
|
496
|
+
<p class="system-version">Vanilla Breeze <code>v${Wn()}</code></p>
|
|
497
497
|
<p class="system-sw-status" data-sw-status>Service Worker: <span>checking\u2026</span></p>
|
|
498
498
|
<footer class="system-actions">
|
|
499
499
|
<button type="button" data-action="clear-cache">Clear Cache</button>
|
|
@@ -506,7 +506,7 @@ svg {
|
|
|
506
506
|
<footer class="settings-footer">
|
|
507
507
|
<button type="button" class="settings-reset">Reset to Defaults</button>
|
|
508
508
|
</footer>
|
|
509
|
-
`}#g(){this.#e.addEventListener("click",this.#C),this.listen(document,"click",this.#_),this.listen(document,"keydown",this.#M),this.#t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),this.#t.querySelectorAll('input[name="settings-mode"]').forEach(t=>{t.addEventListener("change",this.#S)}),this.#t.querySelector("#settings-theme")?.addEventListener("change",this.#B),this.#t.querySelector("input[data-fluid-toggle]")?.addEventListener("change",this.#q),this.#t.querySelectorAll('input[name="settings-density"]').forEach(t=>{t.addEventListener("change",this.#k)}),this.#t.querySelector("input[data-backdrop-toggle]")?.addEventListener("change",this.#I),this.#t.querySelectorAll('input[name="settings-backdrop"]').forEach(t=>{t.addEventListener("change",this.#O)}),this.#t.querySelectorAll('input[name="settings-backdrop-chrome"]').forEach(t=>{t.addEventListener("change",this.#R)}),this.#t.querySelector("input[data-backdrop-fixed]")?.addEventListener("change",this.#T),this.#t.querySelector("input[data-sticky-toggle]")?.addEventListener("change",this.#N),this.#t.querySelector('[name="settings-page-bg"]')?.addEventListener("change",this.#E),this.#t.querySelector('[name="settings-page-bg-color"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.addEventListener("change",this.#x),this.#t.querySelectorAll("input[data-a11y]").forEach(t=>{t.addEventListener("change",this.#A)}),this.#t.querySelectorAll("input[data-ext]").forEach(t=>{t.addEventListener("change",this.#L)}),this.#t.querySelectorAll("input[data-env]").forEach(t=>{t.addEventListener("change",this.#H)}),this.#t.querySelector(".settings-reset")?.addEventListener("click",this.#F),this.#t.querySelector('[data-action="clear-cache"]')?.addEventListener("click",this.#Q),this.#t.querySelector('[data-action="check-update"]')?.addEventListener("click",this.#tt),this.#Z()}#C=t=>{t.stopPropagation(),this.toggle()};#_=t=>{this.#i&&!this.contains(t.target)&&this.close()};#M=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#e?.focus())};#S=t=>{A.setMode(t.target.value)};#B=async t=>{let e=t.target;e.disabled=!0;try{await A.setBrand(e.value),this.#G()}catch{console.warn("[VB] Theme load failed, using default")}finally{e.disabled=!1}};#q=t=>{let e=t.target.checked,s=this.#f(A.getState().fluid)||"default";A.setFluid(this.#h(e,s)),this.#$(e)};#k=t=>{A.setFluid(this.#h(!0,t.target.value))};#I=t=>{let e=t.target.checked,s=this.#l(A.getState().backdrop)||"default";A.setBackdrop(this.#m(e,s)),this.#D(e)};#O=t=>{A.setBackdrop(this.#m(!0,t.target.value))};#R=t=>{let e=this.#y(A.getState().backdropChrome);A.setBackdropChrome(this.#w(t.target.value,e))};#T=t=>{let e=this.#d(A.getState().backdropChrome);A.setBackdropChrome(this.#w(e,t.target.checked))};#N=async t=>{let e=t.target.checked;this.#n=e,await E.set(O,"sticky",e?"on":"off");let s=document.querySelector("header");if(e){document.documentElement.dataset.sticky="",s&&(s.dataset.sticky="");let{initStickyManager:n}=await Promise.resolve().then(()=>(Mt(),re));n()}else{delete document.documentElement.dataset.sticky,s&&delete s.dataset.sticky;let{destroyStickyManager:n}=await Promise.resolve().then(()=>(Mt(),re));n()}};#E=t=>{let e=t.target.value;if(this.#z(e),e==="color"){let s=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"#1a1a2e";A.setPageBg({type:e,color:s})}else if(e==="gradient"){let s=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"#1a1a2e",n=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"#16213e",r=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";A.setPageBg({type:e,gradStart:s,gradEnd:n,gradDir:r})}else A.setPageBg({})};#x=()=>{let t=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";if(t==="color"){let e=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"";A.setPageBg({type:t,color:e})}else if(t==="gradient"){let e=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"",s=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"",n=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";A.setPageBg({type:t,gradStart:e,gradEnd:s,gradDir:n})}};#A=t=>{let e=t.target.dataset.a11y,s=this.#W();if(t.target.checked&&!s.includes(e))s.push(e);else if(!t.target.checked){let n=s.indexOf(e);n!==-1&&s.splice(n,1)}this.#Y(s),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:s}))};#L=t=>{let e=t.target.dataset.ext,s=t.target.checked;this.#K(e,s),this.#J()};#H=t=>{let e=t.target.dataset.env,s=t.target.checked;Lt.setSource(e,s)};#F=()=>{confirm("Reset all settings to defaults?")&&(A.reset(),this.#Y([]),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]})),this.#r={...Nt},E.remove(O,"extensions").catch(()=>{}),this.#J(),this.#n=!1,E.remove(O,"sticky").catch(()=>{}),delete document.documentElement.dataset.sticky,Promise.resolve().then(()=>(Mt(),re)).then(t=>t.destroyStickyManager()).catch(()=>{}),Lt.setSource("timeOfDay",!1),Lt.setSource("seasonal",!1),this.#V())};#P=()=>{this.#V()};#V(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:h,pageBgGradDir:l}=A.getState(),d=this.#W(),u=this.#X(),f=this.#c(s),v=this.#f(s),p=this.#u(n),m=this.#l(n),y=this.#t.querySelector(`input[name="settings-mode"][value="${t}"]`);y&&(y.checked=!0);let S=this.#t.querySelector("#settings-theme");S&&(S.value=e||"default");let x=this.#t.querySelector("input[data-fluid-toggle]");x&&(x.checked=f);let B=this.#t.querySelector(`input[name="settings-density"][value="${v}"]`);B&&(B.checked=!0),this.#$(f);let H=this.#t.querySelector("input[data-backdrop-toggle]");H&&(H.checked=p);let zt=this.#t.querySelector(`input[name="settings-backdrop"][value="${m}"]`);zt&&(zt.checked=!0);let Ca=this.#d(r),Hs=this.#t.querySelector(`input[name="settings-backdrop-chrome"][value="${Ca}"]`);Hs&&(Hs.checked=!0);let zs=this.#t.querySelector("input[data-backdrop-fixed]");zs&&(zs.checked=this.#y(r)),this.#D(p);let Vs=this.#t.querySelector('[name="settings-page-bg"]');Vs&&(Vs.value=a||"");let Us=this.#t.querySelector('[name="settings-page-bg-color"]');Us&&o&&(Us.value=o);let Ws=this.#t.querySelector('[name="settings-page-bg-grad-start"]');Ws&&c&&(Ws.value=c);let js=this.#t.querySelector('[name="settings-page-bg-grad-end"]');js&&h&&(js.value=h);let Ys=this.#t.querySelector('[name="settings-page-bg-grad-dir"]');Ys&&l&&(Ys.value=l),p&&this.#z(a||""),this.#t.querySelectorAll("input[data-a11y]").forEach(vt=>{let U=vt;U.checked=d.includes(U.dataset.a11y||"")}),this.#t.querySelectorAll("input[data-ext]").forEach(vt=>{let U=vt,Vt=U.dataset.ext,Ta=u[Vt];U.checked=Ta??Nt[Vt]});let Gs=this.#t.querySelector("input[data-sticky-toggle]");Gs&&(Gs.checked=this.#p());let ka=this.#j();this.#t.querySelectorAll("input[data-env]").forEach(vt=>{let U=vt,Vt=U.dataset.env;U.checked=ka[Vt]??!1})}#$(t){let e=this.#t.querySelector(".density-row");e&&(e.hidden=!t)}#D(t){if(this.#t.querySelectorAll(".backdrop-row").forEach(e=>{e.hidden=!t}),t){let e=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";this.#z(e)}}#z(t){let e=this.#t.querySelector(".page-bg-color-row"),s=this.#t.querySelector(".page-bg-grad-row"),n=this.#t.querySelector(".page-bg-grad-dir-row");e&&(e.hidden=t!=="color"),s&&(s.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#W(){return[...this.#s]}#Y(t){this.#s=[...t],E.set(O,"a11y",this.#s).catch(()=>{})}#U(){let t=this.#W(),{brand:e}=A.getState(),s=document.documentElement,n=e!=="default"?[e,...t]:[...t];n.length?s.dataset.theme=n.join(" "):delete s.dataset.theme}#G(){this.#U()}#j(){return Lt.load()}#X(){return{...this.#r}}#K(t,e){this.#r={...this.#r,[t]:e},E.set(O,"extensions",this.#r).catch(()=>{})}async#J(){let t=this.#X(),e=document.documentElement;t.motionFx?delete e.dataset.motionReduced:e.dataset.motionReduced="",t.sounds?(ft||(ft=(await Promise.resolve().then(()=>(Gn(),Yn))).SoundManager),ft.init(),ft.enable()):ft&&ft.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}async#Z(){let t=this.#t.querySelector("[data-sw-status] span");if(t){if(!("serviceWorker"in navigator)){t.textContent="Not supported";return}try{let s=(await zn()).cachedURLs?.length??0;t.textContent=`Active (${s} cached files)`}catch{t.textContent="Not registered"}}}#Q=async t=>{let e=t.target;e.disabled=!0,e.textContent="Clearing\u2026";try{await Vn(),e.textContent="Cleared!",this.#Z(),setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}};#tt=async t=>{let e=t.target;e.disabled=!0,e.textContent="Checking\u2026";try{let{updated:s}=await Un();e.textContent=s?"Update available!":"Up to date",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}};open(){this.#i||(this.#i=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#V(),this.#et())}#et(){let t=this.getBoundingClientRect(),e=this.#t;e.style.removeProperty("top"),e.style.removeProperty("bottom"),e.style.removeProperty("left"),e.style.removeProperty("right");let s=e.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<s.height&&o>a?(e.style.top="calc(100% + 8px)",e.style.bottom="auto"):(e.style.bottom="calc(100% + 8px)",e.style.top="auto");let c=n-t.right,h=t.left,l=s.width;t.right<l&&h<c?(e.style.left="0",e.style.right="auto"):(e.style.right="0",e.style.left="auto")}close(){this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"))}toggle(){this.#i?this.close():this.open()}};b("settings-panel",Ei);W();Ai();var Ho={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"};function N(i){return String(i??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}var Si=class extends g{#e="panel";#t=null;#i=null;#s=null;#r=null;#n=new Set;#a=[];#o=!1;#c=null;#f=new Set;#h="all";#p=[];setup(){return this.#e=this.getAttribute("mode")==="banner"?"banner":"panel",this.#e==="banner"?this.#u():this.#m(),!0}teardown(){this.#c!=null&&(clearInterval(this.#c),this.#c=null)}get notifications(){return[...this.#a]}set notifications(t){this.#e==="panel"&&(this.#a=Array.isArray(t)?t:[],typeof this.#g=="function"&&this.#g(),typeof this.#_=="function"&&this.#_(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#a,source:"property"},bubbles:!0})))}async#u(){let t=this.getAttribute("persist");if(t||console.warn("[notification-wc] banner mode requires a persist attribute"),this.dataset.mode="banner",this.dataset.variant=this.getAttribute("variant")||"info",this.dataset.position=this.getAttribute("position")||"top",t){let s=Number(this.getAttribute("expires")??""),n=Number.isFinite(s)&&s>0?s*864e5:void 0,r=await E.get("notifications",t,n?{maxAge:n}:void 0);if(r&&r.dismissed){this.hidden=!0;return}}let e=this.querySelector('[value="dismiss"], [data-dismiss]');e&&(this.#t=e,this.listen(e,"click",this.#l))}#l=async t=>{t.preventDefault();let e=this.getAttribute("persist");e&&await E.set("notifications",e,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:e}})),this.hidden=!0};async#m(){if(this.dataset.mode="panel",await this.#d(),this.#w(),this.#v(),await this.#M(),this.#_(),this.listen(document,"click",this.#O),this.listen(document,"keydown",this.#R),this.listen(document,"page-watch:add",()=>this.#M()),this.listen(document,"page-watch:remove",()=>this.#M()),this.getAttribute("src")){await this.#A();let t=Number(this.getAttribute("poll"));Number.isFinite(t)&&t>0&&(this.#c=setInterval(()=>this.#A(),t))}}async#d(){let t=this.getAttribute("storage-key")||"notifications",e=await E.get(t,"read-ids");Array.isArray(e)&&(this.#n=new Set(e.filter(s=>typeof s=="string")))}async#y(){let t=this.getAttribute("storage-key")||"notifications";await E.set(t,"read-ids",Array.from(this.#n))}#w(){if(this.#i=this.querySelector(":scope > [data-trigger]"),this.#i){let t=this.#i.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.hidden=!0,this.#i.appendChild(t))}else{let t=document.createElement("button");t.type="button",t.setAttribute("data-trigger",""),t.className="notification-trigger",t.setAttribute("aria-label","Notifications"),t.innerHTML='<icon-wc name="bell" size="sm"></icon-wc><span class="notification-badge" hidden>0</span>',this.#i=t,this.prepend(t)}this.#r=this.#i.querySelector(".notification-badge"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.listen(this.#i,"click",this.#I)}#v(){this.#s=document.createElement("div"),this.#s.className="notification-panel",this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Notifications"),this.#s.hidden=!0;let t=`notification-panel-${crypto.randomUUID().slice(0,8)}`;this.#s.id=t,this.#i?.setAttribute("aria-controls",t),this.#s.innerHTML=`
|
|
509
|
+
`}#g(){this.#e.addEventListener("click",this.#C),this.listen(document,"click",this.#_),this.listen(document,"keydown",this.#M),this.#t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),this.#t.querySelectorAll('input[name="settings-mode"]').forEach(t=>{t.addEventListener("change",this.#S)}),this.#t.querySelector("#settings-theme")?.addEventListener("change",this.#B),this.#t.querySelector("input[data-fluid-toggle]")?.addEventListener("change",this.#q),this.#t.querySelectorAll('input[name="settings-density"]').forEach(t=>{t.addEventListener("change",this.#k)}),this.#t.querySelector("input[data-backdrop-toggle]")?.addEventListener("change",this.#I),this.#t.querySelectorAll('input[name="settings-backdrop"]').forEach(t=>{t.addEventListener("change",this.#O)}),this.#t.querySelectorAll('input[name="settings-backdrop-chrome"]').forEach(t=>{t.addEventListener("change",this.#R)}),this.#t.querySelector("input[data-backdrop-fixed]")?.addEventListener("change",this.#T),this.#t.querySelector("input[data-sticky-toggle]")?.addEventListener("change",this.#N),this.#t.querySelector('[name="settings-page-bg"]')?.addEventListener("change",this.#E),this.#t.querySelector('[name="settings-page-bg-color"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.addEventListener("input",this.#x),this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.addEventListener("change",this.#x),this.#t.querySelectorAll("input[data-a11y]").forEach(t=>{t.addEventListener("change",this.#A)}),this.#t.querySelectorAll("input[data-ext]").forEach(t=>{t.addEventListener("change",this.#L)}),this.#t.querySelectorAll("input[data-env]").forEach(t=>{t.addEventListener("change",this.#H)}),this.#t.querySelector(".settings-reset")?.addEventListener("click",this.#F),this.#t.querySelector('[data-action="clear-cache"]')?.addEventListener("click",this.#Q),this.#t.querySelector('[data-action="check-update"]')?.addEventListener("click",this.#tt),this.#Z()}#C=t=>{t.stopPropagation(),this.toggle()};#_=t=>{this.#i&&!this.contains(t.target)&&this.close()};#M=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#e?.focus())};#S=t=>{A.setMode(t.target.value)};#B=async t=>{let e=t.target;e.disabled=!0;try{await A.setBrand(e.value),this.#G()}catch{console.warn("[VB] Theme load failed, using default")}finally{e.disabled=!1}};#q=t=>{let e=t.target.checked,s=this.#f(A.getState().fluid)||"default";A.setFluid(this.#h(e,s)),this.#$(e)};#k=t=>{A.setFluid(this.#h(!0,t.target.value))};#I=t=>{let e=t.target.checked,s=this.#l(A.getState().backdrop)||"default";A.setBackdrop(this.#m(e,s)),this.#D(e)};#O=t=>{A.setBackdrop(this.#m(!0,t.target.value))};#R=t=>{let e=this.#y(A.getState().backdropChrome);A.setBackdropChrome(this.#w(t.target.value,e))};#T=t=>{let e=this.#d(A.getState().backdropChrome);A.setBackdropChrome(this.#w(e,t.target.checked))};#N=async t=>{let e=t.target.checked;this.#n=e,await E.set(O,"sticky",e?"on":"off");let s=document.querySelector("header");if(e){document.documentElement.dataset.sticky="",s&&(s.dataset.sticky="");let{initStickyManager:n}=await Promise.resolve().then(()=>(Mt(),re));n()}else{delete document.documentElement.dataset.sticky,s&&delete s.dataset.sticky;let{destroyStickyManager:n}=await Promise.resolve().then(()=>(Mt(),re));n()}};#E=t=>{let e=t.target.value;if(this.#z(e),e==="color"){let s=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"#1a1a2e";A.setPageBg({type:e,color:s})}else if(e==="gradient"){let s=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"#1a1a2e",n=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"#16213e",r=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";A.setPageBg({type:e,gradStart:s,gradEnd:n,gradDir:r})}else A.setPageBg({})};#x=()=>{let t=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";if(t==="color"){let e=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"";A.setPageBg({type:t,color:e})}else if(t==="gradient"){let e=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"",s=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"",n=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";A.setPageBg({type:t,gradStart:e,gradEnd:s,gradDir:n})}};#A=t=>{let e=t.target.dataset.a11y,s=this.#W();if(t.target.checked&&!s.includes(e))s.push(e);else if(!t.target.checked){let n=s.indexOf(e);n!==-1&&s.splice(n,1)}this.#Y(s),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:s}))};#L=t=>{let e=t.target.dataset.ext,s=t.target.checked;this.#K(e,s),this.#J()};#H=t=>{let e=t.target.dataset.env,s=t.target.checked;Lt.setSource(e,s)};#F=()=>{confirm("Reset all settings to defaults?")&&(A.reset(),this.#Y([]),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]})),this.#r={...Nt},E.remove(O,"extensions").catch(()=>{}),this.#J(),this.#n=!1,E.remove(O,"sticky").catch(()=>{}),delete document.documentElement.dataset.sticky,Promise.resolve().then(()=>(Mt(),re)).then(t=>t.destroyStickyManager()).catch(()=>{}),Lt.setSource("timeOfDay",!1),Lt.setSource("seasonal",!1),this.#V())};#P=()=>{this.#V()};#V(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:h,pageBgGradDir:l}=A.getState(),d=this.#W(),u=this.#X(),f=this.#c(s),v=this.#f(s),p=this.#u(n),m=this.#l(n),y=this.#t.querySelector(`input[name="settings-mode"][value="${t}"]`);y&&(y.checked=!0);let S=this.#t.querySelector("#settings-theme");S&&(S.value=e||"default");let C=this.#t.querySelector("input[data-fluid-toggle]");C&&(C.checked=f);let B=this.#t.querySelector(`input[name="settings-density"][value="${v}"]`);B&&(B.checked=!0),this.#$(f);let H=this.#t.querySelector("input[data-backdrop-toggle]");H&&(H.checked=p);let zt=this.#t.querySelector(`input[name="settings-backdrop"][value="${m}"]`);zt&&(zt.checked=!0);let Da=this.#d(r),Vs=this.#t.querySelector(`input[name="settings-backdrop-chrome"][value="${Da}"]`);Vs&&(Vs.checked=!0);let Us=this.#t.querySelector("input[data-backdrop-fixed]");Us&&(Us.checked=this.#y(r)),this.#D(p);let Ws=this.#t.querySelector('[name="settings-page-bg"]');Ws&&(Ws.value=a||"");let js=this.#t.querySelector('[name="settings-page-bg-color"]');js&&o&&(js.value=o);let Ys=this.#t.querySelector('[name="settings-page-bg-grad-start"]');Ys&&c&&(Ys.value=c);let Gs=this.#t.querySelector('[name="settings-page-bg-grad-end"]');Gs&&h&&(Gs.value=h);let Ks=this.#t.querySelector('[name="settings-page-bg-grad-dir"]');Ks&&l&&(Ks.value=l),p&&this.#z(a||""),this.#t.querySelectorAll("input[data-a11y]").forEach(vt=>{let W=vt;W.checked=d.includes(W.dataset.a11y||"")}),this.#t.querySelectorAll("input[data-ext]").forEach(vt=>{let W=vt,Vt=W.dataset.ext,Ia=u[Vt];W.checked=Ia??Nt[Vt]});let Xs=this.#t.querySelector("input[data-sticky-toggle]");Xs&&(Xs.checked=this.#p());let _a=this.#j();this.#t.querySelectorAll("input[data-env]").forEach(vt=>{let W=vt,Vt=W.dataset.env;W.checked=_a[Vt]??!1})}#$(t){let e=this.#t.querySelector(".density-row");e&&(e.hidden=!t)}#D(t){if(this.#t.querySelectorAll(".backdrop-row").forEach(e=>{e.hidden=!t}),t){let e=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";this.#z(e)}}#z(t){let e=this.#t.querySelector(".page-bg-color-row"),s=this.#t.querySelector(".page-bg-grad-row"),n=this.#t.querySelector(".page-bg-grad-dir-row");e&&(e.hidden=t!=="color"),s&&(s.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#W(){return[...this.#s]}#Y(t){this.#s=[...t],E.set(O,"a11y",this.#s).catch(()=>{})}#U(){let t=this.#W(),{brand:e}=A.getState(),s=document.documentElement,n=e!=="default"?[e,...t]:[...t];n.length?s.dataset.theme=n.join(" "):delete s.dataset.theme}#G(){this.#U()}#j(){return Lt.load()}#X(){return{...this.#r}}#K(t,e){this.#r={...this.#r,[t]:e},E.set(O,"extensions",this.#r).catch(()=>{})}async#J(){let t=this.#X(),e=document.documentElement;t.motionFx?delete e.dataset.motionReduced:e.dataset.motionReduced="",t.sounds?(ft||(ft=(await Promise.resolve().then(()=>(tr(),Qn))).SoundManager),ft.init(),ft.enable()):ft&&ft.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}async#Z(){let t=this.#t.querySelector("[data-sw-status] span");if(t){if(!("serviceWorker"in navigator)){t.textContent="Not supported";return}try{let s=(await Gn()).cachedURLs?.length??0;t.textContent=`Active (${s} cached files)`}catch{t.textContent="Not registered"}}}#Q=async t=>{let e=t.target;e.disabled=!0,e.textContent="Clearing\u2026";try{await Kn(),e.textContent="Cleared!",this.#Z(),setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}};#tt=async t=>{let e=t.target;e.disabled=!0,e.textContent="Checking\u2026";try{let{updated:s}=await Xn();e.textContent=s?"Update available!":"Up to date",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}};open(){this.#i||(this.#i=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#V(),this.#et())}#et(){let t=this.getBoundingClientRect(),e=this.#t;e.style.removeProperty("top"),e.style.removeProperty("bottom"),e.style.removeProperty("left"),e.style.removeProperty("right");let s=e.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<s.height&&o>a?(e.style.top="calc(100% + 8px)",e.style.bottom="auto"):(e.style.bottom="calc(100% + 8px)",e.style.top="auto");let c=n-t.right,h=t.left,l=s.width;t.right<l&&h<c?(e.style.left="0",e.style.right="auto"):(e.style.right="0",e.style.left="auto")}close(){this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"))}toggle(){this.#i?this.close():this.open()}};b("settings-panel",Si);j();xi();var Ko={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"};function N(i){return String(i??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}var Ci=class extends g{#e="panel";#t=null;#i=null;#s=null;#r=null;#n=new Set;#a=[];#o=!1;#c=null;#f=new Set;#h="all";#p=[];setup(){return this.#e=this.getAttribute("mode")==="banner"?"banner":"panel",this.#e==="banner"?this.#u():this.#m(),!0}teardown(){this.#c!=null&&(clearInterval(this.#c),this.#c=null)}get notifications(){return[...this.#a]}set notifications(t){this.#e==="panel"&&(this.#a=Array.isArray(t)?t:[],typeof this.#g=="function"&&this.#g(),typeof this.#_=="function"&&this.#_(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#a,source:"property"},bubbles:!0})))}async#u(){let t=this.getAttribute("persist");if(t||console.warn("[notification-wc] banner mode requires a persist attribute"),this.dataset.mode="banner",this.dataset.variant=this.getAttribute("variant")||"info",this.dataset.position=this.getAttribute("position")||"top",t){let s=Number(this.getAttribute("expires")??""),n=Number.isFinite(s)&&s>0?s*864e5:void 0,r=await E.get("notifications",t,n?{maxAge:n}:void 0);if(r&&r.dismissed){this.hidden=!0;return}}let e=this.querySelector('[value="dismiss"], [data-dismiss]');e&&(this.#t=e,this.listen(e,"click",this.#l))}#l=async t=>{t.preventDefault();let e=this.getAttribute("persist");e&&await E.set("notifications",e,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:e}})),this.hidden=!0};async#m(){if(this.dataset.mode="panel",await this.#d(),this.#w(),this.#v(),await this.#M(),this.#_(),this.listen(document,"click",this.#O),this.listen(document,"keydown",this.#R),this.listen(document,"page-watch:add",()=>this.#M()),this.listen(document,"page-watch:remove",()=>this.#M()),this.getAttribute("src")){await this.#A();let t=Number(this.getAttribute("poll"));Number.isFinite(t)&&t>0&&(this.#c=setInterval(()=>this.#A(),t))}}async#d(){let t=this.getAttribute("storage-key")||"notifications",e=await E.get(t,"read-ids");Array.isArray(e)&&(this.#n=new Set(e.filter(s=>typeof s=="string")))}async#y(){let t=this.getAttribute("storage-key")||"notifications";await E.set(t,"read-ids",Array.from(this.#n))}#w(){if(this.#i=this.querySelector(":scope > [data-trigger]"),this.#i){let t=this.#i.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.hidden=!0,this.#i.appendChild(t))}else{let t=document.createElement("button");t.type="button",t.setAttribute("data-trigger",""),t.className="notification-trigger",t.setAttribute("aria-label","Notifications"),t.innerHTML='<icon-wc name="bell" size="sm"></icon-wc><span class="notification-badge" hidden>0</span>',this.#i=t,this.prepend(t)}this.#r=this.#i.querySelector(".notification-badge"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.listen(this.#i,"click",this.#I)}#v(){this.#s=document.createElement("div"),this.#s.className="notification-panel",this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Notifications"),this.#s.hidden=!0;let t=`notification-panel-${crypto.randomUUID().slice(0,8)}`;this.#s.id=t,this.#i?.setAttribute("aria-controls",t),this.#s.innerHTML=`
|
|
510
510
|
<header class="notification-header">
|
|
511
511
|
<strong>Notifications</strong>
|
|
512
512
|
<button type="button" class="notification-mark-all">Mark all read</button>
|
|
@@ -520,7 +520,7 @@ svg {
|
|
|
520
520
|
<footer class="notification-footer" hidden>
|
|
521
521
|
<em>No notifications</em>
|
|
522
522
|
</footer>
|
|
523
|
-
`,this.appendChild(this.#s);let e=this.#s.querySelector(".notification-mark-all");e&&this.listen(e,"click",this.#N);for(let s of this.#s.querySelectorAll('[role="tab"]'))this.listen(s,"click",this.#q);this.#g()}#b(){let t=Array.from(this.querySelectorAll(":scope > article")),e=new Map;for(let s of t){let n=s.getAttribute("data-id")||s.id||`static-${e.size}`,r=s.getAttribute("data-type")||"update",a=s.getAttribute("data-date")||"",o=s.querySelector("h1, h2, h3, h4, h5, h6")?.textContent?.trim()||n,h=s.querySelector("p")?.textContent?.trim()||"",l=s.querySelector("a");e.set(n,{id:n,type:r,date:a,title:o,body:h,url:l?.getAttribute("href")||null,source:"static"})}for(let s of this.#a)if(!(!s||typeof s.id!="string")){if(s.dismissed){e.delete(s.id);continue}e.set(s.id,{...e.get(s.id),...s,source:"dynamic"})}return Array.from(e.values()).sort((s,n)=>{let r=s.date?Date.parse(s.date):0;return(n.date?Date.parse(n.date):0)-r})}#g(){if(!this.#s)return;let t=this.#s.querySelector(".notification-list"),e=this.#s.querySelector(".notification-footer");if(!t)return;let s=this.#b();t.innerHTML=s.map(n=>this.#C(n)).join(""),e&&(e.hidden=s.length>0);for(let n of t.querySelectorAll("[data-notification-id]"))this.listen(n,"click",this.#T);this.#_()}#C(t){let e=
|
|
523
|
+
`,this.appendChild(this.#s);let e=this.#s.querySelector(".notification-mark-all");e&&this.listen(e,"click",this.#N);for(let s of this.#s.querySelectorAll('[role="tab"]'))this.listen(s,"click",this.#q);this.#g()}#b(){let t=Array.from(this.querySelectorAll(":scope > article")),e=new Map;for(let s of t){let n=s.getAttribute("data-id")||s.id||`static-${e.size}`,r=s.getAttribute("data-type")||"update",a=s.getAttribute("data-date")||"",o=s.querySelector("h1, h2, h3, h4, h5, h6")?.textContent?.trim()||n,h=s.querySelector("p")?.textContent?.trim()||"",l=s.querySelector("a");e.set(n,{id:n,type:r,date:a,title:o,body:h,url:l?.getAttribute("href")||null,source:"static"})}for(let s of this.#a)if(!(!s||typeof s.id!="string")){if(s.dismissed){e.delete(s.id);continue}e.set(s.id,{...e.get(s.id),...s,source:"dynamic"})}return Array.from(e.values()).sort((s,n)=>{let r=s.date?Date.parse(s.date):0;return(n.date?Date.parse(n.date):0)-r})}#g(){if(!this.#s)return;let t=this.#s.querySelector(".notification-list"),e=this.#s.querySelector(".notification-footer");if(!t)return;let s=this.#b();t.innerHTML=s.map(n=>this.#C(n)).join(""),e&&(e.hidden=s.length>0);for(let n of t.querySelectorAll("[data-notification-id]"))this.listen(n,"click",this.#T);this.#_()}#C(t){let e=Ko[t.type]||"bell",s=this.#n.has(t.id),n=t.date?new Date(t.date).toLocaleString():"",r=`
|
|
524
524
|
<icon-wc class="notification-type-icon" name="${N(e)}" size="sm"></icon-wc>
|
|
525
525
|
<div class="notification-body">
|
|
526
526
|
<h4>${N(t.title)}</h4>
|
|
@@ -541,9 +541,9 @@ svg {
|
|
|
541
541
|
<button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${N(t.key)}" aria-label="Unwatch ${N(n)}">
|
|
542
542
|
<icon-wc name="x" size="xs"></icon-wc>
|
|
543
543
|
</button>
|
|
544
|
-
</li>`}#q=t=>{let e=t.currentTarget.dataset.tab;if(!e||e===this.#h||(this.#h=e,!this.#s))return;for(let n of this.#s.querySelectorAll('[role="tab"]')){let r=n.dataset.tab===e;n.setAttribute("aria-selected",r?"true":"false")}for(let n of this.#s.querySelectorAll("[data-tab-panel]"))n.hidden=n.dataset.tabPanel!==e;let s=this.#s.querySelector(".notification-footer");s&&(s.hidden=!0)};#k=async t=>{t.preventDefault(),t.stopPropagation();let s=t.currentTarget.getAttribute("data-watch-key");if(!s)return;let n=this.#p.find(r=>r.key===s);await E.remove("watches",s),this.#p=this.#p.filter(r=>r.key!==s),this.#S(),this.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:n?.data?.url||s,subscriptionId:n?.data?.subscriptionId||null}}))};#I=t=>{t.stopPropagation(),this.#o?this.#x():this.#E()};#O=t=>{this.#o&&!this.contains(t.target)&&this.#x()};#R=t=>{t.key==="Escape"&&this.#o&&(t.preventDefault(),this.#x(),this.#i?.focus())};#T=async t=>{let e=t.currentTarget.closest("[data-notification-id]");if(!e)return;let s=e.getAttribute("data-notification-id");s&&(this.#n.has(s)||(this.#n.add(s),e.setAttribute("data-read",""),await this.#y(),this.#_(),this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:s}}))))};#N=async()=>{let t=this.#b();for(let e of t)this.#n.add(e.id);await this.#y(),this.#g();for(let e of t)this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:e.id}}))};#E(){this.#s&&(this.#o=!0,this.#s.hidden=!1,this.#i?.setAttribute("aria-expanded","true"),this.#M(),this.dispatchEvent(new CustomEvent("notification-wc:open",{bubbles:!0,composed:!0})))}#x(){this.#s&&(this.#o=!1,this.#s.hidden=!0,this.#i?.setAttribute("aria-expanded","false"),this.dispatchEvent(new CustomEvent("notification-wc:close",{bubbles:!0,composed:!0})))}async#A(){let t=this.getAttribute("src");if(!t)return;let e,s=0;try{if(t.startsWith("http")||t.startsWith("/")){let c=await fetch(t,{headers:{accept:"application/json"}});if(s=c.status,!c.ok)throw new Error(`${c.status}`);e=await c.json()}else e=await new st(t).get("/")}catch(c){let h=c instanceof
|
|
544
|
+
</li>`}#q=t=>{let e=t.currentTarget.dataset.tab;if(!e||e===this.#h||(this.#h=e,!this.#s))return;for(let n of this.#s.querySelectorAll('[role="tab"]')){let r=n.dataset.tab===e;n.setAttribute("aria-selected",r?"true":"false")}for(let n of this.#s.querySelectorAll("[data-tab-panel]"))n.hidden=n.dataset.tabPanel!==e;let s=this.#s.querySelector(".notification-footer");s&&(s.hidden=!0)};#k=async t=>{t.preventDefault(),t.stopPropagation();let s=t.currentTarget.getAttribute("data-watch-key");if(!s)return;let n=this.#p.find(r=>r.key===s);await E.remove("watches",s),this.#p=this.#p.filter(r=>r.key!==s),this.#S(),this.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:n?.data?.url||s,subscriptionId:n?.data?.subscriptionId||null}}))};#I=t=>{t.stopPropagation(),this.#o?this.#x():this.#E()};#O=t=>{this.#o&&!this.contains(t.target)&&this.#x()};#R=t=>{t.key==="Escape"&&this.#o&&(t.preventDefault(),this.#x(),this.#i?.focus())};#T=async t=>{let e=t.currentTarget.closest("[data-notification-id]");if(!e)return;let s=e.getAttribute("data-notification-id");s&&(this.#n.has(s)||(this.#n.add(s),e.setAttribute("data-read",""),await this.#y(),this.#_(),this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:s}}))))};#N=async()=>{let t=this.#b();for(let e of t)this.#n.add(e.id);await this.#y(),this.#g();for(let e of t)this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:e.id}}))};#E(){this.#s&&(this.#o=!0,this.#s.hidden=!1,this.#i?.setAttribute("aria-expanded","true"),this.#M(),this.dispatchEvent(new CustomEvent("notification-wc:open",{bubbles:!0,composed:!0})))}#x(){this.#s&&(this.#o=!1,this.#s.hidden=!0,this.#i?.setAttribute("aria-expanded","false"),this.dispatchEvent(new CustomEvent("notification-wc:close",{bubbles:!0,composed:!0})))}async#A(){let t=this.getAttribute("src");if(!t)return;let e,s=0;try{if(t.startsWith("http")||t.startsWith("/")){let c=await fetch(t,{headers:{accept:"application/json"}});if(s=c.status,!c.ok)throw new Error(`${c.status}`);e=await c.json()}else e=await new st(t).get("/")}catch(c){let h=c instanceof U?c.status:s;if(h===404||h===503)return;let l=c instanceof U?`${c.status}`:String(c);console.warn("[notification-wc] failed to fetch",t,l);return}let n=Array.isArray(e)?e:Array.isArray(e?.notifications)?e.notifications:[],r=this.#f,a=r.size===0,o=this.hasAttribute("toast-new")?document.querySelector("toast-msg"):null;for(let c of n)c?.id&&(r.has(c.id)||(this.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:c}})),!a&&o&&typeof o.show=="function"&&o.show({message:c.title||c.body||"New notification",variant:c.type==="alert"||c.type==="stewardship"?"warning":"info",duration:5e3})),r.add(c.id));this.#a=n,this.#g()}};b("notification-wc",Ci);var cr="Watch for updates",lc="Watching",Fi=class extends g{#e=null;setup(){if(this.hasAttribute("server-sync")){let e=window;e.vbPageWatch={...e.vbPageWatch??{},serverSync:!0}}let t=this.#t();this.dataset.variant=t;for(let e of Array.from(this.children))e.hasAttribute?.("data-watch-page")&&e.remove();this.#e=this.#i(t),this.appendChild(this.#e),this.listen(document,"page-watch:add",this.#s),this.listen(document,"page-watch:remove",this.#s)}teardown(){this.#e&&(this.#e.remove(),this.#e=null)}#t(){let t=this.getAttribute("variant");return t==="compact"||t==="button"?t:"icon"}#i(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-watch-page",""),e.className="ghost",e.setAttribute("aria-label","Watch this page for updates");let s=t==="icon"?"sm":"xs",n=this.getAttribute("label")??cr;return t==="icon"?e.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc>`:(e.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc><span>${this.#r(n)}</span>`,e.setAttribute("data-watch-label-locked","")),e}#s=async()=>{if(this.#e)try{let{readWatch:t}=await Promise.resolve().then(()=>(Pi(),Bi)),s=!!await t();this.#e.setAttribute("aria-pressed",s?"true":"false");let n=this.#e.querySelector("icon-wc");n&&n.setAttribute("name",s?"bookmark-check":"bookmark");let r=this.#e.querySelector("span");if(r&&this.#t()!=="icon"){let a=this.getAttribute("label");r.textContent=a||(s?lc:cr)}this.#e.setAttribute("title",s?"Stop watching this page":"Watch this page for content updates")}catch{}};#r(t){let e=document.createElement("div");return e.textContent=t,e.innerHTML}};b("watch-wc",Fi);var rt={optout:"vb_optout",sessionCount:"vb_sc",eventQueue:"vb_q"};function hc(i){return String(i).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function dc(i){return typeof i!="number"||i<=0?"\u2014":i<6e4?`${Math.round(i/1e3)}s`:`${Math.floor(i/6e4)}m ${Math.round(i%6e4/1e3)}s`}var Ri=class extends g{setup(){this.#s(),this.listen(this,"click",this.#e)}get isOptedOut(){try{return sessionStorage.getItem(rt.optout)==="1"}catch{return!1}}get sessionCounter(){try{let t=sessionStorage.getItem(rt.sessionCount);return t?JSON.parse(t):null}catch{return null}}get queuedEvents(){try{let t=sessionStorage.getItem(rt.eventQueue);return t?JSON.parse(t):[]}catch{return[]}}get hasSessionData(){return this.sessionCounter!=null||this.queuedEvents.length>0}#e=t=>{let e=t.target?.closest?.("[data-analytics-action]");if(!e||!this.contains(e))return;let s=e.dataset.analyticsAction;s==="clear"&&this.#t(),s==="optout"&&this.#i(),s==="refresh"&&this.#s()};#t(){try{sessionStorage.removeItem(rt.sessionCount),sessionStorage.removeItem(rt.eventQueue)}catch{}this.dispatchEvent(new CustomEvent("analytics-panel:cleared",{bubbles:!0,composed:!0})),this.#s()}#i(){let t=!this.isOptedOut;try{t?sessionStorage.setItem(rt.optout,"1"):sessionStorage.removeItem(rt.optout)}catch{}this.dispatchEvent(new CustomEvent(t?"analytics-panel:optout":"analytics-panel:optin",{bubbles:!0,composed:!0})),t?this.#t():this.#s()}#s(){let t=this.getAttribute("title")||"Analytics data",e=this.isOptedOut,s=this.hasSessionData;this.innerHTML=`
|
|
545
545
|
<header class="analytics-panel__header">
|
|
546
|
-
<h3>${
|
|
546
|
+
<h3>${hc(t)}</h3>
|
|
547
547
|
<p class="analytics-panel__status" role="status">
|
|
548
548
|
<span class="analytics-panel__dot analytics-panel__dot--${e?"paused":"active"}" aria-hidden="true"></span>
|
|
549
549
|
${e?"Analytics paused for this tab. No data is being collected.":"Analytics active. Only aggregate, device-scoped data is collected."}
|
|
@@ -573,8 +573,8 @@ svg {
|
|
|
573
573
|
No cookies, no cross-site identifiers, no IP address stored.
|
|
574
574
|
Data is cleared automatically when you close this tab.
|
|
575
575
|
</p>
|
|
576
|
-
`}#r(){if(!this.hasSessionData)return'<p class="analytics-panel__empty">No data stored on this device in this session.</p>';let t=this.sessionCounter,e=this.queuedEvents,s=e.find(o=>o?.id==="__scroll"),n=e.find(o=>o?.id==="__attention"),r=e.filter(o=>!o?.id?.startsWith?.("__")).length,a=[];return t?.v!=null&&a.push(`<dt>Pages this session</dt><dd>${t.v}</dd>`),s&&a.push(`<dt>Max scroll depth</dt><dd>${s.params?.depth??"?"}%</dd>`),n&&a.push(`<dt>Active reading time</dt><dd>${
|
|
577
|
-
`),document.head.appendChild(i)}function ce(i){Ot(i),$t(i)}function zi(i){let t=L.get(i);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let e=R(i);e&&qt(i,e)}i.classList.remove("interest-source"),L.delete(i),he.delete(i)}}function nr(i=document){i.querySelectorAll(`[${M}]`).forEach(ce)}var rr=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute(M)&&ce(s),s.querySelectorAll(`[${M}]`).forEach(ce)}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;L.has(s)&&zi(s),s.querySelectorAll(`[${M}]`).forEach(n=>{L.has(n)&&zi(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let e=t.target;e.hasAttribute(M)?L.has(e)||ce(e):L.has(e)&&zi(e)}}});ar||(uc(),dc(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{nr(),rr.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[M]})}):(nr(),rr.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[M]})));if(ar&&Ui){let i=()=>{document.querySelectorAll(`[${M}]`).forEach($t),new MutationObserver(t=>{for(let e of t){for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.hasAttribute(M)&&$t(n),n.querySelectorAll(`[${M}]`).forEach($t)}e.type==="attributes"&&e.target.hasAttribute?.(M)&&$t(e.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[M]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i):i()}var Bt="[data-back-to-top]";var fc=matchMedia("(prefers-reduced-motion: reduce)"),de=new Set,at=null,ji=!1;function Yi(i){i.hasAttribute("data-back-to-top-init")||(i.setAttribute("data-back-to-top-init",""),i.toggleAttribute("data-visible",!1),i.addEventListener("click",ur),de.add(i),pc(),fr())}function lr(i){i.hasAttribute("data-back-to-top-init")&&(i.removeAttribute("data-back-to-top-init"),i.removeEventListener("click",ur),de.delete(i),de.size===0&&at&&(window.removeEventListener("scroll",at),at=null))}var bt=null;function dr(){if(bt&&bt.isConnected)return bt;let i=document.documentElement,t=document.body;if(t&&t.scrollHeight>i.clientHeight+1&&t){let s=getComputedStyle(t);if(/auto|scroll/.test(s.overflowY))return bt=t,t}return bt=document.scrollingElement||i,bt}function ur(i){let t=i.currentTarget.getAttribute("href")||"";if(t===""||t==="#"||t==="#top")i.preventDefault();else return;dr().scrollTo({top:0,left:0,behavior:fc.matches?"auto":"smooth"})}function pc(){at||(at=()=>{ji||(ji=!0,requestAnimationFrame(()=>{fr(),ji=!1}))},window.addEventListener("scroll",at,{passive:!0}),document.addEventListener("scroll",at,{capture:!0,passive:!0}))}function fr(){let t=dr().scrollTop||window.scrollY,s=window.innerHeight*1,n=t>s,r=t<200;for(let a of de)a.toggleAttribute("data-visible",n&&!r)}function hr(i=document){i.querySelectorAll(Bt).forEach(Yi)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>hr(),{once:!0}):hr();var mc=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Bt)&&Yi(s),s.querySelectorAll(Bt).forEach(n=>Yi(n))}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches?.(Bt)&&lr(s),s.querySelectorAll?.(Bt).forEach(n=>lr(n))}}});mc.observe(document.documentElement,{childList:!0,subtree:!0});var Gi="kbd[data-hotkey]";function pr(i=document){i.querySelectorAll(Gi).forEach(Ki)}function Ki(i){if(i.hasAttribute("data-hotkey-init"))return;i.setAttribute("data-hotkey-init","");let t=i.dataset.hotkey;if(!t)return;let e=ct?xt.mac:xt.other,s=t.toLowerCase().split("+").map(r=>r.trim()),n=document.createDocumentFragment();s.forEach((r,a)=>{let o=document.createElement("kbd");o.textContent=e[r]??r.toUpperCase(),n.appendChild(o),a<s.length-1&&!ct&&n.appendChild(document.createTextNode("+"))}),i.replaceChildren(n),i.setAttribute("aria-label",i.textContent)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>pr()):pr();var bc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Gi)&&Ki(s),s.querySelectorAll(Gi).forEach(n=>Ki(n))}});bc.observe(document.documentElement,{childList:!0,subtree:!0});function gt(){return document.documentElement.lang||navigator.language||"en"}var Xi="data[data-format-number]";function mr(i=document){i.querySelectorAll(Xi).forEach(Ji)}function Ji(i){if(i.hasAttribute("data-format-number-init"))return;i.setAttribute("data-format-number-init","");let t=i.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e))return;i.title||(i.title=i.textContent.trim());let s=i.getAttribute("data-format-number")||"decimal",n=i.getAttribute("data-locale")||gt(),r={};switch(s){case"currency":{r.style="currency",r.currency=i.getAttribute("data-currency")||"USD";break}case"percent":r.style="percent";break;case"compact":r.notation="compact";break;default:break}try{i.textContent=new Intl.NumberFormat(n,r).format(e)}catch{}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>mr()):mr();var gc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Xi)&&Ji(s),s.querySelectorAll(Xi).forEach(n=>Ji(n))}});gc.observe(document.documentElement,{childList:!0,subtree:!0});var ue="time[data-format-date]",Pt=new Map;function br(i=document){i.querySelectorAll(ue).forEach(Zi)}function Zi(i){if(i.hasAttribute("data-format-date-init"))return;i.setAttribute("data-format-date-init","");let t=i.getAttribute("datetime");if(!t)return;let e=new Date(t);if(isNaN(e.getTime()))return;i.title||(i.title=i.textContent.trim());let s=i.getAttribute("data-format-date")||"medium",n=i.getAttribute("data-locale")||gt();s==="relative"?(i.textContent=vr(e,n),yr(i,e,n)):i.textContent=vc(e,s,i,n)}function vc(i,t,e,s){let n=t||"medium",r=e.getAttribute("data-format-time")||void 0;try{let a={dateStyle:n};return r&&(a.timeStyle=r),new Intl.DateTimeFormat(s,a).format(i)}catch{return e.textContent}}function vr(i,t){let e=Date.now(),s=Math.round((i.getTime()-e)/1e3),n=Math.abs(s),r=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(let{unit:a,seconds:o}of r)if(n>=o){let c=Math.round(s/o);try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,a)}catch{let h=Math.abs(c),l=h===1?a:`${a}s`;return c<0?`${h} ${l} ago`:`in ${h} ${l}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function yr(i,t,e){clearInterval(Pt.get(i));let s=Math.abs(Date.now()-t.getTime()),n=36e5,r=864e5,a;s<n?a=6e4:s<r?a=3e5:a=36e5;let o=setInterval(()=>{i.textContent=vr(t,e),yr(i,t,e)},a);Pt.set(i,o)}function gr(i){Pt.has(i)&&(clearInterval(Pt.get(i)),Pt.delete(i))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>br()):br();var yc=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ue)&&Zi(s),s.querySelectorAll(ue).forEach(n=>Zi(n))}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;gr(s),s.querySelectorAll(ue).forEach(gr)}}});yc.observe(document.documentElement,{childList:!0,subtree:!0});var ts="data[data-format-bytes]",Qi=["B","KB","MB","GB","TB","PB"];function wr(i=document){i.querySelectorAll(ts).forEach(es)}function es(i){if(i.hasAttribute("data-format-bytes-init"))return;i.setAttribute("data-format-bytes-init","");let t=i.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e)||e<0)return;i.title||(i.title=i.textContent.trim());let s=parseInt(i.getAttribute("data-format-bytes")??"0",10)||0,n=i.getAttribute("data-unit")==="decimal",r=i.getAttribute("data-locale")||gt(),a=n?1e3:1024;if(e===0){i.textContent="0 B";return}let o=Math.min(Math.floor(Math.log(e)/Math.log(a)),Qi.length-1),c=e/Math.pow(a,o);try{let h=new Intl.NumberFormat(r,{minimumFractionDigits:s,maximumFractionDigits:s}).format(c);i.textContent=`${h} ${Qi[o]}`}catch{i.textContent=`${c.toFixed(s)} ${Qi[o]}`}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>wr()):wr();var wc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ts)&&es(s),s.querySelectorAll(ts).forEach(n=>es(n))}});wc.observe(document.documentElement,{childList:!0,subtree:!0});var is="[data-spoiler]";var Sr=new Set(["SPAN","EM","STRONG","CODE","A","B","I","S","U","SMALL","SUB","SUP","MARK","ABBR","Q","CITE","DFN","SAMP","VAR","KBD","BDI","BDO","DATA","TIME","WBR"]);function Er(i=document){i.querySelectorAll(is).forEach(ss)}function ss(i){if(i.hasAttribute("data-spoiler-init"))return;i.setAttribute("data-spoiler-init","");let t=i.getAttribute("data-spoiler")||"blur";i.getAttribute("data-spoiler")||i.setAttribute("data-spoiler","blur");let e=Sr.has(i.tagName),s=e?"span":"div";i.setAttribute("role","group"),i.setAttribute("aria-label","Spoiler");let n=document.createElement(s);for(n.setAttribute("data-spoiler-content",""),n.setAttribute("inert","");i.firstChild;)n.appendChild(i.firstChild);i.appendChild(n);let r=i.getAttribute("data-spoiler-label")||"Reveal spoiler",a;e?(a=document.createElement("span"),a.setAttribute("role","button"),a.setAttribute("tabindex","0")):(a=document.createElement("button"),a.setAttribute("type","button")),a.setAttribute("data-spoiler-trigger",""),a.setAttribute("aria-expanded","false");let o=document.createElement("span");o.setAttribute("data-spoiler-label",""),o.textContent=r,a.appendChild(o),i.appendChild(a),a.addEventListener("click",()=>Ar(i)),e&&a.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),Ar(i))}),i.addEventListener("keydown",c=>{c.key==="Escape"&&i.hasAttribute("data-spoiler-visible")&&(c.stopPropagation(),fe(i))})}function Ar(i){let t=i.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${t}"][data-spoiler-visible]`).forEach(n=>{n!==i&&fe(n)});let e=i.querySelector("[data-spoiler-content]"),s=i.querySelector("[data-spoiler-trigger]");if(e&&e.removeAttribute("inert"),s&&(s.setAttribute("aria-expanded","true"),s.hidden=!0),i.setAttribute("data-spoiler-visible",""),!i.hasAttribute("data-spoiler-persist")){let n=Sr.has(i.tagName),r;n?(r=document.createElement("span"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),fe(i))})):(r=document.createElement("button"),r.setAttribute("type","button")),r.setAttribute("data-spoiler-hide",""),r.textContent="Hide",r.addEventListener("click",()=>fe(i)),i.appendChild(r)}Ec("Spoiler revealed"),i.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function fe(i){if(i.hasAttribute("data-spoiler-persist"))return;let t=i.querySelector("[data-spoiler-content]"),e=i.querySelector("[data-spoiler-trigger]"),s=i.querySelector("[data-spoiler-hide]");t&&t.setAttribute("inert",""),e&&(e.setAttribute("aria-expanded","false"),e.hidden=!1,e.focus()),s&&s.remove(),i.removeAttribute("data-spoiler-visible"),i.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function Ec(i){let t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:"0"}),t.textContent=i,document.body.appendChild(t),setTimeout(()=>t.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Er()):Er();var Ac=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(is)&&ss(s),s.querySelectorAll(is).forEach(ss)}});Ac.observe(document.documentElement,{childList:!0,subtree:!0});var ns="[data-splitter]";function xr(i=document){i.querySelectorAll(ns).forEach(rs)}function rs(i){if(i.hasAttribute("data-splitter-init"))return;i.setAttribute("data-splitter-init","");let t=[...i.children];if(t.length<2)return;let e=t[0],s=t[1],n=i.getAttribute("data-splitter")==="vertical",r=Number(e.dataset.min)||10,a=Number(e.dataset.max)||90,o=document.createElement("div");o.className="split-divider",o.setAttribute("role","separator"),o.setAttribute("aria-orientation",n?"vertical":"horizontal"),o.setAttribute("aria-valuenow","50"),o.setAttribute("aria-valuemin",String(r)),o.setAttribute("aria-valuemax",String(a)),o.setAttribute("aria-label","Resize panels"),o.setAttribute("tabindex","0"),i.insertBefore(o,s),e.style.flexBasis="50%",e.style.flexGrow="0",e.style.flexShrink="0",e.style.overflow="auto",s.style.flexGrow="1",s.style.overflow="auto";let c=!1;function h(l){let d=Math.min(a,Math.max(r,l));e.style.flexBasis=`${d}%`,o.setAttribute("aria-valuenow",String(Math.round(d))),i.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:d},bubbles:!0}))}o.addEventListener("pointerdown",l=>{l.preventDefault(),c=!0,o.setPointerCapture(l.pointerId),i.style.userSelect="none"}),o.addEventListener("pointermove",l=>{if(!c)return;let d=i.getBoundingClientRect(),u;n?u=(l.clientY-d.top)/d.height*100:u=(l.clientX-d.left)/d.width*100,h(u)}),o.addEventListener("pointerup",l=>{c=!1,o.releasePointerCapture(l.pointerId),i.style.userSelect=""}),o.addEventListener("keydown",l=>{let d=l.shiftKey?10:1,u=Number(o.getAttribute("aria-valuenow")),f=n?["ArrowUp"]:["ArrowLeft"],v=n?["ArrowDown"]:["ArrowRight"];f.includes(l.key)?(l.preventDefault(),h(u-d)):v.includes(l.key)?(l.preventDefault(),h(u+d)):l.key==="Home"?(l.preventDefault(),h(r)):l.key==="End"&&(l.preventDefault(),h(a))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>xr()):xr();var Sc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ns)&&rs(s),s.querySelectorAll(ns).forEach(rs)}});Sc.observe(document.documentElement,{childList:!0,subtree:!0});var as='input[type="checkbox"][data-switch]';function os(i){i.hasAttribute("data-switch-init")||(i.setAttribute("data-switch-init",""),i.setAttribute("role","switch"))}function Cr(i=document){i.querySelectorAll(as).forEach(os)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Cr()):Cr();var xc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(as)&&os(s),s.querySelectorAll(as).forEach(n=>os(n))}});xc.observe(document.documentElement,{childList:!0,subtree:!0});var pe=new Map,cs=null,me=!1;function Cc(i){for(let[t,e]of pe)i.querySelectorAll(t).forEach(e)}function kc(i){if(i.nodeType!==Node.ELEMENT_NODE)return;let t=i;for(let[e,s]of pe)t.matches(e)&&s(t),t.querySelectorAll(e).forEach(s)}function Tc(){cs||(cs=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes)kc(e)}),cs.observe(document.documentElement,{childList:!0,subtree:!0}))}function Lc(){me||(me=!0,Cc(document))}function I(i,t){pe.set(i,t),Tc(),me||document.readyState!=="loading"?(me=!0,document.querySelectorAll(i).forEach(t)):pe.size===1&&document.addEventListener("DOMContentLoaded",Lc)}var Mc="textarea[data-count]";function Nc(i){if(i.hasAttribute("data-count-init"))return;i.setAttribute("data-count-init","");let t=i.dataset.count==="words",e=t?parseInt(i.dataset.maxwords??"0",10)||0:i.maxLength>0?i.maxLength:0,s=document.createElement("output");s.className="textarea-counter",s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true");let n=i.closest("form-field");n?n.appendChild(s):i.insertAdjacentElement("afterend",s);function r(){let a=i.value,o=t?a.trim()?a.trim().split(/\s+/).length:0:a.length;if(e>0){s.textContent=`${o} / ${e}`;let c=o/e;s.dataset.state=c>=1?"error":c>=.8?"warning":""}else{let c=t?o===1?"word":"words":o===1?"character":"characters";s.textContent=`${o} ${c}`,s.dataset.state=""}}i.addEventListener("input",r),r()}I(Mc,Nc);var Dc="textarea[data-grow]",_c=CSS.supports("field-sizing","content");function Ic(i){if(i.hasAttribute("data-grow-init"))return;i.setAttribute("data-grow-init","");let t=parseInt(i.dataset.maxRows??"0",10)||0;if(i.style.resize="none",_c){i.style.fieldSizing="content",t>0&&(i.style.maxBlockSize=`${t}lh`);return}i.style.overflow="hidden";function e(){i.style.blockSize="auto";let s=i.scrollHeight;if(t>0){let n=getComputedStyle(i),r=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=r*t+a;s>o?(s=o,i.style.overflow="auto"):i.style.overflow="hidden"}i.style.blockSize=s+"px"}i.addEventListener("input",e),i.addEventListener("change",e),e()}I(Dc,Ic);var be="[data-show-when], [data-hide-when]";function ls(i){let t=i.indexOf("=");return t===-1?{name:i,value:null}:{name:i.slice(0,t),value:i.slice(t+1)}}function $c(i,t){let e=t.querySelectorAll(`[name="${CSS.escape(i)}"]`);if(!e.length)return"";let s=e[0];if(s.type==="radio"){let n=Array.from(e).find(r=>r.checked);return n?n.value:""}return s.type==="checkbox"?s.checked?s.value||"true":"":s.value}function kr(i,t){let e=$c(i.name,t);return i.value===null?e!=="":e===i.value}function ge(i){let t=i.closest("form")||document,e;if(i.dataset.showWhen){let s=ls(i.dataset.showWhen);e=kr(s,t)}else if(i.dataset.hideWhen){let s=ls(i.dataset.hideWhen);e=!kr(s,t)}e?(i.removeAttribute("hidden"),i.removeAttribute("inert")):(i.setAttribute("hidden",""),i.setAttribute("inert",""))}function Tr(i=document){let t=i.querySelectorAll(be);t.forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),ge(n))});let e=new Set;t.forEach(n=>{let r=n.closest("form");r&&!r.hasAttribute("data-conditional-listener")&&(r.setAttribute("data-conditional-listener",""),e.add(r))}),(e.size?[...e]:[document]).forEach(n=>{n.addEventListener("change",Lr),n.addEventListener("input",Lr)})}function Lr(i){let t=i.target.name;if(!t)return;(i.target.closest("form")||document).querySelectorAll(be).forEach(n=>{let r=n.dataset.showWhen||n.dataset.hideWhen||"";ls(r).name===t&&ge(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Tr()):Tr();var qc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(be)&&(s.hasAttribute("data-conditional-init")||(s.setAttribute("data-conditional-init",""),ge(s))),s.querySelectorAll(be).forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),ge(n))})}});qc.observe(document.documentElement,{childList:!0,subtree:!0});var Oc='input[type="range"][data-range]';function Bc(i){if(i.hasAttribute("data-range-init"))return;i.setAttribute("data-range-init","");let t=i.dataset.prefix||"",e=i.dataset.suffix||"",s=i.hasAttribute("data-bubble"),n=document.createElement("div");if(n.className="range-wrapper",!i.parentNode)return;i.parentNode.insertBefore(n,i),n.appendChild(i);function r(){let l=parseFloat(i.min)||0,d=parseFloat(i.max)||100,f=(parseFloat(i.value)-l)/(d-l)*100;n.style.setProperty("--range-pct",`${f}%`)}let a;s&&(a=document.createElement("output"),a.className="range-bubble",a.setAttribute("for",i.id||""),n.appendChild(a));function o(){if(!a)return;a.textContent=`${t}${i.value}${e}`;let l=parseFloat(i.min)||0,d=parseFloat(i.max)||100,u=(parseFloat(i.value)-l)/(d-l),f=i.offsetWidth,p=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize),m=i.offsetLeft+p/2+u*(f-p);a.style.insetInlineStart=`${m}px`}if(i.hasAttribute("data-markers")){let l=parseFloat(i.min)||0,d=parseFloat(i.max)||100,u=parseFloat(i.step)||1,f=document.createElement("div");f.className="range-markers";let v=Math.round((d-l)/u);for(let p=0;p<=v;p++)f.appendChild(document.createElement("span"));n.appendChild(f)}let c=i.getAttribute("list");if(c){let l=document.getElementById(c);if(l){let d=document.createElement("div");d.className="range-labels";let u=parseFloat(i.min)||0,f=parseFloat(i.max)||100;requestAnimationFrame(()=>{let v=i.offsetWidth,m=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize);Array.from(l.options).forEach(y=>{let S=document.createElement("span");S.textContent=y.label||y.value;let x=(parseFloat(y.value)-u)/(f-u),B=i.offsetLeft+m/2+x*(v-m);S.style.insetInlineStart=`${B}px`,d.appendChild(S)})}),n.appendChild(d)}}function h(){r(),o()}i.addEventListener("input",h),h()}I(Oc,Bc);var hs='input[type="file"][data-upload]';function Pc(i){if(i===0)return"0 B";let t=["B","KB","MB","GB"],e=Math.floor(Math.log(i)/Math.log(1024));return`${(i/Math.pow(1024,e)).toFixed(e>0?1:0)} ${t[e]}`}function ds(i){if(i.hasAttribute("data-upload-init"))return;i.setAttribute("data-upload-init","");let t=i.hasAttribute("multiple"),e=i.getAttribute("accept")||"",s=document.createElement("div");if(s.className="upload-zone",s.setAttribute("role","presentation"),!i.parentNode)return;i.parentNode.insertBefore(s,i),s.appendChild(i);let n=document.createElement("div");n.className="upload-prompt",n.innerHTML=`
|
|
576
|
+
`}#r(){if(!this.hasSessionData)return'<p class="analytics-panel__empty">No data stored on this device in this session.</p>';let t=this.sessionCounter,e=this.queuedEvents,s=e.find(o=>o?.id==="__scroll"),n=e.find(o=>o?.id==="__attention"),r=e.filter(o=>!o?.id?.startsWith?.("__")).length,a=[];return t?.v!=null&&a.push(`<dt>Pages this session</dt><dd>${t.v}</dd>`),s&&a.push(`<dt>Max scroll depth</dt><dd>${s.params?.depth??"?"}%</dd>`),n&&a.push(`<dt>Active reading time</dt><dd>${dc(n.params?.ms)}</dd>`),r>0&&a.push(`<dt>Queued events</dt><dd>${r}</dd>`),`<dl class="analytics-panel__data">${a.join("")}</dl>`}};b("analytics-panel",Ri);var Hi=class extends g{static observedAttributes=["src","src-dark","src-compact","alt","wordmark","height"];#e="";#t=null;#i=null;#s=!1;setup(){this.#e=this.#c(),this.hasAttribute("src-dark")&&this.#n(),this.#o()}teardown(){this.#t?.removeEventListener("change",this.#a),this.#t=null,this.#i?.disconnect(),this.#i=null,this.#s&&(window.removeEventListener("vb:theme-change",this.#a),this.#s=!1)}attributeChangedCallback(t,e,s){e!==s&&(!this.isConnected||!this.hasAttribute("data-upgraded")||(t==="src-dark"&&(s?this.#n():(this.#t?.removeEventListener("change",this.#a),this.#i?.disconnect(),this.#s&&(window.removeEventListener("vb:theme-change",this.#a),this.#s=!1))),this.#o()))}#r(){let t=document.documentElement.getAttribute("data-mode");if(t==="dark")return!0;if(t==="light")return!1;let e=getComputedStyle(this).colorScheme||"";return/\bdark\b/.test(e)&&!/\blight\b/.test(e)?!0:/\blight\b/.test(e)&&!/\bdark\b/.test(e)?!1:this.#t?.matches??!1}#n(){this.#t||(this.#t=matchMedia("(prefers-color-scheme: dark)"),this.#t.addEventListener("change",this.#a)),this.#i||(this.#i=new MutationObserver(()=>this.#a(void 0)),this.#i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-mode","data-theme"]})),this.#s||(window.addEventListener("vb:theme-change",this.#a),this.#s=!0)}#a=()=>{this.isConnected&&this.#o()};#o(){let t=this.getAttribute("src"),e=this.getAttribute("src-dark"),s=e&&this.#r()?e:t;if(!s){this.#e&&this.querySelector("img")&&(this.replaceChildren(document.createTextNode(this.#e)),this.removeAttribute("aria-label"));return}let n=this.#e||this.getAttribute("alt")||"",r=this.hasAttribute("wordmark"),a=this.getAttribute("height");if(this.querySelector("img")?.getAttribute("src")===s){let h=this.querySelector(".brand-mark-wordmark");if(r&&!h){let l=document.createElement("span");l.className="brand-mark-wordmark",l.textContent=n,this.appendChild(l)}else!r&&h&&h.remove();return}let c=document.createElement("img");if(c.src=s,c.alt=r?"":n,c.decoding="async",a&&(c.height=parseInt(a,10)),r){let h=document.createElement("span");h.className="brand-mark-wordmark",h.textContent=n,this.replaceChildren(c,h)}else this.replaceChildren(c),this.getAttribute("alt")||this.setAttribute("aria-label",n)}#c(){let t="";for(let e of this.childNodes)(e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE&&e.tagName!=="IMG")&&(t+=e.textContent);return t.trim()}};b("brand-mark",Hi);var uc="52rem",zi=class extends HTMLElement{#e=null;connectedCallback(){let t=this.getAttribute("breakpoint")||uc;this.#e=matchMedia(`(max-width: ${t})`),this.#e.addEventListener("change",this.#t),this.#t(void 0)}disconnectedCallback(){this.#e?.removeEventListener("change",this.#t),this.#e=null}#t=t=>{let e=this.#e?.matches??!1;if(e)this.setAttribute("data-mobile","");else{this.removeAttribute("data-mobile");let n=this.querySelector("[popover]");n?.matches(":popover-open")&&n.hidePopover?.()}let s=this.closest("header");if(s)for(let n of s.children)n!==this&&n.matches("nav, nav-bar, site-tools")&&(n.style.display=e?"none":"")}};customElements.get("mobile-menu")||customElements.define("mobile-menu",zi);var M="interestfor",ur="interestForElement"in HTMLButtonElement.prototype,L=new WeakMap,mt=new WeakMap,he=new Set,Wi=!1,ji=CSS.supports?.("anchor-name","--a")??!1;function lr(i){let t=String(i).trim(),e=t.match(/^([\d.]+)s$/);if(e)return parseFloat(e[1])*1e3;let s=t.match(/^([\d.]+)ms$/);return s?parseFloat(s[1]):parseFloat(t)||0}function fr(i,t){let e=getComputedStyle(i),s=e.getPropertyValue(t).trim();if(s.toLowerCase()!=="normal")return lr(s);let n=e.getPropertyValue("--interest-delay").trim();if(n&&n.toLowerCase()!=="normal"){let r=n.split(/\s+/).filter(a=>a.length>0);if(r.length>0){let a=t==="--interest-delay-start"?r[0]:r[1]||r[0];if(a.toLowerCase()!=="normal")return lr(a)}}return t==="--interest-delay-start"?500:250}var fc=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(","),pc="h1,h2,h3,h4,h5,h6,ul,ol,li,table,nav,header,footer,main,aside,article,section,form,blockquote,details,summary,dialog";function Yi(i){if(i.getAttribute("popover")?.toLowerCase()!=="hint"||i.querySelector(fc)||i.querySelector(pc))return!1;for(let t of i.querySelectorAll("[role]")){let e=t.getAttribute("role").toLowerCase();if(!["presentation","none","generic","image"].includes(e))return!1}return!0}function mc(i,t){Yi(t)?i.setAttribute("aria-describedby",t.id):(i.setAttribute("aria-details",t.id),i.setAttribute("aria-expanded","false"),t.hasAttribute("role")||t.setAttribute("role","tooltip"))}function R(i){let t=i.getAttribute(M);return t?document.getElementById(t):null}function le(i){let t=mt.get(i);return t?.invoker&&L.get(t.invoker)?.state==="full"?t.invoker:null}function Ot(i){if(L.has(i))return L.get(i);let t={state:"none",gainedTimer:null,lostTimer:null,longPressTimer:null};L.set(i,t);let e=R(i);return e&&mc(i,e),t}function pr(i,t){if(!i||!t||!i.isConnected||R(i)!==t)return!1;let e=le(t);if(e){if(e===i)return clearTimeout(L.get(e).lostTimer),!1;if(!qt(e,t)||!i.isConnected||R(i)!==t)return!1}let s=Ot(i);if(s.state!=="none")return!1;let n=new CustomEvent("interest",{bubbles:!1,cancelable:!0,detail:{source:i}});if(t.dispatchEvent(n),t.hasAttribute("popover")){try{t.showPopover()}catch{}gc(i,t)}s.state="full",mt.has(t)||mt.set(t,{});let r=mt.get(t);if(r.invoker=i,t.hasAttribute("popover")){let a=o=>{o.newState==="closed"&&qt(i,t)};r.toggleListener=a,t.addEventListener("toggle",a)}return he.add(i),i.classList.add("interest-source"),t.classList.add("interest-target"),Yi(t)||i.setAttribute("aria-expanded","true"),!0}function qt(i,t){if(!i||!t||R(i)!==t||le(t)!==i)return!1;let e=L.get(i);if(!e||e.state==="none")return!1;if(clearTimeout(e.gainedTimer),clearTimeout(e.lostTimer),t.dispatchEvent(new CustomEvent("loseinterest",{bubbles:!1,detail:{source:i}})),t.hasAttribute("popover"))try{t.hidePopover()}catch{}let s=mt.get(t);return s?.toggleListener&&t.removeEventListener("toggle",s.toggleListener),mt.delete(t),he.delete(i),i.classList.remove("interest-source"),t.classList.remove("interest-target"),Yi(t)||i.setAttribute("aria-expanded","false"),e.state="none",!0}function bc(i){let t=Ot(i);clearTimeout(t.gainedTimer);let e=fr(i,"--interest-delay-start");t.gainedTimer=setTimeout(()=>{let s=R(i);s&&pr(i,s)},e)}function Vi(i){let t=L.get(i);if(!t)return;clearTimeout(t.lostTimer);let e=fr(i,"--interest-delay-end");t.lostTimer=setTimeout(()=>{let s=R(i);s&&qt(i,s)},e)}function $t(i){if(!ji)return;let t=i.getAttribute(M),e=t?document.getElementById(t):null;if(!e?.id)return;let s=`--interest-${e.id}`;i.style.anchorName=s,e.style.positionAnchor=s}function gc(i,t){if(ji)return;let e=i.getBoundingClientRect(),s=t.getBoundingClientRect(),n=8,r=8,a=e.top-s.height-n,o=e.left+(e.width-s.width)/2;a<r&&(a=e.bottom+n),o=Math.max(r,Math.min(o,window.innerWidth-s.width-r)),a=Math.max(r,Math.min(a,window.innerHeight-s.height-r)),t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.margin="0"}function vc(i,t){if(Wi||!i.isConnected)return;if(!R(i)){let r=i.closest(".interest-target");if(r){let a=le(r);a&&(t?clearTimeout(L.get(a)?.lostTimer):Vi(a))}return}let s=Ot(i),n=le(i);if(t)clearTimeout(s.lostTimer),n&&clearTimeout(L.get(n)?.lostTimer),bc(i);else if(clearTimeout(s.gainedTimer),s.state!=="none"&&Vi(i),n){let r=L.get(n);r&&clearTimeout(r.gainedTimer),Vi(n)}}function yc(){let i=(s,n)=>{for(let r=s.target;r;r=r.parentElement)vc(r,n)};document.body.addEventListener("mouseover",s=>i(s,!0)),document.body.addEventListener("mouseout",s=>i(s,!1)),document.body.addEventListener("focusin",s=>i(s,!0)),document.body.addEventListener("focusout",s=>i(s,!1)),document.body.addEventListener("keydown",s=>{if(s.key==="Escape")for(let n of he){let r=R(n);r&&qt(n,r)}});let t=500;document.body.addEventListener("touchstart",s=>{Wi=!0;let n=s.target.closest(`button[${M}]`);if(!n)return;let r=Ot(n);r.longPressTimer=setTimeout(()=>{let a=R(n);a&&pr(n,a),r.longPressTimer=null},t)});let e=s=>{let n=s.target.closest(`button[${M}]`);if(!n)return;let r=L.get(n);r?.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)};document.body.addEventListener("touchend",s=>{e(s),Wi=!1}),document.body.addEventListener("touchmove",e)}function wc(){let i=document.createElement("style");i.textContent=['@property --interest-delay-start { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay-end { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay { syntax: "*"; inherits: false; initial-value: normal; }'].join(`
|
|
577
|
+
`),document.head.appendChild(i)}function ce(i){Ot(i),$t(i)}function Ui(i){let t=L.get(i);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let e=R(i);e&&qt(i,e)}i.classList.remove("interest-source"),L.delete(i),he.delete(i)}}function hr(i=document){i.querySelectorAll(`[${M}]`).forEach(ce)}var dr=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute(M)&&ce(s),s.querySelectorAll(`[${M}]`).forEach(ce)}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;L.has(s)&&Ui(s),s.querySelectorAll(`[${M}]`).forEach(n=>{L.has(n)&&Ui(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let e=t.target;e.hasAttribute(M)?L.has(e)||ce(e):L.has(e)&&Ui(e)}}});ur||(wc(),yc(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{hr(),dr.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[M]})}):(hr(),dr.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[M]})));if(ur&&ji){let i=()=>{document.querySelectorAll(`[${M}]`).forEach($t),new MutationObserver(t=>{for(let e of t){for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.hasAttribute(M)&&$t(n),n.querySelectorAll(`[${M}]`).forEach($t)}e.type==="attributes"&&e.target.hasAttribute?.(M)&&$t(e.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[M]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i):i()}var Bt="[data-back-to-top]";var Ec=matchMedia("(prefers-reduced-motion: reduce)"),de=new Set,at=null,Gi=!1;function Ki(i){i.hasAttribute("data-back-to-top-init")||(i.setAttribute("data-back-to-top-init",""),i.toggleAttribute("data-visible",!1),i.addEventListener("click",vr),de.add(i),Ac(),yr())}function mr(i){i.hasAttribute("data-back-to-top-init")&&(i.removeAttribute("data-back-to-top-init"),i.removeEventListener("click",vr),de.delete(i),de.size===0&&at&&(window.removeEventListener("scroll",at),at=null))}var bt=null;function gr(){if(bt&&bt.isConnected)return bt;let i=document.documentElement,t=document.body;if(t&&t.scrollHeight>i.clientHeight+1&&t){let s=getComputedStyle(t);if(/auto|scroll/.test(s.overflowY))return bt=t,t}return bt=document.scrollingElement||i,bt}function vr(i){let t=i.currentTarget.getAttribute("href")||"";if(t===""||t==="#"||t==="#top")i.preventDefault();else return;gr().scrollTo({top:0,left:0,behavior:Ec.matches?"auto":"smooth"})}function Ac(){at||(at=()=>{Gi||(Gi=!0,requestAnimationFrame(()=>{yr(),Gi=!1}))},window.addEventListener("scroll",at,{passive:!0}),document.addEventListener("scroll",at,{capture:!0,passive:!0}))}function yr(){let t=gr().scrollTop||window.scrollY,s=window.innerHeight*1,n=t>s,r=t<200;for(let a of de)a.toggleAttribute("data-visible",n&&!r)}function br(i=document){i.querySelectorAll(Bt).forEach(Ki)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>br(),{once:!0}):br();var Sc=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Bt)&&Ki(s),s.querySelectorAll(Bt).forEach(n=>Ki(n))}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches?.(Bt)&&mr(s),s.querySelectorAll?.(Bt).forEach(n=>mr(n))}}});Sc.observe(document.documentElement,{childList:!0,subtree:!0});var Xi="kbd[data-hotkey]";function wr(i=document){i.querySelectorAll(Xi).forEach(Ji)}function Ji(i){if(i.hasAttribute("data-hotkey-init"))return;i.setAttribute("data-hotkey-init","");let t=i.dataset.hotkey;if(!t)return;let e=ct?xt.mac:xt.other,s=t.toLowerCase().split("+").map(r=>r.trim()),n=document.createDocumentFragment();s.forEach((r,a)=>{let o=document.createElement("kbd");o.textContent=e[r]??r.toUpperCase(),n.appendChild(o),a<s.length-1&&!ct&&n.appendChild(document.createTextNode("+"))}),i.replaceChildren(n),i.setAttribute("aria-label",i.textContent)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>wr()):wr();var xc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Xi)&&Ji(s),s.querySelectorAll(Xi).forEach(n=>Ji(n))}});xc.observe(document.documentElement,{childList:!0,subtree:!0});function gt(){return document.documentElement.lang||navigator.language||"en"}var Zi="data[data-format-number]";function Er(i=document){i.querySelectorAll(Zi).forEach(Qi)}function Qi(i){if(i.hasAttribute("data-format-number-init"))return;i.setAttribute("data-format-number-init","");let t=i.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e))return;i.title||(i.title=i.textContent.trim());let s=i.getAttribute("data-format-number")||"decimal",n=i.getAttribute("data-locale")||gt(),r={};switch(s){case"currency":{r.style="currency",r.currency=i.getAttribute("data-currency")||"USD";break}case"percent":r.style="percent";break;case"compact":r.notation="compact";break;default:break}try{i.textContent=new Intl.NumberFormat(n,r).format(e)}catch{}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Er()):Er();var Cc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Zi)&&Qi(s),s.querySelectorAll(Zi).forEach(n=>Qi(n))}});Cc.observe(document.documentElement,{childList:!0,subtree:!0});var ue="time[data-format-date]",Pt=new Map;function Ar(i=document){i.querySelectorAll(ue).forEach(ts)}function ts(i){if(i.hasAttribute("data-format-date-init"))return;i.setAttribute("data-format-date-init","");let t=i.getAttribute("datetime");if(!t)return;let e=new Date(t);if(isNaN(e.getTime()))return;i.title||(i.title=i.textContent.trim());let s=i.getAttribute("data-format-date")||"medium",n=i.getAttribute("data-locale")||gt();s==="relative"?(i.textContent=xr(e,n),Cr(i,e,n)):i.textContent=kc(e,s,i,n)}function kc(i,t,e,s){let n=t||"medium",r=e.getAttribute("data-format-time")||void 0;try{let a={dateStyle:n};return r&&(a.timeStyle=r),new Intl.DateTimeFormat(s,a).format(i)}catch{return e.textContent}}function xr(i,t){let e=Date.now(),s=Math.round((i.getTime()-e)/1e3),n=Math.abs(s),r=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(let{unit:a,seconds:o}of r)if(n>=o){let c=Math.round(s/o);try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,a)}catch{let h=Math.abs(c),l=h===1?a:`${a}s`;return c<0?`${h} ${l} ago`:`in ${h} ${l}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function Cr(i,t,e){clearInterval(Pt.get(i));let s=Math.abs(Date.now()-t.getTime()),n=36e5,r=864e5,a;s<n?a=6e4:s<r?a=3e5:a=36e5;let o=setInterval(()=>{i.textContent=xr(t,e),Cr(i,t,e)},a);Pt.set(i,o)}function Sr(i){Pt.has(i)&&(clearInterval(Pt.get(i)),Pt.delete(i))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ar()):Ar();var Tc=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ue)&&ts(s),s.querySelectorAll(ue).forEach(n=>ts(n))}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;Sr(s),s.querySelectorAll(ue).forEach(Sr)}}});Tc.observe(document.documentElement,{childList:!0,subtree:!0});var is="data[data-format-bytes]",es=["B","KB","MB","GB","TB","PB"];function kr(i=document){i.querySelectorAll(is).forEach(ss)}function ss(i){if(i.hasAttribute("data-format-bytes-init"))return;i.setAttribute("data-format-bytes-init","");let t=i.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e)||e<0)return;i.title||(i.title=i.textContent.trim());let s=parseInt(i.getAttribute("data-format-bytes")??"0",10)||0,n=i.getAttribute("data-unit")==="decimal",r=i.getAttribute("data-locale")||gt(),a=n?1e3:1024;if(e===0){i.textContent="0 B";return}let o=Math.min(Math.floor(Math.log(e)/Math.log(a)),es.length-1),c=e/Math.pow(a,o);try{let h=new Intl.NumberFormat(r,{minimumFractionDigits:s,maximumFractionDigits:s}).format(c);i.textContent=`${h} ${es[o]}`}catch{i.textContent=`${c.toFixed(s)} ${es[o]}`}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>kr()):kr();var Lc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(is)&&ss(s),s.querySelectorAll(is).forEach(n=>ss(n))}});Lc.observe(document.documentElement,{childList:!0,subtree:!0});var ns="[data-spoiler]";var Mr=new Set(["SPAN","EM","STRONG","CODE","A","B","I","S","U","SMALL","SUB","SUP","MARK","ABBR","Q","CITE","DFN","SAMP","VAR","KBD","BDI","BDO","DATA","TIME","WBR"]);function Tr(i=document){i.querySelectorAll(ns).forEach(rs)}function rs(i){if(i.hasAttribute("data-spoiler-init"))return;i.setAttribute("data-spoiler-init","");let t=i.getAttribute("data-spoiler")||"blur";i.getAttribute("data-spoiler")||i.setAttribute("data-spoiler","blur");let e=Mr.has(i.tagName),s=e?"span":"div";i.setAttribute("role","group"),i.setAttribute("aria-label","Spoiler");let n=document.createElement(s);for(n.setAttribute("data-spoiler-content",""),n.setAttribute("inert","");i.firstChild;)n.appendChild(i.firstChild);i.appendChild(n);let r=i.getAttribute("data-spoiler-label")||"Reveal spoiler",a;e?(a=document.createElement("span"),a.setAttribute("role","button"),a.setAttribute("tabindex","0")):(a=document.createElement("button"),a.setAttribute("type","button")),a.setAttribute("data-spoiler-trigger",""),a.setAttribute("aria-expanded","false");let o=document.createElement("span");o.setAttribute("data-spoiler-label",""),o.textContent=r,a.appendChild(o),i.appendChild(a),a.addEventListener("click",()=>Lr(i)),e&&a.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),Lr(i))}),i.addEventListener("keydown",c=>{c.key==="Escape"&&i.hasAttribute("data-spoiler-visible")&&(c.stopPropagation(),fe(i))})}function Lr(i){let t=i.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${t}"][data-spoiler-visible]`).forEach(n=>{n!==i&&fe(n)});let e=i.querySelector("[data-spoiler-content]"),s=i.querySelector("[data-spoiler-trigger]");if(e&&e.removeAttribute("inert"),s&&(s.setAttribute("aria-expanded","true"),s.hidden=!0),i.setAttribute("data-spoiler-visible",""),!i.hasAttribute("data-spoiler-persist")){let n=Mr.has(i.tagName),r;n?(r=document.createElement("span"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),fe(i))})):(r=document.createElement("button"),r.setAttribute("type","button")),r.setAttribute("data-spoiler-hide",""),r.textContent="Hide",r.addEventListener("click",()=>fe(i)),i.appendChild(r)}Mc("Spoiler revealed"),i.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function fe(i){if(i.hasAttribute("data-spoiler-persist"))return;let t=i.querySelector("[data-spoiler-content]"),e=i.querySelector("[data-spoiler-trigger]"),s=i.querySelector("[data-spoiler-hide]");t&&t.setAttribute("inert",""),e&&(e.setAttribute("aria-expanded","false"),e.hidden=!1,e.focus()),s&&s.remove(),i.removeAttribute("data-spoiler-visible"),i.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function Mc(i){let t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:"0"}),t.textContent=i,document.body.appendChild(t),setTimeout(()=>t.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Tr()):Tr();var Nc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ns)&&rs(s),s.querySelectorAll(ns).forEach(rs)}});Nc.observe(document.documentElement,{childList:!0,subtree:!0});var as="[data-splitter]";function Nr(i=document){i.querySelectorAll(as).forEach(os)}function os(i){if(i.hasAttribute("data-splitter-init"))return;i.setAttribute("data-splitter-init","");let t=[...i.children];if(t.length<2)return;let e=t[0],s=t[1],n=i.getAttribute("data-splitter")==="vertical",r=Number(e.dataset.min)||10,a=Number(e.dataset.max)||90,o=document.createElement("div");o.className="split-divider",o.setAttribute("role","separator"),o.setAttribute("aria-orientation",n?"vertical":"horizontal"),o.setAttribute("aria-valuenow","50"),o.setAttribute("aria-valuemin",String(r)),o.setAttribute("aria-valuemax",String(a)),o.setAttribute("aria-label","Resize panels"),o.setAttribute("tabindex","0"),i.insertBefore(o,s),e.style.flexBasis="50%",e.style.flexGrow="0",e.style.flexShrink="0",e.style.overflow="auto",s.style.flexGrow="1",s.style.overflow="auto";let c=!1;function h(l){let d=Math.min(a,Math.max(r,l));e.style.flexBasis=`${d}%`,o.setAttribute("aria-valuenow",String(Math.round(d))),i.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:d},bubbles:!0}))}o.addEventListener("pointerdown",l=>{l.preventDefault(),c=!0,o.setPointerCapture(l.pointerId),i.style.userSelect="none"}),o.addEventListener("pointermove",l=>{if(!c)return;let d=i.getBoundingClientRect(),u;n?u=(l.clientY-d.top)/d.height*100:u=(l.clientX-d.left)/d.width*100,h(u)}),o.addEventListener("pointerup",l=>{c=!1,o.releasePointerCapture(l.pointerId),i.style.userSelect=""}),o.addEventListener("keydown",l=>{let d=l.shiftKey?10:1,u=Number(o.getAttribute("aria-valuenow")),f=n?["ArrowUp"]:["ArrowLeft"],v=n?["ArrowDown"]:["ArrowRight"];f.includes(l.key)?(l.preventDefault(),h(u-d)):v.includes(l.key)?(l.preventDefault(),h(u+d)):l.key==="Home"?(l.preventDefault(),h(r)):l.key==="End"&&(l.preventDefault(),h(a))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Nr()):Nr();var Dc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(as)&&os(s),s.querySelectorAll(as).forEach(os)}});Dc.observe(document.documentElement,{childList:!0,subtree:!0});var cs='input[type="checkbox"][data-switch]';function ls(i){i.hasAttribute("data-switch-init")||(i.setAttribute("data-switch-init",""),i.setAttribute("role","switch"))}function Dr(i=document){i.querySelectorAll(cs).forEach(ls)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Dr()):Dr();var _c=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(cs)&&ls(s),s.querySelectorAll(cs).forEach(n=>ls(n))}});_c.observe(document.documentElement,{childList:!0,subtree:!0});var pe=new Map,hs=null,me=!1;function Ic(i){for(let[t,e]of pe)i.querySelectorAll(t).forEach(e)}function $c(i){if(i.nodeType!==Node.ELEMENT_NODE)return;let t=i;for(let[e,s]of pe)t.matches(e)&&s(t),t.querySelectorAll(e).forEach(s)}function qc(){hs||(hs=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes)$c(e)}),hs.observe(document.documentElement,{childList:!0,subtree:!0}))}function Oc(){me||(me=!0,Ic(document))}function I(i,t){pe.set(i,t),qc(),me||document.readyState!=="loading"?(me=!0,document.querySelectorAll(i).forEach(t)):pe.size===1&&document.addEventListener("DOMContentLoaded",Oc)}var Bc="textarea[data-count]";function Pc(i){if(i.hasAttribute("data-count-init"))return;i.setAttribute("data-count-init","");let t=i.dataset.count==="words",e=t?parseInt(i.dataset.maxwords??"0",10)||0:i.maxLength>0?i.maxLength:0,s=document.createElement("output");s.className="textarea-counter",s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true");let n=i.closest("form-field");n?n.appendChild(s):i.insertAdjacentElement("afterend",s);function r(){let a=i.value,o=t?a.trim()?a.trim().split(/\s+/).length:0:a.length;if(e>0){s.textContent=`${o} / ${e}`;let c=o/e;s.dataset.state=c>=1?"error":c>=.8?"warning":""}else{let c=t?o===1?"word":"words":o===1?"character":"characters";s.textContent=`${o} ${c}`,s.dataset.state=""}}i.addEventListener("input",r),r()}I(Bc,Pc);var Fc="textarea[data-grow]",Rc=CSS.supports("field-sizing","content");function Hc(i){if(i.hasAttribute("data-grow-init"))return;i.setAttribute("data-grow-init","");let t=parseInt(i.dataset.maxRows??"0",10)||0;if(i.style.resize="none",Rc){i.style.fieldSizing="content",t>0&&(i.style.maxBlockSize=`${t}lh`);return}i.style.overflow="hidden";function e(){i.style.blockSize="auto";let s=i.scrollHeight;if(t>0){let n=getComputedStyle(i),r=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=r*t+a;s>o?(s=o,i.style.overflow="auto"):i.style.overflow="hidden"}i.style.blockSize=s+"px"}i.addEventListener("input",e),i.addEventListener("change",e),e()}I(Fc,Hc);var be="[data-show-when], [data-hide-when]";function ds(i){let t=i.indexOf("=");return t===-1?{name:i,value:null}:{name:i.slice(0,t),value:i.slice(t+1)}}function zc(i,t){let e=t.querySelectorAll(`[name="${CSS.escape(i)}"]`);if(!e.length)return"";let s=e[0];if(s.type==="radio"){let n=Array.from(e).find(r=>r.checked);return n?n.value:""}return s.type==="checkbox"?s.checked?s.value||"true":"":s.value}function _r(i,t){let e=zc(i.name,t);return i.value===null?e!=="":e===i.value}function ge(i){let t=i.closest("form")||document,e;if(i.dataset.showWhen){let s=ds(i.dataset.showWhen);e=_r(s,t)}else if(i.dataset.hideWhen){let s=ds(i.dataset.hideWhen);e=!_r(s,t)}e?(i.removeAttribute("hidden"),i.removeAttribute("inert")):(i.setAttribute("hidden",""),i.setAttribute("inert",""))}function Ir(i=document){let t=i.querySelectorAll(be);t.forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),ge(n))});let e=new Set;t.forEach(n=>{let r=n.closest("form");r&&!r.hasAttribute("data-conditional-listener")&&(r.setAttribute("data-conditional-listener",""),e.add(r))}),(e.size?[...e]:[document]).forEach(n=>{n.addEventListener("change",$r),n.addEventListener("input",$r)})}function $r(i){let t=i.target.name;if(!t)return;(i.target.closest("form")||document).querySelectorAll(be).forEach(n=>{let r=n.dataset.showWhen||n.dataset.hideWhen||"";ds(r).name===t&&ge(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ir()):Ir();var Vc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(be)&&(s.hasAttribute("data-conditional-init")||(s.setAttribute("data-conditional-init",""),ge(s))),s.querySelectorAll(be).forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),ge(n))})}});Vc.observe(document.documentElement,{childList:!0,subtree:!0});var Uc='input[type="range"][data-range]';function Wc(i){if(i.hasAttribute("data-range-init"))return;i.setAttribute("data-range-init","");let t=i.dataset.prefix||"",e=i.dataset.suffix||"",s=i.hasAttribute("data-bubble"),n=document.createElement("div");if(n.className="range-wrapper",!i.parentNode)return;i.parentNode.insertBefore(n,i),n.appendChild(i);function r(){let l=parseFloat(i.min)||0,d=parseFloat(i.max)||100,f=(parseFloat(i.value)-l)/(d-l)*100;n.style.setProperty("--range-pct",`${f}%`)}let a;s&&(a=document.createElement("output"),a.className="range-bubble",a.setAttribute("for",i.id||""),n.appendChild(a));function o(){if(!a)return;a.textContent=`${t}${i.value}${e}`;let l=parseFloat(i.min)||0,d=parseFloat(i.max)||100,u=(parseFloat(i.value)-l)/(d-l),f=i.offsetWidth,p=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize),m=i.offsetLeft+p/2+u*(f-p);a.style.insetInlineStart=`${m}px`}if(i.hasAttribute("data-markers")){let l=parseFloat(i.min)||0,d=parseFloat(i.max)||100,u=parseFloat(i.step)||1,f=document.createElement("div");f.className="range-markers";let v=Math.round((d-l)/u);for(let p=0;p<=v;p++)f.appendChild(document.createElement("span"));n.appendChild(f)}let c=i.getAttribute("list");if(c){let l=document.getElementById(c);if(l){let d=document.createElement("div");d.className="range-labels";let u=parseFloat(i.min)||0,f=parseFloat(i.max)||100;requestAnimationFrame(()=>{let v=i.offsetWidth,m=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize);Array.from(l.options).forEach(y=>{let S=document.createElement("span");S.textContent=y.label||y.value;let C=(parseFloat(y.value)-u)/(f-u),B=i.offsetLeft+m/2+C*(v-m);S.style.insetInlineStart=`${B}px`,d.appendChild(S)})}),n.appendChild(d)}}function h(){r(),o()}i.addEventListener("input",h),h()}I(Uc,Wc);var us='input[type="file"][data-upload]';function jc(i){if(i===0)return"0 B";let t=["B","KB","MB","GB"],e=Math.floor(Math.log(i)/Math.log(1024));return`${(i/Math.pow(1024,e)).toFixed(e>0?1:0)} ${t[e]}`}function fs(i){if(i.hasAttribute("data-upload-init"))return;i.setAttribute("data-upload-init","");let t=i.hasAttribute("multiple"),e=i.getAttribute("accept")||"",s=document.createElement("div");if(s.className="upload-zone",s.setAttribute("role","presentation"),!i.parentNode)return;i.parentNode.insertBefore(s,i),s.appendChild(i);let n=document.createElement("div");n.className="upload-prompt",n.innerHTML=`
|
|
578
578
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
579
579
|
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
|
|
580
580
|
<polyline points="17 8 12 3 7 8"/>
|
|
@@ -583,11 +583,11 @@ svg {
|
|
|
583
583
|
<span>Drag files here or <button type="button" class="upload-browse">browse</button></span>
|
|
584
584
|
${e?`<small>${e.replace(/\./g,"").toUpperCase().replace(/,/g,", ")}</small>`:""}
|
|
585
585
|
`,s.appendChild(n);let r=document.createElement("ul");r.className="upload-file-list",r.setAttribute("aria-label","Selected files"),s.appendChild(r);let a=n.querySelector(".upload-browse");if(!a)return;a.addEventListener("click",()=>i.click()),s.addEventListener("click",c=>{(c.target===s||c.target===n||c.target.closest(".upload-prompt"))&&i.click()});let o=0;s.addEventListener("dragenter",c=>{c.preventDefault(),o++,s.dataset.dragover=""}),s.addEventListener("dragleave",()=>{o--,o===0&&delete s.dataset.dragover}),s.addEventListener("dragover",c=>{c.preventDefault()}),s.addEventListener("drop",c=>{c.preventDefault(),o=0,delete s.dataset.dragover,c.dataTransfer&&c.dataTransfer.files.length&&(i.files=c.dataTransfer.files,i.dispatchEvent(new Event("change",{bubbles:!0})))}),i.addEventListener("change",()=>{r.innerHTML="";let c=Array.from(i.files??[]);if(c.length===0){r.hidden=!0;return}r.hidden=!1,c.forEach(h=>{let l=document.createElement("li");l.innerHTML=`
|
|
586
|
-
<span class="upload-file-name">${
|
|
587
|
-
<span class="upload-file-size">${
|
|
588
|
-
`,r.appendChild(l)})})}function Fc(i){let t=document.createElement("div");return t.textContent=i,t.innerHTML}function Mr(i=document){i.querySelectorAll(hs).forEach(ds)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Mr()):Mr();var Rc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(hs)&&ds(s),s.querySelectorAll(hs).forEach(n=>ds(n))}});Rc.observe(document.documentElement,{childList:!0,subtree:!0});W();var fs="form[data-autosave]",us="autosave",Nr=500,Hc=1440*60*1e3;function zc(i){let t=i.dataset.autosave;if(typeof t=="string"&&t.trim()!=="")return t.trim();let e=(i.method||"get").toLowerCase(),s=i.action||(typeof location<"u"?location.href:"");return`${e} ${s}`}function Vc(i){let t=i.dataset.autosaveRetain;if(typeof t!="string")return null;let e=t.trim();return e===""?null:new Set(e.split(/\s+/))}function ps(i){if(i.hasAttribute("data-autosave-init"))return;i.setAttribute("data-autosave-init","");let t=zc(i),e=Vc(i),s;function n(l){return e===null||e.has(l)}function r(){let l={},d=i.elements;for(let u of d){let f=u;f.name&&(f.type==="password"||f.type==="file"||n(f.name)&&(f.type==="checkbox"?l[f.name]=f.checked?"on":"":f.type==="radio"?f.checked&&(l[f.name]=f.value):f instanceof HTMLSelectElement&&f.multiple?l[f.name]=Array.from(f.selectedOptions).map(v=>v.value):l[f.name]=f.value))}return l}function a(){E.set(us,t,r()).catch(()=>{})}async function o(){let l=await E.get(us,t,{maxAge:Hc});if(!l)return!1;let d=!1;for(let[u,f]of Object.entries(l)){if(!n(u))continue;let v=i.querySelectorAll(`[name="${CSS.escape(u)}"]`);v.forEach(p=>{let m=p;if(m.type==="checkbox")m.checked=f==="on";else if(m.type==="radio")m.checked=m.value===f;else if(m instanceof HTMLSelectElement&&m.multiple){let y=Array.isArray(f)?f:[f];Array.from(m.options).forEach(S=>{S.selected=y.includes(S.value)})}else typeof f=="string"&&(m.value=f)}),v.length&&(d=!0)}return d}function c(){E.remove(us,t).catch(()=>{})}function h(){if(customElements.get("toast-msg")){let l=document.createElement("toast-msg");l.setAttribute("variant","info"),l.setAttribute("duration","3000"),l.textContent="Draft restored",document.body.appendChild(l)}}o().then(l=>{l&&(h(),Array.from(i.elements).forEach(d=>{let u=d;u.name&&u.type!=="password"&&u.type!=="file"&&u.dispatchEvent(new Event("input",{bubbles:!0}))}))}),i.addEventListener("input",()=>{clearTimeout(s),s=setTimeout(a,Nr)}),i.addEventListener("change",()=>{clearTimeout(s),s=setTimeout(a,Nr)}),i.addEventListener("submit",c),i.addEventListener("reset",()=>{setTimeout(c,0)})}function Dr(i=document){i.querySelectorAll(fs).forEach(ps)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Dr()):Dr();var Uc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(fs)&&ps(s),s.querySelectorAll(fs).forEach(ps)}});Uc.observe(document.documentElement,{childList:!0,subtree:!0});var Wc="input[data-mask]",_r={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},jc={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/};function Yc(i){let t=i.dataset.mask;if(_r[t])return _r[t];if(t==="custom"&&i.dataset.pattern){let e=i.dataset.pattern,s=new Set;for(let r of e)r==="#"?s.add("0-9"):r==="A"?s.add("a-zA-Z"):r==="*"&&s.add("a-zA-Z0-9");let n=s.size>0?new RegExp(`[${[...s].join("")}]`):/./;return{pattern:e,accept:n}}return null}function ve(i){return i==="#"||i==="A"||i==="*"}function Gc(i,t){let e=jc[i];return e?e.test(t):!1}function Ir(i,t){let e="",s=0;for(let n=0;n<t.length&&s<i.length;n++){let r=t[n];if(ve(r)){for(;s<i.length&&!Gc(r,i[s]);)s++;s<i.length&&(e+=i[s],s++)}else e+=r}return e}function $r(i,t){return i.split("").filter(e=>t.test(e)).join("")}function Kc(i){for(let t of i)if(ve(t)&&t!=="#")return!1;return!0}function Xc(i){if(i.hasAttribute("data-mask-init"))return;i.setAttribute("data-mask-init","");let t=Yc(i);if(!t)return;let{pattern:e}=t,s=t.accept;Kc(e)&&!i.getAttribute("inputmode")&&i.setAttribute("inputmode","numeric"),i.getAttribute("maxlength")||i.setAttribute("maxlength",String(e.length));let n=!1;i.addEventListener("compositionstart",()=>{n=!0}),i.addEventListener("compositionend",()=>{n=!1,r()});function r(){if(n)return;let a=i.selectionStart??0,o=0;for(let u=0;u<a&&u<i.value.length;u++)s.test(i.value[u])&&o++;let c=$r(i.value,s),h=Ir(c,e);i.value=h,i.dataset.rawValue=c;let l=0,d=h.length;for(let u=0;u<h.length;u++)if(u<e.length&&ve(e[u])&&(l++,l===o)){for(d=u+1;d<e.length&&!ve(e[d]);)d++;break}i.setSelectionRange(d,d)}if(i.addEventListener("input",r),i.value){let a=$r(i.value,s);i.value=Ir(a,e),i.dataset.rawValue=a}}I(Wc,Xc);var Jc="input[data-accept]",Zc={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},alphanum:{pattern:"[a-zA-Z0-9]",inputmode:"text"},phone:{pattern:"[0-9+()\\- ]",inputmode:"tel"},date:{pattern:"[0-9/\\-.]",inputmode:"numeric"},hex:{pattern:"[0-9a-fA-F]",inputmode:"text"},currency:{pattern:"[0-9.,]",inputmode:"decimal"},cc:{pattern:"[0-9 \\-]",inputmode:"numeric"}};function Qc(i){if(!i)return null;let t=Zc[i];if(t)return{regex:new RegExp(t.pattern),inputmode:t.inputmode};if(i.startsWith("["))try{return{regex:new RegExp(i),inputmode:"text"}}catch{return console.warn(`[data-accept] Invalid character class: ${i}`),null}return console.warn(`[data-accept] Unknown preset: ${i}`),null}function tl(i){if(i.hasAttribute("data-accept-init"))return;if(i.setAttribute("data-accept-init",""),i.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",i);return}let t=Qc(i.dataset.accept||"");if(!t)return;let{regex:e,inputmode:s}=t;i.dataset.acceptPattern=e.source,i.getAttribute("inputmode")||i.setAttribute("inputmode",s);let n=!1;i.addEventListener("compositionstart",()=>{n=!0}),i.addEventListener("compositionend",()=>{n=!1,r()}),i.addEventListener("beforeinput",a=>{if(n)return;let o=a.data;if(o!=null){if(a.inputType==="insertFromPaste"){let c=o.split("").filter(h=>e.test(h)).join("");if(c===o||(a.preventDefault(),!c))return;document.execCommand("insertText",!1,c)||el(i,c);return}if(a.inputType==="insertText"||a.inputType==="insertCompositionText"){for(let c of o)if(!e.test(c)){a.preventDefault();return}}}}),i.addEventListener("input",()=>{n||r()});function r(){let a=i.value,o=a.split("").filter(d=>e.test(d)).join("");if(o===a)return;let c=i.selectionStart??0,h=0;for(let d=0;d<c&&d<a.length;d++)e.test(a[d])&&h++;i.value=o;let l=Math.min(h,o.length);i.setSelectionRange(l,l)}if(i.value){let a=i.value.split("").filter(o=>e.test(o)).join("");a!==i.value&&(i.value=a)}}function el(i,t){let e=i.selectionStart??0,s=i.selectionEnd??0,n=i.value.slice(0,e),r=i.value.slice(s);i.value=n+t+r;let a=e+t.length;i.setSelectionRange(a,a),i.dispatchEvent(new Event("input",{bubbles:!0}))}I(Jc,tl);var ms="fieldset[data-toggle-tags][data-max]";function bs(i){if(i.hasAttribute("data-toggle-tags-init"))return;i.setAttribute("data-toggle-tags-init","");let t=parseInt(i.dataset.max,10);if(!t||t<1)return;function e(){let s=i.querySelectorAll('input[type="checkbox"]'),n=i.querySelectorAll('input[type="checkbox"]:checked').length;s.forEach(r=>{r.checked||(r.disabled=n>=t)})}i.addEventListener("change",e),e()}function qr(i=document){i.querySelectorAll(ms).forEach(bs)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>qr()):qr();var il=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ms)&&bs(s),s.querySelectorAll(ms).forEach(bs)}});il.observe(document.documentElement,{childList:!0,subtree:!0});var sl='input[type="number"][data-stepper]',nl='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="5" y1="12" x2="19" y2="12"/></svg>',rl='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function al(i){if(i.hasAttribute("data-stepper-init"))return;i.setAttribute("data-stepper-init","");let t=document.createElement("div");t.className="number-wrapper",i.parentNode.insertBefore(t,i);let e=document.createElement("button");e.type="button",e.className="number-dec",e.innerHTML=nl,e.setAttribute("aria-label","Decrease"),e.tabIndex=-1;let s=document.createElement("button");s.type="button",s.className="number-inc",s.innerHTML=rl,s.setAttribute("aria-label","Increase"),s.tabIndex=-1,t.appendChild(e),t.appendChild(i),t.appendChild(s);function n(a){let o=i.min!==""?parseFloat(i.min):-1/0,c=i.max!==""?parseFloat(i.max):1/0,h=parseFloat(i.step)||1,l=parseFloat(i.value)||0,d=(h.toString().split(".")[1]||"").length,u=parseFloat((l+h*a).toFixed(d)),f=Math.min(Math.max(u,o),c);i.value=f,i.dispatchEvent(new Event("input",{bubbles:!0})),i.dispatchEvent(new Event("change",{bubbles:!0})),r()}function r(){let a=i.min!==""?parseFloat(i.min):-1/0,o=i.max!==""?parseFloat(i.max):1/0,c=parseFloat(i.value)||0;e.disabled=c<=a,s.disabled=c>=o}e.addEventListener("click",()=>n(-1)),s.addEventListener("click",()=>n(1)),i.addEventListener("input",r),r()}I(sl,al);var gs='input[type="color"][data-color]';function vs(i){if(i.hasAttribute("data-color-init")||i.closest("color-picker"))return;i.setAttribute("data-color-init","");let t=document.createElement("div");t.className="color-wrapper",i.parentNode.insertBefore(t,i),t.appendChild(i);let e=document.createElement("button");e.type="button",e.className="color-display";let s=document.createElement("span");s.className="color-swatch";let n=document.createElement("span");n.className="color-hex",e.appendChild(s),e.appendChild(n),t.appendChild(e);function r(){s.style.background=i.value,n.textContent=i.value}e.addEventListener("click",()=>i.click()),i.addEventListener("input",r),r()}function Or(i=document){i.querySelectorAll(gs).forEach(vs)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Or()):Or();var ol=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(gs)&&vs(s),s.querySelectorAll(gs).forEach(vs)}});ol.observe(document.documentElement,{childList:!0,subtree:!0});var cl=window.matchMedia("(prefers-reduced-motion: reduce)");function Br(){return cl.matches||document.documentElement.hasAttribute("data-motion-reduced")}var Pr=0,ll=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),X={_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_transitionCleanups:new WeakMap,_keyframePhase:ll,_observer:null,_animationEndHandler:null,effect(i,t){this._effects.set(i,t),document.querySelectorAll("[data-effect]").forEach(e=>{(e.getAttribute("data-effect")||"").split(/\s+/).includes(i)&&this._initEffect(e,i)})},trigger(i,t){this._triggers.set(i,t)},transition(i,t){this._transitions.set(i,t)},uid(i){return i.id?i.id:(i._vbUid||(Pr++,i._vbUid=`vb-${Pr}`),i._vbUid)},theme(i,t){this._themes=this._themes||new Map,this._themes.set(i,t)},applyTheme(i,t=document.documentElement){let e=this._themes?.get(i);if(e)for(let[s,n]of Object.entries(e))t.style.setProperty(s,n)},swap(i){if(!document.startViewTransition){i(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(i);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(i){i.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(i){this._activateEffects(i)},deactivate(i){i.hasAttribute("data-effect-active")&&(i.removeAttribute("data-effect-active"),this.emit(i,"vb:phase-change",{active:!1}))},onPhaseEnd(i,t,e){let s=n=>{n.detail?.phase===t&&e(n.detail)};return i.addEventListener("vb:effect-phase-end",s),()=>i.removeEventListener("vb:effect-phase-end",s)},registerKeyframe(i,t){this._keyframePhase.set(i,t)},observe(i=document){if(i.querySelectorAll("[data-effect]").forEach(e=>this._processElement(e)),i.querySelectorAll("[data-stagger]").forEach(e=>this._processStagger(e)),i.querySelectorAll("[data-transition]").forEach(e=>this._processTransition(e)),this._observer)return;this._observer=new MutationObserver(e=>{for(let s of e){if(s.type==="childList"){for(let n of s.addedNodes)n.nodeType===Node.ELEMENT_NODE&&this._processTree(n);for(let n of s.removedNodes)n.nodeType===Node.ELEMENT_NODE&&this._cleanupTree(n)}if(s.type==="attributes"){let n=s.target;s.attributeName==="data-effect"&&this._reconcileEffects(n),s.attributeName==="data-trigger"&&this._reconcileTrigger(n),s.attributeName==="data-stagger"&&this._processStagger(n),s.attributeName==="data-transition"&&this._processTransition(n)}}});let t=i===document?document.body:i;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=e=>{let s=e.target;if(!(s instanceof Element)||!s.hasAttribute("data-effect"))return;let n=this._keyframePhase.get(e.animationName);n&&this.emit(s,"vb:effect-phase-end",{phase:n,animationName:e.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(i){let t=getComputedStyle(i);return{get(e){return t.getPropertyValue(`--vb-${e}`).trim()},getNumber(e,s=0){let n=t.getPropertyValue(`--vb-${e}`).trim();return n?parseFloat(n):s},getTime(e,s=0){let n=t.getPropertyValue(`--vb-${e}`).trim();if(!n)return s;let r=parseFloat(n);return Number.isFinite(r)?/s\s*$/.test(n)&&!/ms\s*$/.test(n)?r*1e3:r:s},hasClass(e){return i.classList.contains(e)}}},emit(i,t,e={}){i.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))},prefersReducedMotion:Br,_processTree(i){i.hasAttribute?.("data-effect")&&this._processElement(i),i.hasAttribute?.("data-stagger")&&this._processStagger(i),i.hasAttribute?.("data-transition")&&this._processTransition(i),i.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),i.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),i.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(i){i.hasAttribute?.("data-effect")&&this._cleanupElement(i),i.hasAttribute?.("data-transition")&&this._cleanupTransition(i),i.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),i.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(i){if(i.hasAttribute("data-effect-processed"))return;i.setAttribute("data-effect-processed","");let t=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let e of t)this._initEffect(i,e);this._wireTrigger(i,t)},_initEffect(i,t){let e=this._effects.get(t);if(!e)return;let s=this._instances.get(i);if(s?.has(t))return;Br();let n=e(i);n&&(s||(s=new Map,this._instances.set(i,s)),typeof n=="function"?s.set(t,{cleanup:n}):s.set(t,n))},_wireTrigger(i,t){let e=i.getAttribute("data-trigger");if(!e){this._activateEffects(i);return}let s=e.split(/\s+/).filter(Boolean);for(let n of s){let r=n.indexOf(":"),a=r>-1?n.slice(0,r):n,o=r>-1?n.slice(r+1):null,c=this._triggers.get(a);if(!c)continue;let h=c(i,()=>this._activateEffects(i),o);if(h){let l=this._triggerCleanups.get(i);if(l){let d=l;this._triggerCleanups.set(i,()=>{d(),h()})}else this._triggerCleanups.set(i,h)}}},_activateEffects(i){i.setAttribute("data-effect-active",""),this.emit(i,"vb:phase-change",{active:!0});let t=this._instances.get(i);if(t)for(let[,e]of t)e.activate&&e.activate()},_cleanupElement(i){let t=this._instances.get(i);if(t){for(let[,s]of t)s.cleanup&&s.cleanup();this._instances.delete(i)}let e=this._triggerCleanups.get(i);e&&(e(),this._triggerCleanups.delete(i))},_reconcileEffects(i){let t=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],e=this._instances.get(i);if(e)for(let[s,n]of e)t.includes(s)||(n.cleanup&&n.cleanup(),e.delete(s));for(let s of t)e?.has(s)||this._initEffect(i,s);i.hasAttribute("data-effect-processed")||(i.setAttribute("data-effect-processed",""),this._wireTrigger(i,t))},_reconcileTrigger(i){let t=this._triggerCleanups.get(i);t&&(t(),this._triggerCleanups.delete(i));let e=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(i,e)},_processStagger(i){let t=i.getAttribute("data-stagger")||"",e=i.children,s=e.length,n;if(t==="reverse")n=Array.from({length:s},(r,a)=>s-1-a);else if(t==="random"){let r=this._hashString(this.uid(i));n=Array.from({length:s},(o,c)=>c);let a=r;for(let o=s-1;o>0;o--){a^=a<<13,a^=a>>>17,a^=a<<5;let c=Math.abs(a)%(o+1);[n[o],n[c]]=[n[c],n[o]]}}else if(t==="grid"){let r=[];for(let a=0;a<s;a++){let o=getComputedStyle(e[a]),c=parseInt(o.gridRowStart,10),h=parseInt(o.gridColumnStart,10);r.push({i:a,dist:Number.isFinite(c)&&Number.isFinite(h)?c-1+(h-1):a})}r.sort((a,o)=>a.dist-o.dist),n=new Array(s),r.forEach((a,o)=>{n[a.i]=o})}else n=Array.from({length:s},(r,a)=>a);for(let r=0;r<s;r++)e[r].style.setProperty("--vb-stagger-index",String(n[r]))},_hashString(i){let t=5381;for(let e=0;e<i.length;e++)t=(t<<5)+t^i.charCodeAt(e);return t|0},_processTransition(i){if(i.hasAttribute("data-transition-processed"))return;i.setAttribute("data-transition-processed","");let t=i.getAttribute("data-transition");if(!t)return;let e=t.indexOf(":"),s=e>-1?t.slice(0,e):t,n=e>-1?t.slice(e+1):null,r=this._transitions.get(s);if(r){let a=r(i,n);a&&this._transitionCleanups.set(i,a)}else i.style.viewTransitionName=`${t}-${this.uid(i)}`},_cleanupTransition(i){let t=this._transitionCleanups.get(i);t&&(t(),this._transitionCleanups.delete(i)),i.style.viewTransitionName=""}};typeof window<"u"&&(window.VB=X);function hl(i){let t=i.textContent;i.setAttribute("aria-label",t),i.innerHTML="",t.split(/(\s+)/).forEach((s,n)=>{if(/^\s+$/.test(s)){i.appendChild(document.createTextNode(s));return}let r=document.createElement("span");r.className="vb-reveal-chunk",r.textContent=s,r.style.setProperty("--i",String(Math.floor(n/2))),r.setAttribute("aria-hidden","true"),i.appendChild(r)})}function dl(i){let t=i.textContent;i.setAttribute("aria-label",t);let e=document.createElement("div");e.style.cssText=getComputedStyle(i).cssText,e.style.position="absolute",e.style.visibility="hidden",e.style.whiteSpace="normal",document.body.appendChild(e);let s=t.split(/\s+/).filter(Boolean),n=[],r="";s.forEach(a=>{let o=r?r+" "+a:a;e.textContent=o,e.style.width=getComputedStyle(i).width,e.scrollWidth>e.clientWidth&&r?(n.push(r),r=a):r=o}),r&&n.push(r),document.body.removeChild(e),n.length===0&&n.push(t),i.innerHTML="",n.forEach((a,o)=>{let c=document.createElement("span");c.className="vb-reveal-chunk",c.textContent=a,c.style.setProperty("--i",String(o)),c.setAttribute("aria-hidden","true"),i.appendChild(c),o<n.length-1&&i.appendChild(document.createTextNode(" "))})}X.effect("reveal",i=>{if(i.hasAttribute("data-effect-reveal-init")||(i.setAttribute("data-effect-reveal-init",""),X.prefersReducedMotion()))return;let t=i.classList.contains("line")?"line":"word",e=X.params(i),s=e.get("reveal-delay")||"80ms",n=e.get("reveal-duration")||"400ms";return i.style.setProperty("--reveal-delay",s),i.style.setProperty("--reveal-duration",n),t==="line"?dl(i):hl(i),{activate(){i.setAttribute("data-effect-active","")},cleanup(){}}});X.effect("highlight",i=>{if(i.hasAttribute("data-effect-highlight-init"))return;i.setAttribute("data-effect-highlight-init","");let e=getComputedStyle(i).getPropertyValue("--vb-highlight-color").trim();return e&&i.style.setProperty("--highlight-color",e),X.prefersReducedMotion()&&i.setAttribute("data-effect-active",""),{activate(){i.setAttribute("data-effect-active","")},cleanup(){}}});var ys="[data-select-all]";function Fr(i=document){i.querySelectorAll(ys).forEach(ws)}function ws(i){if(i.hasAttribute("data-select-all-init"))return;i.setAttribute("data-select-all-init","");let t=i.dataset.selectAll??"";if(!t)return;function e(){return(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).querySelectorAll(t)}function s(){let a=e(),o=a.length,c=0;a.forEach(d=>{d.checked&&c++}),c===0?(i.checked=!1,i.indeterminate=!1):c===o?(i.checked=!0,i.indeterminate=!1):(i.checked=!1,i.indeterminate=!0);let l=(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).querySelector("[data-selected-count]");l&&(l.textContent=String(c)),i.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:c,total:o,selected:[...a].filter(d=>d.checked)}}))}let n=!1;i.addEventListener("change",()=>{n=!0;let a=i.checked;e().forEach(c=>{c.checked=a,c.dispatchEvent(new Event("change",{bubbles:!0}))}),n=!1,i.indeterminate=!1,s()}),(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).addEventListener("change",a=>{n||a.target!==i&&a.target.matches?.(t)&&s()}),s()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Fr()):Fr();var ul=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ys)&&ws(s),s.querySelectorAll(ys).forEach(n=>ws(n))}});ul.observe(document.documentElement,{childList:!0,subtree:!0});var Es="[data-math], code.language-math";var Rr=0;window.VBMath=window.VBMath||{equations:[]};function Hr(i=document){i.querySelectorAll(Es).forEach(As)}function fl(i){let t=i.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function As(i){if(i.hasAttribute("data-math-init"))return;i.setAttribute("data-math-init",""),!i.hasAttribute("data-math")&&i.classList.contains("language-math")&&i.setAttribute("data-math","");let t=fl(i),e=i.getAttribute("data-mathml"),s=i.textContent.trim(),n=t.has("inline");if(!e){i.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.innerHTML=e;let a=i.id||null;a&&(r.id=a,i.removeAttribute("id"));let o=r.querySelector("math");o&&!n&&o.setAttribute("display","block");let c=null;t.has("numbered")&&(Rr++,c=Rr,r.setAttribute("data-math-numbered",""),r.setAttribute("data-equation-number",String(c)),a&&window.VBMath?.equations.push({id:a,number:c,latex:s})),t.has("copyable")&&(r.setAttribute("data-math-copyable",""),r.style.cursor="copy",r.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(s),ml("Copied to clipboard",r)}catch{}})),i.setAttribute("data-math-state","rendered"),i.insertAdjacentElement("afterend",r);let h=i.closest("pre");h?(h.setAttribute("data-math-state","rendered"),h.hidden=!0):i.hidden=!0,pl(),i.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:s,inline:n,number:c}}))}function pl(){if(document.querySelector("[data-vb-math-font]"))return;let i=document.createElement("link");i.rel="stylesheet",i.href="/fonts/math-fonts.css",i.setAttribute("data-vb-math-font",""),document.head.appendChild(i)}function ml(i,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="visually-hidden",e.textContent=i,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Hr()):Hr();var bl=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Es)&&As(s),s.querySelectorAll(Es).forEach(As)}});bl.observe(document.documentElement,{childList:!0,subtree:!0});var zr="vb:recently-visited",gl="vb:recently-visited:paused";function vl(){try{return localStorage.getItem(gl)==="1"}catch{return!1}}function yl(){return!!document.querySelector('meta[name="vb:no-track-history"]')}function wl(){try{let i=localStorage.getItem(zr);if(!i)return[];let t=JSON.parse(i);return Array.isArray(t)?t:[]}catch{return[]}}function El(i){try{localStorage.setItem(zr,JSON.stringify(i))}catch{}}function Al(i){if(!i)return"";let t=i.slice(1);if(!t)return"";let e=null;try{e=document.getElementById(t)}catch{}return e&&(e.textContent||"").trim().slice(0,80)||t}function Ss(){if(vl()||yl()||location.protocol==="file:"||location.protocol==="about:")return;let i=location.pathname+location.search,t=location.hash,e=(document.title||"").trim();if(!e)return;let s=Al(t),n=Date.now(),r=wl(),a=i+t;if((r[0]?r[0].url+(r[0].hash||""):"")===a)return;let c=r.filter(h=>h.url+(h.hash||"")!==a);c.unshift({url:i,hash:t,title:e,hashTitle:s,ts:n}),El(c.slice(0,100))}Ss();window.addEventListener("pageshow",i=>{i.persisted&&Ss()});window.addEventListener("hashchange",Ss);var Sl=CSS.supports("anchor-name","--test"),xl=new Set(["BUTTON","A","AREA"]);function Cl(i){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?xl.has(i.tagName):!1}function xs(i,t){if(Cl(i)){i.setAttribute("interestfor",t.id),t.addEventListener("toggle",h=>{h.newState==="open"&&ye(i,t)});return}let e=null,s=null,n=t,r=()=>{clearTimeout(s),e=setTimeout(()=>{n.showPopover(),ye(i,t)},200)},a=()=>{clearTimeout(e),s=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(s),n.showPopover(),ye(i,t)},c=()=>{clearTimeout(e),n.hidePopover()};i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",a),i.addEventListener("focus",o),i.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(s)),t.addEventListener("mouseleave",a)}function Cs(i,t){if(!Sl)return;let e=`--tooltip-anchor-${t.id}`;i.style.anchorName=e,t.style.positionAnchor=e,t.setAttribute("data-anchor","")}function kl(i){let t=i.getAttribute("title");if(!t)return;i.removeAttribute("title");let e=document.createElement("div");e.setAttribute("role","tooltip"),e.setAttribute("popover","hint"),e.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,e.textContent=t;let s=i.dataset.tooltipPosition||"top";e.dataset.tooltipPosition=s;let n=document.createElement("span");n.className="tooltip-arrow",n.setAttribute("aria-hidden","true"),e.appendChild(n),i.after(e),i.setAttribute("aria-describedby",e.id),Cs(i,e),xs(i,e)}function Tl(i,t){let e=document.getElementById(t);e?.hasAttribute("popover")&&(i.hasAttribute("title")&&i.removeAttribute("title"),i.hasAttribute("aria-describedby")||i.setAttribute("aria-describedby",t),Cs(i,e),xs(i,e))}function Vr(i=document){i.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let e=t.dataset.tooltip;e?Tl(t,e):kl(t)}),i.querySelectorAll("[aria-describedby]").forEach(t=>{let e=t.getAttribute("aria-describedby")??"",s=document.getElementById(e);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),Cs(t,s),xs(t,s))}),i.querySelectorAll("[popovertarget]").forEach(t=>{let e=t.getAttribute("popovertarget")??"",s=document.getElementById(e);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||s.hasAttribute("data-tooltip-click-init")||(s.setAttribute("data-tooltip-click-init",""),s.addEventListener("toggle",n=>{n.newState==="open"&&ye(t,s)}))})}function ye(i,t){if(t.hasAttribute("data-anchor"))return;let e=i.getBoundingClientRect(),s=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(s){case"bottom":a=e.bottom+n,o=e.left+(e.width-r.width)/2;break;case"left":a=e.top+(e.height-r.height)/2,o=e.left-r.width-n;break;case"right":a=e.top+(e.height-r.height)/2,o=e.right+n;break;default:a=e.top-r.height-n,o=e.left+(e.width-r.width)/2;break}let c=8;o=Math.max(c,Math.min(o,window.innerWidth-r.width-c)),a=Math.max(c,Math.min(a,window.innerHeight-r.height-c)),t.style.top=`${a}px`,t.style.left=`${o}px`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Vr()):Vr();var ks="[data-vt-name]";function Ts(i){i.hasAttribute("data-vt-name-init")||(i.setAttribute("data-vt-name-init",""),i.style.viewTransitionName=i.dataset.vtName)}function Ur(i=document){i.querySelectorAll(ks).forEach(Ts)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ur()):Ur();var Ll=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ks)&&Ts(s),s.querySelectorAll(ks).forEach(Ts)}});Ll.observe(document.documentElement,{childList:!0,subtree:!0});function Wr(i){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",i)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",i)})}function jr(){let{effectiveMode:i}=A.getState();Wr(i),window.addEventListener("vb:theme-change",e=>{Wr(e.detail.effectiveMode)}),new MutationObserver(e=>{let{effectiveMode:s}=A.getState();for(let n of e)for(let r of n.addedNodes){if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=r;a.tagName==="BROWSER-WINDOW"?a.setAttribute("mode",s):a.tagName==="CODE-BLOCK"&&a.setAttribute("theme",s),a.querySelectorAll("browser-window").forEach(o=>{o.setAttribute("mode",s)}),a.querySelectorAll("code-block").forEach(o=>{o.setAttribute("theme",s)})}}).observe(document.body,{childList:!0,subtree:!0})}Mt();function Rt(i){return[...i.querySelectorAll("input, select, textarea")].filter(t=>t.type!=="submit"&&t.type!=="button"&&t.type!=="hidden"&&!("honeypot"in t.dataset))}function Kr(i){return[...i.querySelectorAll("form-field[data-upgraded]")]}function Ml(i){return i.labels?.[0]?.textContent?.trim()??i.getAttribute("aria-label")??i.name??i.id}function Ft(i,t){let e=i.dataset.match;if(!e)return;let s=t.querySelector(`#${CSS.escape(e)}`)??t.querySelector(`[name="${CSS.escape(e)}"]`);if(s){if(i.setCustomValidity(""),i.value&&s.value&&i.value!==s.value){let n=i.dataset.messageMatch??"Values do not match";i.setCustomValidity(n);let r=Yr(i);r&&(r.textContent=n)}else if(i.validity.valid){let n=Yr(i);n&&(n.textContent="")}}}function Yr(i){let t=i.getAttribute("aria-describedby")?.split(/\s+/)??[];for(let s of t){let n=document.getElementById(s);if(n?.tagName==="OUTPUT"&&n.classList.contains("error"))return n}return i.closest("form-field")?.querySelector("output.error")??null}function Gr(i){let e=[...i.querySelectorAll('input[type="checkbox"]')].filter(o=>o.checked).length,s=parseInt(i.dataset.minChecked??"0",10),n=parseInt(i.dataset.maxChecked??"999",10),r=i.querySelector(":scope > output"),a=null;return e<s&&(a=i.dataset.messageMinChecked??`Select at least ${s}`),e>n&&(a=i.dataset.messageMaxChecked??`Select no more than ${n}`),r&&(r.textContent=a??""),a?i.dataset.invalid="":delete i.dataset.invalid,!a}function Xr(i){let t=i.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored"};let e=i.querySelector("output.error-summary");return e?{el:e,type:"legacy"}:null}function we(i,t,{focus:e=!1}={}){if(!t)return;let s=[];for(let n of Rt(i))n.validity.valid||s.push({id:n.id||n.name,label:Ml(n),message:n.validationMessage});for(let n of i.querySelectorAll("fieldset[data-invalid]")){let r=n.querySelector(":scope > output");s.push({id:n.id||"",label:n.querySelector("legend")?.textContent?.trim()??"Group",message:r?.textContent||"Invalid selection"})}if(s.length===0){Jr(t);return}if(t.type==="authored"){let n=t.el.querySelector("[data-summary-list]");if(n){n.innerHTML="";for(let r of s){let a=document.createElement("li"),o=document.createElement("a");o.href=r.id?`#${r.id}`:"#",o.textContent=`${r.label}: ${r.message}`,a.appendChild(o),n.appendChild(a)}}t.el.removeAttribute("hidden"),t.el.dataset.visible=""}else{let n=s.length,r=s.map(a=>`<li><a href="${a.id?`#${a.id}`:"#"}">${a.label}: ${a.message}</a></li>`).join(`
|
|
586
|
+
<span class="upload-file-name">${Yc(h.name)}</span>
|
|
587
|
+
<span class="upload-file-size">${jc(h.size)}</span>
|
|
588
|
+
`,r.appendChild(l)})})}function Yc(i){let t=document.createElement("div");return t.textContent=i,t.innerHTML}function qr(i=document){i.querySelectorAll(us).forEach(fs)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>qr()):qr();var Gc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(us)&&fs(s),s.querySelectorAll(us).forEach(n=>fs(n))}});Gc.observe(document.documentElement,{childList:!0,subtree:!0});j();var ms="form[data-autosave]",ps="autosave",Or=500,Kc=1440*60*1e3;function Xc(i){let t=i.dataset.autosave;if(typeof t=="string"&&t.trim()!=="")return t.trim();let e=(i.method||"get").toLowerCase(),s=i.action||(typeof location<"u"?location.href:"");return`${e} ${s}`}function Jc(i){let t=i.dataset.autosaveRetain;if(typeof t!="string")return null;let e=t.trim();return e===""?null:new Set(e.split(/\s+/))}function bs(i){if(i.hasAttribute("data-autosave-init"))return;i.setAttribute("data-autosave-init","");let t=Xc(i),e=Jc(i),s;function n(l){return e===null||e.has(l)}function r(){let l={},d=i.elements;for(let u of d){let f=u;f.name&&(f.type==="password"||f.type==="file"||n(f.name)&&(f.type==="checkbox"?l[f.name]=f.checked?"on":"":f.type==="radio"?f.checked&&(l[f.name]=f.value):f instanceof HTMLSelectElement&&f.multiple?l[f.name]=Array.from(f.selectedOptions).map(v=>v.value):l[f.name]=f.value))}return l}function a(){E.set(ps,t,r()).catch(()=>{})}async function o(){let l=await E.get(ps,t,{maxAge:Kc});if(!l)return!1;let d=!1;for(let[u,f]of Object.entries(l)){if(!n(u))continue;let v=i.querySelectorAll(`[name="${CSS.escape(u)}"]`);v.forEach(p=>{let m=p;if(m.type==="checkbox")m.checked=f==="on";else if(m.type==="radio")m.checked=m.value===f;else if(m instanceof HTMLSelectElement&&m.multiple){let y=Array.isArray(f)?f:[f];Array.from(m.options).forEach(S=>{S.selected=y.includes(S.value)})}else typeof f=="string"&&(m.value=f)}),v.length&&(d=!0)}return d}function c(){E.remove(ps,t).catch(()=>{})}function h(){if(customElements.get("toast-msg")){let l=document.createElement("toast-msg");l.setAttribute("variant","info"),l.setAttribute("duration","3000"),l.textContent="Draft restored",document.body.appendChild(l)}}o().then(l=>{l&&(h(),Array.from(i.elements).forEach(d=>{let u=d;u.name&&u.type!=="password"&&u.type!=="file"&&u.dispatchEvent(new Event("input",{bubbles:!0}))}))}),i.addEventListener("input",()=>{clearTimeout(s),s=setTimeout(a,Or)}),i.addEventListener("change",()=>{clearTimeout(s),s=setTimeout(a,Or)}),i.addEventListener("submit",c),i.addEventListener("reset",()=>{setTimeout(c,0)})}function Br(i=document){i.querySelectorAll(ms).forEach(bs)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Br()):Br();var Zc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ms)&&bs(s),s.querySelectorAll(ms).forEach(bs)}});Zc.observe(document.documentElement,{childList:!0,subtree:!0});var Qc="input[data-mask]",Pr={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},tl={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/};function el(i){let t=i.dataset.mask;if(Pr[t])return Pr[t];if(t==="custom"&&i.dataset.pattern){let e=i.dataset.pattern,s=new Set;for(let r of e)r==="#"?s.add("0-9"):r==="A"?s.add("a-zA-Z"):r==="*"&&s.add("a-zA-Z0-9");let n=s.size>0?new RegExp(`[${[...s].join("")}]`):/./;return{pattern:e,accept:n}}return null}function ve(i){return i==="#"||i==="A"||i==="*"}function il(i,t){let e=tl[i];return e?e.test(t):!1}function Fr(i,t){let e="",s=0;for(let n=0;n<t.length&&s<i.length;n++){let r=t[n];if(ve(r)){for(;s<i.length&&!il(r,i[s]);)s++;s<i.length&&(e+=i[s],s++)}else e+=r}return e}function Rr(i,t){return i.split("").filter(e=>t.test(e)).join("")}function sl(i){for(let t of i)if(ve(t)&&t!=="#")return!1;return!0}function nl(i){if(i.hasAttribute("data-mask-init"))return;i.setAttribute("data-mask-init","");let t=el(i);if(!t)return;let{pattern:e}=t,s=t.accept;sl(e)&&!i.getAttribute("inputmode")&&i.setAttribute("inputmode","numeric"),i.getAttribute("maxlength")||i.setAttribute("maxlength",String(e.length));let n=!1;i.addEventListener("compositionstart",()=>{n=!0}),i.addEventListener("compositionend",()=>{n=!1,r()});function r(){if(n)return;let a=i.selectionStart??0,o=0;for(let u=0;u<a&&u<i.value.length;u++)s.test(i.value[u])&&o++;let c=Rr(i.value,s),h=Fr(c,e);i.value=h,i.dataset.rawValue=c;let l=0,d=h.length;for(let u=0;u<h.length;u++)if(u<e.length&&ve(e[u])&&(l++,l===o)){for(d=u+1;d<e.length&&!ve(e[d]);)d++;break}i.setSelectionRange(d,d)}if(i.addEventListener("input",r),i.value){let a=Rr(i.value,s);i.value=Fr(a,e),i.dataset.rawValue=a}}I(Qc,nl);var rl="input[data-accept]",al={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},alphanum:{pattern:"[a-zA-Z0-9]",inputmode:"text"},phone:{pattern:"[0-9+()\\- ]",inputmode:"tel"},date:{pattern:"[0-9/\\-.]",inputmode:"numeric"},hex:{pattern:"[0-9a-fA-F]",inputmode:"text"},currency:{pattern:"[0-9.,]",inputmode:"decimal"},cc:{pattern:"[0-9 \\-]",inputmode:"numeric"}};function ol(i){if(!i)return null;let t=al[i];if(t)return{regex:new RegExp(t.pattern),inputmode:t.inputmode};if(i.startsWith("["))try{return{regex:new RegExp(i),inputmode:"text"}}catch{return console.warn(`[data-accept] Invalid character class: ${i}`),null}return console.warn(`[data-accept] Unknown preset: ${i}`),null}function cl(i){if(i.hasAttribute("data-accept-init"))return;if(i.setAttribute("data-accept-init",""),i.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",i);return}let t=ol(i.dataset.accept||"");if(!t)return;let{regex:e,inputmode:s}=t;i.dataset.acceptPattern=e.source,i.getAttribute("inputmode")||i.setAttribute("inputmode",s);let n=!1;i.addEventListener("compositionstart",()=>{n=!0}),i.addEventListener("compositionend",()=>{n=!1,r()}),i.addEventListener("beforeinput",a=>{if(n)return;let o=a.data;if(o!=null){if(a.inputType==="insertFromPaste"){let c=o.split("").filter(h=>e.test(h)).join("");if(c===o||(a.preventDefault(),!c))return;document.execCommand("insertText",!1,c)||ll(i,c);return}if(a.inputType==="insertText"||a.inputType==="insertCompositionText"){for(let c of o)if(!e.test(c)){a.preventDefault();return}}}}),i.addEventListener("input",()=>{n||r()});function r(){let a=i.value,o=a.split("").filter(d=>e.test(d)).join("");if(o===a)return;let c=i.selectionStart??0,h=0;for(let d=0;d<c&&d<a.length;d++)e.test(a[d])&&h++;i.value=o;let l=Math.min(h,o.length);i.setSelectionRange(l,l)}if(i.value){let a=i.value.split("").filter(o=>e.test(o)).join("");a!==i.value&&(i.value=a)}}function ll(i,t){let e=i.selectionStart??0,s=i.selectionEnd??0,n=i.value.slice(0,e),r=i.value.slice(s);i.value=n+t+r;let a=e+t.length;i.setSelectionRange(a,a),i.dispatchEvent(new Event("input",{bubbles:!0}))}I(rl,cl);var gs="fieldset[data-toggle-tags][data-max]";function vs(i){if(i.hasAttribute("data-toggle-tags-init"))return;i.setAttribute("data-toggle-tags-init","");let t=parseInt(i.dataset.max,10);if(!t||t<1)return;function e(){let s=i.querySelectorAll('input[type="checkbox"]'),n=i.querySelectorAll('input[type="checkbox"]:checked').length;s.forEach(r=>{r.checked||(r.disabled=n>=t)})}i.addEventListener("change",e),e()}function Hr(i=document){i.querySelectorAll(gs).forEach(vs)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Hr()):Hr();var hl=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(gs)&&vs(s),s.querySelectorAll(gs).forEach(vs)}});hl.observe(document.documentElement,{childList:!0,subtree:!0});var dl='input[type="number"][data-stepper]',ul='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="5" y1="12" x2="19" y2="12"/></svg>',fl='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function pl(i){if(i.hasAttribute("data-stepper-init"))return;i.setAttribute("data-stepper-init","");let t=document.createElement("div");t.className="number-wrapper",i.parentNode.insertBefore(t,i);let e=document.createElement("button");e.type="button",e.className="number-dec",e.innerHTML=ul,e.setAttribute("aria-label","Decrease"),e.tabIndex=-1;let s=document.createElement("button");s.type="button",s.className="number-inc",s.innerHTML=fl,s.setAttribute("aria-label","Increase"),s.tabIndex=-1,t.appendChild(e),t.appendChild(i),t.appendChild(s);function n(a){let o=i.min!==""?parseFloat(i.min):-1/0,c=i.max!==""?parseFloat(i.max):1/0,h=parseFloat(i.step)||1,l=parseFloat(i.value)||0,d=(h.toString().split(".")[1]||"").length,u=parseFloat((l+h*a).toFixed(d)),f=Math.min(Math.max(u,o),c);i.value=f,i.dispatchEvent(new Event("input",{bubbles:!0})),i.dispatchEvent(new Event("change",{bubbles:!0})),r()}function r(){let a=i.min!==""?parseFloat(i.min):-1/0,o=i.max!==""?parseFloat(i.max):1/0,c=parseFloat(i.value)||0;e.disabled=c<=a,s.disabled=c>=o}e.addEventListener("click",()=>n(-1)),s.addEventListener("click",()=>n(1)),i.addEventListener("input",r),r()}I(dl,pl);var ys='input[type="color"][data-color]';function ws(i){if(i.hasAttribute("data-color-init")||i.closest("color-picker"))return;i.setAttribute("data-color-init","");let t=document.createElement("div");t.className="color-wrapper",i.parentNode.insertBefore(t,i),t.appendChild(i);let e=document.createElement("button");e.type="button",e.className="color-display";let s=document.createElement("span");s.className="color-swatch";let n=document.createElement("span");n.className="color-hex",e.appendChild(s),e.appendChild(n),t.appendChild(e);function r(){s.style.background=i.value,n.textContent=i.value}e.addEventListener("click",()=>i.click()),i.addEventListener("input",r),r()}function zr(i=document){i.querySelectorAll(ys).forEach(ws)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>zr()):zr();var ml=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ys)&&ws(s),s.querySelectorAll(ys).forEach(ws)}});ml.observe(document.documentElement,{childList:!0,subtree:!0});var bl=window.matchMedia("(prefers-reduced-motion: reduce)");function Vr(){return bl.matches||document.documentElement.hasAttribute("data-motion-reduced")}var Ur=0,gl=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),J={_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_transitionCleanups:new WeakMap,_keyframePhase:gl,_observer:null,_animationEndHandler:null,effect(i,t){this._effects.set(i,t),document.querySelectorAll("[data-effect]").forEach(e=>{(e.getAttribute("data-effect")||"").split(/\s+/).includes(i)&&this._initEffect(e,i)})},trigger(i,t){this._triggers.set(i,t)},transition(i,t){this._transitions.set(i,t)},uid(i){return i.id?i.id:(i._vbUid||(Ur++,i._vbUid=`vb-${Ur}`),i._vbUid)},theme(i,t){this._themes=this._themes||new Map,this._themes.set(i,t)},applyTheme(i,t=document.documentElement){let e=this._themes?.get(i);if(e)for(let[s,n]of Object.entries(e))t.style.setProperty(s,n)},swap(i){if(!document.startViewTransition){i(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(i);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(i){i.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(i){this._activateEffects(i)},deactivate(i){i.hasAttribute("data-effect-active")&&(i.removeAttribute("data-effect-active"),this.emit(i,"vb:phase-change",{active:!1}))},onPhaseEnd(i,t,e){let s=n=>{n.detail?.phase===t&&e(n.detail)};return i.addEventListener("vb:effect-phase-end",s),()=>i.removeEventListener("vb:effect-phase-end",s)},registerKeyframe(i,t){this._keyframePhase.set(i,t)},observe(i=document){if(i.querySelectorAll("[data-effect]").forEach(e=>this._processElement(e)),i.querySelectorAll("[data-stagger]").forEach(e=>this._processStagger(e)),i.querySelectorAll("[data-transition]").forEach(e=>this._processTransition(e)),this._observer)return;this._observer=new MutationObserver(e=>{for(let s of e){if(s.type==="childList"){for(let n of s.addedNodes)n.nodeType===Node.ELEMENT_NODE&&this._processTree(n);for(let n of s.removedNodes)n.nodeType===Node.ELEMENT_NODE&&this._cleanupTree(n)}if(s.type==="attributes"){let n=s.target;s.attributeName==="data-effect"&&this._reconcileEffects(n),s.attributeName==="data-trigger"&&this._reconcileTrigger(n),s.attributeName==="data-stagger"&&this._processStagger(n),s.attributeName==="data-transition"&&this._processTransition(n)}}});let t=i===document?document.body:i;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=e=>{let s=e.target;if(!(s instanceof Element)||!s.hasAttribute("data-effect"))return;let n=this._keyframePhase.get(e.animationName);n&&this.emit(s,"vb:effect-phase-end",{phase:n,animationName:e.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(i){let t=getComputedStyle(i);return{get(e){return t.getPropertyValue(`--vb-${e}`).trim()},getNumber(e,s=0){let n=t.getPropertyValue(`--vb-${e}`).trim();return n?parseFloat(n):s},getTime(e,s=0){let n=t.getPropertyValue(`--vb-${e}`).trim();if(!n)return s;let r=parseFloat(n);return Number.isFinite(r)?/s\s*$/.test(n)&&!/ms\s*$/.test(n)?r*1e3:r:s},hasClass(e){return i.classList.contains(e)}}},emit(i,t,e={}){i.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))},prefersReducedMotion:Vr,_processTree(i){i.hasAttribute?.("data-effect")&&this._processElement(i),i.hasAttribute?.("data-stagger")&&this._processStagger(i),i.hasAttribute?.("data-transition")&&this._processTransition(i),i.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),i.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),i.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(i){i.hasAttribute?.("data-effect")&&this._cleanupElement(i),i.hasAttribute?.("data-transition")&&this._cleanupTransition(i),i.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),i.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(i){if(i.hasAttribute("data-effect-processed"))return;i.setAttribute("data-effect-processed","");let t=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let e of t)this._initEffect(i,e);this._wireTrigger(i,t)},_initEffect(i,t){let e=this._effects.get(t);if(!e)return;let s=this._instances.get(i);if(s?.has(t))return;Vr();let n=e(i);n&&(s||(s=new Map,this._instances.set(i,s)),typeof n=="function"?s.set(t,{cleanup:n}):s.set(t,n))},_wireTrigger(i,t){let e=i.getAttribute("data-trigger");if(!e){this._activateEffects(i);return}let s=e.split(/\s+/).filter(Boolean);for(let n of s){let r=n.indexOf(":"),a=r>-1?n.slice(0,r):n,o=r>-1?n.slice(r+1):null,c=this._triggers.get(a);if(!c)continue;let h=c(i,()=>this._activateEffects(i),o);if(h){let l=this._triggerCleanups.get(i);if(l){let d=l;this._triggerCleanups.set(i,()=>{d(),h()})}else this._triggerCleanups.set(i,h)}}},_activateEffects(i){i.setAttribute("data-effect-active",""),this.emit(i,"vb:phase-change",{active:!0});let t=this._instances.get(i);if(t)for(let[,e]of t)e.activate&&e.activate()},_cleanupElement(i){let t=this._instances.get(i);if(t){for(let[,s]of t)s.cleanup&&s.cleanup();this._instances.delete(i)}let e=this._triggerCleanups.get(i);e&&(e(),this._triggerCleanups.delete(i))},_reconcileEffects(i){let t=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],e=this._instances.get(i);if(e)for(let[s,n]of e)t.includes(s)||(n.cleanup&&n.cleanup(),e.delete(s));for(let s of t)e?.has(s)||this._initEffect(i,s);i.hasAttribute("data-effect-processed")||(i.setAttribute("data-effect-processed",""),this._wireTrigger(i,t))},_reconcileTrigger(i){let t=this._triggerCleanups.get(i);t&&(t(),this._triggerCleanups.delete(i));let e=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(i,e)},_processStagger(i){let t=i.getAttribute("data-stagger")||"",e=i.children,s=e.length,n;if(t==="reverse")n=Array.from({length:s},(r,a)=>s-1-a);else if(t==="random"){let r=this._hashString(this.uid(i));n=Array.from({length:s},(o,c)=>c);let a=r;for(let o=s-1;o>0;o--){a^=a<<13,a^=a>>>17,a^=a<<5;let c=Math.abs(a)%(o+1);[n[o],n[c]]=[n[c],n[o]]}}else if(t==="grid"){let r=[];for(let a=0;a<s;a++){let o=getComputedStyle(e[a]),c=parseInt(o.gridRowStart,10),h=parseInt(o.gridColumnStart,10);r.push({i:a,dist:Number.isFinite(c)&&Number.isFinite(h)?c-1+(h-1):a})}r.sort((a,o)=>a.dist-o.dist),n=new Array(s),r.forEach((a,o)=>{n[a.i]=o})}else n=Array.from({length:s},(r,a)=>a);for(let r=0;r<s;r++)e[r].style.setProperty("--vb-stagger-index",String(n[r]))},_hashString(i){let t=5381;for(let e=0;e<i.length;e++)t=(t<<5)+t^i.charCodeAt(e);return t|0},_processTransition(i){if(i.hasAttribute("data-transition-processed"))return;i.setAttribute("data-transition-processed","");let t=i.getAttribute("data-transition");if(!t)return;let e=t.indexOf(":"),s=e>-1?t.slice(0,e):t,n=e>-1?t.slice(e+1):null,r=this._transitions.get(s);if(r){let a=r(i,n);a&&this._transitionCleanups.set(i,a)}else i.style.viewTransitionName=`${t}-${this.uid(i)}`},_cleanupTransition(i){let t=this._transitionCleanups.get(i);t&&(t(),this._transitionCleanups.delete(i)),i.style.viewTransitionName=""}};typeof window<"u"&&(window.VB=J);function vl(i){let t=i.textContent;i.setAttribute("aria-label",t),i.innerHTML="",t.split(/(\s+)/).forEach((s,n)=>{if(/^\s+$/.test(s)){i.appendChild(document.createTextNode(s));return}let r=document.createElement("span");r.className="vb-reveal-chunk",r.textContent=s,r.style.setProperty("--i",String(Math.floor(n/2))),r.setAttribute("aria-hidden","true"),i.appendChild(r)})}function yl(i){let t=i.textContent;i.setAttribute("aria-label",t);let e=document.createElement("div");e.style.cssText=getComputedStyle(i).cssText,e.style.position="absolute",e.style.visibility="hidden",e.style.whiteSpace="normal",document.body.appendChild(e);let s=t.split(/\s+/).filter(Boolean),n=[],r="";s.forEach(a=>{let o=r?r+" "+a:a;e.textContent=o,e.style.width=getComputedStyle(i).width,e.scrollWidth>e.clientWidth&&r?(n.push(r),r=a):r=o}),r&&n.push(r),document.body.removeChild(e),n.length===0&&n.push(t),i.innerHTML="",n.forEach((a,o)=>{let c=document.createElement("span");c.className="vb-reveal-chunk",c.textContent=a,c.style.setProperty("--i",String(o)),c.setAttribute("aria-hidden","true"),i.appendChild(c),o<n.length-1&&i.appendChild(document.createTextNode(" "))})}J.effect("reveal",i=>{if(i.hasAttribute("data-effect-reveal-init")||(i.setAttribute("data-effect-reveal-init",""),J.prefersReducedMotion()))return;let t=i.classList.contains("line")?"line":"word",e=J.params(i),s=e.get("reveal-delay")||"80ms",n=e.get("reveal-duration")||"400ms";return i.style.setProperty("--reveal-delay",s),i.style.setProperty("--reveal-duration",n),t==="line"?yl(i):vl(i),{activate(){i.setAttribute("data-effect-active","")},cleanup(){}}});J.effect("highlight",i=>{if(i.hasAttribute("data-effect-highlight-init"))return;i.setAttribute("data-effect-highlight-init","");let e=getComputedStyle(i).getPropertyValue("--vb-highlight-color").trim();return e&&i.style.setProperty("--highlight-color",e),J.prefersReducedMotion()&&i.setAttribute("data-effect-active",""),{activate(){i.setAttribute("data-effect-active","")},cleanup(){}}});var Es="[data-select-all]";function Wr(i=document){i.querySelectorAll(Es).forEach(As)}function As(i){if(i.hasAttribute("data-select-all-init"))return;i.setAttribute("data-select-all-init","");let t=i.dataset.selectAll??"";if(!t)return;function e(){return(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).querySelectorAll(t)}function s(){let a=e(),o=a.length,c=0;a.forEach(d=>{d.checked&&c++}),c===0?(i.checked=!1,i.indeterminate=!1):c===o?(i.checked=!0,i.indeterminate=!1):(i.checked=!1,i.indeterminate=!0);let l=(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).querySelector("[data-selected-count]");l&&(l.textContent=String(c)),i.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:c,total:o,selected:[...a].filter(d=>d.checked)}}))}let n=!1;i.addEventListener("change",()=>{n=!0;let a=i.checked;e().forEach(c=>{c.checked=a,c.dispatchEvent(new Event("change",{bubbles:!0}))}),n=!1,i.indeterminate=!1,s()}),(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).addEventListener("change",a=>{n||a.target!==i&&a.target.matches?.(t)&&s()}),s()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Wr()):Wr();var wl=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Es)&&As(s),s.querySelectorAll(Es).forEach(n=>As(n))}});wl.observe(document.documentElement,{childList:!0,subtree:!0});var Ss="[data-math], code.language-math";var jr=0;window.VBMath=window.VBMath||{equations:[]};function Yr(i=document){i.querySelectorAll(Ss).forEach(xs)}function El(i){let t=i.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function xs(i){if(i.hasAttribute("data-math-init"))return;i.setAttribute("data-math-init",""),!i.hasAttribute("data-math")&&i.classList.contains("language-math")&&i.setAttribute("data-math","");let t=El(i),e=i.getAttribute("data-mathml"),s=i.textContent.trim(),n=t.has("inline");if(!e){i.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.innerHTML=e;let a=i.id||null;a&&(r.id=a,i.removeAttribute("id"));let o=r.querySelector("math");o&&!n&&o.setAttribute("display","block");let c=null;t.has("numbered")&&(jr++,c=jr,r.setAttribute("data-math-numbered",""),r.setAttribute("data-equation-number",String(c)),a&&window.VBMath?.equations.push({id:a,number:c,latex:s})),t.has("copyable")&&(r.setAttribute("data-math-copyable",""),r.style.cursor="copy",r.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(s),Sl("Copied to clipboard",r)}catch{}})),i.setAttribute("data-math-state","rendered"),i.insertAdjacentElement("afterend",r);let h=i.closest("pre");h?(h.setAttribute("data-math-state","rendered"),h.hidden=!0):i.hidden=!0,Al(),i.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:s,inline:n,number:c}}))}function Al(){if(document.querySelector("[data-vb-math-font]"))return;let i=document.createElement("link");i.rel="stylesheet",i.href="/fonts/math-fonts.css",i.setAttribute("data-vb-math-font",""),document.head.appendChild(i)}function Sl(i,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="visually-hidden",e.textContent=i,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Yr()):Yr();var xl=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Ss)&&xs(s),s.querySelectorAll(Ss).forEach(xs)}});xl.observe(document.documentElement,{childList:!0,subtree:!0});var Gr="vb:recently-visited",Cl="vb:recently-visited:paused";function kl(){try{return localStorage.getItem(Cl)==="1"}catch{return!1}}function Tl(){return!!document.querySelector('meta[name="vb:no-track-history"]')}function Ll(){try{let i=localStorage.getItem(Gr);if(!i)return[];let t=JSON.parse(i);return Array.isArray(t)?t:[]}catch{return[]}}function Ml(i){try{localStorage.setItem(Gr,JSON.stringify(i))}catch{}}function Nl(i){if(!i)return"";let t=i.slice(1);if(!t)return"";let e=null;try{e=document.getElementById(t)}catch{}return e&&(e.textContent||"").trim().slice(0,80)||t}function Cs(){if(kl()||Tl()||location.protocol==="file:"||location.protocol==="about:")return;let i=location.pathname+location.search,t=location.hash,e=(document.title||"").trim();if(!e)return;let s=Nl(t),n=Date.now(),r=Ll(),a=i+t;if((r[0]?r[0].url+(r[0].hash||""):"")===a)return;let c=r.filter(h=>h.url+(h.hash||"")!==a);c.unshift({url:i,hash:t,title:e,hashTitle:s,ts:n}),Ml(c.slice(0,100))}Cs();window.addEventListener("pageshow",i=>{i.persisted&&Cs()});window.addEventListener("hashchange",Cs);var Dl=CSS.supports("anchor-name","--test"),_l=new Set(["BUTTON","A","AREA"]);function Il(i){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?_l.has(i.tagName):!1}function ks(i,t){if(Il(i)){i.setAttribute("interestfor",t.id),t.addEventListener("toggle",h=>{h.newState==="open"&&ye(i,t)});return}let e=null,s=null,n=t,r=()=>{clearTimeout(s),e=setTimeout(()=>{n.showPopover(),ye(i,t)},200)},a=()=>{clearTimeout(e),s=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(s),n.showPopover(),ye(i,t)},c=()=>{clearTimeout(e),n.hidePopover()};i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",a),i.addEventListener("focus",o),i.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(s)),t.addEventListener("mouseleave",a)}function Ts(i,t){if(!Dl)return;let e=`--tooltip-anchor-${t.id}`;i.style.anchorName=e,t.style.positionAnchor=e,t.setAttribute("data-anchor","")}function $l(i){let t=i.getAttribute("title");if(!t)return;i.removeAttribute("title");let e=document.createElement("div");e.setAttribute("role","tooltip"),e.setAttribute("popover","hint"),e.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,e.textContent=t;let s=i.dataset.tooltipPosition||"top";e.dataset.tooltipPosition=s;let n=document.createElement("span");n.className="tooltip-arrow",n.setAttribute("aria-hidden","true"),e.appendChild(n),i.after(e),i.setAttribute("aria-describedby",e.id),Ts(i,e),ks(i,e)}function ql(i,t){let e=document.getElementById(t);e?.hasAttribute("popover")&&(i.hasAttribute("title")&&i.removeAttribute("title"),i.hasAttribute("aria-describedby")||i.setAttribute("aria-describedby",t),Ts(i,e),ks(i,e))}function Kr(i=document){i.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let e=t.dataset.tooltip;e?ql(t,e):$l(t)}),i.querySelectorAll("[aria-describedby]").forEach(t=>{let e=t.getAttribute("aria-describedby")??"",s=document.getElementById(e);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),Ts(t,s),ks(t,s))}),i.querySelectorAll("[popovertarget]").forEach(t=>{let e=t.getAttribute("popovertarget")??"",s=document.getElementById(e);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||s.hasAttribute("data-tooltip-click-init")||(s.setAttribute("data-tooltip-click-init",""),s.addEventListener("toggle",n=>{n.newState==="open"&&ye(t,s)}))})}function ye(i,t){if(t.hasAttribute("data-anchor"))return;let e=i.getBoundingClientRect(),s=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(s){case"bottom":a=e.bottom+n,o=e.left+(e.width-r.width)/2;break;case"left":a=e.top+(e.height-r.height)/2,o=e.left-r.width-n;break;case"right":a=e.top+(e.height-r.height)/2,o=e.right+n;break;default:a=e.top-r.height-n,o=e.left+(e.width-r.width)/2;break}let c=8;o=Math.max(c,Math.min(o,window.innerWidth-r.width-c)),a=Math.max(c,Math.min(a,window.innerHeight-r.height-c)),t.style.top=`${a}px`,t.style.left=`${o}px`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Kr()):Kr();var Ls="[data-vt-name]";function Ms(i){i.hasAttribute("data-vt-name-init")||(i.setAttribute("data-vt-name-init",""),i.style.viewTransitionName=i.dataset.vtName)}function Xr(i=document){i.querySelectorAll(Ls).forEach(Ms)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Xr()):Xr();var Ol=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Ls)&&Ms(s),s.querySelectorAll(Ls).forEach(Ms)}});Ol.observe(document.documentElement,{childList:!0,subtree:!0});function Jr(i){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",i)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",i)})}function Zr(){let{effectiveMode:i}=A.getState();Jr(i),window.addEventListener("vb:theme-change",e=>{Jr(e.detail.effectiveMode)}),new MutationObserver(e=>{let{effectiveMode:s}=A.getState();for(let n of e)for(let r of n.addedNodes){if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=r;a.tagName==="BROWSER-WINDOW"?a.setAttribute("mode",s):a.tagName==="CODE-BLOCK"&&a.setAttribute("theme",s),a.querySelectorAll("browser-window").forEach(o=>{o.setAttribute("mode",s)}),a.querySelectorAll("code-block").forEach(o=>{o.setAttribute("theme",s)})}}).observe(document.body,{childList:!0,subtree:!0})}Mt();function Rt(i){return[...i.querySelectorAll("input, select, textarea")].filter(t=>t.type!=="submit"&&t.type!=="button"&&t.type!=="hidden"&&!("honeypot"in t.dataset))}function ea(i){return[...i.querySelectorAll("form-field[data-upgraded]")]}function Bl(i){return i.labels?.[0]?.textContent?.trim()??i.getAttribute("aria-label")??i.name??i.id}function Ft(i,t){let e=i.dataset.match;if(!e)return;let s=t.querySelector(`#${CSS.escape(e)}`)??t.querySelector(`[name="${CSS.escape(e)}"]`);if(s){if(i.setCustomValidity(""),i.value&&s.value&&i.value!==s.value){let n=i.dataset.messageMatch??"Values do not match";i.setCustomValidity(n);let r=Qr(i);r&&(r.textContent=n)}else if(i.validity.valid){let n=Qr(i);n&&(n.textContent="")}}}function Qr(i){let t=i.getAttribute("aria-describedby")?.split(/\s+/)??[];for(let s of t){let n=document.getElementById(s);if(n?.tagName==="OUTPUT"&&n.classList.contains("error"))return n}return i.closest("form-field")?.querySelector("output.error")??null}function ta(i){let e=[...i.querySelectorAll('input[type="checkbox"]')].filter(o=>o.checked).length,s=parseInt(i.dataset.minChecked??"0",10),n=parseInt(i.dataset.maxChecked??"999",10),r=i.querySelector(":scope > output"),a=null;return e<s&&(a=i.dataset.messageMinChecked??`Select at least ${s}`),e>n&&(a=i.dataset.messageMaxChecked??`Select no more than ${n}`),r&&(r.textContent=a??""),a?i.dataset.invalid="":delete i.dataset.invalid,!a}function ia(i){let t=i.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored"};let e=i.querySelector("output.error-summary");return e?{el:e,type:"legacy"}:null}function we(i,t,{focus:e=!1}={}){if(!t)return;let s=[];for(let n of Rt(i))n.validity.valid||s.push({id:n.id||n.name,label:Bl(n),message:n.validationMessage});for(let n of i.querySelectorAll("fieldset[data-invalid]")){let r=n.querySelector(":scope > output");s.push({id:n.id||"",label:n.querySelector("legend")?.textContent?.trim()??"Group",message:r?.textContent||"Invalid selection"})}if(s.length===0){sa(t);return}if(t.type==="authored"){let n=t.el.querySelector("[data-summary-list]");if(n){n.innerHTML="";for(let r of s){let a=document.createElement("li"),o=document.createElement("a");o.href=r.id?`#${r.id}`:"#",o.textContent=`${r.label}: ${r.message}`,a.appendChild(o),n.appendChild(a)}}t.el.removeAttribute("hidden"),t.el.dataset.visible=""}else{let n=s.length,r=s.map(a=>`<li><a href="${a.id?`#${a.id}`:"#"}">${a.label}: ${a.message}</a></li>`).join(`
|
|
589
589
|
`);t.el.innerHTML=`<p>Please fix ${n} error${n===1?"":"s"}:</p>
|
|
590
590
|
<ul>
|
|
591
591
|
${r}
|
|
592
|
-
</ul>`}e&&t.el.focus()}function Jr(i){if(i)if(i.type==="authored"){delete i.el.dataset.visible;let t=i.el.querySelector("[data-summary-list]");t&&i.el.addEventListener("transitionend",()=>{i.el.dataset.visible||(t.innerHTML="")},{once:!0})}else i.el.innerHTML=""}function Nl(i){i&&i.el.addEventListener("click",t=>{let e=t.target.closest('a[href^="#"]');if(!e)return;t.preventDefault();let s=e.getAttribute("href").slice(1),n=document.getElementById(s);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus())})}function Dl(i){for(let t of Rt(i))t.focus({preventScroll:!0}),t.blur()}async function _l(i){let t=i.querySelector('[type="submit"]');i.dataset.submitting="",delete i.dataset.error,t&&t.setAttribute("aria-disabled","true");try{let e=new FormData(i),s=await fetch(i.action,{method:i.method||"post",body:e});if(delete i.dataset.submitting,t&&t.removeAttribute("aria-disabled"),!s.ok){if((s.headers.get("content-type")??"").includes("application/json")){let a=await s.json();if(a.errors){Il(i,a.errors);return}}throw new Error(`Server error: ${s.status}`)}i.dataset.success="";let n=i.querySelector("[data-form-success]");n&&(n.hidden=!1,n.focus())}catch{delete i.dataset.submitting,t&&t.removeAttribute("aria-disabled"),i.dataset.error="network"}}function Il(i,t){i.dataset.error="";let e=Kr(i),s=[];for(let n of e){let r=n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(a),s.push(n))}if(s.length>0){let n=Xr(i);we(i,n,{focus:!0})}for(let n of e)n.querySelector("input, textarea, select")?.addEventListener("input",()=>n.clearError(),{once:!0})}function Ls(i){if(i.hasAttribute("data-vb-enhanced"))return;i.setAttribute("novalidate",""),i.setAttribute("data-vb-enhanced","");let t=Xr(i);t&&Nl(t);for(let e of Rt(i))if(e.dataset.match){e.addEventListener("input",()=>Ft(e,i)),e.addEventListener("blur",()=>Ft(e,i));let s=e.dataset.match,n=i.querySelector(`#${CSS.escape(s)}`)??i.querySelector(`[name="${CSS.escape(s)}"]`);n&&n.addEventListener("input",()=>Ft(e,i))}for(let e of i.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))e.addEventListener("change",()=>{Gr(e),t&&we(i,t)});i.addEventListener("submit",e=>{e.preventDefault();let s=Kr(i);for(let o of s)o.validate();for(let o of Rt(i))o.dataset.match&&Ft(o,i);for(let o of i.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))Gr(o);if(Dl(i),!(i.checkValidity()&&![...i.querySelectorAll("fieldset[data-invalid]")].length)){if(t)we(i,t,{focus:!0});else{let o=i.querySelector(":invalid");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.focus())}return}Jr(t);let r=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:i}});if(i.dispatchEvent(r),r.defaultPrevented)return;let a=i.dataset.submit??"native";if(a==="fetch")_l(i);else if(a==="event"){let o=new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:new FormData(i)});i.dispatchEvent(o)}else i.submit()}),t&&i.addEventListener("input",()=>{requestAnimationFrame(()=>{for(let e of Rt(i))e.dataset.match&&Ft(e,i);we(i,t)})})}function Zr(){for(let t of document.querySelectorAll("form[data-validate]"))Ls(t);new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-validate]")&&Ls(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>Ls(r))}}).observe(document.body,{childList:!0,subtree:!0})}var Qr='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>',$l='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>';function Ms(i){let t=i.querySelector('input[type="password"]');if(!t||i.dataset.enhanced==="password")return;i.dataset.enhanced="password";let e=document.createElement("div");e.className="password-wrapper",t.parentNode.insertBefore(e,t),e.appendChild(t);let s=document.createElement("button");s.type="button",s.className="password-toggle",s.setAttribute("aria-label","Show password"),s.setAttribute("aria-pressed","false"),s.innerHTML=Qr,e.appendChild(s),s.addEventListener("click",()=>{let n=t.type==="password";t.type=n?"text":"password",s.setAttribute("aria-pressed",String(n)),s.setAttribute("aria-label",n?"Hide password":"Show password"),s.innerHTML=n?$l:Qr})}function Ns(i){let t=i.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||i.dataset.enhanced==="otp")return;i.dataset.enhanced="otp";let e=parseInt(t.dataset.length||"6",10);t.type="hidden",t.removeAttribute("inputmode"),t.removeAttribute("pattern");let s=document.createElement("div");s.className="otp-wrapper",t.parentNode.insertBefore(s,t.nextSibling);let n=[];for(let a=0;a<e;a++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.maxLength=1,o.pattern="[0-9]",o.className="otp-digit",o.setAttribute("aria-label",`Digit ${a+1} of ${e}`),n.push(o),s.appendChild(o)}function r(){t.value=n.map(a=>a.value).join(""),t.dispatchEvent(new Event("input",{bubbles:!0}))}n.forEach((a,o)=>{a.addEventListener("input",c=>{let h=c.target.value;if(h&&!/^\d$/.test(h)){c.target.value="";return}h&&o<n.length-1&&n[o+1].focus(),r()}),a.addEventListener("keydown",c=>{c.key==="Backspace"&&!c.target.value&&o>0&&n[o-1].focus(),c.key==="ArrowLeft"&&o>0&&(c.preventDefault(),n[o-1].focus()),c.key==="ArrowRight"&&o<n.length-1&&(c.preventDefault(),n[o+1].focus())}),a.addEventListener("paste",c=>{c.preventDefault();let l=((c.clipboardData||window.clipboardData)?.getData("text")??"").replace(/\D/g,"").slice(0,e).split("");l.forEach((u,f)=>{n[f]&&(n[f].value=u)});let d=n.findIndex(u=>!u.value);d!==-1?n[d].focus():l.length>0&&n[Math.min(l.length-1,e-1)].focus(),r()}),a.addEventListener("focus",()=>{a.select()})}),i.addEventListener("click",a=>{a.target===i&&n[0].focus()})}function Ds(i){let t=i.querySelector("input[data-strength]");if(!t||i.dataset.enhanced==="strength")return;i.dataset.enhanced="strength";let e=t.dataset.rules||"length:8",s=ql(e),n=document.createElement("div");n.className="strength-meter";let r=document.createElement("meter");r.min=0,r.max=s.length,r.low=Math.ceil(s.length*.4),r.high=Math.ceil(s.length*.75),r.optimum=s.length,r.value=0,r.className="xs";let a=document.createElement("span");a.className="strength-label",a.textContent="",n.appendChild(r),n.appendChild(a);let o=document.createElement("ul");o.className="strength-rules",o.setAttribute("aria-label","Password requirements"),s.forEach(h=>{let l=document.createElement("li");l.dataset.rule=h.type,l.textContent=h.label,o.appendChild(l)}),(i.querySelector(".password-wrapper")||t).insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",o),t.addEventListener("input",()=>{let h=t.value,l=0;s.forEach((u,f)=>{let v=Ol(u,h),p=o.children[f];p.dataset.met=v?"":void 0,v?(p.setAttribute("data-met",""),l++):p.removeAttribute("data-met")}),r.value=l;let d=l/s.length;h.length===0?(a.textContent="",n.dataset.level=""):d<.4?(a.textContent="Weak",n.dataset.level="weak"):d<.75?(a.textContent="Fair",n.dataset.level="fair"):d<1?(a.textContent="Good",n.dataset.level="good"):(a.textContent="Strong",n.dataset.level="strong")})}function ql(i){return i.split(",").map(t=>{let[e,s]=t.trim().split(":");switch(e){case"length":return{type:e,param:parseInt(s)||8,label:`At least ${s||8} characters`};case"uppercase":return{type:e,label:"One uppercase letter"};case"lowercase":return{type:e,label:"One lowercase letter"};case"number":return{type:e,label:"One number"};case"special":return{type:e,label:"One special character"};default:return{type:e,label:e}}})}function Ol(i,t){switch(i.type){case"length":return t.length>=(i.param||8);case"uppercase":return/[A-Z]/.test(t);case"lowercase":return/[a-z]/.test(t);case"number":return/\d/.test(t);case"special":return/[^A-Za-z0-9]/.test(t);default:return!1}}function Bl(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(Ms)}function Pl(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach(Ns)}function Fl(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(Ds)}function ta(){Bl(),Pl(),Fl(),new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.('form-field:has(input[type="password"])')&&Ms(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&Ns(n),n.matches?.("form-field:has(input[data-strength])")&&Ds(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(Ms),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach(Ns),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(Ds)}}).observe(document.body,{childList:!0,subtree:!0})}function Rl(i){let t=Date.now(),e=i*7+t%9973&65535;return btoa(JSON.stringify({s:i,t,c:e}))}function Hl(i,t,e){let s=0,n=i.submitAt-(i.firstInteractionAt??i.submitAt),r=t.querySelector("[data-honeypot]");return r&&r.value.trim()&&(s+=80),[...t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], textarea')].filter(o=>o.value.trim()&&!("honeypot"in o.dataset)).length>0&&i.keyboardEventCount===0&&(s+=30),i.fieldFocusCount===0&&(s+=40),!e&&!i.mouseMovedInForm&&(s+=20),n<1e3?s+=80:n<3e3&&(s+=50),Math.min(s,100)}function zl(i){return new Promise((t,e)=>{let s=document.createElement("script");s.src=i,s.async=!0,s.onload=t,s.onerror=e,document.head.appendChild(s)})}async function Vl(i,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await zl("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let e=document.createElement("div");e.className="cf-turnstile",e.dataset.sitekey=t,e.dataset.size="invisible",i.appendChild(e)}catch{}}function _s(i){if(i.hasAttribute("data-bot-enhanced"))return;i.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},e=navigator.maxTouchPoints>0;i.addEventListener("focusin",s=>{s.target.matches("input, textarea, select")&&!("honeypot"in s.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),i.addEventListener("keydown",s=>{s.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),e||i.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),i.addEventListener("vb:beforesubmit",s=>{t.submitAt=Date.now();let n=Hl(t,i,e),r=i.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",i.appendChild(r)),r.value=Rl(n),n>=80){s.preventDefault(),i.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&i.dataset.turnstileSitekey&&Vl(i,i.dataset.turnstileSitekey)})}function ea(){for(let t of document.querySelectorAll("form[data-bot-protection]"))_s(t);new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-bot-protection]")&&_s(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>_s(r))}}).observe(document.body,{childList:!0,subtree:!0})}ot();ot();var th=1e3,ca=new Map;function qs(i,t){return e=>{let s=JSON.stringify(e.detail??null),n=ca.get(i),r=Date.now();n&&n.key===s&&r-n.at<th||(ca.set(i,{key:s,at:r}),t(e))}}var eh={"vb:submit":i=>w.track("form.submit_valid",{formId:i.detail?.formId}),"wizard:step-change":i=>w.track("form.wizard_step",{from:i.detail?.from,to:i.detail?.to,direction:i.detail?.direction}),"wizard:complete":i=>w.track("form.wizard_complete",{steps:i.detail?.steps}),"wizard:reset":()=>w.track("form.wizard_reset"),"data-table:sort":i=>w.track("table.sort",{column:i.detail?.column,direction:i.detail?.direction,columnName:i.detail?.columnName}),"data-table:filter":i=>w.track("table.filter",{column:i.detail?.column,hasValue:!!i.detail?.value,length:i.detail?.value?.length??0}),"data-table:page":i=>w.track("table.paginate",{page:i.detail?.page}),"vb:theme-change":qs("vb:theme-change",i=>w.track("ui.theme_change",{theme:i.detail?.brand??i.detail?.theme,mode:i.detail?.mode})),"vb:a11y-themes-change":qs("vb:a11y-themes-change",i=>w.track("ui.a11y_theme",{themes:i.detail})),"vb:extensions-change":qs("vb:extensions-change",i=>w.track("ui.extension_toggle",{extensions:i.detail})),"heading-links:navigate":i=>w.track("docs.anchor_navigate",{id:i.detail?.id}),"page-toc:navigate":i=>w.track("docs.toc_navigate",{id:i.detail?.id}),"site-search:open":()=>w.track("search.open"),"site-search:close":i=>w.track("search.close",{hasQuery:i.detail?.hasQuery}),"theme-composer:change":i=>w.track("theme.compose",{dimension:i.detail?.dimension,source:i.detail?.source,token:i.detail?.token})},ih={"accordion-wc:toggle":i=>w.track("ui.accordion_toggle",{open:i.detail?.open,index:i.detail?.index}),"tab-set:change":i=>w.track("ui.tab_change",{tab:i.detail?.tab}),"carousel-wc:change":i=>w.track("ui.carousel_slide",{index:i.detail?.index}),"carousel-wc:play":()=>w.track("ui.carousel_play"),"carousel-wc:pause":()=>w.track("ui.carousel_pause"),"data-table:expand":i=>w.track("table.row_expand",{row:i.detail?.row}),"data-table:selection":i=>w.track("table.row_select",{count:i.detail?.count??i.detail?.rows?.length??0}),"theme-picker:open":()=>w.track("ui.theme_picker_open"),"theme-picker:close":()=>w.track("ui.theme_picker_close"),"color-palette:select":i=>w.track("palette.color_select",{name:i.detail?.name,index:i.detail?.index}),"color-palette:change":i=>w.track("palette.color_edit",{name:i.detail?.name,index:i.detail?.index}),"semantic-palette:change":i=>w.track("palette.semantic_change",{role:i.detail?.role}),"token-specimen:change":i=>w.track("tokens.edit",{token:i.detail?.token}),"spacing-specimen:change":i=>w.track("tokens.spacing_edit",{token:i.detail?.token}),"type-specimen:change":i=>w.track("tokens.type_edit",{token:i.detail?.token}),"theme-export:change":i=>w.track("theme.export_format",{format:i.detail?.format})};function la(i){for(let[t,e]of Object.entries(i))(t.startsWith("vb:theme-change")||t==="vb:a11y-themes-change"||t==="vb:extensions-change"?window:document).addEventListener(t,e)}function ha({tiers:i=["tier1","tier2"]}={}){i.includes("tier1")&&la(eh),i.includes("tier2")&&la(ih)}ot();await A.init();document.documentElement.hasAttribute("data-sticky")&&yi();jr();Zr();ta();ea();w.init({siteId:globalThis.vbAnalyticsConfig?.siteId??"vb-docs",transport:globalThis.vbAnalyticsConfig?.transport??"console",endpoint:globalThis.vbAnalyticsConfig?.endpoint??"/api/analytics"});ha();Promise.resolve().then(()=>ua());Promise.resolve().then(()=>pa());Promise.resolve().then(()=>Ea());document.querySelector("[data-wizard]")&&Promise.resolve().then(()=>(xa(),Sa));document.querySelector("[data-watch-page], watch-wc")&&Promise.resolve().then(()=>(Oi(),qi));export{w as Analytics};
|
|
592
|
+
</ul>`}e&&t.el.focus()}function sa(i){if(i)if(i.type==="authored"){delete i.el.dataset.visible;let t=i.el.querySelector("[data-summary-list]");t&&i.el.addEventListener("transitionend",()=>{i.el.dataset.visible||(t.innerHTML="")},{once:!0})}else i.el.innerHTML=""}function Pl(i){i&&i.el.addEventListener("click",t=>{let e=t.target.closest('a[href^="#"]');if(!e)return;t.preventDefault();let s=e.getAttribute("href").slice(1),n=document.getElementById(s);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus())})}function Fl(i){for(let t of Rt(i))t.focus({preventScroll:!0}),t.blur()}async function Rl(i){let t=i.querySelector('[type="submit"]');i.dataset.submitting="",delete i.dataset.error,t&&t.setAttribute("aria-disabled","true");try{let e=new FormData(i),s=await fetch(i.action,{method:i.method||"post",body:e});if(delete i.dataset.submitting,t&&t.removeAttribute("aria-disabled"),!s.ok){if((s.headers.get("content-type")??"").includes("application/json")){let a=await s.json();if(a.errors){Hl(i,a.errors);return}}throw new Error(`Server error: ${s.status}`)}i.dataset.success="";let n=i.querySelector("[data-form-success]");n&&(n.hidden=!1,n.focus())}catch{delete i.dataset.submitting,t&&t.removeAttribute("aria-disabled"),i.dataset.error="network"}}function Hl(i,t){i.dataset.error="";let e=ea(i),s=[];for(let n of e){let r=n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(a),s.push(n))}if(s.length>0){let n=ia(i);we(i,n,{focus:!0})}for(let n of e)n.querySelector("input, textarea, select")?.addEventListener("input",()=>n.clearError(),{once:!0})}function Ns(i){if(i.hasAttribute("data-vb-enhanced"))return;i.setAttribute("novalidate",""),i.setAttribute("data-vb-enhanced","");let t=ia(i);t&&Pl(t);for(let e of Rt(i))if(e.dataset.match){e.addEventListener("input",()=>Ft(e,i)),e.addEventListener("blur",()=>Ft(e,i));let s=e.dataset.match,n=i.querySelector(`#${CSS.escape(s)}`)??i.querySelector(`[name="${CSS.escape(s)}"]`);n&&n.addEventListener("input",()=>Ft(e,i))}for(let e of i.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))e.addEventListener("change",()=>{ta(e),t&&we(i,t)});i.addEventListener("submit",e=>{e.preventDefault();let s=ea(i);for(let o of s)o.validate();for(let o of Rt(i))o.dataset.match&&Ft(o,i);for(let o of i.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))ta(o);if(Fl(i),!(i.checkValidity()&&![...i.querySelectorAll("fieldset[data-invalid]")].length)){if(t)we(i,t,{focus:!0});else{let o=i.querySelector(":invalid");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.focus())}return}sa(t);let r=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:i}});if(i.dispatchEvent(r),r.defaultPrevented)return;let a=i.dataset.submit??"native";if(a==="fetch")Rl(i);else if(a==="event"){let o=new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:new FormData(i)});i.dispatchEvent(o)}else i.submit()}),t&&i.addEventListener("input",()=>{requestAnimationFrame(()=>{for(let e of Rt(i))e.dataset.match&&Ft(e,i);we(i,t)})})}function na(){for(let t of document.querySelectorAll("form[data-validate]"))Ns(t);new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-validate]")&&Ns(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>Ns(r))}}).observe(document.body,{childList:!0,subtree:!0})}var ra='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>',zl='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>';function Ds(i){let t=i.querySelector('input[type="password"]');if(!t||i.dataset.enhanced==="password")return;i.dataset.enhanced="password";let e=document.createElement("div");e.className="password-wrapper",t.parentNode.insertBefore(e,t),e.appendChild(t);let s=document.createElement("button");s.type="button",s.className="password-toggle",s.setAttribute("aria-label","Show password"),s.setAttribute("aria-pressed","false"),s.innerHTML=ra,e.appendChild(s),s.addEventListener("click",()=>{let n=t.type==="password";t.type=n?"text":"password",s.setAttribute("aria-pressed",String(n)),s.setAttribute("aria-label",n?"Hide password":"Show password"),s.innerHTML=n?zl:ra})}function _s(i){let t=i.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||i.dataset.enhanced==="otp")return;i.dataset.enhanced="otp";let e=parseInt(t.dataset.length||"6",10);t.type="hidden",t.removeAttribute("inputmode"),t.removeAttribute("pattern");let s=document.createElement("div");s.className="otp-wrapper",t.parentNode.insertBefore(s,t.nextSibling);let n=[];for(let a=0;a<e;a++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.maxLength=1,o.pattern="[0-9]",o.className="otp-digit",o.setAttribute("aria-label",`Digit ${a+1} of ${e}`),n.push(o),s.appendChild(o)}function r(){t.value=n.map(a=>a.value).join(""),t.dispatchEvent(new Event("input",{bubbles:!0}))}n.forEach((a,o)=>{a.addEventListener("input",c=>{let h=c.target.value;if(h&&!/^\d$/.test(h)){c.target.value="";return}h&&o<n.length-1&&n[o+1].focus(),r()}),a.addEventListener("keydown",c=>{c.key==="Backspace"&&!c.target.value&&o>0&&n[o-1].focus(),c.key==="ArrowLeft"&&o>0&&(c.preventDefault(),n[o-1].focus()),c.key==="ArrowRight"&&o<n.length-1&&(c.preventDefault(),n[o+1].focus())}),a.addEventListener("paste",c=>{c.preventDefault();let l=((c.clipboardData||window.clipboardData)?.getData("text")??"").replace(/\D/g,"").slice(0,e).split("");l.forEach((u,f)=>{n[f]&&(n[f].value=u)});let d=n.findIndex(u=>!u.value);d!==-1?n[d].focus():l.length>0&&n[Math.min(l.length-1,e-1)].focus(),r()}),a.addEventListener("focus",()=>{a.select()})}),i.addEventListener("click",a=>{a.target===i&&n[0].focus()})}function Is(i){let t=i.querySelector("input[data-strength]");if(!t||i.dataset.enhanced==="strength")return;i.dataset.enhanced="strength";let e=t.dataset.rules||"length:8",s=Vl(e),n=document.createElement("div");n.className="strength-meter";let r=document.createElement("meter");r.min=0,r.max=s.length,r.low=Math.ceil(s.length*.4),r.high=Math.ceil(s.length*.75),r.optimum=s.length,r.value=0,r.className="xs";let a=document.createElement("span");a.className="strength-label",a.textContent="",n.appendChild(r),n.appendChild(a);let o=document.createElement("ul");o.className="strength-rules",o.setAttribute("aria-label","Password requirements"),s.forEach(h=>{let l=document.createElement("li");l.dataset.rule=h.type,l.textContent=h.label,o.appendChild(l)}),(i.querySelector(".password-wrapper")||t).insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",o),t.addEventListener("input",()=>{let h=t.value,l=0;s.forEach((u,f)=>{let v=Ul(u,h),p=o.children[f];p.dataset.met=v?"":void 0,v?(p.setAttribute("data-met",""),l++):p.removeAttribute("data-met")}),r.value=l;let d=l/s.length;h.length===0?(a.textContent="",n.dataset.level=""):d<.4?(a.textContent="Weak",n.dataset.level="weak"):d<.75?(a.textContent="Fair",n.dataset.level="fair"):d<1?(a.textContent="Good",n.dataset.level="good"):(a.textContent="Strong",n.dataset.level="strong")})}function Vl(i){return i.split(",").map(t=>{let[e,s]=t.trim().split(":");switch(e){case"length":return{type:e,param:parseInt(s)||8,label:`At least ${s||8} characters`};case"uppercase":return{type:e,label:"One uppercase letter"};case"lowercase":return{type:e,label:"One lowercase letter"};case"number":return{type:e,label:"One number"};case"special":return{type:e,label:"One special character"};default:return{type:e,label:e}}})}function Ul(i,t){switch(i.type){case"length":return t.length>=(i.param||8);case"uppercase":return/[A-Z]/.test(t);case"lowercase":return/[a-z]/.test(t);case"number":return/\d/.test(t);case"special":return/[^A-Za-z0-9]/.test(t);default:return!1}}function Wl(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(Ds)}function jl(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach(_s)}function Yl(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(Is)}function aa(){Wl(),jl(),Yl(),new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.('form-field:has(input[type="password"])')&&Ds(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&_s(n),n.matches?.("form-field:has(input[data-strength])")&&Is(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(Ds),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach(_s),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(Is)}}).observe(document.body,{childList:!0,subtree:!0})}function Gl(i){let t=Date.now(),e=i*7+t%9973&65535;return btoa(JSON.stringify({s:i,t,c:e}))}function Kl(i,t,e){let s=0,n=i.submitAt-(i.firstInteractionAt??i.submitAt),r=t.querySelector("[data-honeypot]");return r&&r.value.trim()&&(s+=80),[...t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], textarea')].filter(o=>o.value.trim()&&!("honeypot"in o.dataset)).length>0&&i.keyboardEventCount===0&&(s+=30),i.fieldFocusCount===0&&(s+=40),!e&&!i.mouseMovedInForm&&(s+=20),n<1e3?s+=80:n<3e3&&(s+=50),Math.min(s,100)}function Xl(i){return new Promise((t,e)=>{let s=document.createElement("script");s.src=i,s.async=!0,s.onload=t,s.onerror=e,document.head.appendChild(s)})}async function Jl(i,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await Xl("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let e=document.createElement("div");e.className="cf-turnstile",e.dataset.sitekey=t,e.dataset.size="invisible",i.appendChild(e)}catch{}}function $s(i){if(i.hasAttribute("data-bot-enhanced"))return;i.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},e=navigator.maxTouchPoints>0;i.addEventListener("focusin",s=>{s.target.matches("input, textarea, select")&&!("honeypot"in s.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),i.addEventListener("keydown",s=>{s.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),e||i.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),i.addEventListener("vb:beforesubmit",s=>{t.submitAt=Date.now();let n=Kl(t,i,e),r=i.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",i.appendChild(r)),r.value=Gl(n),n>=80){s.preventDefault(),i.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&i.dataset.turnstileSitekey&&Jl(i,i.dataset.turnstileSitekey)})}function oa(){for(let t of document.querySelectorAll("form[data-bot-protection]"))$s(t);new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-bot-protection]")&&$s(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>$s(r))}}).observe(document.body,{childList:!0,subtree:!0})}ot();ot();var ch=1e3,pa=new Map;function Bs(i,t){return e=>{let s=JSON.stringify(e.detail??null),n=pa.get(i),r=Date.now();n&&n.key===s&&r-n.at<ch||(pa.set(i,{key:s,at:r}),t(e))}}var lh={"vb:submit":i=>w.track("form.submit_valid",{formId:i.detail?.formId}),"wizard:step-change":i=>w.track("form.wizard_step",{from:i.detail?.from,to:i.detail?.to,direction:i.detail?.direction}),"wizard:complete":i=>w.track("form.wizard_complete",{steps:i.detail?.steps}),"wizard:reset":()=>w.track("form.wizard_reset"),"data-table:sort":i=>w.track("table.sort",{column:i.detail?.column,direction:i.detail?.direction,columnName:i.detail?.columnName}),"data-table:filter":i=>w.track("table.filter",{column:i.detail?.column,hasValue:!!i.detail?.value,length:i.detail?.value?.length??0}),"data-table:page":i=>w.track("table.paginate",{page:i.detail?.page}),"vb:theme-change":Bs("vb:theme-change",i=>w.track("ui.theme_change",{theme:i.detail?.brand??i.detail?.theme,mode:i.detail?.mode})),"vb:a11y-themes-change":Bs("vb:a11y-themes-change",i=>w.track("ui.a11y_theme",{themes:i.detail})),"vb:extensions-change":Bs("vb:extensions-change",i=>w.track("ui.extension_toggle",{extensions:i.detail})),"heading-links:navigate":i=>w.track("docs.anchor_navigate",{id:i.detail?.id}),"page-toc:navigate":i=>w.track("docs.toc_navigate",{id:i.detail?.id}),"site-search:open":()=>w.track("search.open"),"site-search:close":i=>w.track("search.close",{hasQuery:i.detail?.hasQuery}),"theme-composer:change":i=>w.track("theme.compose",{dimension:i.detail?.dimension,source:i.detail?.source,token:i.detail?.token})},hh={"accordion-wc:toggle":i=>w.track("ui.accordion_toggle",{open:i.detail?.open,index:i.detail?.index}),"tab-set:change":i=>w.track("ui.tab_change",{tab:i.detail?.tab}),"carousel-wc:change":i=>w.track("ui.carousel_slide",{index:i.detail?.index}),"carousel-wc:play":()=>w.track("ui.carousel_play"),"carousel-wc:pause":()=>w.track("ui.carousel_pause"),"data-table:expand":i=>w.track("table.row_expand",{row:i.detail?.row}),"data-table:selection":i=>w.track("table.row_select",{count:i.detail?.count??i.detail?.rows?.length??0}),"theme-picker:open":()=>w.track("ui.theme_picker_open"),"theme-picker:close":()=>w.track("ui.theme_picker_close"),"color-palette:select":i=>w.track("palette.color_select",{name:i.detail?.name,index:i.detail?.index}),"color-palette:change":i=>w.track("palette.color_edit",{name:i.detail?.name,index:i.detail?.index}),"semantic-palette:change":i=>w.track("palette.semantic_change",{role:i.detail?.role}),"token-specimen:change":i=>w.track("tokens.edit",{token:i.detail?.token}),"spacing-specimen:change":i=>w.track("tokens.spacing_edit",{token:i.detail?.token}),"type-specimen:change":i=>w.track("tokens.type_edit",{token:i.detail?.token}),"theme-export:change":i=>w.track("theme.export_format",{format:i.detail?.format})};function ma(i){for(let[t,e]of Object.entries(i))(t.startsWith("vb:theme-change")||t==="vb:a11y-themes-change"||t==="vb:extensions-change"?window:document).addEventListener(t,e)}function ba({tiers:i=["tier1","tier2"]}={}){i.includes("tier1")&&ma(lh),i.includes("tier2")&&ma(hh)}ot();await A.init();document.documentElement.hasAttribute("data-sticky")&&Ei();Zr();na();aa();oa();w.init({siteId:globalThis.vbAnalyticsConfig?.siteId??"vb-docs",transport:globalThis.vbAnalyticsConfig?.transport??"console",endpoint:globalThis.vbAnalyticsConfig?.endpoint??"/api/analytics"});ba();Promise.resolve().then(()=>va());Promise.resolve().then(()=>wa());Promise.resolve().then(()=>Ta());document.querySelector("[data-wizard]")&&Promise.resolve().then(()=>(Na(),Ma));document.querySelector("[data-watch-page], watch-wc")&&Promise.resolve().then(()=>(Pi(),Bi));export{w as Analytics};
|
|
593
593
|
//# sourceMappingURL=vanilla-breeze-core.js.map
|