@vanduo-oss/framework 1.3.2 → 1.3.3

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.
@@ -1,8 +1,8 @@
1
- /*! Vanduo v1.3.2 | Built: 2026-04-06T19:04:41.601Z | git:8e08b38 | production */
2
- (()=>{(function(){"use strict";let m={instances:new Map,register:function(e,t,n=[]){if(this.instances.has(e)){let s=this.instances.get(e);s.cleanup=s.cleanup.concat(n);return}this.instances.set(e,{component:t,cleanup:n,registeredAt:Date.now()})},unregister:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(function(n){try{n()}catch(s){console.warn("[Vanduo Lifecycle] Cleanup error:",s)}}),this.instances.delete(e))},destroyAll:function(e){let t=[];this.instances.forEach(function(n,s){(!e||n.component===e)&&t.push(s)}),t.forEach(function(n){m.unregister(n)})},destroyAllInContainer:function(e){let t=[];this.instances.forEach(function(n,s){e.contains(s)&&t.push(s)}),t.forEach(function(n){m.unregister(n)})},getAll:function(){let e=[];return this.instances.forEach(function(t,n){e.push({element:n,component:t.component,registeredAt:t.registeredAt})}),e},has:function(e){return this.instances.has(e)}};window.addEventListener("beforeunload",function(){m.destroyAll()}),window.VanduoLifecycle=m,typeof window.Vanduo<"u"&&window.Vanduo.register("lifecycle",m)})();(function(){"use strict";let e={version:"1.3.2",components:{},init:function(){typeof ready<"u"?ready(()=>{this.initComponents()}):document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this.initComponents()}):this.initComponents()},initComponents:function(){Object.keys(this.components).forEach(t=>{let n=this.components[t];if(n.init&&typeof n.init=="function")try{n.init()}catch(s){console.warn('[Vanduo] Failed to initialize component "'+t+'":',s)}}),console.log("Vanduo Framework v"+this.version+" initialized")},register:function(t,n){this.components[t]=n},reinit:function(t){let n=this.components[t];if(n&&n.init&&typeof n.init=="function")try{n.init()}catch(s){console.warn('[Vanduo] Failed to reinitialize component "'+t+'":',s)}},destroyAll:function(){let t=Object.keys(this.components);for(let n=0;n<t.length;n++){let s=this.components[t[n]];if(s&&s.destroyAll&&typeof s.destroyAll=="function")try{s.destroyAll()}catch(i){console.warn('[Vanduo] Failed to destroy component "'+t[n]+'":',i)}}typeof window.VanduoLifecycle<"u"&&window.VanduoLifecycle.destroyAll()},getComponent:function(t){return this.components[t]||null}};window.Vanduo=e})();(function(){"use strict";let m={_snippetIdCounter:0,getSnippetInstanceId:function(e){if(e.dataset.codeSnippetId)return e.dataset.codeSnippetId;let t=(e.id||"").trim();return t?(e.dataset.codeSnippetId=`snippet-${t}`,e.dataset.codeSnippetId):(this._snippetIdCounter+=1,e.dataset.codeSnippetId=`snippet-auto-${this._snippetIdCounter}`,e.dataset.codeSnippetId)},addListener:function(e,t,n,s){t&&(t.addEventListener(n,s),e._codeSnippetCleanup||(e._codeSnippetCleanup=[]),e._codeSnippetCleanup.push(()=>t.removeEventListener(n,s)))},init:function(){document.querySelectorAll(".vd-code-snippet").forEach(t=>{t.dataset.initialized||this.initSnippet(t)})},initSnippet:function(e){e.dataset.initialized="true",e._codeSnippetCleanup=[];let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&n&&this.initCollapsible(e,t,n);let s=e.querySelectorAll(".vd-code-snippet-tab"),i=e.querySelectorAll(".vd-code-snippet-pane");s.length>0&&this.initTabs(e,s,i);let a=e.querySelector(".vd-code-snippet-copy");a&&this.initCopyButton(e,a),e.querySelectorAll("[data-extract]").forEach(l=>{this.extractHtml(l)}),e.querySelectorAll(".has-line-numbers").forEach(l=>{this.addLineNumbers(l)})},initCollapsible:function(e,t,n){let s=e.dataset.expanded==="true";t.setAttribute("aria-expanded",s),n.dataset.visible=s,this.addListener(e,t,"click",()=>{let i=e.dataset.expanded==="true";e.dataset.expanded=!i,t.setAttribute("aria-expanded",!i),n.dataset.visible=!i,i||n.querySelectorAll("[data-extract]:not([data-extracted])").forEach(r=>{this.extractHtml(r)});let a=new CustomEvent("codesnippet:toggle",{bubbles:!0,detail:{snippet:e,expanded:!i}});e.dispatchEvent(a)})},initTabs:function(e,t,n){let s=this.getSnippetInstanceId(e),i=e.querySelector(".vd-code-snippet-tabs");i&&i.setAttribute("role","tablist"),t.forEach((a,o)=>{let r=a.dataset.lang,l=a.classList.contains("is-active");a.setAttribute("role","tab"),a.setAttribute("aria-selected",l),a.setAttribute("tabindex",l?"0":"-1"),a.id=a.id||`code-tab-${s}-${r||"tab"}-${o}`;let d=e.querySelector(`.vd-code-snippet-pane[data-lang="${r}"]`);d&&(d.id=d.id||`code-pane-${s}-${r||"pane"}-${o}`,d.setAttribute("role","tabpanel"),a.setAttribute("aria-controls",d.id),d.setAttribute("aria-labelledby",a.id)),this.addListener(e,a,"click",()=>{this.switchTab(e,a,t,n)}),this.addListener(e,a,"keydown",c=>{this.handleTabKeydown(c,e,t,n)})})},switchTab:function(e,t,n,s){let i=t.dataset.lang;n.forEach(r=>{r.classList.remove("is-active"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1")}),s.forEach(r=>{r.classList.remove("is-active")}),t.classList.add("is-active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0");let a=e.querySelector(`.vd-code-snippet-pane[data-lang="${i}"]`);a&&a.classList.add("is-active");let o=new CustomEvent("codesnippet:tabchange",{bubbles:!0,detail:{snippet:e,tab:t,lang:i}});e.dispatchEvent(o)},handleTabKeydown:function(e,t,n,s){let i=Array.from(n),a=i.indexOf(e.target),o;switch(e.key){case"ArrowLeft":e.preventDefault(),o=a>0?a-1:i.length-1;break;case"ArrowRight":e.preventDefault(),o=a<i.length-1?a+1:0;break;case"Home":e.preventDefault(),o=0;break;case"End":e.preventDefault(),o=i.length-1;break;default:return}o!==a&&(i[o].focus(),this.switchTab(t,i[o],n,s))},initCopyButton:function(e,t){this.addListener(e,t,"click",async()=>{await this.copyCode(e,t)})},copyCode:async function(e,t){let n=e.querySelector(".vd-code-snippet-pane.is-active")||e.querySelector(".vd-code-snippet-pane");if(!n){console.warn("CodeSnippet: No code pane found");return}let i=(n.querySelector("code")||n).textContent,a;try{await navigator.clipboard.writeText(i),a=!0}catch{a=this.fallbackCopy(i)}this.showCopyFeedback(t,a);let o=new CustomEvent("codesnippet:copy",{bubbles:!0,detail:{snippet:e,code:i,success:a}});e.dispatchEvent(o)},fallbackCopy:function(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",t.style.top="-9999px",document.body.appendChild(t),t.focus(),t.select();let n=!1;try{n=document.execCommand("copy")}catch(s){console.warn("CodeSnippet: Fallback copy failed",s)}return document.body.removeChild(t),n},showCopyFeedback:function(e,t){if(t){e.classList.add("is-copied");let n=document.createElement("span");n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.className="sr-only",n.textContent="Code copied to clipboard",e.appendChild(n),setTimeout(()=>{e.classList.remove("is-copied"),n.parentNode&&n.parentNode.removeChild(n)},2e3)}},extractHtml:function(e){let t=e.dataset.extract;if(!t)return;let n=document.querySelector(t);if(!n){console.warn(`CodeSnippet: Source element not found: ${t}`);return}let s=n.innerHTML;s=this.formatHtml(s),s=this.escapeHtml(s),s=this.highlightHtml(s);let i=document.createElement("code");i.innerHTML=s,e.replaceChildren(i),e.dataset.extracted="true"},formatHtml:function(e){e=e.trim();let t=e.split(`
1
+ /*! Vanduo v1.3.3 | Built: 2026-04-10T21:45:12.664Z | git:281f4f6 | production */
2
+ (()=>{(function(){"use strict";let m={instances:new Map,register:function(e,t,n=[]){if(this.instances.has(e)){let s=this.instances.get(e);s.cleanup=s.cleanup.concat(n);return}this.instances.set(e,{component:t,cleanup:n,registeredAt:Date.now()})},unregister:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(function(n){try{n()}catch(s){console.warn("[Vanduo Lifecycle] Cleanup error:",s)}}),this.instances.delete(e))},destroyAll:function(e){let t=[];this.instances.forEach(function(n,s){(!e||n.component===e)&&t.push(s)}),t.forEach(function(n){m.unregister(n)})},destroyAllInContainer:function(e){let t=[];this.instances.forEach(function(n,s){e.contains(s)&&t.push(s)}),t.forEach(function(n){m.unregister(n)})},getAll:function(){let e=[];return this.instances.forEach(function(t,n){e.push({element:n,component:t.component,registeredAt:t.registeredAt})}),e},has:function(e){return this.instances.has(e)}};window.addEventListener("beforeunload",function(){m.destroyAll()}),window.VanduoLifecycle=m,typeof window.Vanduo<"u"&&window.Vanduo.register("lifecycle",m)})();(function(){"use strict";let e={version:"1.3.3",components:{},init:function(){typeof ready<"u"?ready(()=>{this.initComponents()}):document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this.initComponents()}):this.initComponents()},initComponents:function(){Object.keys(this.components).forEach(t=>{let n=this.components[t];if(n.init&&typeof n.init=="function")try{n.init()}catch(s){console.warn('[Vanduo] Failed to initialize component "'+t+'":',s)}}),console.log("Vanduo Framework v"+this.version+" initialized")},register:function(t,n){this.components[t]=n},reinit:function(t){let n=this.components[t];if(n&&n.init&&typeof n.init=="function")try{n.init()}catch(s){console.warn('[Vanduo] Failed to reinitialize component "'+t+'":',s)}},destroyAll:function(){let t=Object.keys(this.components);for(let n=0;n<t.length;n++){let s=this.components[t[n]];if(s&&s.destroyAll&&typeof s.destroyAll=="function")try{s.destroyAll()}catch(i){console.warn('[Vanduo] Failed to destroy component "'+t[n]+'":',i)}}typeof window.VanduoLifecycle<"u"&&window.VanduoLifecycle.destroyAll()},getComponent:function(t){return this.components[t]||null}};window.Vanduo=e})();(function(){"use strict";let m={_snippetIdCounter:0,getSnippetInstanceId:function(e){if(e.dataset.codeSnippetId)return e.dataset.codeSnippetId;let t=(e.id||"").trim();return t?(e.dataset.codeSnippetId=`snippet-${t}`,e.dataset.codeSnippetId):(this._snippetIdCounter+=1,e.dataset.codeSnippetId=`snippet-auto-${this._snippetIdCounter}`,e.dataset.codeSnippetId)},addListener:function(e,t,n,s){t&&(t.addEventListener(n,s),e._codeSnippetCleanup||(e._codeSnippetCleanup=[]),e._codeSnippetCleanup.push(()=>t.removeEventListener(n,s)))},init:function(){document.querySelectorAll(".vd-code-snippet").forEach(t=>{t.dataset.initialized||this.initSnippet(t)})},initSnippet:function(e){e.dataset.initialized="true",e._codeSnippetCleanup=[];let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&n&&this.initCollapsible(e,t,n);let s=e.querySelectorAll(".vd-code-snippet-tab"),i=e.querySelectorAll(".vd-code-snippet-pane");s.length>0&&this.initTabs(e,s,i);let a=e.querySelector(".vd-code-snippet-copy");a&&this.initCopyButton(e,a),e.querySelectorAll("[data-extract]").forEach(l=>{this.extractHtml(l)}),e.querySelectorAll(".has-line-numbers").forEach(l=>{this.addLineNumbers(l)})},initCollapsible:function(e,t,n){let s=e.dataset.expanded==="true";t.setAttribute("aria-expanded",s),n.dataset.visible=s,this.addListener(e,t,"click",()=>{let i=e.dataset.expanded==="true";e.dataset.expanded=!i,t.setAttribute("aria-expanded",!i),n.dataset.visible=!i,i||n.querySelectorAll("[data-extract]:not([data-extracted])").forEach(r=>{this.extractHtml(r)});let a=new CustomEvent("codesnippet:toggle",{bubbles:!0,detail:{snippet:e,expanded:!i}});e.dispatchEvent(a)})},initTabs:function(e,t,n){let s=this.getSnippetInstanceId(e),i=e.querySelector(".vd-code-snippet-tabs");i&&i.setAttribute("role","tablist"),t.forEach((a,o)=>{let r=a.dataset.lang,l=a.classList.contains("is-active");a.setAttribute("role","tab"),a.setAttribute("aria-selected",l),a.setAttribute("tabindex",l?"0":"-1"),a.id=a.id||`code-tab-${s}-${r||"tab"}-${o}`;let d=e.querySelector(`.vd-code-snippet-pane[data-lang="${r}"]`);d&&(d.id=d.id||`code-pane-${s}-${r||"pane"}-${o}`,d.setAttribute("role","tabpanel"),a.setAttribute("aria-controls",d.id),d.setAttribute("aria-labelledby",a.id)),this.addListener(e,a,"click",()=>{this.switchTab(e,a,t,n)}),this.addListener(e,a,"keydown",c=>{this.handleTabKeydown(c,e,t,n)})})},switchTab:function(e,t,n,s){let i=t.dataset.lang;n.forEach(r=>{r.classList.remove("is-active"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1")}),s.forEach(r=>{r.classList.remove("is-active")}),t.classList.add("is-active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0");let a=e.querySelector(`.vd-code-snippet-pane[data-lang="${i}"]`);a&&a.classList.add("is-active");let o=new CustomEvent("codesnippet:tabchange",{bubbles:!0,detail:{snippet:e,tab:t,lang:i}});e.dispatchEvent(o)},handleTabKeydown:function(e,t,n,s){let i=Array.from(n),a=i.indexOf(e.target),o;switch(e.key){case"ArrowLeft":e.preventDefault(),o=a>0?a-1:i.length-1;break;case"ArrowRight":e.preventDefault(),o=a<i.length-1?a+1:0;break;case"Home":e.preventDefault(),o=0;break;case"End":e.preventDefault(),o=i.length-1;break;default:return}o!==a&&(i[o].focus(),this.switchTab(t,i[o],n,s))},initCopyButton:function(e,t){this.addListener(e,t,"click",async()=>{await this.copyCode(e,t)})},copyCode:async function(e,t){let n=e.querySelector(".vd-code-snippet-pane.is-active")||e.querySelector(".vd-code-snippet-pane");if(!n){console.warn("CodeSnippet: No code pane found");return}let i=(n.querySelector("code")||n).textContent,a;try{await navigator.clipboard.writeText(i),a=!0}catch{a=this.fallbackCopy(i)}this.showCopyFeedback(t,a);let o=new CustomEvent("codesnippet:copy",{bubbles:!0,detail:{snippet:e,code:i,success:a}});e.dispatchEvent(o)},fallbackCopy:function(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",t.style.top="-9999px",document.body.appendChild(t),t.focus(),t.select();let n=!1;try{n=document.execCommand("copy")}catch(s){console.warn("CodeSnippet: Fallback copy failed",s)}return document.body.removeChild(t),n},showCopyFeedback:function(e,t){if(t){e.classList.add("is-copied");let n=document.createElement("span");n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.className="sr-only",n.textContent="Code copied to clipboard",e.appendChild(n),setTimeout(()=>{e.classList.remove("is-copied"),n.parentNode&&n.parentNode.removeChild(n)},2e3)}},extractHtml:function(e){let t=e.dataset.extract;if(!t)return;let n=document.querySelector(t);if(!n){console.warn(`CodeSnippet: Source element not found: ${t}`);return}let s=n.innerHTML;s=this.formatHtml(s),s=this.escapeHtml(s),s=this.highlightHtml(s);let i=document.createElement("code");i.innerHTML=s,e.replaceChildren(i),e.dataset.extracted="true"},formatHtml:function(e){e=e.trim();let t=e.split(`
3
3
  `),n=0,s=2,i=[];return t.forEach(a=>{if(a=a.trim(),!a)return;a.match(/^<\/\w/)&&(n=Math.max(0,n-s)),i.push(" ".repeat(n)+a);let o=/<[a-zA-Z]/.test(a),r=a.includes("/>");o&&!r&&(a.match(/<(br|hr|img|input|meta|link|area|base|col|embed|param|source|track|wbr)/i)||a.match(/<\/\w+>$/)||(n+=s))}),i.join(`
4
4
  `)},escapeHtml:function(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML},highlightHtml:function(e){return e=e.replace(/(&lt;\/?)([\w-]+)/g,'$1<span class="code-tag">$2</span>'),e=e.replace(/([\w-]+)(=)(&quot;|&#39;)/g,'<span class="code-attr">$1</span>$2$3'),e=e.replace(/(&quot;|&#39;)([^&]*)(&quot;|&#39;)/g,'$1<span class="code-string">$2</span>$3'),e=e.replace(/(&lt;!--)(.*?)(--&gt;)/g,'<span class="code-comment">$1$2$3</span>'),e},highlightCss:function(e){return e=e.replace(/([.#]?[a-zA-Z][a-zA-Z0-9_-]{0,200})(\s*\{)/g,'<span class="code-selector">$1</span>$2'),e=e.replace(/([a-zA-Z][a-zA-Z0-9_-]{0,200})(\s*:)/g,'<span class="code-property">$1</span>$2'),e=e.replace(/:\s*([^;{}]+)(;)/g,': <span class="code-value">$1</span>$2'),e=e.replace(/(\d+)(px|rem|em|%|vh|vw|deg|s|ms)/g,'<span class="code-number">$1</span><span class="code-unit">$2</span>'),e=e.replace(/(\/\*[\s\S]*?\*\/)/g,'<span class="code-comment">$1</span>'),e},highlightJs:function(e){return["const","let","var","function","return","if","else","for","while","switch","case","break","continue","new","this","class","extends","import","export","default","async","await","try","catch","throw","typeof","instanceof"].forEach(n=>{let s=new RegExp(`\\b(${n})\\b`,"g");e=e.replace(s,'<span class="code-keyword">$1</span>')}),e=e.replace(/('(?:[^'\\]|\\.){0,10000}'|"(?:[^"\\]|\\.){0,10000}"|`(?:[^`\\]|\\.){0,10000}`)/g,'<span class="code-string">$1</span>'),e=e.replace(/\b(\d+\.?\d*)\b/g,'<span class="code-number">$1</span>'),e=e.replace(/\b([\w]+)(\s*\()/g,'<span class="code-function">$1</span>$2'),e=e.replace(/(\/\/.*$)/gm,'<span class="code-comment">$1</span>'),e=e.replace(/(\/\*[\s\S]*?\*\/)/g,'<span class="code-comment">$1</span>'),e},addLineNumbers:function(e){let t=e.querySelector("code");if(!t)return;let s=t.innerHTML.split(`
5
- `).length,i=document.createElement("div");i.className="vd-code-snippet-line-numbers",i.setAttribute("aria-hidden","true");for(let o=1;o<=s;o++){let r=document.createElement("span");r.textContent=o,i.appendChild(r)}let a=document.createElement("div");a.className="vd-code-snippet-code",a.appendChild(t.cloneNode(!0)),t.parentNode.removeChild(t),e.appendChild(i),e.appendChild(a)},expand:function(e){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;e.dataset.expanded="true";let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&t.setAttribute("aria-expanded","true"),n&&(n.dataset.visible="true")},collapse:function(e){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;e.dataset.expanded="false";let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&t.setAttribute("aria-expanded","false"),n&&(n.dataset.visible="false")},showLang:function(e,t){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;let n=e.querySelector(`.vd-code-snippet-tab[data-lang="${t}"]`),s=e.querySelectorAll(".vd-code-snippet-tab"),i=e.querySelectorAll(".vd-code-snippet-pane");n&&this.switchTab(e,n,s,i)},destroy:function(e){typeof e=="string"&&(e=document.querySelector(e)),e&&(e._codeSnippetCleanup&&(e._codeSnippetCleanup.forEach(t=>t()),delete e._codeSnippetCleanup),delete e.dataset.initialized)},destroyAll:function(){document.querySelectorAll('.vd-code-snippet[data-initialized="true"]').forEach(t=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("codeSnippet",m),window.CodeSnippet=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-collapsible, .accordion").forEach(t=>{this.instances.has(t)||this.initCollapsible(t)})},initCollapsible:function(e){let t=e.classList.contains("accordion"),n=e.querySelectorAll(".vd-collapsible-item, .accordion-item"),s=[];n.forEach(i=>{let a=i.querySelector(".vd-collapsible-header, .accordion-header"),o=i.querySelector(".vd-collapsible-body, .accordion-body"),r=i.querySelector(".vd-collapsible-trigger, .accordion-trigger")||a;if(!a||!o)return;i.classList.contains("is-open")?this.openItem(i,o,!1):this.closeItem(i,o,!1);let l=d=>{d.preventDefault(),this.toggleItem(i,o,e,t)};r.addEventListener("click",l),s.push(()=>r.removeEventListener("click",l))}),this.instances.set(e,{cleanup:s})},toggleItem:function(e,t,n,s){e.classList.contains("is-open")?this.closeItem(e,t):(s&&n.querySelectorAll(".vd-collapsible-item.is-open, .accordion-item.is-open").forEach(o=>{if(o!==e){let r=o.querySelector(".vd-collapsible-body, .accordion-body");this.closeItem(o,r)}}),this.openItem(e,t))},openItem:function(e,t,n=!0){n||(t.style.transition="none"),e.classList.add("is-open"),e.setAttribute("aria-expanded","true");let s=t.scrollHeight;t.style.maxHeight=`${s}px`,n||setTimeout(()=>{t.style.transition=""},0),e.dispatchEvent(new CustomEvent("collapsible:open",{bubbles:!0}))},closeItem:function(e,t,n=!0){n||(t.style.transition="none"),e.classList.remove("is-open"),e.setAttribute("aria-expanded","false"),t.style.maxHeight="0",n||setTimeout(()=>{t.style.transition=""},0),e.dispatchEvent(new CustomEvent("collapsible:close",{bubbles:!0}))},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body");n&&this.openItem(t,n)}},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body");n&&this.closeItem(t,n)}},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body"),s=t.closest(".vd-collapsible, .accordion"),i=s&&s.classList.contains("accordion");n&&this.toggleItem(t,n,s,i)}},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("collapsible",m),window.VanduoCollapsible=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-dropdown").forEach(t=>{this.instances.has(t)||this.initDropdown(t)})},initDropdown:function(e){let t=e.querySelector(".vd-dropdown-toggle"),n=e.querySelector(".vd-dropdown-menu");if(!t||!n)return;let s=[];t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false"),n.setAttribute("role","menu"),n.setAttribute("aria-hidden","true");let i=l=>{l.preventDefault(),l.stopPropagation(),this.toggleDropdown(e,t,n)};t.addEventListener("click",i),s.push(()=>t.removeEventListener("click",i));let a=l=>{!e.contains(l.target)&&n.classList.contains("is-open")&&this.closeDropdown(e,t,n)};document.addEventListener("click",a),s.push(()=>document.removeEventListener("click",a));let o=l=>{this.handleKeydown(l,e,t,n)};t.addEventListener("keydown",o),s.push(()=>t.removeEventListener("keydown",o)),n.querySelectorAll(".vd-dropdown-item:not(.disabled):not(.is-disabled)").forEach(l=>{let d=u=>{u.preventDefault(),this.selectItem(l,e,t,n)};l.addEventListener("click",d),s.push(()=>l.removeEventListener("click",d));let c=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),this.selectItem(l,e,t,n))};l.addEventListener("keydown",c),s.push(()=>l.removeEventListener("keydown",c))}),this.instances.set(e,{toggle:t,menu:n,cleanup:s,typeaheadBuffer:"",typeaheadTimer:null})},toggleDropdown:function(e,t,n){n.classList.contains("is-open")?this.closeDropdown(e,t,n):this.openDropdown(e,t,n)},openDropdown:function(e,t,n){document.querySelectorAll(".vd-dropdown-menu.is-open").forEach(a=>{if(a!==n){let o=a.closest(".vd-dropdown"),r=o.querySelector(".vd-dropdown-toggle");this.closeDropdown(o,r,a)}}),e.classList.add("is-open"),n.classList.add("is-open"),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false"),this.positionMenu(e,n);let i=n.querySelector(".vd-dropdown-item:not(.disabled):not(.is-disabled)");i&&setTimeout(()=>i.focus(),0)},closeDropdown:function(e,t,n){e.classList.remove("is-open"),n.classList.remove("is-open"),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true"),t.focus()},positionMenu:function(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=8;n.left+s.width>i-o&&(t.classList.add("vd-dropdown-menu-end"),t.classList.remove("vd-dropdown-menu-start")),t.classList.contains("dropdown-menu-top")?n.top-s.height<o&&t.classList.remove("vd-dropdown-menu-top"):n.bottom+s.height>a-o&&t.classList.add("vd-dropdown-menu-top")},handleKeydown:function(e,t,n,s){let i=s.classList.contains("is-open"),a=Array.from(s.querySelectorAll(".vd-dropdown-item:not(.disabled):not(.is-disabled)")),o=a.findIndex(r=>r===document.activeElement);switch(e.key){case"Enter":case" ":case"ArrowDown":if(e.preventDefault(),!i)this.openDropdown(t,n,s);else if(e.key==="ArrowDown"){let r=o<a.length-1?o+1:0;a[r].focus()}break;case"ArrowUp":if(i){e.preventDefault();let r=o>0?o-1:a.length-1;a[r].focus()}break;case"Escape":i&&(e.preventDefault(),this.closeDropdown(t,n,s));break;case"Home":i&&(e.preventDefault(),a[0].focus());break;case"End":i&&(e.preventDefault(),a[a.length-1].focus());break;default:if(i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let r=this.instances.get(t);if(!r)break;clearTimeout(r.typeaheadTimer),r.typeaheadBuffer+=e.key.toLowerCase();let l=a.find(d=>d.textContent.trim().toLowerCase().startsWith(r.typeaheadBuffer));l&&l.focus(),r.typeaheadTimer=setTimeout(()=>{r.typeaheadBuffer=""},500)}break}},selectItem:function(e,t,n,s){s.querySelectorAll(".vd-dropdown-item").forEach(i=>{i.classList.remove("active","is-active")}),e.classList.add("active","is-active"),(n.tagName==="BUTTON"||n.classList.contains("btn"))&&(n.textContent=e.textContent.trim()),this.closeDropdown(t,n,s),e.dispatchEvent(new CustomEvent("dropdown:select",{bubbles:!0,detail:{item:e,value:e.dataset.value||e.textContent}}))},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-dropdown-toggle"),s=t.querySelector(".vd-dropdown-menu");n&&s&&this.openDropdown(t,n,s)}},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-dropdown-toggle"),s=t.querySelector(".vd-dropdown-menu");n&&s&&this.closeDropdown(t,n,s)}},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("dropdown",m),window.VanduoDropdown=m})();(function(){"use strict";let m={STORAGE_KEY:"vanduo-font-preference",isInitialized:!1,fonts:{system:{name:"System Default",family:null},inter:{name:"Inter",family:"'Inter', sans-serif"},"source-sans":{name:"Source Sans 3",family:"'Source Sans 3', sans-serif"},"fira-sans":{name:"Fira Sans",family:"'Fira Sans', sans-serif"},"ibm-plex":{name:"IBM Plex Sans",family:"'IBM Plex Sans', sans-serif"},"jetbrains-mono":{name:"JetBrains Mono",family:"'JetBrains Mono', monospace"},ubuntu:{name:"Ubuntu",family:"'Ubuntu', sans-serif",category:"sans-serif",description:"Friendly, humanist sans-serif"},"open-sans":{name:"Open Sans",family:"'Open Sans', sans-serif",category:"sans-serif",description:"Neutral, highly readable"},rubik:{name:"Rubik",family:"'Rubik', sans-serif",category:"sans-serif",description:"Modern, geometric"},"titillium-web":{name:"Titillium Web",family:"'Titillium Web', sans-serif",category:"sans-serif",description:"Technical, elegant"}},init:function(){if(this.state={preference:this.getPreference()},this.isInitialized){this.applyFont(),this.renderUI(),this.updateUI();return}this.isInitialized=!0,this.applyFont(),this.renderUI(),console.log("Vanduo Font Switcher initialized")},getPreference:function(){return this.getStorageValue(this.STORAGE_KEY,"ubuntu")},setPreference:function(e){if(!this.fonts[e]){console.warn("Unknown font:",e);return}this.state.preference=e,this.setStorageValue(this.STORAGE_KEY,e),this.applyFont(),this.updateUI();let t=new CustomEvent("font:change",{bubbles:!0,detail:{font:e,fontData:this.fonts[e]}});document.dispatchEvent(t)},applyFont:function(){let e=this.state.preference;e==="system"?document.documentElement.removeAttribute("data-font"):document.documentElement.setAttribute("data-font",e)},renderUI:function(){document.querySelectorAll('[data-toggle="font"]').forEach(t=>{if(t.getAttribute("data-font-initialized")==="true"){t.tagName==="SELECT"&&(t.value=this.state.preference);return}if(t.tagName==="SELECT"){t.value=this.state.preference;let n=s=>{this.setPreference(s.target.value)};t.addEventListener("change",n),t._fontToggleHandler=n}else{let n=()=>{let s=Object.keys(this.fonts),a=(s.indexOf(this.state.preference)+1)%s.length;this.setPreference(s[a])};t.addEventListener("click",n),t._fontToggleHandler=n}t.setAttribute("data-font-initialized","true")})},updateUI:function(){document.querySelectorAll('[data-toggle="font"]').forEach(t=>{if(t.tagName==="SELECT")t.value=this.state.preference;else{let n=t.querySelector(".font-current-label");n&&(n.textContent=this.fonts[this.state.preference].name)}})},getCurrentFont:function(){return this.state.preference},getFontData:function(e){return this.fonts[e]||null},destroyAll:function(){document.querySelectorAll('[data-toggle="font"][data-font-initialized="true"]').forEach(t=>{if(t._fontToggleHandler){let n=t.tagName==="SELECT"?"change":"click";t.removeEventListener(n,t._fontToggleHandler),delete t._fontToggleHandler}t.removeAttribute("data-font-initialized")}),this.isInitialized=!1},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}}};window.Vanduo&&window.Vanduo.register("fontSwitcher",m),window.FontSwitcher=m})();(function(){"use strict";let m=(function(){try{return CSS.supports("selector(:has(*))")}catch{return!1}})(),e={instances:new Map,init:function(){document.querySelectorAll("[data-layout-mode]").forEach(function(n){this.instances.has(n)||this.initContainer(n)}.bind(this)),this.initToggleButtons()},initContainer:function(t){let n=t.getAttribute("data-layout-mode")||"standard",s=[];this.applyMode(t,n),t.setAttribute("role","region"),t.setAttribute("aria-label","Grid layout: "+n+" mode"),this.instances.set(t,{cleanup:s,mode:n})},initToggleButtons:function(){document.querySelectorAll("[data-grid-toggle]").forEach(function(n){if(n.getAttribute("data-grid-initialized")==="true")return;let s=function(i){i.preventDefault();let a=n.getAttribute("data-grid-toggle"),o;a?o=document.querySelector(a):o=n.closest("[data-layout-mode]"),o&&this.toggle(o)}.bind(this);n.addEventListener("click",s),n.setAttribute("data-grid-initialized","true"),n.setAttribute("aria-pressed","false"),n._gridCleanup=function(){n.removeEventListener("click",s),n.removeAttribute("data-grid-initialized"),n.removeAttribute("aria-pressed")}}.bind(this))},applyFibFallback:function(t){if(m)return;t.querySelectorAll(".vd-row, .row").forEach(function(s){let a=s.querySelectorAll(':scope > [class*="vd-col-"], :scope > [class*="col-"]').length;a===1?s.style.gridTemplateColumns="1fr":a===2?s.style.gridTemplateColumns="1fr 1.618fr":a===3?s.style.gridTemplateColumns="2fr 3fr 5fr":a===4?s.style.gridTemplateColumns="1fr 2fr 3fr 5fr":s.style.gridTemplateColumns="repeat("+a+", 1fr)"})},removeFibFallback:function(t){t.querySelectorAll(".vd-row, .row").forEach(function(s){s.style.gridTemplateColumns=""})},applyMode:function(t,n){t.classList.remove("vd-grid-standard","vd-grid-fibonacci"),n==="fibonacci"?(t.classList.add("vd-grid-fibonacci"),this.applyFibFallback(t)):(t.classList.add("vd-grid-standard"),this.removeFibFallback(t)),t.setAttribute("data-layout-mode",n),t.setAttribute("aria-label","Grid layout: "+n+" mode"),document.querySelectorAll("[data-grid-toggle]").forEach(function(o){let r=o.getAttribute("data-grid-toggle");if(r&&t.matches(r)){let l=n==="fibonacci";l?o.classList.add("is-active"):o.classList.remove("is-active"),o.setAttribute("aria-pressed",l?"true":"false")}});let i=this.instances.get(t);i&&(i.mode=n);let a;try{a=new CustomEvent("grid:modechange",{bubbles:!0,detail:{container:t,mode:n}})}catch{a=document.createEvent("CustomEvent"),a.initCustomEvent("grid:modechange",!0,!0,{container:t,mode:n})}t.dispatchEvent(a)},toggle:function(t){if(typeof t=="string"&&(t=document.querySelector(t)),!t)return;let s=(t.getAttribute("data-layout-mode")||"standard")==="fibonacci"?"standard":"fibonacci";this.applyMode(t,s)},setMode:function(t,n){typeof t=="string"&&(t=document.querySelector(t)),t&&(n!=="fibonacci"&&n!=="standard"||this.applyMode(t,n))},getMode:function(t){return typeof t=="string"&&(t=document.querySelector(t)),t?t.getAttribute("data-layout-mode")||"standard":null},destroy:function(t){let n=this.instances.get(t);n&&(n.cleanup.forEach(function(s){s()}),t.classList.remove("vd-grid-standard","vd-grid-fibonacci"),t.removeAttribute("aria-label"),this.removeFibFallback(t),this.instances.delete(t))},destroyAll:function(){this.instances.forEach(function(n,s){this.destroy(s)}.bind(this)),document.querySelectorAll('[data-grid-initialized="true"]').forEach(function(n){n._gridCleanup&&(n._gridCleanup(),delete n._gridCleanup)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("gridLayout",e),window.VanduoGridLayout=e})();(function(){"use strict";let m={backdrop:null,container:null,img:null,closeBtn:null,caption:null,currentTrigger:null,scrollThreshold:50,initialScrollY:0,isOpen:!1,_cleanupFunctions:[],init:function(){this.createBackdrop(),this.bindTriggers()},createBackdrop:function(){if(this.backdrop||document.querySelector(".vd-image-box-backdrop")){this.backdrop||(this.backdrop=document.querySelector(".vd-image-box-backdrop"),this.container=this.backdrop.querySelector(".vd-image-box-container"),this.img=this.backdrop.querySelector(".vd-image-box-img"),this.closeBtn=this.backdrop.querySelector(".vd-image-box-close"),this.caption=this.backdrop.querySelector(".vd-image-box-caption"),this.bindBackdropEvents());return}this.backdrop=document.createElement("div"),this.backdrop.className="vd-image-box-backdrop",this.backdrop.setAttribute("role","dialog"),this.backdrop.setAttribute("aria-modal","true"),this.backdrop.setAttribute("aria-label","Image viewer"),this.backdrop.setAttribute("tabindex","-1"),this.container=document.createElement("div"),this.container.className="vd-image-box-container",this.img=document.createElement("img"),this.img.className="vd-image-box-img",this.img.alt="",this.closeBtn=document.createElement("button"),this.closeBtn.className="vd-image-box-close",this.closeBtn.setAttribute("aria-label","Close image viewer"),this.closeBtn.innerHTML="&times;",this.caption=document.createElement("div"),this.caption.className="vd-image-box-caption",this.container.appendChild(this.img),this.backdrop.appendChild(this.closeBtn),this.backdrop.appendChild(this.container),this.backdrop.appendChild(this.caption),document.body.appendChild(this.backdrop),this.bindBackdropEvents()},bindBackdropEvents:function(){let e=this,t=function(o){(o.target===e.backdrop||o.target===e.container)&&e.close()};this.backdrop.addEventListener("click",t),this._cleanupFunctions.push(()=>this.backdrop.removeEventListener("click",t));let n=function(){e.close()};this.img.addEventListener("click",n),this._cleanupFunctions.push(()=>this.img.removeEventListener("click",n));let s=function(){e.close()};this.closeBtn.addEventListener("click",s),this._cleanupFunctions.push(()=>this.closeBtn.removeEventListener("click",s));let i=function(o){o.key==="Escape"&&e.isOpen&&e.close()};document.addEventListener("keydown",i),this._cleanupFunctions.push(()=>document.removeEventListener("keydown",i));let a=function(){if(!e.isOpen)return;let o=window.scrollY;Math.abs(o-e.initialScrollY)>e.scrollThreshold&&e.close()};window.addEventListener("scroll",a,{passive:!0}),this._cleanupFunctions.push(()=>window.removeEventListener("scroll",a))},bindTriggers:function(){let e=this;document.querySelectorAll("[data-image-box]").forEach(function(n){if(n.dataset.imageBoxInitialized)return;if(n.dataset.imageBoxInitialized="true",n.classList.add("vd-image-box-trigger"),n.tagName==="IMG"){n.complete&&n.naturalWidth===0&&n.classList.add("is-broken");let i=function(){n.classList.add("is-broken")};n.addEventListener("error",i);let a=function(){n.classList.remove("is-broken")};n.addEventListener("load",a)}let s=function(i){i.preventDefault(),e.open(n)};if(n.addEventListener("click",s),n._imageBoxCleanup=()=>n.removeEventListener("click",s),n.tagName!=="BUTTON"&&n.tagName!=="A"){n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.setAttribute("aria-label","View enlarged image");let i=function(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e.open(n))};n.addEventListener("keydown",i);let a=n._imageBoxCleanup;n._imageBoxCleanup=()=>{a(),n.removeEventListener("keydown",i)}}})},open:function(e){if(this.isOpen)return;this.currentTrigger=e,this.isOpen=!0,this.initialScrollY=window.scrollY;let t=e.dataset.imageBoxFullSrc||e.dataset.imageBoxSrc||e.src||e.href;if(!t){console.warn("[Vanduo ImageBox] No image source found for trigger:",e);return}let n=e.dataset.imageBoxCaption||e.alt||"";this.img.src=t,this.img.alt=e.alt||"",n?(this.caption.textContent=n,this.caption.style.display="block"):this.caption.style.display="none";let s=window.innerWidth-document.documentElement.clientWidth;document.body.style.setProperty("--scrollbar-width",`${s}px`),document.body.classList.add("body-image-box-open"),this.backdrop.classList.add("is-visible"),this.backdrop.focus(),e.dispatchEvent(new CustomEvent("imageBox:open",{bubbles:!0,detail:{src:t}})),this.img.complete||(this.img.style.opacity="0",this._imgLoadHandler=()=>{this.img.style.opacity=""},this.img.addEventListener("load",this._imgLoadHandler,{once:!0}))},close:function(){this.isOpen&&(this.isOpen=!1,this.backdrop.classList.remove("is-visible"),document.body.classList.remove("body-image-box-open"),document.body.style.removeProperty("--scrollbar-width"),this.currentTrigger&&(this.currentTrigger.focus(),this.currentTrigger.dispatchEvent(new CustomEvent("imageBox:close",{bubbles:!0})),this.currentTrigger=null),setTimeout(()=>{this.isOpen||(this._imgLoadHandler&&(this.img.removeEventListener("load",this._imgLoadHandler),this._imgLoadHandler=null),this.img.src="",this.img.alt="")},300))},reinit:function(){this.bindTriggers()},destroy:function(){this.isOpen&&this.close(),this.backdrop&&this.backdrop.parentNode&&this.backdrop.parentNode.removeChild(this.backdrop),this._cleanupFunctions.forEach(t=>t()),this._cleanupFunctions=[],document.querySelectorAll("[data-image-box-initialized]").forEach(t=>{t.classList.remove("vd-image-box-trigger"),t._imageBoxCleanup&&(t._imageBoxCleanup(),delete t._imageBoxCleanup),delete t.dataset.imageBoxInitialized}),this.backdrop=null,this.container=null,this.img=null,this.closeBtn=null,this.caption=null,this.currentTrigger=null,this.isOpen=!1},destroyAll:function(){this.destroy()}};typeof window.Vanduo<"u"&&window.Vanduo.register("imageBox",m),window.VanduoImageBox=m})();(function(){"use strict";let m={modals:new Map,openModals:[],zIndexCounter:1050,_triggerCleanups:[],_sharedEscHandler:null,init:function(){document.querySelectorAll(".vd-modal").forEach(n=>{this.modals.has(n)||this.initModal(n)}),document.querySelectorAll("[data-modal]").forEach(n=>{if(n.dataset.modalTriggerInitialized)return;n.dataset.modalTriggerInitialized="true";let s=i=>{i.preventDefault();let a=n.dataset.modal,o=document.querySelector(a);o&&this.open(o)};n.addEventListener("click",s),this._triggerCleanups.push(()=>n.removeEventListener("click",s))})},initModal:function(e){let t=this.createBackdrop(e),n=e.querySelectorAll('.vd-modal-close, [data-dismiss="modal"]'),s=e.querySelector(".vd-modal-dialog");if(!s)return;let i=[];e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-hidden","true"),e.id||(e.id="modal-"+Math.random().toString(36).substr(2,9));let a=e.querySelector(".vd-modal-title");a&&!a.id&&(a.id=e.id+"-title",e.setAttribute("aria-labelledby",a.id)),n.forEach(r=>{let l=()=>{this.close(e)};r.addEventListener("click",l),i.push(()=>r.removeEventListener("click",l))});let o=r=>{r.target===t&&e.dataset.backdrop!=="static"&&this.close(e)};t.addEventListener("click",o),i.push(()=>t.removeEventListener("click",o)),this._sharedEscHandler||(this._sharedEscHandler=r=>{if(r.key==="Escape"&&this.openModals.length>0){let l=this.openModals[this.openModals.length-1];l.dataset.keyboard!=="false"&&this.close(l)}},document.addEventListener("keydown",this._sharedEscHandler)),this.modals.set(e,{backdrop:t,dialog:s,trapHandler:null,cleanup:i})},createBackdrop:function(e){let t=e.querySelector(".vd-modal-backdrop");return t||(t=document.createElement("div"),t.className="vd-modal-backdrop",document.body.appendChild(t)),t},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t){console.warn("[Vanduo Modals] Modal element not found:",e);return}if(!this.modals.has(t)){console.warn("[Vanduo Modals] Modal not initialized:",t);return}let n=this.modals.get(t),{backdrop:s,dialog:i}=n;if(this.zIndexCounter+=10,t.style.zIndex=this.zIndexCounter,s.style.zIndex=this.zIndexCounter-1,this.openModals.push(t),s.classList.add("is-visible"),t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),this.openModals.length===1){document.body.classList.add("body-modal-open");let o=window.innerWidth-document.documentElement.clientWidth;o>0&&(document.body.style.paddingRight=`${o}px`)}let a=this.trapFocus(t);n.trapHandler=a,setTimeout(()=>{let o=this.getFocusableElements(t)[0];o&&o.focus()},100),t.dispatchEvent(new CustomEvent("modal:open",{bubbles:!0}))},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t){console.warn("[Vanduo Modals] Modal element not found:",e);return}if(!this.modals.has(t)){console.warn("[Vanduo Modals] Modal not initialized:",t);return}let n=this.modals.get(t),{backdrop:s,trapHandler:i}=n;i&&(t.removeEventListener("keydown",i),n.trapHandler=null);let a=this.openModals.indexOf(t);if(a>-1&&this.openModals.splice(a,1),t.classList.remove("is-open"),t.setAttribute("aria-hidden","true"),this.openModals.length===0)s.classList.remove("is-visible"),document.body.classList.remove("body-modal-open"),document.body.style.paddingRight="",this.zIndexCounter=1050;else{let r=this.openModals[this.openModals.length-1];this.modals.get(r).backdrop.classList.add("is-visible")}let o=document.querySelector(`[data-modal="#${t.id}"]`);o&&o.focus(),t.dispatchEvent(new CustomEvent("modal:close",{bubbles:!0}))},trapFocus:function(e){let t=this,n=function(s){if(s.key!=="Tab")return;let i=t.getFocusableElements(e),a=i[0],o=i[i.length-1];s.shiftKey?document.activeElement===a&&(s.preventDefault(),o.focus()):document.activeElement===o&&(s.preventDefault(),a.focus())};return e.addEventListener("keydown",n),n},getFocusableElements:function(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(n=>!n.hasAttribute("disabled")&&n.offsetWidth>0&&n.offsetHeight>0)},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.classList.contains("is-open")?this.close(t):this.open(t))},destroy:function(e){let t=this.modals.get(e);t&&(e.classList.contains("is-open")&&this.close(e),t.cleanup&&t.cleanup.forEach(n=>n()),t.backdrop&&t.backdrop.parentNode&&t.backdrop.parentNode.removeChild(t.backdrop),this.modals.delete(e))},destroyAll:function(){this.modals.forEach((e,t)=>{this.destroy(t)}),this._triggerCleanups.forEach(e=>e()),this._triggerCleanups=[],this._sharedEscHandler&&(document.removeEventListener("keydown",this._sharedEscHandler),this._sharedEscHandler=null)}};typeof window.Vanduo<"u"&&window.Vanduo.register("modals",m),window.VanduoModals=m})();(function(){"use strict";let m={instances:new Map,getBreakpoint:function(){let t=getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-lg").trim(),n=parseInt(t,10);return isNaN(n)?992:n},init:function(){document.querySelectorAll(".vd-navbar").forEach(t=>{this.instances.has(t)||this.initNavbar(t)})},initNavbar:function(e){let t=e.querySelector(".vd-navbar-toggle, .vd-navbar-burger"),n=e.querySelector(".vd-navbar-menu"),s=e.querySelector(".vd-navbar-overlay")||this.createOverlay(e);if(!t||!n)return;let i=[],a=u=>{u.preventDefault(),u.stopPropagation(),this.toggleMenu(e,t,n,s)};if(t.addEventListener("click",a),i.push(()=>t.removeEventListener("click",a)),s){let u=()=>{this.closeMenu(e,t,n,s)};s.addEventListener("click",u),i.push(()=>s.removeEventListener("click",u))}let o=u=>{u.key==="Escape"&&n.classList.contains("is-open")&&this.closeMenu(e,t,n,s)};document.addEventListener("keydown",o),i.push(()=>document.removeEventListener("keydown",o));let r,l=()=>{clearTimeout(r),r=setTimeout(()=>{let u=this.getBreakpoint();window.innerWidth>=u&&n.classList.contains("is-open")&&this.closeMenu(e,t,n,s)},250)};window.addEventListener("resize",l),i.push(()=>{clearTimeout(r),window.removeEventListener("resize",l)});let d=u=>{n.classList.contains("is-open")&&!e.contains(u.target)&&!n.contains(u.target)&&this.closeMenu(e,t,n,s)};document.addEventListener("click",d),i.push(()=>document.removeEventListener("click",d)),n.querySelectorAll(".vd-navbar-dropdown > .vd-nav-link, .vd-navbar-dropdown > .nav-link").forEach(u=>{let h=p=>{let v=this.getBreakpoint();if(window.innerWidth<v){p.preventDefault();let C=u.parentElement.querySelector(".vd-navbar-dropdown-menu");C&&C.classList.toggle("is-open")}};u.addEventListener("click",h),i.push(()=>u.removeEventListener("click",h))}),this.instances.set(e,{toggle:t,menu:n,overlay:s,cleanup:i})},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.overlay&&t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})},toggleMenu:function(e,t,n,s){n.classList.contains("is-open")?this.closeMenu(e,t,n,s):this.openMenu(e,t,n,s)},openMenu:function(e,t,n,s){n.classList.add("is-open"),t.classList.add("is-active"),s&&s.classList.add("is-active"),document.body.classList.add("body-navbar-open"),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false")},closeMenu:function(e,t,n,s){n.classList.remove("is-open"),t.classList.remove("is-active"),s&&s.classList.remove("is-active"),document.body.classList.remove("body-navbar-open"),n.querySelectorAll(".vd-navbar-dropdown-menu.is-open").forEach(a=>{a.classList.remove("is-open")}),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true")},createOverlay:function(e){let t=document.createElement("div");return t.className="vd-navbar-overlay",document.body.appendChild(t),t}};typeof window.Vanduo<"u"&&window.Vanduo.register("navbar",m),window.VanduoNavbar=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-pagination[data-pagination]").forEach(t=>{this.instances.has(t)||this.initPagination(t)})},initPagination:function(e){let t=parseInt(e.dataset.totalPages)||1,n=parseInt(e.dataset.currentPage)||1,s=parseInt(e.dataset.maxVisible)||7;this.render(e,{totalPages:t,currentPage:n,maxVisible:s});let i=a=>{let o=a.target.closest(".vd-pagination-link");if(!o||o.closest(".vd-pagination-item.disabled")||o.closest(".vd-pagination-item.active"))return;a.preventDefault();let r=o.closest(".vd-pagination-item"),l=r.dataset.page;l?this.goToPage(e,parseInt(l)):r.classList.contains("pagination-prev")?this.prevPage(e):r.classList.contains("pagination-next")&&this.nextPage(e)};e.addEventListener("click",i),this.instances.set(e,{cleanup:[()=>e.removeEventListener("click",i)]})},render:function(e,t){let{totalPages:n,currentPage:s,maxVisible:i}=t;if(n<=1){e.innerHTML="";return}let a="";a+=`<li class="vd-pagination-item vd-pagination-prev pagination-item pagination-prev ${s===1?"disabled":""}">`,a+='<a class="vd-pagination-link pagination-link" href="#" aria-label="Previous">Previous</a>',a+="</li>";let o=this.calculatePages(s,n,i),r=0;o.forEach(l=>{if(l==="ellipsis")a+='<li class="vd-pagination-item pagination-item"><span class="vd-pagination-ellipsis pagination-ellipsis">\u2026</span></li>';else{l!==r+1&&r>0&&(a+='<li class="vd-pagination-item pagination-item"><span class="vd-pagination-ellipsis pagination-ellipsis">\u2026</span></li>');let d=Number(l);a+=`<li class="vd-pagination-item pagination-item ${d===s?"active":""}" data-page="${d}">`,a+=`<a class="vd-pagination-link pagination-link" href="#" aria-label="Page ${d}">${d}</a>`,a+="</li>",r=l}}),a+=`<li class="vd-pagination-item vd-pagination-next pagination-item pagination-next ${s===n?"disabled":""}">`,a+='<a class="vd-pagination-link pagination-link" href="#" aria-label="Next">Next</a>',a+="</li>",e.innerHTML=a,e.dataset.currentPage=s},calculatePages:function(e,t,n){let s=[],i=Math.floor(n/2);if(t<=n)for(let a=1;a<=t;a++)s.push(a);else{s.push(1);let a=Math.max(2,e-i),o=Math.min(t-1,e+i);e<=i+1&&(o=Math.min(t-1,n-1)),e>=t-i&&(a=Math.max(2,t-n+2)),a>2&&s.push("ellipsis");for(let r=a;r<=o;r++)s.push(r);o<t-1&&s.push("ellipsis"),t>1&&s.push(t)}return s},goToPage:function(e,t){let n=parseInt(e.dataset.totalPages)||1,s=parseInt(e.dataset.maxVisible)||7;t<1||t>n||(this.render(e,{totalPages:n,currentPage:t,maxVisible:s}),e.dispatchEvent(new CustomEvent("pagination:change",{bubbles:!0,detail:{page:t,totalPages:n}})))},prevPage:function(e){let t=parseInt(e.dataset.currentPage)||1;t>1&&this.goToPage(e,t-1)},nextPage:function(e){let t=parseInt(e.dataset.currentPage)||1,n=parseInt(e.dataset.totalPages)||1;t<n&&this.goToPage(e,t+1)},update:function(e,t){let n=typeof e=="string"?document.querySelector(e):e;n&&(t.totalPages!==void 0&&(n.dataset.totalPages=t.totalPages),t.currentPage!==void 0&&(n.dataset.currentPage=t.currentPage),t.maxVisible!==void 0&&(n.dataset.maxVisible=t.maxVisible),this.render(n,{totalPages:parseInt(n.dataset.totalPages)||1,currentPage:parseInt(n.dataset.currentPage)||1,maxVisible:parseInt(n.dataset.maxVisible)||7}))},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("pagination",m),window.VanduoPagination=m})();(function(){"use strict";let m={parallaxElements:new Map,ticking:!1,isMobile:window.innerWidth<768,reducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches,isInitialized:!1,_onScroll:null,_onResize:null,init:function(){if(this.isInitialized){this.refresh();return}if(this.isInitialized=!0,this.reducedMotion)return;document.querySelectorAll(".vd-parallax").forEach(t=>{t.dataset.parallaxInitialized||this.initParallax(t)}),this.handleScroll(),this._onScroll=()=>{this.handleScroll()},window.addEventListener("scroll",this._onScroll,{passive:!0}),this._onResize=()=>{this.isMobile=window.innerWidth<768,this.updateAll()},window.addEventListener("resize",this._onResize)},initParallax:function(e){e.dataset.parallaxInitialized="true";let t=e.classList.contains("parallax-disable-mobile");if(t&&this.isMobile)return;let n=e.querySelectorAll(".vd-parallax-layer, .vd-parallax-bg"),s=this.getSpeed(e),i=e.classList.contains("parallax-horizontal")?"horizontal":"vertical";this.parallaxElements.set(e,{layers:Array.from(n),speed:s,direction:i,disableMobile:t}),this.updateParallax(e)},getSpeed:function(e){return e.classList.contains("parallax-slow")?.5:e.classList.contains("parallax-fast")?1.5:1},handleScroll:function(){this.ticking||(window.requestAnimationFrame(()=>{this.updateAll(),this.ticking=!1}),this.ticking=!0)},updateAll:function(){this.parallaxElements.forEach((e,t)=>{e.disableMobile&&this.isMobile||this.updateParallax(t)})},updateParallax:function(e){let t=this.parallaxElements.get(e);if(!t)return;let n=e.getBoundingClientRect(),s=window.innerHeight,i=n.top,a=n.height,r=(Math.max(0,Math.min(1,(s-i)/(s+a)))-.5)*t.speed*100;t.layers.forEach((l,d)=>{let c=l.dataset.parallaxSpeed?parseFloat(l.dataset.parallaxSpeed):1,u=r*c;t.direction==="horizontal"?l.style.transform=`translateX(${u}px)`:l.style.transform=`translateY(${u}px)`})},destroy:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&this.parallaxElements.has(t)&&(this.parallaxElements.get(t).layers.forEach(s=>{s.style.transform=""}),this.parallaxElements.delete(t))},refresh:function(){this.updateAll()},destroyAll:function(){this.parallaxElements.forEach((e,t)=>{this.destroy(t)}),this.parallaxElements.clear(),this._onScroll&&(window.removeEventListener("scroll",this._onScroll),this._onScroll=null),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null),this.isInitialized=!1}};typeof window.Vanduo<"u"&&window.Vanduo.register("parallax",m),window.VanduoParallax=m})();(function(){"use strict";let m={init:function(){document.querySelectorAll(".progress-bar[data-progress]").forEach(t=>{t.dataset.progressInitialized||this.initProgressBar(t)})},initProgressBar:function(e){e.dataset.progressInitialized="true";let t=parseInt(e.dataset.progress)||0;this.setProgress(e,t,!1)},setProgress:function(e,t,n=!0){let s=typeof e=="string"?document.querySelector(e):e;if(!s)return;t=Math.max(0,Math.min(100,t)),n?s.style.transition="width var(--transition-duration-slow) var(--transition-ease)":(s.style.transition="none",setTimeout(()=>{s.style.transition=""},0)),s.style.width=t+"%",s.setAttribute("aria-valuenow",t),s.setAttribute("aria-valuemin",0),s.setAttribute("aria-valuemax",100);let i=s.querySelector(".progress-text");i&&(i.textContent=t+"%"),s.dispatchEvent(new CustomEvent("progress:update",{bubbles:!0,detail:{value:t,max:100}})),t>=100&&s.dispatchEvent(new CustomEvent("progress:complete",{bubbles:!0,detail:{value:t,max:100}}))},animateProgress:function(e,t,n=1e3){let s=typeof e=="string"?document.querySelector(e):e;if(!s)return;let i=parseInt(s.style.width)||0,a=t-i,o=performance.now(),r=l=>{let d=l-o,c=Math.min(d/n,1),u=1-Math.pow(1-c,3),h=i+a*u;this.setProgress(s,h,!1),c<1&&requestAnimationFrame(r)};requestAnimationFrame(r)},show:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display="inline-block",t.setAttribute("aria-hidden","false"))},hide:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display="none",t.setAttribute("aria-hidden","true"))},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display==="none"||t.getAttribute("aria-hidden")==="true"?this.show(t):this.hide(t))},destroyAll:function(){document.querySelectorAll('.progress-bar[data-progress-initialized="true"]').forEach(t=>{delete t.dataset.progressInitialized})}};typeof window.Vanduo<"u"&&window.Vanduo.register("preloader",m),window.VanduoPreloader=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("select.vd-custom-select-input, select[data-custom-select]").forEach(t=>{this.instances.has(t)||this.initSelect(t)})},initSelect:function(e){if(e.closest(".vd-custom-select-wrapper"))return;let t=[],n=document.createElement("div");n.className="custom-select-wrapper",e.parentNode.insertBefore(n,e),n.appendChild(e);let s=document.createElement("button");s.type="button",s.className="custom-select-button",s.setAttribute("aria-haspopup","listbox"),s.setAttribute("aria-expanded","false"),s.setAttribute("aria-labelledby",e.id||this.generateId(e));let i=document.createElement("div");if(i.className="custom-select-dropdown",i.setAttribute("role","listbox"),e.dataset.searchable==="true"){let d=document.createElement("div");d.className="custom-select-search";let c=document.createElement("input");c.type="text",c.className="input input-sm",c.placeholder="Search...",c.setAttribute("aria-label","Search options"),d.appendChild(c),i.appendChild(d);let u=p=>{this.filterOptions(i,p.target.value)},h=typeof debounce=="function"?debounce(u,150):u;c.addEventListener("input",h),t.push(()=>c.removeEventListener("input",h))}this.buildOptions(e,i,s),n.appendChild(s),n.appendChild(i),this.updateButtonText(e,s);let a=d=>{d.preventDefault(),d.stopPropagation(),this.toggleDropdown(s,i)};s.addEventListener("click",a),t.push(()=>s.removeEventListener("click",a));let o=d=>{!n.contains(d.target)&&i.classList.contains("is-open")&&this.closeDropdown(s,i)};document.addEventListener("click",o),t.push(()=>document.removeEventListener("click",o));let r=d=>{this.handleKeydown(d,e,s,i)};s.addEventListener("keydown",r),t.push(()=>s.removeEventListener("keydown",r));let l=()=>{this.updateButtonText(e,s),this.updateSelectedOptions(e,i)};e.addEventListener("change",l),t.push(()=>e.removeEventListener("change",l)),this.instances.set(e,{wrapper:n,button:s,dropdown:i,cleanup:t,typeaheadBuffer:"",typeaheadTimer:null})},buildOptions:function(e,t,n){let s=e.querySelectorAll("option"),i=document.createDocumentFragment();s.forEach((a,o)=>{if(a.parentElement.tagName==="OPTGROUP"){let l=a.parentElement;if(!t.querySelector(`[data-group="${l.label}"]`)){let d=document.createElement("div");d.className="custom-select-option-group",d.textContent=l.label,d.dataset.group=l.label,i.appendChild(d)}}if(a.value===""&&!a.textContent.trim())return;let r=document.createElement("div");r.className="custom-select-option",r.textContent=a.textContent,r.setAttribute("role","option"),r.setAttribute("data-value",a.value),r.setAttribute("data-index",o),a.selected&&(r.classList.add("is-selected"),r.setAttribute("aria-selected","true")),a.disabled&&(r.classList.add("is-disabled"),r.setAttribute("aria-disabled","true")),r.addEventListener("click",l=>{a.disabled||this.selectOption(e,a,r,n,t)}),i.appendChild(r)}),t.appendChild(i)},selectOption:function(e,t,n,s,i){e.multiple?(t.selected=!t.selected,n.classList.toggle("is-selected"),n.setAttribute("aria-selected",t.selected)):(e.value=t.value,e.dispatchEvent(new Event("change",{bubbles:!0})),this.closeDropdown(s,i)),this.updateButtonText(e,s)},updateButtonText:function(e,t){if(e.multiple){let n=Array.from(e.selectedOptions);n.length===0?t.textContent=e.dataset.placeholder||"Select options...":n.length===1?t.textContent=n[0].textContent:t.textContent=`${n.length} selected`}else{let n=e.options[e.selectedIndex];t.textContent=n?n.textContent:e.dataset.placeholder||"Select..."}},updateSelectedOptions:function(e,t){let n=t.querySelectorAll(".custom-select-option"),s=Array.from(e.selectedOptions).map(i=>i.value);n.forEach(i=>{let a=i.dataset.value;s.includes(a)?(i.classList.add("is-selected"),i.setAttribute("aria-selected","true")):(i.classList.remove("is-selected"),i.setAttribute("aria-selected","false"))})},toggleDropdown:function(e,t){t.classList.contains("is-open")?this.closeDropdown(e,t):this.openDropdown(e,t)},openDropdown:function(e,t){t.classList.add("is-open"),e.setAttribute("aria-expanded","true");let n=t.querySelector(".custom-select-option:not(.is-disabled)");n&&n.focus()},closeDropdown:function(e,t){t.classList.remove("is-open"),e.setAttribute("aria-expanded","false")},handleKeydown:function(e,t,n,s){let i=s.classList.contains("is-open"),a=Array.from(s.querySelectorAll(".custom-select-option:not(.is-disabled)")),o=a.findIndex(r=>r===document.activeElement);switch(e.key){case"Enter":case" ":if(e.preventDefault(),i&&o>=0){let r=a[o],l=t.options[parseInt(r.dataset.index)];this.selectOption(t,l,r,n,s)}else this.openDropdown(n,s);break;case"Escape":i&&(e.preventDefault(),this.closeDropdown(n,s),n.focus());break;case"ArrowDown":if(e.preventDefault(),!i)this.openDropdown(n,s);else{let r=o<a.length-1?o+1:0;a[r].focus()}break;case"ArrowUp":if(e.preventDefault(),i){let r=o>0?o-1:a.length-1;a[r].focus()}break;case"Home":i&&(e.preventDefault(),a[0].focus());break;case"End":i&&(e.preventDefault(),a[a.length-1].focus());break;default:if(i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let r=this.instances.get(t);if(!r)break;clearTimeout(r.typeaheadTimer),r.typeaheadBuffer+=e.key.toLowerCase();let l=a.find(d=>d.textContent.trim().toLowerCase().startsWith(r.typeaheadBuffer));l&&l.focus(),r.typeaheadTimer=setTimeout(()=>{r.typeaheadBuffer=""},500)}break}},filterOptions:function(e,t){let n=e.querySelectorAll(".vd-custom-select-option"),s=t.toLowerCase();n.forEach(i=>{i.textContent.toLowerCase().includes(s)?i.style.display="block":i.style.display="none"})},generateId:function(e){if(e.id)return e.id;let t="select-"+Math.random().toString(36).substr(2,9);return e.id=t,t},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.wrapper&&t.wrapper.parentNode&&(t.wrapper.parentNode.insertBefore(e,t.wrapper),t.wrapper.parentNode.removeChild(t.wrapper)),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("select",m)})();(function(){"use strict";let m={sidenavs:new Map,breakpoint:992,_globalCleanups:[],isFixedVariant:function(e){return e.classList.contains("vd-sidenav-fixed")||e.classList.contains("sidenav-fixed")},isPushVariant:function(e){return e.classList.contains("vd-sidenav-push")||e.classList.contains("sidenav-push")},isRightVariant:function(e){return e.classList.contains("vd-sidenav-right")||e.classList.contains("sidenav-right")},init:function(){document.querySelectorAll(".vd-sidenav, .vd-offcanvas").forEach(s=>{this.sidenavs.has(s)||this.initSidenav(s)}),document.querySelectorAll("[data-sidenav-toggle]").forEach(s=>{if(s.dataset.sidenavToggleInitialized)return;s.dataset.sidenavToggleInitialized="true";let i=a=>{a.preventDefault();let o=s.dataset.sidenavToggle,r=document.querySelector(o);r&&this.toggle(r)};s.addEventListener("click",i),this._globalCleanups.push(()=>s.removeEventListener("click",i))}),this.handleResize();let n=()=>{this.handleResize()};window.addEventListener("resize",n),this._globalCleanups.push(()=>window.removeEventListener("resize",n))},initSidenav:function(e){let t=e.getAttribute("data-vd-position");if(t){let r=e.classList.contains("vd-offcanvas")?"vd-offcanvas":"vd-sidenav";e.classList.add(r+"-"+t)}let n=this.createOverlay(e),s=e.querySelector(".vd-sidenav-close, .vd-offcanvas-close"),i=[];if(e.setAttribute("role","navigation"),e.setAttribute("aria-hidden","true"),s){let r=()=>{this.close(e)};s.addEventListener("click",r),i.push(()=>s.removeEventListener("click",r))}let a=()=>{e.dataset.backdrop!=="static"&&this.close(e)};n.addEventListener("click",a),i.push(()=>n.removeEventListener("click",a));let o=r=>{r.key==="Escape"&&e.classList.contains("is-open")&&e.dataset.keyboard!=="false"&&this.close(e)};document.addEventListener("keydown",o),i.push(()=>document.removeEventListener("keydown",o)),this.sidenavs.set(e,{overlay:n,cleanup:i})},createOverlay:function(e){let t=e.querySelector(".vd-sidenav-overlay");return t||(t=document.createElement("div"),t.className="vd-sidenav-overlay",document.body.appendChild(t)),t},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t||!this.sidenavs.has(t))return;let{overlay:n}=this.sidenavs.get(t);this.isFixedVariant(t)||n.classList.add("is-visible"),t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),document.body.classList.add("body-sidenav-open"),this.isPushVariant(t)&&this.handlePushVariant(t,!0),t.dispatchEvent(new CustomEvent("sidenav:open",{bubbles:!0}))},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t||!this.sidenavs.has(t))return;let{overlay:n}=this.sidenavs.get(t);n.classList.remove("is-visible"),t.classList.remove("is-open"),t.setAttribute("aria-hidden","true"),document.body.classList.remove("body-sidenav-open"),this.isPushVariant(t)&&this.handlePushVariant(t,!1),t.dispatchEvent(new CustomEvent("sidenav:close",{bubbles:!0}))},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.classList.contains("is-open")?this.close(t):this.open(t))},handlePushVariant:function(e,t){let n=document.querySelector('main, .main-content, .content, [role="main"]')||document.body;t?window.innerWidth>=this.breakpoint&&(this.isRightVariant(e)?n.style.marginRight=e.offsetWidth+"px":n.style.marginLeft=e.offsetWidth+"px"):(n.style.marginLeft="",n.style.marginRight="")},handleResize:function(){this.sidenavs.forEach(({overlay:e},t)=>{window.innerWidth>=this.breakpoint?this.isFixedVariant(t)&&!t.classList.contains("is-open")&&(t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),e.classList.remove("is-visible")):this.isFixedVariant(t)&&t.classList.contains("is-open")&&this.close(t)})},destroy:function(e){let t=this.sidenavs.get(e);t&&(e.classList.contains("is-open")&&this.close(e),t.cleanup.forEach(n=>n()),t.overlay&&t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay),this.sidenavs.delete(e))},destroyAll:function(){this.sidenavs.forEach((e,t)=>{this.destroy(t)}),this._globalCleanups.forEach(e=>e()),this._globalCleanups=[]}};typeof window.Vanduo<"u"&&window.Vanduo.register("sidenav",m),window.VanduoSidenav=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-tabs, [data-tabs]").forEach(t=>{this.instances.has(t)||this.initTabs(t)})},initTabs:function(e){let t=e.querySelector('.vd-tab-list, [role="tablist"]'),n=e.querySelectorAll(".vd-tab-link, [data-tab]"),s=e.querySelectorAll(".vd-tab-pane, [data-tab-pane]");if(!t||n.length===0)return;let i=[];t.setAttribute("role","tablist"),n.forEach((o,r)=>{let l=o.dataset.tab||o.getAttribute("href")?.replace("#","")||`tab-${r}`,d=this.findPane(e,l,s);o.setAttribute("role","tab"),o.setAttribute("aria-selected",o.classList.contains("is-active")?"true":"false"),o.setAttribute("tabindex",o.classList.contains("is-active")?"0":"-1"),o.id||(o.id=`tab-btn-${l}`),d&&(d.setAttribute("role","tabpanel"),d.setAttribute("aria-labelledby",o.id),d.id||(d.id=`tab-pane-${l}`),o.setAttribute("aria-controls",d.id));let c=h=>{h.preventDefault(),!o.classList.contains("disabled")&&!o.disabled&&this.activateTab(e,o,n,s)};o.addEventListener("click",c),i.push(()=>o.removeEventListener("click",c));let u=h=>{this.handleKeydown(h,e,o,n,s)};o.addEventListener("keydown",u),i.push(()=>o.removeEventListener("keydown",u))}),!e.querySelector(".vd-tab-link.is-active, [data-tab].is-active")&&n.length>0&&this.activateTab(e,n[0],n,s),this.instances.set(e,{cleanup:i})},findPane:function(e,t,n){let s=e.querySelector(`[data-tab-pane="${t}"]`);return s||(s=e.querySelector(`#${t}`)),s||e.querySelectorAll(".vd-tab-link, [data-tab]").forEach((a,o)=>{(a.dataset.tab||a.getAttribute("href")?.replace("#",""))===t&&n[o]&&(s=n[o])}),s},activateTab:function(e,t,n,s){let i=t.dataset.tab||t.getAttribute("href")?.replace("#","")||t.id;n.forEach(r=>{r.classList.remove("is-active"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1"),r.parentElement&&r.parentElement.classList.contains("tab-item")&&r.parentElement.classList.remove("is-active")}),s.forEach(r=>{r.classList.remove("is-active")}),t.classList.add("is-active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0"),t.parentElement&&t.parentElement.classList.contains("tab-item")&&t.parentElement.classList.add("is-active");let a=this.findPane(e,i,s);a&&a.classList.add("is-active");let o=new CustomEvent("tab:change",{bubbles:!0,detail:{tab:t,pane:a,tabId:i}});e.dispatchEvent(o)},handleKeydown:function(e,t,n,s,i){let a=t.classList.contains("tabs-vertical"),o=Array.from(s).filter(d=>!d.classList.contains("disabled")&&!d.disabled),r=o.indexOf(n),l=r;switch(e.key){case"ArrowLeft":a||(e.preventDefault(),l=r>0?r-1:o.length-1);break;case"ArrowRight":a||(e.preventDefault(),l=r<o.length-1?r+1:0);break;case"ArrowUp":a&&(e.preventDefault(),l=r>0?r-1:o.length-1);break;case"ArrowDown":a&&(e.preventDefault(),l=r<o.length-1?r+1:0);break;case"Home":e.preventDefault(),l=0;break;case"End":e.preventDefault(),l=o.length-1;break;case"Enter":case" ":e.preventDefault(),this.activateTab(t,n,s,i);return;default:return}l!==r&&(o[l].focus(),this.activateTab(t,o[l],s,i))},show:function(e){let t;if(typeof e=="string"?t=document.querySelector(`[data-tab="${e}"], [href="#${e}"]`):t=e,!t)return;let n=t.closest(".vd-tabs, [data-tabs]");if(!n)return;let s=n.querySelectorAll(".vd-tab-link, [data-tab]"),i=n.querySelectorAll(".vd-tab-pane, [data-tab-pane]");this.activateTab(n,t,s,i)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("tabs",m)})();(function(){"use strict";let m={STORAGE_KEYS:{PRIMARY:"vanduo-primary-color",NEUTRAL:"vanduo-neutral-color",RADIUS:"vanduo-radius",FONT:"vanduo-font-preference",THEME:"vanduo-theme-preference"},DEFAULTS:{PRIMARY_LIGHT:"black",PRIMARY_DARK:"amber",NEUTRAL:"neutral",RADIUS:"0.5",FONT:"ubuntu",THEME:"system"},PRIMARY_COLORS:{black:{name:"Black",color:"#000000"},red:{name:"Red",color:"#fa5252"},orange:{name:"Orange",color:"#fd7e14"},amber:{name:"Amber",color:"#f59f00"},yellow:{name:"Yellow",color:"#fcc419"},lime:{name:"Lime",color:"#82c91e"},green:{name:"Green",color:"#40c057"},emerald:{name:"Emerald",color:"#20c997"},teal:{name:"Teal",color:"#12b886"},cyan:{name:"Cyan",color:"#22b8cf"},sky:{name:"Sky",color:"#3bc9db"},blue:{name:"Blue",color:"#228be6"},indigo:{name:"Indigo",color:"#4c6ef5"},violet:{name:"Violet",color:"#7950f2"},purple:{name:"Purple",color:"#be4bdb"},fuchsia:{name:"Fuchsia",color:"#f06595"},pink:{name:"Pink",color:"#e64980"},rose:{name:"Rose",color:"#ff8787"}},NEUTRAL_COLORS:{slate:{name:"Slate",color:"#64748b"},gray:{name:"Gray",color:"#6b7280"},zinc:{name:"Zinc",color:"#71717a"},neutral:{name:"Neutral",color:"#737373"},stone:{name:"Stone",color:"#78716c"}},RADIUS_OPTIONS:["0","0.125","0.25","0.375","0.5"],FONT_OPTIONS:{"jetbrains-mono":{name:"JetBrains Mono",family:"'JetBrains Mono', monospace"},inter:{name:"Inter",family:"'Inter', sans-serif"},"source-sans":{name:"Source Sans 3",family:"'Source Sans 3', sans-serif"},"fira-sans":{name:"Fira Sans",family:"'Fira Sans', sans-serif"},"ibm-plex":{name:"IBM Plex Sans",family:"'IBM Plex Sans', sans-serif"},system:{name:"System Default",family:null},ubuntu:{name:"Ubuntu",family:"'Ubuntu', sans-serif"},"open-sans":{name:"Open Sans",family:"'Open Sans', sans-serif"},rubik:{name:"Rubik",family:"'Rubik', sans-serif"},"titillium-web":{name:"Titillium Web",family:"'Titillium Web', sans-serif"}},THEME_MODES:["system","dark","light"],state:{primary:null,neutral:null,radius:null,font:null,theme:null,isOpen:!1},isInitialized:!1,_cleanup:[],elements:{customizer:null,trigger:null,panel:null,overlay:null},init:function(){if(this.isInitialized){this.bindExistingElements(),this.bindPanelEvents(),this.updateUI();return}this.isInitialized=!0,this._cleanup=[],this.loadPreferences(),this.applyAllPreferences(),this.bindExistingElements(),this.bindEvents(),console.log("Vanduo Theme Customizer initialized")},addListener:function(e,t,n,s){e&&(e.addEventListener(t,n,s),this._cleanup.push(()=>e.removeEventListener(t,n,s)))},getDefaultPrimary:function(e){return e==="system"?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?this.DEFAULTS.PRIMARY_DARK:this.DEFAULTS.PRIMARY_LIGHT:e==="dark"?this.DEFAULTS.PRIMARY_DARK:this.DEFAULTS.PRIMARY_LIGHT},loadPreferences:function(){this.state.theme=this.getStorageValue(this.STORAGE_KEYS.THEME,this.DEFAULTS.THEME),this.state.primary=this.getStorageValue(this.STORAGE_KEYS.PRIMARY,this.getDefaultPrimary(this.state.theme)),this.state.neutral=this.getStorageValue(this.STORAGE_KEYS.NEUTRAL,this.DEFAULTS.NEUTRAL),this.state.radius=this.getStorageValue(this.STORAGE_KEYS.RADIUS,this.DEFAULTS.RADIUS),this.state.font=this.getStorageValue(this.STORAGE_KEYS.FONT,this.DEFAULTS.FONT)},savePreference:function(e,t){this.setStorageValue(e,t)},applyAllPreferences:function(){this.applyPrimary(this.state.primary),this.applyNeutral(this.state.neutral),this.applyRadius(this.state.radius),this.applyFont(this.state.font),this.applyTheme(this.state.theme)},applyPrimary:function(e){this.PRIMARY_COLORS[e]||(e=this.getDefaultPrimary(this.state.theme)),this.state.primary=e,document.documentElement.setAttribute("data-primary",e),this.savePreference(this.STORAGE_KEYS.PRIMARY,e),this.dispatchEvent("primary-change",{color:e})},applyNeutral:function(e){this.NEUTRAL_COLORS[e]||(e=this.DEFAULTS.NEUTRAL),this.state.neutral=e,document.documentElement.setAttribute("data-neutral",e),this.savePreference(this.STORAGE_KEYS.NEUTRAL,e),this.dispatchEvent("neutral-change",{neutral:e})},applyRadius:function(e){this.RADIUS_OPTIONS.includes(e)||(e=this.DEFAULTS.RADIUS),this.state.radius=e,document.documentElement.setAttribute("data-radius",e),document.documentElement.style.setProperty("--radius-scale",e),this.savePreference(this.STORAGE_KEYS.RADIUS,e),this.dispatchEvent("radius-change",{radius:e})},applyFont:function(e){this.FONT_OPTIONS[e]||(e=this.DEFAULTS.FONT),this.state.font=e,e==="system"?document.documentElement.removeAttribute("data-font"):document.documentElement.setAttribute("data-font",e),this.savePreference(this.STORAGE_KEYS.FONT,e),window.FontSwitcher&&window.FontSwitcher.setPreference&&(window.FontSwitcher.state.preference=e,window.FontSwitcher.applyFont()),this.dispatchEvent("font-change",{font:e})},applyTheme:function(e){this.THEME_MODES.includes(e)||(e=this.DEFAULTS.THEME),this._isApplying=!0;let t=this.state.theme,n=this.getDefaultPrimary(t);if(this.state.primary===n){let s=this.getDefaultPrimary(e);s!==this.state.primary&&this.applyPrimary(s)}if(this.state.theme=e,e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e),this.savePreference(this.STORAGE_KEYS.THEME,e),window.Vanduo&&window.Vanduo.components.themeSwitcher){let s=window.Vanduo.components.themeSwitcher;s.state&&s.state.preference!==e&&(s.state.preference=e,typeof s.setStorageValue=="function"&&s.setStorageValue(s.STORAGE_KEY,e),typeof s.updateUI=="function"&&s.updateUI())}this._isApplying=!1,this.dispatchEvent("mode-change",{mode:e})},dispatchEvent:function(e,t){let n=new CustomEvent("theme:"+e,{bubbles:!0,detail:t});document.dispatchEvent(n);let s=new CustomEvent("theme:change",{bubbles:!0,detail:{type:e,value:t[Object.keys(t)[0]],state:{...this.state}}});document.dispatchEvent(s)},bindExistingElements:function(){if(this.elements.customizer=document.querySelector(".vd-theme-customizer"),this.elements.customizer)this.elements.trigger=this.elements.customizer.querySelector(".vd-theme-customizer-trigger"),this.elements.panel=this.elements.customizer.querySelector(".vd-theme-customizer-panel"),this.elements.overlay=this.elements.customizer.querySelector(".vd-theme-customizer-overlay");else{let e=document.querySelector("[data-theme-customizer-trigger]");e&&this.createDynamicPanel(e)}this.updateUI()},createDynamicPanel:function(e){let t=document.createElement("div");t.className="vd-theme-customizer",this.elements.trigger=e;let n=document.createElement("div");n.className="vd-theme-customizer-overlay";let s=document.createElement("div");s.className="vd-theme-customizer-panel",s.innerHTML=this.getPanelHTML(),document.body.appendChild(n),document.body.appendChild(s),this.elements.panel=s,this.elements.overlay=n,this.elements.customizer={contains:i=>s.contains(i)||e.contains(i)},this.positionPanel(),this.bindPanelEvents(),this.addListener(window,"resize",()=>this.positionPanel())},positionPanel:function(){if(!this.elements.panel||!this.elements.trigger)return;if(window.innerWidth<768)this.elements.panel.style.top="",this.elements.panel.style.right="",this.elements.panel.style.left="",this.elements.panel.style.height="",this.elements.panel.style.maxHeight="";else{let t=this.elements.trigger.getBoundingClientRect(),n=320,s=t.bottom+8,i=window.innerWidth,a=i-t.right;i-a-n<8&&(a=i-n-8),this.elements.panel.style.top=s+"px",this.elements.panel.style.right=a+"px",this.elements.panel.style.left="",this.elements.panel.style.height="auto",this.elements.panel.style.maxHeight="calc(100vh - "+s+"px)"}},bindPanelEvents:function(){if(!this.elements.panel||this.elements.panel.getAttribute("data-customizer-initialized")==="true")return;this.elements.panel.setAttribute("data-customizer-initialized","true"),this.elements.panel.querySelectorAll("[data-color]").forEach(s=>{this.addListener(s,"click",()=>{this.applyPrimary(s.dataset.color),this.updateUI()})}),this.elements.panel.querySelectorAll("[data-neutral]").forEach(s=>{this.addListener(s,"click",()=>{this.applyNeutral(s.dataset.neutral),this.updateUI()})}),this.elements.panel.querySelectorAll("[data-radius]").forEach(s=>{this.addListener(s,"click",()=>{this.applyRadius(s.dataset.radius),this.updateUI()})});let e=this.elements.panel.querySelector("[data-customizer-font]");e&&this.addListener(e,"change",s=>{this.applyFont(s.target.value),this.updateUI()});let t=this.elements.panel.querySelector(".customizer-reset");t&&this.addListener(t,"click",()=>{this.reset()});let n=this.elements.panel.querySelector(".customizer-mobile-close");n&&this.addListener(n,"click",()=>{this.close()}),this.elements.overlay&&this.addListener(this.elements.overlay,"click",()=>{this.close()})},getPanelHTML:function(){let e=typeof escapeHtml=="function"?escapeHtml:function(o){let r=document.createElement("div");return r.textContent=String(o??""),r.innerHTML},t=function(o){let r=String(o??"").trim();return/^(#[0-9a-fA-F]{3,8}|rgb[a]?\([^)]{1,60}\)|hsl[a]?\([^)]{1,60}\)|var\(--[a-zA-Z0-9_-]{1,40}\))$/.test(r)?r:"#000000"},n="";for(let[o,r]of Object.entries(this.PRIMARY_COLORS))n+=`<button class="tc-color-swatch${o===this.state.primary?" is-active":""}" data-color="${e(o)}" style="--swatch-color: ${t(r.color)}" title="${e(r.name)}"></button>`;let s="";for(let[o,r]of Object.entries(this.NEUTRAL_COLORS))s+=`<button class="tc-neutral-swatch${o===this.state.neutral?" is-active":""}" data-neutral="${e(o)}" style="--swatch-color: ${t(r.color)}" title="${e(r.name)}"><span>${e(r.name)}</span></button>`;let i="";this.RADIUS_OPTIONS.forEach(o=>{i+=`<button class="tc-radius-btn${o===this.state.radius?" is-active":""}" data-radius="${e(o)}">${e(o)}</button>`});let a="";for(let[o,r]of Object.entries(this.FONT_OPTIONS))a+=`<option value="${e(o)}"${o===this.state.font?" selected":""}>${e(r.name)}</option>`;return`
5
+ `).length,i=document.createElement("div");i.className="vd-code-snippet-line-numbers",i.setAttribute("aria-hidden","true");for(let o=1;o<=s;o++){let r=document.createElement("span");r.textContent=o,i.appendChild(r)}let a=document.createElement("div");a.className="vd-code-snippet-code",a.appendChild(t.cloneNode(!0)),t.parentNode.removeChild(t),e.appendChild(i),e.appendChild(a)},expand:function(e){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;e.dataset.expanded="true";let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&t.setAttribute("aria-expanded","true"),n&&(n.dataset.visible="true")},collapse:function(e){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;e.dataset.expanded="false";let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&t.setAttribute("aria-expanded","false"),n&&(n.dataset.visible="false")},showLang:function(e,t){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;let n=e.querySelector(`.vd-code-snippet-tab[data-lang="${t}"]`),s=e.querySelectorAll(".vd-code-snippet-tab"),i=e.querySelectorAll(".vd-code-snippet-pane");n&&this.switchTab(e,n,s,i)},destroy:function(e){typeof e=="string"&&(e=document.querySelector(e)),e&&(e._codeSnippetCleanup&&(e._codeSnippetCleanup.forEach(t=>t()),delete e._codeSnippetCleanup),delete e.dataset.initialized)},destroyAll:function(){document.querySelectorAll('.vd-code-snippet[data-initialized="true"]').forEach(t=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("codeSnippet",m),window.CodeSnippet=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-collapsible, .accordion").forEach(t=>{this.instances.has(t)||this.initCollapsible(t)})},initCollapsible:function(e){let t=e.classList.contains("accordion"),n=e.querySelectorAll(".vd-collapsible-item, .accordion-item"),s=[];n.forEach(i=>{let a=i.querySelector(".vd-collapsible-header, .accordion-header"),o=i.querySelector(".vd-collapsible-body, .accordion-body"),r=i.querySelector(".vd-collapsible-trigger, .accordion-trigger")||a;if(!a||!o)return;i.classList.contains("is-open")?this.openItem(i,o,!1):this.closeItem(i,o,!1);let l=d=>{d.preventDefault(),this.toggleItem(i,o,e,t)};r.addEventListener("click",l),s.push(()=>r.removeEventListener("click",l))}),this.instances.set(e,{cleanup:s})},toggleItem:function(e,t,n,s){e.classList.contains("is-open")?this.closeItem(e,t):(s&&n.querySelectorAll(".vd-collapsible-item.is-open, .accordion-item.is-open").forEach(o=>{if(o!==e){let r=o.querySelector(".vd-collapsible-body, .accordion-body");this.closeItem(o,r)}}),this.openItem(e,t))},openItem:function(e,t,n=!0){n||(t.style.transition="none"),e.classList.add("is-open"),e.setAttribute("aria-expanded","true");let s=t.scrollHeight;t.style.maxHeight=`${s}px`,n||setTimeout(()=>{t.style.transition=""},0),e.dispatchEvent(new CustomEvent("collapsible:open",{bubbles:!0}))},closeItem:function(e,t,n=!0){n||(t.style.transition="none"),e.classList.remove("is-open"),e.setAttribute("aria-expanded","false"),t.style.maxHeight="0",n||setTimeout(()=>{t.style.transition=""},0),e.dispatchEvent(new CustomEvent("collapsible:close",{bubbles:!0}))},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body");n&&this.openItem(t,n)}},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body");n&&this.closeItem(t,n)}},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body"),s=t.closest(".vd-collapsible, .accordion"),i=s&&s.classList.contains("accordion");n&&this.toggleItem(t,n,s,i)}},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("collapsible",m),window.VanduoCollapsible=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-dropdown").forEach(t=>{this.instances.has(t)||this.initDropdown(t)})},initDropdown:function(e){let t=e.querySelector(".vd-dropdown-toggle"),n=e.querySelector(".vd-dropdown-menu");if(!t||!n)return;let s=[];t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false"),n.setAttribute("role","menu"),n.setAttribute("aria-hidden","true");let i=l=>{l.preventDefault(),l.stopPropagation(),this.toggleDropdown(e,t,n)};t.addEventListener("click",i),s.push(()=>t.removeEventListener("click",i));let a=l=>{!e.contains(l.target)&&n.classList.contains("is-open")&&this.closeDropdown(e,t,n)};document.addEventListener("click",a),s.push(()=>document.removeEventListener("click",a));let o=l=>{this.handleKeydown(l,e,t,n)};t.addEventListener("keydown",o),s.push(()=>t.removeEventListener("keydown",o)),n.querySelectorAll(".vd-dropdown-item:not(.disabled):not(.is-disabled)").forEach(l=>{let d=u=>{u.preventDefault(),this.selectItem(l,e,t,n)};l.addEventListener("click",d),s.push(()=>l.removeEventListener("click",d));let c=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),this.selectItem(l,e,t,n))};l.addEventListener("keydown",c),s.push(()=>l.removeEventListener("keydown",c))}),this.instances.set(e,{toggle:t,menu:n,cleanup:s,typeaheadBuffer:"",typeaheadTimer:null})},toggleDropdown:function(e,t,n){n.classList.contains("is-open")?this.closeDropdown(e,t,n):this.openDropdown(e,t,n)},openDropdown:function(e,t,n){document.querySelectorAll(".vd-dropdown-menu.is-open").forEach(a=>{if(a!==n){let o=a.closest(".vd-dropdown"),r=o.querySelector(".vd-dropdown-toggle");this.closeDropdown(o,r,a)}}),e.classList.add("is-open"),n.classList.add("is-open"),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false"),this.positionMenu(e,n);let i=n.querySelector(".vd-dropdown-item:not(.disabled):not(.is-disabled)");i&&setTimeout(()=>i.focus(),0)},closeDropdown:function(e,t,n){e.classList.remove("is-open"),n.classList.remove("is-open"),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true"),t.focus()},positionMenu:function(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=8;n.left+s.width>i-o&&(t.classList.add("vd-dropdown-menu-end"),t.classList.remove("vd-dropdown-menu-start")),t.classList.contains("dropdown-menu-top")?n.top-s.height<o&&t.classList.remove("vd-dropdown-menu-top"):n.bottom+s.height>a-o&&t.classList.add("vd-dropdown-menu-top")},handleKeydown:function(e,t,n,s){let i=s.classList.contains("is-open"),a=Array.from(s.querySelectorAll(".vd-dropdown-item:not(.disabled):not(.is-disabled)")),o=a.findIndex(r=>r===document.activeElement);switch(e.key){case"Enter":case" ":case"ArrowDown":if(e.preventDefault(),!i)this.openDropdown(t,n,s);else if(e.key==="ArrowDown"){let r=o<a.length-1?o+1:0;a[r].focus()}break;case"ArrowUp":if(i){e.preventDefault();let r=o>0?o-1:a.length-1;a[r].focus()}break;case"Escape":i&&(e.preventDefault(),this.closeDropdown(t,n,s));break;case"Home":i&&(e.preventDefault(),a[0].focus());break;case"End":i&&(e.preventDefault(),a[a.length-1].focus());break;default:if(i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let r=this.instances.get(t);if(!r)break;clearTimeout(r.typeaheadTimer),r.typeaheadBuffer+=e.key.toLowerCase();let l=a.find(d=>d.textContent.trim().toLowerCase().startsWith(r.typeaheadBuffer));l&&l.focus(),r.typeaheadTimer=setTimeout(()=>{r.typeaheadBuffer=""},500)}break}},selectItem:function(e,t,n,s){s.querySelectorAll(".vd-dropdown-item").forEach(i=>{i.classList.remove("active","is-active")}),e.classList.add("active","is-active"),(n.tagName==="BUTTON"||n.classList.contains("btn"))&&(n.textContent=e.textContent.trim()),this.closeDropdown(t,n,s),e.dispatchEvent(new CustomEvent("dropdown:select",{bubbles:!0,detail:{item:e,value:e.dataset.value||e.textContent}}))},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-dropdown-toggle"),s=t.querySelector(".vd-dropdown-menu");n&&s&&this.openDropdown(t,n,s)}},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-dropdown-toggle"),s=t.querySelector(".vd-dropdown-menu");n&&s&&this.closeDropdown(t,n,s)}},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("dropdown",m),window.VanduoDropdown=m})();(function(){"use strict";let m={STORAGE_KEY:"vanduo-font-preference",isInitialized:!1,fonts:{system:{name:"System Default",family:null},inter:{name:"Inter",family:"'Inter', sans-serif"},"source-sans":{name:"Source Sans 3",family:"'Source Sans 3', sans-serif"},"fira-sans":{name:"Fira Sans",family:"'Fira Sans', sans-serif"},"ibm-plex":{name:"IBM Plex Sans",family:"'IBM Plex Sans', sans-serif"},"jetbrains-mono":{name:"JetBrains Mono",family:"'JetBrains Mono', monospace"},ubuntu:{name:"Ubuntu",family:"'Ubuntu', sans-serif",category:"sans-serif",description:"Friendly, humanist sans-serif"},"open-sans":{name:"Open Sans",family:"'Open Sans', sans-serif",category:"sans-serif",description:"Neutral, highly readable"},rubik:{name:"Rubik",family:"'Rubik', sans-serif",category:"sans-serif",description:"Modern, geometric"},"titillium-web":{name:"Titillium Web",family:"'Titillium Web', sans-serif",category:"sans-serif",description:"Technical, elegant"}},init:function(){if(this.state={preference:this.getPreference()},this.isInitialized){this.applyFont(),this.renderUI(),this.updateUI();return}this.isInitialized=!0,this.applyFont(),this.renderUI(),console.log("Vanduo Font Switcher initialized")},getPreference:function(){return this.getStorageValue(this.STORAGE_KEY,"ubuntu")},setPreference:function(e){if(!this.fonts[e]){console.warn("Unknown font:",e);return}this.state.preference=e,this.setStorageValue(this.STORAGE_KEY,e),this.applyFont(),this.updateUI();let t=new CustomEvent("font:change",{bubbles:!0,detail:{font:e,fontData:this.fonts[e]}});document.dispatchEvent(t)},applyFont:function(){let e=this.state.preference;e==="system"?document.documentElement.removeAttribute("data-font"):document.documentElement.setAttribute("data-font",e)},renderUI:function(){document.querySelectorAll('[data-toggle="font"]').forEach(t=>{if(t.getAttribute("data-font-initialized")==="true"){t.tagName==="SELECT"&&(t.value=this.state.preference);return}if(t.tagName==="SELECT"){t.value=this.state.preference;let n=s=>{this.setPreference(s.target.value)};t.addEventListener("change",n),t._fontToggleHandler=n}else{let n=()=>{let s=Object.keys(this.fonts),a=(s.indexOf(this.state.preference)+1)%s.length;this.setPreference(s[a])};t.addEventListener("click",n),t._fontToggleHandler=n}t.setAttribute("data-font-initialized","true")})},updateUI:function(){document.querySelectorAll('[data-toggle="font"]').forEach(t=>{if(t.tagName==="SELECT")t.value=this.state.preference;else{let n=t.querySelector(".font-current-label");n&&(n.textContent=this.fonts[this.state.preference].name)}})},getCurrentFont:function(){return this.state.preference},getFontData:function(e){return this.fonts[e]||null},destroyAll:function(){document.querySelectorAll('[data-toggle="font"][data-font-initialized="true"]').forEach(t=>{if(t._fontToggleHandler){let n=t.tagName==="SELECT"?"change":"click";t.removeEventListener(n,t._fontToggleHandler),delete t._fontToggleHandler}t.removeAttribute("data-font-initialized")}),this.isInitialized=!1},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}}};window.Vanduo&&window.Vanduo.register("fontSwitcher",m),window.FontSwitcher=m})();(function(){"use strict";let m=(function(){try{return CSS.supports("selector(:has(*))")}catch{return!1}})(),e={instances:new Map,init:function(){document.querySelectorAll("[data-layout-mode]").forEach(function(n){this.instances.has(n)||this.initContainer(n)}.bind(this)),this.initToggleButtons()},initContainer:function(t){let n=t.getAttribute("data-layout-mode")||"standard",s=[];this.applyMode(t,n),t.setAttribute("role","region"),t.setAttribute("aria-label","Grid layout: "+n+" mode"),this.instances.set(t,{cleanup:s,mode:n})},initToggleButtons:function(){document.querySelectorAll("[data-grid-toggle]").forEach(function(n){if(n.getAttribute("data-grid-initialized")==="true")return;let s=function(i){i.preventDefault();let a=n.getAttribute("data-grid-toggle"),o;a?o=document.querySelector(a):o=n.closest("[data-layout-mode]"),o&&this.toggle(o)}.bind(this);n.addEventListener("click",s),n.setAttribute("data-grid-initialized","true"),n.setAttribute("aria-pressed","false"),n._gridCleanup=function(){n.removeEventListener("click",s),n.removeAttribute("data-grid-initialized"),n.removeAttribute("aria-pressed")}}.bind(this))},applyFibFallback:function(t){if(m)return;t.querySelectorAll(".vd-row, .row").forEach(function(s){let a=s.querySelectorAll(':scope > [class*="vd-col-"], :scope > [class*="col-"]').length;a===1?s.style.gridTemplateColumns="1fr":a===2?s.style.gridTemplateColumns="1fr 1.618fr":a===3?s.style.gridTemplateColumns="2fr 3fr 5fr":a===4?s.style.gridTemplateColumns="1fr 2fr 3fr 5fr":s.style.gridTemplateColumns="repeat("+a+", 1fr)"})},removeFibFallback:function(t){t.querySelectorAll(".vd-row, .row").forEach(function(s){s.style.gridTemplateColumns=""})},applyMode:function(t,n){t.classList.remove("vd-grid-standard","vd-grid-fibonacci"),n==="fibonacci"?(t.classList.add("vd-grid-fibonacci"),this.applyFibFallback(t)):(t.classList.add("vd-grid-standard"),this.removeFibFallback(t)),t.setAttribute("data-layout-mode",n),t.setAttribute("aria-label","Grid layout: "+n+" mode"),document.querySelectorAll("[data-grid-toggle]").forEach(function(o){let r=o.getAttribute("data-grid-toggle");if(r&&t.matches(r)){let l=n==="fibonacci";l?o.classList.add("is-active"):o.classList.remove("is-active"),o.setAttribute("aria-pressed",l?"true":"false")}});let i=this.instances.get(t);i&&(i.mode=n);let a;try{a=new CustomEvent("grid:modechange",{bubbles:!0,detail:{container:t,mode:n}})}catch{a=document.createEvent("CustomEvent"),a.initCustomEvent("grid:modechange",!0,!0,{container:t,mode:n})}t.dispatchEvent(a)},toggle:function(t){if(typeof t=="string"&&(t=document.querySelector(t)),!t)return;let s=(t.getAttribute("data-layout-mode")||"standard")==="fibonacci"?"standard":"fibonacci";this.applyMode(t,s)},setMode:function(t,n){typeof t=="string"&&(t=document.querySelector(t)),t&&(n!=="fibonacci"&&n!=="standard"||this.applyMode(t,n))},getMode:function(t){return typeof t=="string"&&(t=document.querySelector(t)),t?t.getAttribute("data-layout-mode")||"standard":null},destroy:function(t){let n=this.instances.get(t);n&&(n.cleanup.forEach(function(s){s()}),t.classList.remove("vd-grid-standard","vd-grid-fibonacci"),t.removeAttribute("aria-label"),this.removeFibFallback(t),this.instances.delete(t))},destroyAll:function(){this.instances.forEach(function(n,s){this.destroy(s)}.bind(this)),document.querySelectorAll('[data-grid-initialized="true"]').forEach(function(n){n._gridCleanup&&(n._gridCleanup(),delete n._gridCleanup)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("gridLayout",e),window.VanduoGridLayout=e})();(function(){"use strict";let m={backdrop:null,container:null,img:null,closeBtn:null,caption:null,currentTrigger:null,scrollThreshold:50,initialScrollY:0,isOpen:!1,_cleanupFunctions:[],init:function(){this.createBackdrop(),this.bindTriggers()},createBackdrop:function(){if(this.backdrop||document.querySelector(".vd-image-box-backdrop")){this.backdrop||(this.backdrop=document.querySelector(".vd-image-box-backdrop"),this.container=this.backdrop.querySelector(".vd-image-box-container"),this.img=this.backdrop.querySelector(".vd-image-box-img"),this.closeBtn=this.backdrop.querySelector(".vd-image-box-close"),this.caption=this.backdrop.querySelector(".vd-image-box-caption"),this.bindBackdropEvents());return}this.backdrop=document.createElement("div"),this.backdrop.className="vd-image-box-backdrop",this.backdrop.setAttribute("role","dialog"),this.backdrop.setAttribute("aria-modal","true"),this.backdrop.setAttribute("aria-label","Image viewer"),this.backdrop.setAttribute("tabindex","-1"),this.container=document.createElement("div"),this.container.className="vd-image-box-container",this.img=document.createElement("img"),this.img.className="vd-image-box-img",this.img.alt="",this.closeBtn=document.createElement("button"),this.closeBtn.className="vd-image-box-close",this.closeBtn.setAttribute("aria-label","Close image viewer"),this.closeBtn.innerHTML="&times;",this.caption=document.createElement("div"),this.caption.className="vd-image-box-caption",this.container.appendChild(this.img),this.backdrop.appendChild(this.closeBtn),this.backdrop.appendChild(this.container),this.backdrop.appendChild(this.caption),document.body.appendChild(this.backdrop),this.bindBackdropEvents()},bindBackdropEvents:function(){let e=this,t=function(o){(o.target===e.backdrop||o.target===e.container)&&e.close()};this.backdrop.addEventListener("click",t),this._cleanupFunctions.push(()=>this.backdrop.removeEventListener("click",t));let n=function(){e.close()};this.img.addEventListener("click",n),this._cleanupFunctions.push(()=>this.img.removeEventListener("click",n));let s=function(){e.close()};this.closeBtn.addEventListener("click",s),this._cleanupFunctions.push(()=>this.closeBtn.removeEventListener("click",s));let i=function(o){o.key==="Escape"&&e.isOpen&&e.close()};document.addEventListener("keydown",i),this._cleanupFunctions.push(()=>document.removeEventListener("keydown",i));let a=function(){if(!e.isOpen)return;let o=window.scrollY;Math.abs(o-e.initialScrollY)>e.scrollThreshold&&e.close()};window.addEventListener("scroll",a,{passive:!0}),this._cleanupFunctions.push(()=>window.removeEventListener("scroll",a))},bindTriggers:function(){let e=this;document.querySelectorAll("[data-image-box]").forEach(function(n){if(n.dataset.imageBoxInitialized)return;if(n.dataset.imageBoxInitialized="true",n.classList.add("vd-image-box-trigger"),n.tagName==="IMG"){n.complete&&n.naturalWidth===0&&n.classList.add("is-broken");let i=function(){n.classList.add("is-broken")};n.addEventListener("error",i);let a=function(){n.classList.remove("is-broken")};n.addEventListener("load",a)}let s=function(i){i.preventDefault(),e.open(n)};if(n.addEventListener("click",s),n._imageBoxCleanup=()=>n.removeEventListener("click",s),n.tagName!=="BUTTON"&&n.tagName!=="A"){n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.setAttribute("aria-label","View enlarged image");let i=function(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e.open(n))};n.addEventListener("keydown",i);let a=n._imageBoxCleanup;n._imageBoxCleanup=()=>{a(),n.removeEventListener("keydown",i)}}})},open:function(e){if(this.isOpen)return;this.currentTrigger=e,this.isOpen=!0,this.initialScrollY=window.scrollY;let t=e.dataset.imageBoxFullSrc||e.dataset.imageBoxSrc||e.src||e.href;if(!t){console.warn("[Vanduo ImageBox] No image source found for trigger:",e);return}let n=e.dataset.imageBoxCaption||e.alt||"";this.img.src=t,this.img.alt=e.alt||"",n?(this.caption.textContent=n,this.caption.style.display="block"):this.caption.style.display="none";let s=window.innerWidth-document.documentElement.clientWidth;document.body.style.setProperty("--scrollbar-width",`${s}px`),document.body.classList.add("body-image-box-open"),this.backdrop.classList.add("is-visible"),this.backdrop.focus(),e.dispatchEvent(new CustomEvent("imageBox:open",{bubbles:!0,detail:{src:t}})),this.img.complete||(this.img.style.opacity="0",this._imgLoadHandler=()=>{this.img.style.opacity=""},this.img.addEventListener("load",this._imgLoadHandler,{once:!0}))},close:function(){this.isOpen&&(this.isOpen=!1,this.backdrop.classList.remove("is-visible"),document.body.classList.remove("body-image-box-open"),document.body.style.removeProperty("--scrollbar-width"),this.currentTrigger&&(this.currentTrigger.focus(),this.currentTrigger.dispatchEvent(new CustomEvent("imageBox:close",{bubbles:!0})),this.currentTrigger=null),setTimeout(()=>{this.isOpen||(this._imgLoadHandler&&(this.img.removeEventListener("load",this._imgLoadHandler),this._imgLoadHandler=null),this.img.src="",this.img.alt="")},300))},reinit:function(){this.bindTriggers()},destroy:function(){this.isOpen&&this.close(),this.backdrop&&this.backdrop.parentNode&&this.backdrop.parentNode.removeChild(this.backdrop),this._cleanupFunctions.forEach(t=>t()),this._cleanupFunctions=[],document.querySelectorAll("[data-image-box-initialized]").forEach(t=>{t.classList.remove("vd-image-box-trigger"),t._imageBoxCleanup&&(t._imageBoxCleanup(),delete t._imageBoxCleanup),delete t.dataset.imageBoxInitialized}),this.backdrop=null,this.container=null,this.img=null,this.closeBtn=null,this.caption=null,this.currentTrigger=null,this.isOpen=!1},destroyAll:function(){this.destroy()}};typeof window.Vanduo<"u"&&window.Vanduo.register("imageBox",m),window.VanduoImageBox=m})();(function(){"use strict";let m={modals:new Map,openModals:[],zIndexCounter:1050,_triggerCleanups:[],_sharedEscHandler:null,init:function(){document.querySelectorAll(".vd-modal").forEach(n=>{this.modals.has(n)||this.initModal(n)}),document.querySelectorAll("[data-modal]").forEach(n=>{if(n.dataset.modalTriggerInitialized)return;n.dataset.modalTriggerInitialized="true";let s=i=>{i.preventDefault();let a=n.dataset.modal,o=document.querySelector(a);o&&this.open(o)};n.addEventListener("click",s),this._triggerCleanups.push(()=>n.removeEventListener("click",s))})},initModal:function(e){let t=this.createBackdrop(e),n=e.querySelectorAll('.vd-modal-close, [data-dismiss="modal"]'),s=e.querySelector(".vd-modal-dialog");if(!s)return;let i=[];e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-hidden","true"),e.id||(e.id="modal-"+Math.random().toString(36).substr(2,9));let a=e.querySelector(".vd-modal-title");a&&!a.id&&(a.id=e.id+"-title",e.setAttribute("aria-labelledby",a.id)),n.forEach(r=>{let l=()=>{this.close(e)};r.addEventListener("click",l),i.push(()=>r.removeEventListener("click",l))});let o=r=>{r.target===t&&e.dataset.backdrop!=="static"&&this.close(e)};t.addEventListener("click",o),i.push(()=>t.removeEventListener("click",o)),this._sharedEscHandler||(this._sharedEscHandler=r=>{if(r.key==="Escape"&&this.openModals.length>0){let l=this.openModals[this.openModals.length-1];l.dataset.keyboard!=="false"&&this.close(l)}},document.addEventListener("keydown",this._sharedEscHandler)),this.modals.set(e,{backdrop:t,dialog:s,trapHandler:null,cleanup:i})},createBackdrop:function(e){let t=e.querySelector(".vd-modal-backdrop");return t||(t=document.createElement("div"),t.className="vd-modal-backdrop",document.body.appendChild(t)),t},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t){console.warn("[Vanduo Modals] Modal element not found:",e);return}if(!this.modals.has(t)){console.warn("[Vanduo Modals] Modal not initialized:",t);return}let n=this.modals.get(t),{backdrop:s,dialog:i}=n;if(this.zIndexCounter+=10,t.style.zIndex=this.zIndexCounter,s.style.zIndex=this.zIndexCounter-1,this.openModals.push(t),s.classList.add("is-visible"),t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),this.openModals.length===1){document.body.classList.add("body-modal-open");let o=window.innerWidth-document.documentElement.clientWidth;o>0&&(document.body.style.paddingRight=`${o}px`)}let a=this.trapFocus(t);n.trapHandler=a,setTimeout(()=>{let o=this.getFocusableElements(t)[0];o&&o.focus()},100),t.dispatchEvent(new CustomEvent("modal:open",{bubbles:!0}))},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t){console.warn("[Vanduo Modals] Modal element not found:",e);return}if(!this.modals.has(t)){console.warn("[Vanduo Modals] Modal not initialized:",t);return}let n=this.modals.get(t),{backdrop:s,trapHandler:i}=n;i&&(t.removeEventListener("keydown",i),n.trapHandler=null);let a=this.openModals.indexOf(t);if(a>-1&&this.openModals.splice(a,1),t.classList.remove("is-open"),t.setAttribute("aria-hidden","true"),this.openModals.length===0)s.classList.remove("is-visible"),document.body.classList.remove("body-modal-open"),document.body.style.paddingRight="",this.zIndexCounter=1050;else{let r=this.openModals[this.openModals.length-1];this.modals.get(r).backdrop.classList.add("is-visible")}let o=document.querySelector(`[data-modal="#${t.id}"]`);o&&o.focus(),t.dispatchEvent(new CustomEvent("modal:close",{bubbles:!0}))},trapFocus:function(e){let t=this,n=function(s){if(s.key!=="Tab")return;let i=t.getFocusableElements(e),a=i[0],o=i[i.length-1];s.shiftKey?document.activeElement===a&&(s.preventDefault(),o.focus()):document.activeElement===o&&(s.preventDefault(),a.focus())};return e.addEventListener("keydown",n),n},getFocusableElements:function(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(n=>!n.hasAttribute("disabled")&&n.offsetWidth>0&&n.offsetHeight>0)},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.classList.contains("is-open")?this.close(t):this.open(t))},destroy:function(e){let t=this.modals.get(e);t&&(e.classList.contains("is-open")&&this.close(e),t.cleanup&&t.cleanup.forEach(n=>n()),t.backdrop&&t.backdrop.parentNode&&t.backdrop.parentNode.removeChild(t.backdrop),this.modals.delete(e))},destroyAll:function(){this.modals.forEach((e,t)=>{this.destroy(t)}),this._triggerCleanups.forEach(e=>e()),this._triggerCleanups=[],this._sharedEscHandler&&(document.removeEventListener("keydown",this._sharedEscHandler),this._sharedEscHandler=null)}};typeof window.Vanduo<"u"&&window.Vanduo.register("modals",m),window.VanduoModals=m})();(function(){"use strict";let m={instances:new Map,getBreakpoint:function(){let t=getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-lg").trim(),n=parseInt(t,10);return isNaN(n)?992:n},init:function(){document.querySelectorAll(".vd-navbar").forEach(t=>{this.instances.has(t)||this.initNavbar(t)})},initNavbar:function(e){let t=e.querySelector(".vd-navbar-toggle, .vd-navbar-burger"),n=e.querySelector(".vd-navbar-menu"),s=e.querySelector(".vd-navbar-overlay")||this.createOverlay(e);if(!t||!n)return;let i=[],a=u=>{u.preventDefault(),u.stopPropagation(),this.toggleMenu(e,t,n,s)};if(t.addEventListener("click",a),i.push(()=>t.removeEventListener("click",a)),s){let u=()=>{this.closeMenu(e,t,n,s)};s.addEventListener("click",u),i.push(()=>s.removeEventListener("click",u))}let o=u=>{u.key==="Escape"&&n.classList.contains("is-open")&&this.closeMenu(e,t,n,s)};document.addEventListener("keydown",o),i.push(()=>document.removeEventListener("keydown",o));let r,l=()=>{clearTimeout(r),r=setTimeout(()=>{let u=this.getBreakpoint();window.innerWidth>=u&&n.classList.contains("is-open")&&this.closeMenu(e,t,n,s)},250)};window.addEventListener("resize",l),i.push(()=>{clearTimeout(r),window.removeEventListener("resize",l)});let d=u=>{n.classList.contains("is-open")&&!e.contains(u.target)&&!n.contains(u.target)&&this.closeMenu(e,t,n,s)};document.addEventListener("click",d),i.push(()=>document.removeEventListener("click",d)),n.querySelectorAll(".vd-navbar-dropdown > .vd-nav-link, .vd-navbar-dropdown > .nav-link").forEach(u=>{let h=p=>{let v=this.getBreakpoint();if(window.innerWidth<v){p.preventDefault();let C=u.parentElement.querySelector(".vd-navbar-dropdown-menu");C&&C.classList.toggle("is-open")}};u.addEventListener("click",h),i.push(()=>u.removeEventListener("click",h))}),this.instances.set(e,{toggle:t,menu:n,overlay:s,cleanup:i})},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.overlay&&t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})},toggleMenu:function(e,t,n,s){n.classList.contains("is-open")?this.closeMenu(e,t,n,s):this.openMenu(e,t,n,s)},openMenu:function(e,t,n,s){n.classList.add("is-open"),t.classList.add("is-active"),s&&s.classList.add("is-active"),document.body.classList.add("body-navbar-open"),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false")},closeMenu:function(e,t,n,s){n.classList.remove("is-open"),t.classList.remove("is-active"),s&&s.classList.remove("is-active"),document.body.classList.remove("body-navbar-open"),n.querySelectorAll(".vd-navbar-dropdown-menu.is-open").forEach(a=>{a.classList.remove("is-open")}),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true")},createOverlay:function(e){let t=document.createElement("div");return t.className="vd-navbar-overlay",document.body.appendChild(t),t}};typeof window.Vanduo<"u"&&window.Vanduo.register("navbar",m),window.VanduoNavbar=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-pagination[data-pagination]").forEach(t=>{this.instances.has(t)||this.initPagination(t)})},initPagination:function(e){let t=parseInt(e.dataset.totalPages)||1,n=parseInt(e.dataset.currentPage)||1,s=parseInt(e.dataset.maxVisible)||7;this.render(e,{totalPages:t,currentPage:n,maxVisible:s});let i=a=>{let o=a.target.closest(".vd-pagination-link");if(!o||o.closest(".vd-pagination-item.disabled")||o.closest(".vd-pagination-item.active"))return;a.preventDefault();let r=o.closest(".vd-pagination-item"),l=r.dataset.page;l?this.goToPage(e,parseInt(l)):r.classList.contains("pagination-prev")?this.prevPage(e):r.classList.contains("pagination-next")&&this.nextPage(e)};e.addEventListener("click",i),this.instances.set(e,{cleanup:[()=>e.removeEventListener("click",i)]})},render:function(e,t){let{totalPages:n,currentPage:s,maxVisible:i}=t;if(n<=1){e.innerHTML="";return}let a="";a+=`<li class="vd-pagination-item vd-pagination-prev pagination-item pagination-prev ${s===1?"disabled":""}">`,a+='<a class="vd-pagination-link pagination-link" href="#" aria-label="Previous">Previous</a>',a+="</li>";let o=this.calculatePages(s,n,i),r=0;o.forEach(l=>{if(l==="ellipsis")a+='<li class="vd-pagination-item pagination-item"><span class="vd-pagination-ellipsis pagination-ellipsis">\u2026</span></li>';else{l!==r+1&&r>0&&(a+='<li class="vd-pagination-item pagination-item"><span class="vd-pagination-ellipsis pagination-ellipsis">\u2026</span></li>');let d=Number(l);a+=`<li class="vd-pagination-item pagination-item ${d===s?"active":""}" data-page="${d}">`,a+=`<a class="vd-pagination-link pagination-link" href="#" aria-label="Page ${d}">${d}</a>`,a+="</li>",r=l}}),a+=`<li class="vd-pagination-item vd-pagination-next pagination-item pagination-next ${s===n?"disabled":""}">`,a+='<a class="vd-pagination-link pagination-link" href="#" aria-label="Next">Next</a>',a+="</li>",e.innerHTML=a,e.dataset.currentPage=s},calculatePages:function(e,t,n){let s=[],i=Math.floor(n/2);if(t<=n)for(let a=1;a<=t;a++)s.push(a);else{s.push(1);let a=Math.max(2,e-i),o=Math.min(t-1,e+i);e<=i+1&&(o=Math.min(t-1,n-1)),e>=t-i&&(a=Math.max(2,t-n+2)),a>2&&s.push("ellipsis");for(let r=a;r<=o;r++)s.push(r);o<t-1&&s.push("ellipsis"),t>1&&s.push(t)}return s},goToPage:function(e,t){let n=parseInt(e.dataset.totalPages)||1,s=parseInt(e.dataset.maxVisible)||7;t<1||t>n||(this.render(e,{totalPages:n,currentPage:t,maxVisible:s}),e.dispatchEvent(new CustomEvent("pagination:change",{bubbles:!0,detail:{page:t,totalPages:n}})))},prevPage:function(e){let t=parseInt(e.dataset.currentPage)||1;t>1&&this.goToPage(e,t-1)},nextPage:function(e){let t=parseInt(e.dataset.currentPage)||1,n=parseInt(e.dataset.totalPages)||1;t<n&&this.goToPage(e,t+1)},update:function(e,t){let n=typeof e=="string"?document.querySelector(e):e;n&&(t.totalPages!==void 0&&(n.dataset.totalPages=t.totalPages),t.currentPage!==void 0&&(n.dataset.currentPage=t.currentPage),t.maxVisible!==void 0&&(n.dataset.maxVisible=t.maxVisible),this.render(n,{totalPages:parseInt(n.dataset.totalPages)||1,currentPage:parseInt(n.dataset.currentPage)||1,maxVisible:parseInt(n.dataset.maxVisible)||7}))},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("pagination",m),window.VanduoPagination=m})();(function(){"use strict";let m={parallaxElements:new Map,ticking:!1,isMobile:window.innerWidth<768,reducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches,isInitialized:!1,_onScroll:null,_onResize:null,init:function(){if(this.isInitialized){this.refresh();return}if(this.isInitialized=!0,this.reducedMotion)return;document.querySelectorAll(".vd-parallax").forEach(t=>{t.dataset.parallaxInitialized||this.initParallax(t)}),this.handleScroll(),this._onScroll=()=>{this.handleScroll()},window.addEventListener("scroll",this._onScroll,{passive:!0}),this._onResize=()=>{this.isMobile=window.innerWidth<768,this.updateAll()},window.addEventListener("resize",this._onResize)},initParallax:function(e){e.dataset.parallaxInitialized="true";let t=e.classList.contains("parallax-disable-mobile");if(t&&this.isMobile)return;let n=e.querySelectorAll(".vd-parallax-layer, .vd-parallax-bg"),s=this.getSpeed(e),i=e.classList.contains("parallax-horizontal")?"horizontal":"vertical";this.parallaxElements.set(e,{layers:Array.from(n),speed:s,direction:i,disableMobile:t}),this.updateParallax(e)},getSpeed:function(e){return e.classList.contains("parallax-slow")?.5:e.classList.contains("parallax-fast")?1.5:1},handleScroll:function(){this.ticking||(window.requestAnimationFrame(()=>{this.updateAll(),this.ticking=!1}),this.ticking=!0)},updateAll:function(){this.parallaxElements.forEach((e,t)=>{e.disableMobile&&this.isMobile||this.updateParallax(t)})},updateParallax:function(e){let t=this.parallaxElements.get(e);if(!t)return;let n=e.getBoundingClientRect(),s=window.innerHeight,i=n.top,a=n.height,r=(Math.max(0,Math.min(1,(s-i)/(s+a)))-.5)*t.speed*100;t.layers.forEach((l,d)=>{let c=l.dataset.parallaxSpeed?parseFloat(l.dataset.parallaxSpeed):1,u=r*c;t.direction==="horizontal"?l.style.transform=`translateX(${u}px)`:l.style.transform=`translateY(${u}px)`})},destroy:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&this.parallaxElements.has(t)&&(this.parallaxElements.get(t).layers.forEach(s=>{s.style.transform=""}),this.parallaxElements.delete(t))},refresh:function(){this.updateAll()},destroyAll:function(){this.parallaxElements.forEach((e,t)=>{this.destroy(t)}),this.parallaxElements.clear(),this._onScroll&&(window.removeEventListener("scroll",this._onScroll),this._onScroll=null),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null),this.isInitialized=!1}};typeof window.Vanduo<"u"&&window.Vanduo.register("parallax",m),window.VanduoParallax=m})();(function(){"use strict";let m={init:function(){document.querySelectorAll(".progress-bar[data-progress]").forEach(t=>{t.dataset.progressInitialized||this.initProgressBar(t)})},initProgressBar:function(e){e.dataset.progressInitialized="true";let t=parseInt(e.dataset.progress)||0;this.setProgress(e,t,!1)},setProgress:function(e,t,n=!0){let s=typeof e=="string"?document.querySelector(e):e;if(!s)return;t=Math.max(0,Math.min(100,t)),n?s.style.transition="width var(--transition-duration-slow) var(--transition-ease)":(s.style.transition="none",setTimeout(()=>{s.style.transition=""},0)),s.style.width=t+"%",s.setAttribute("aria-valuenow",t),s.setAttribute("aria-valuemin",0),s.setAttribute("aria-valuemax",100);let i=s.querySelector(".progress-text");i&&(i.textContent=t+"%"),s.dispatchEvent(new CustomEvent("progress:update",{bubbles:!0,detail:{value:t,max:100}})),t>=100&&s.dispatchEvent(new CustomEvent("progress:complete",{bubbles:!0,detail:{value:t,max:100}}))},animateProgress:function(e,t,n=1e3){let s=typeof e=="string"?document.querySelector(e):e;if(!s)return;let i=parseInt(s.style.width)||0,a=t-i,o=performance.now(),r=l=>{let d=l-o,c=Math.min(d/n,1),u=1-Math.pow(1-c,3),h=i+a*u;this.setProgress(s,h,!1),c<1&&requestAnimationFrame(r)};requestAnimationFrame(r)},show:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display="inline-block",t.setAttribute("aria-hidden","false"))},hide:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display="none",t.setAttribute("aria-hidden","true"))},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display==="none"||t.getAttribute("aria-hidden")==="true"?this.show(t):this.hide(t))},destroyAll:function(){document.querySelectorAll('.progress-bar[data-progress-initialized="true"]').forEach(t=>{delete t.dataset.progressInitialized})}};typeof window.Vanduo<"u"&&window.Vanduo.register("preloader",m),window.VanduoPreloader=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("select.vd-custom-select-input, select[data-custom-select]").forEach(t=>{this.instances.has(t)||this.initSelect(t)})},initSelect:function(e){if(e.closest(".vd-custom-select-wrapper"))return;let t=[],n=document.createElement("div");n.className="custom-select-wrapper",e.parentNode.insertBefore(n,e),n.appendChild(e);let s=document.createElement("button");s.type="button",s.className="custom-select-button",s.setAttribute("aria-haspopup","listbox"),s.setAttribute("aria-expanded","false"),s.setAttribute("aria-labelledby",e.id||this.generateId(e));let i=document.createElement("div");if(i.className="custom-select-dropdown",i.setAttribute("role","listbox"),e.dataset.searchable==="true"){let d=document.createElement("div");d.className="custom-select-search";let c=document.createElement("input");c.type="text",c.className="input input-sm",c.placeholder="Search...",c.setAttribute("aria-label","Search options"),d.appendChild(c),i.appendChild(d);let u=p=>{this.filterOptions(i,p.target.value)},h=typeof debounce=="function"?debounce(u,150):u;c.addEventListener("input",h),t.push(()=>c.removeEventListener("input",h))}this.buildOptions(e,i,s),n.appendChild(s),n.appendChild(i),this.updateButtonText(e,s);let a=d=>{d.preventDefault(),d.stopPropagation(),this.toggleDropdown(s,i)};s.addEventListener("click",a),t.push(()=>s.removeEventListener("click",a));let o=d=>{!n.contains(d.target)&&i.classList.contains("is-open")&&this.closeDropdown(s,i)};document.addEventListener("click",o),t.push(()=>document.removeEventListener("click",o));let r=d=>{this.handleKeydown(d,e,s,i)};s.addEventListener("keydown",r),t.push(()=>s.removeEventListener("keydown",r));let l=()=>{this.updateButtonText(e,s),this.updateSelectedOptions(e,i)};e.addEventListener("change",l),t.push(()=>e.removeEventListener("change",l)),this.instances.set(e,{wrapper:n,button:s,dropdown:i,cleanup:t,typeaheadBuffer:"",typeaheadTimer:null})},buildOptions:function(e,t,n){let s=e.querySelectorAll("option"),i=document.createDocumentFragment();s.forEach((a,o)=>{if(a.parentElement.tagName==="OPTGROUP"){let l=a.parentElement;if(!t.querySelector(`[data-group="${l.label}"]`)){let d=document.createElement("div");d.className="custom-select-option-group",d.textContent=l.label,d.dataset.group=l.label,i.appendChild(d)}}if(a.value===""&&!a.textContent.trim())return;let r=document.createElement("div");r.className="custom-select-option",r.textContent=a.textContent,r.setAttribute("role","option"),r.setAttribute("data-value",a.value),r.setAttribute("data-index",o),a.selected&&(r.classList.add("is-selected"),r.setAttribute("aria-selected","true")),a.disabled&&(r.classList.add("is-disabled"),r.setAttribute("aria-disabled","true")),r.addEventListener("click",l=>{a.disabled||this.selectOption(e,a,r,n,t)}),i.appendChild(r)}),t.appendChild(i)},selectOption:function(e,t,n,s,i){e.multiple?(t.selected=!t.selected,n.classList.toggle("is-selected"),n.setAttribute("aria-selected",t.selected)):(e.value=t.value,e.dispatchEvent(new Event("change",{bubbles:!0})),this.closeDropdown(s,i)),this.updateButtonText(e,s)},updateButtonText:function(e,t){if(e.multiple){let n=Array.from(e.selectedOptions);n.length===0?t.textContent=e.dataset.placeholder||"Select options...":n.length===1?t.textContent=n[0].textContent:t.textContent=`${n.length} selected`}else{let n=e.options[e.selectedIndex];t.textContent=n?n.textContent:e.dataset.placeholder||"Select..."}},updateSelectedOptions:function(e,t){let n=t.querySelectorAll(".custom-select-option"),s=Array.from(e.selectedOptions).map(i=>i.value);n.forEach(i=>{let a=i.dataset.value;s.includes(a)?(i.classList.add("is-selected"),i.setAttribute("aria-selected","true")):(i.classList.remove("is-selected"),i.setAttribute("aria-selected","false"))})},toggleDropdown:function(e,t){t.classList.contains("is-open")?this.closeDropdown(e,t):this.openDropdown(e,t)},openDropdown:function(e,t){t.classList.add("is-open"),e.setAttribute("aria-expanded","true");let n=t.querySelector(".custom-select-option:not(.is-disabled)");n&&n.focus()},closeDropdown:function(e,t){t.classList.remove("is-open"),e.setAttribute("aria-expanded","false")},handleKeydown:function(e,t,n,s){let i=s.classList.contains("is-open"),a=Array.from(s.querySelectorAll(".custom-select-option:not(.is-disabled)")),o=a.findIndex(r=>r===document.activeElement);switch(e.key){case"Enter":case" ":if(e.preventDefault(),i&&o>=0){let r=a[o],l=t.options[parseInt(r.dataset.index)];this.selectOption(t,l,r,n,s)}else this.openDropdown(n,s);break;case"Escape":i&&(e.preventDefault(),this.closeDropdown(n,s),n.focus());break;case"ArrowDown":if(e.preventDefault(),!i)this.openDropdown(n,s);else{let r=o<a.length-1?o+1:0;a[r].focus()}break;case"ArrowUp":if(e.preventDefault(),i){let r=o>0?o-1:a.length-1;a[r].focus()}break;case"Home":i&&(e.preventDefault(),a[0].focus());break;case"End":i&&(e.preventDefault(),a[a.length-1].focus());break;default:if(i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let r=this.instances.get(t);if(!r)break;clearTimeout(r.typeaheadTimer),r.typeaheadBuffer+=e.key.toLowerCase();let l=a.find(d=>d.textContent.trim().toLowerCase().startsWith(r.typeaheadBuffer));l&&l.focus(),r.typeaheadTimer=setTimeout(()=>{r.typeaheadBuffer=""},500)}break}},filterOptions:function(e,t){let n=e.querySelectorAll(".vd-custom-select-option"),s=t.toLowerCase();n.forEach(i=>{i.textContent.toLowerCase().includes(s)?i.style.display="block":i.style.display="none"})},generateId:function(e){if(e.id)return e.id;let t="select-"+Math.random().toString(36).substr(2,9);return e.id=t,t},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.wrapper&&t.wrapper.parentNode&&(t.wrapper.parentNode.insertBefore(e,t.wrapper),t.wrapper.parentNode.removeChild(t.wrapper)),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("select",m)})();(function(){"use strict";let m={sidenavs:new Map,breakpoint:992,_globalCleanups:[],isFixedVariant:function(e){return e.classList.contains("vd-sidenav-fixed")||e.classList.contains("sidenav-fixed")},isPushVariant:function(e){return e.classList.contains("vd-sidenav-push")||e.classList.contains("sidenav-push")},isRightVariant:function(e){return e.classList.contains("vd-sidenav-right")||e.classList.contains("sidenav-right")},init:function(){document.querySelectorAll(".vd-sidenav, .vd-offcanvas").forEach(s=>{this.sidenavs.has(s)||this.initSidenav(s)}),document.querySelectorAll("[data-sidenav-toggle]").forEach(s=>{if(s.dataset.sidenavToggleInitialized)return;s.dataset.sidenavToggleInitialized="true";let i=a=>{a.preventDefault();let o=s.dataset.sidenavToggle,r=document.querySelector(o);r&&this.toggle(r)};s.addEventListener("click",i),this._globalCleanups.push(()=>s.removeEventListener("click",i))}),this.handleResize();let n=()=>{this.handleResize()};window.addEventListener("resize",n),this._globalCleanups.push(()=>window.removeEventListener("resize",n))},initSidenav:function(e){let t=e.getAttribute("data-vd-position");if(t){let r=e.classList.contains("vd-offcanvas")?"vd-offcanvas":"vd-sidenav";e.classList.add(r+"-"+t)}let n=this.createOverlay(e),s=e.querySelector(".vd-sidenav-close, .vd-offcanvas-close"),i=[];if(e.setAttribute("role","navigation"),e.setAttribute("aria-hidden","true"),s){let r=()=>{this.close(e)};s.addEventListener("click",r),i.push(()=>s.removeEventListener("click",r))}let a=()=>{e.dataset.backdrop!=="static"&&this.close(e)};n.addEventListener("click",a),i.push(()=>n.removeEventListener("click",a));let o=r=>{r.key==="Escape"&&e.classList.contains("is-open")&&e.dataset.keyboard!=="false"&&this.close(e)};document.addEventListener("keydown",o),i.push(()=>document.removeEventListener("keydown",o)),this.sidenavs.set(e,{overlay:n,cleanup:i})},createOverlay:function(e){let t=e.querySelector(".vd-sidenav-overlay");return t||(t=document.createElement("div"),t.className="vd-sidenav-overlay",document.body.appendChild(t)),t},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t||!this.sidenavs.has(t))return;let{overlay:n}=this.sidenavs.get(t);this.isFixedVariant(t)||n.classList.add("is-visible"),t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),document.body.classList.add("body-sidenav-open"),this.isPushVariant(t)&&this.handlePushVariant(t,!0),t.dispatchEvent(new CustomEvent("sidenav:open",{bubbles:!0}))},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t||!this.sidenavs.has(t))return;let{overlay:n}=this.sidenavs.get(t);n.classList.remove("is-visible"),t.classList.remove("is-open"),t.setAttribute("aria-hidden","true"),document.body.classList.remove("body-sidenav-open"),this.isPushVariant(t)&&this.handlePushVariant(t,!1),t.dispatchEvent(new CustomEvent("sidenav:close",{bubbles:!0}))},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.classList.contains("is-open")?this.close(t):this.open(t))},handlePushVariant:function(e,t){let n=document.querySelector('main, .main-content, .content, [role="main"]')||document.body;t?window.innerWidth>=this.breakpoint&&(this.isRightVariant(e)?n.style.marginRight=e.offsetWidth+"px":n.style.marginLeft=e.offsetWidth+"px"):(n.style.marginLeft="",n.style.marginRight="")},handleResize:function(){this.sidenavs.forEach(({overlay:e},t)=>{window.innerWidth>=this.breakpoint?this.isFixedVariant(t)&&!t.classList.contains("is-open")&&(t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),e.classList.remove("is-visible")):this.isFixedVariant(t)&&t.classList.contains("is-open")&&this.close(t)})},destroy:function(e){let t=this.sidenavs.get(e);t&&(e.classList.contains("is-open")&&this.close(e),t.cleanup.forEach(n=>n()),t.overlay&&t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay),this.sidenavs.delete(e))},destroyAll:function(){this.sidenavs.forEach((e,t)=>{this.destroy(t)}),this._globalCleanups.forEach(e=>e()),this._globalCleanups=[]}};typeof window.Vanduo<"u"&&window.Vanduo.register("sidenav",m),window.VanduoSidenav=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-tabs, [data-tabs]").forEach(t=>{this.instances.has(t)||this.initTabs(t)})},initTabs:function(e){let t=e.querySelector('.vd-tab-list, [role="tablist"]'),n=e.querySelectorAll(".vd-tab-link, [data-tab]"),s=e.querySelectorAll(".vd-tab-pane, [data-tab-pane]");if(!t||n.length===0)return;let i=[];t.setAttribute("role","tablist"),n.forEach((o,r)=>{let l=o.dataset.tab||o.getAttribute("href")?.replace("#","")||`tab-${r}`,d=this.findPane(e,l,s);o.setAttribute("role","tab"),o.setAttribute("aria-selected",o.classList.contains("is-active")?"true":"false"),o.setAttribute("tabindex",o.classList.contains("is-active")?"0":"-1"),o.id||(o.id=`tab-btn-${l}`),d&&(d.setAttribute("role","tabpanel"),d.setAttribute("aria-labelledby",o.id),d.id||(d.id=`tab-pane-${l}`),o.setAttribute("aria-controls",d.id));let c=h=>{h.preventDefault(),!o.classList.contains("disabled")&&!o.disabled&&this.activateTab(e,o,n,s)};o.addEventListener("click",c),i.push(()=>o.removeEventListener("click",c));let u=h=>{this.handleKeydown(h,e,o,n,s)};o.addEventListener("keydown",u),i.push(()=>o.removeEventListener("keydown",u))}),!e.querySelector(".vd-tab-link.is-active, [data-tab].is-active")&&n.length>0&&this.activateTab(e,n[0],n,s),this.instances.set(e,{cleanup:i})},findPane:function(e,t,n){let s=e.querySelector(`[data-tab-pane="${t}"]`);return s||(s=e.querySelector(`#${t}`)),s||e.querySelectorAll(".vd-tab-link, [data-tab]").forEach((a,o)=>{(a.dataset.tab||a.getAttribute("href")?.replace("#",""))===t&&n[o]&&(s=n[o])}),s},activateTab:function(e,t,n,s){let i=t.dataset.tab||t.getAttribute("href")?.replace("#","")||t.id;n.forEach(r=>{r.classList.remove("is-active"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1"),r.parentElement&&r.parentElement.classList.contains("tab-item")&&r.parentElement.classList.remove("is-active")}),s.forEach(r=>{r.classList.remove("is-active")}),t.classList.add("is-active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0"),t.parentElement&&t.parentElement.classList.contains("tab-item")&&t.parentElement.classList.add("is-active");let a=this.findPane(e,i,s);a&&a.classList.add("is-active");let o=new CustomEvent("tab:change",{bubbles:!0,detail:{tab:t,pane:a,tabId:i}});e.dispatchEvent(o)},handleKeydown:function(e,t,n,s,i){let a=t.classList.contains("tabs-vertical"),o=Array.from(s).filter(d=>!d.classList.contains("disabled")&&!d.disabled),r=o.indexOf(n),l=r;switch(e.key){case"ArrowLeft":a||(e.preventDefault(),l=r>0?r-1:o.length-1);break;case"ArrowRight":a||(e.preventDefault(),l=r<o.length-1?r+1:0);break;case"ArrowUp":a&&(e.preventDefault(),l=r>0?r-1:o.length-1);break;case"ArrowDown":a&&(e.preventDefault(),l=r<o.length-1?r+1:0);break;case"Home":e.preventDefault(),l=0;break;case"End":e.preventDefault(),l=o.length-1;break;case"Enter":case" ":e.preventDefault(),this.activateTab(t,n,s,i);return;default:return}l!==r&&(o[l].focus(),this.activateTab(t,o[l],s,i))},show:function(e){let t;if(typeof e=="string"?t=document.querySelector(`[data-tab="${e}"], [href="#${e}"]`):t=e,!t)return;let n=t.closest(".vd-tabs, [data-tabs]");if(!n)return;let s=n.querySelectorAll(".vd-tab-link, [data-tab]"),i=n.querySelectorAll(".vd-tab-pane, [data-tab-pane]");this.activateTab(n,t,s,i)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("tabs",m)})();(function(){"use strict";let m={STORAGE_KEYS:{PRIMARY:"vanduo-primary-color",NEUTRAL:"vanduo-neutral-color",RADIUS:"vanduo-radius",FONT:"vanduo-font-preference",THEME:"vanduo-theme-preference"},DEFAULTS:{PRIMARY_LIGHT:"black",PRIMARY_DARK:"amber",NEUTRAL:"neutral",RADIUS:"0.5",FONT:"ubuntu",THEME:"system"},PRIMARY_COLORS:{black:{name:"Black",color:"#000000"},red:{name:"Red",color:"#fa5252"},orange:{name:"Orange",color:"#fd7e14"},amber:{name:"Amber",color:"#f59f00"},yellow:{name:"Yellow",color:"#fcc419"},lime:{name:"Lime",color:"#82c91e"},green:{name:"Green",color:"#40c057"},emerald:{name:"Emerald",color:"#20c997"},teal:{name:"Teal",color:"#12b886"},cyan:{name:"Cyan",color:"#22b8cf"},sky:{name:"Sky",color:"#3bc9db"},blue:{name:"Blue",color:"#228be6"},indigo:{name:"Indigo",color:"#4c6ef5"},violet:{name:"Violet",color:"#7950f2"},purple:{name:"Purple",color:"#be4bdb"},fuchsia:{name:"Fuchsia",color:"#f06595"},pink:{name:"Pink",color:"#e64980"},rose:{name:"Rose",color:"#ff8787"}},NEUTRAL_COLORS:{slate:{name:"Slate",color:"#64748b"},gray:{name:"Gray",color:"#6b7280"},zinc:{name:"Zinc",color:"#71717a"},neutral:{name:"Neutral",color:"#737373"},stone:{name:"Stone",color:"#78716c"}},RADIUS_OPTIONS:["0","0.125","0.25","0.375","0.5"],FONT_OPTIONS:{"jetbrains-mono":{name:"JetBrains Mono",family:"'JetBrains Mono', monospace"},inter:{name:"Inter",family:"'Inter', sans-serif"},"source-sans":{name:"Source Sans 3",family:"'Source Sans 3', sans-serif"},"fira-sans":{name:"Fira Sans",family:"'Fira Sans', sans-serif"},"ibm-plex":{name:"IBM Plex Sans",family:"'IBM Plex Sans', sans-serif"},system:{name:"System Default",family:null},ubuntu:{name:"Ubuntu",family:"'Ubuntu', sans-serif"},"open-sans":{name:"Open Sans",family:"'Open Sans', sans-serif"},rubik:{name:"Rubik",family:"'Rubik', sans-serif"},"titillium-web":{name:"Titillium Web",family:"'Titillium Web', sans-serif"}},THEME_MODES:["system","dark","light"],state:{primary:null,neutral:null,radius:null,font:null,theme:null,isOpen:!1},isInitialized:!1,_cleanup:[],elements:{customizer:null,trigger:null,panel:null,overlay:null},init:function(){if(this.isInitialized){this.bindExistingElements(),this.bindPanelEvents(),this.updateUI();return}this.isInitialized=!0,this._cleanup=[],this.loadPreferences(),this.applyAllPreferences(),this.bindExistingElements(),this.bindEvents(),console.log("Vanduo Theme Customizer initialized")},addListener:function(e,t,n,s){e&&(e.addEventListener(t,n,s),this._cleanup.push(()=>e.removeEventListener(t,n,s)))},getDefaultPrimary:function(e){return e==="system"?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?this.DEFAULTS.PRIMARY_DARK:this.DEFAULTS.PRIMARY_LIGHT:e==="dark"?this.DEFAULTS.PRIMARY_DARK:this.DEFAULTS.PRIMARY_LIGHT},loadPreferences:function(){this.state.theme=this.getStorageValue(this.STORAGE_KEYS.THEME,this.DEFAULTS.THEME),this.state.primary=this.getStorageValue(this.STORAGE_KEYS.PRIMARY,this.getDefaultPrimary(this.state.theme)),this._normalizeDefaultPrimaryIfStaleWithStoredTheme(),this.state.neutral=this.getStorageValue(this.STORAGE_KEYS.NEUTRAL,this.DEFAULTS.NEUTRAL),this.state.radius=this.getStorageValue(this.STORAGE_KEYS.RADIUS,this.DEFAULTS.RADIUS),this.state.font=this.getStorageValue(this.STORAGE_KEYS.FONT,this.DEFAULTS.FONT)},savePreference:function(e,t){this.setStorageValue(e,t)},applyAllPreferences:function(){this.applyPrimary(this.state.primary),this.applyNeutral(this.state.neutral),this.applyRadius(this.state.radius),this.applyFont(this.state.font),this.applyTheme(this.state.theme)},applyPrimary:function(e){this.PRIMARY_COLORS[e]||(e=this.getDefaultPrimary(this.state.theme)),this.state.primary=e,document.documentElement.setAttribute("data-primary",e),this.savePreference(this.STORAGE_KEYS.PRIMARY,e),this.dispatchEvent("primary-change",{color:e})},applyNeutral:function(e){this.NEUTRAL_COLORS[e]||(e=this.DEFAULTS.NEUTRAL),this.state.neutral=e,document.documentElement.setAttribute("data-neutral",e),this.savePreference(this.STORAGE_KEYS.NEUTRAL,e),this.dispatchEvent("neutral-change",{neutral:e})},applyRadius:function(e){this.RADIUS_OPTIONS.includes(e)||(e=this.DEFAULTS.RADIUS),this.state.radius=e,document.documentElement.setAttribute("data-radius",e),document.documentElement.style.setProperty("--radius-scale",e),this.savePreference(this.STORAGE_KEYS.RADIUS,e),this.dispatchEvent("radius-change",{radius:e})},applyFont:function(e){this.FONT_OPTIONS[e]||(e=this.DEFAULTS.FONT),this.state.font=e,e==="system"?document.documentElement.removeAttribute("data-font"):document.documentElement.setAttribute("data-font",e),this.savePreference(this.STORAGE_KEYS.FONT,e),window.FontSwitcher&&window.FontSwitcher.setPreference&&(window.FontSwitcher.state.preference=e,window.FontSwitcher.applyFont()),this.dispatchEvent("font-change",{font:e})},applyTheme:function(e){if(this.THEME_MODES.includes(e)||(e=this.DEFAULTS.THEME),this._isApplying=!0,this.isUsingDefaultPrimary()){let t=this.getDefaultPrimary(e);this.state.primary!==t&&this.applyPrimary(t)}if(this.state.theme=e,e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e),this.savePreference(this.STORAGE_KEYS.THEME,e),window.Vanduo&&window.Vanduo.components.themeSwitcher){let t=window.Vanduo.components.themeSwitcher;t.state&&t.state.preference!==e&&(t.state.preference=e,typeof t.setStorageValue=="function"&&t.setStorageValue(t.STORAGE_KEY,e),typeof t.updateUI=="function"&&t.updateUI())}this._isApplying=!1,this.dispatchEvent("mode-change",{mode:e})},dispatchEvent:function(e,t){let n=new CustomEvent("theme:"+e,{bubbles:!0,detail:t});document.dispatchEvent(n);let s=new CustomEvent("theme:change",{bubbles:!0,detail:{type:e,value:t[Object.keys(t)[0]],state:{...this.state}}});document.dispatchEvent(s)},bindExistingElements:function(){if(this.elements.customizer=document.querySelector(".vd-theme-customizer"),this.elements.customizer)this.elements.trigger=this.elements.customizer.querySelector(".vd-theme-customizer-trigger"),this.elements.panel=this.elements.customizer.querySelector(".vd-theme-customizer-panel"),this.elements.overlay=this.elements.customizer.querySelector(".vd-theme-customizer-overlay");else{let e=document.querySelector("[data-theme-customizer-trigger]");e&&this.createDynamicPanel(e)}this.updateUI()},createDynamicPanel:function(e){let t=document.createElement("div");t.className="vd-theme-customizer",this.elements.trigger=e;let n=document.createElement("div");n.className="vd-theme-customizer-overlay";let s=document.createElement("div");s.className="vd-theme-customizer-panel",s.innerHTML=this.getPanelHTML(),document.body.appendChild(n),document.body.appendChild(s),this.elements.panel=s,this.elements.overlay=n,this.elements.customizer={contains:i=>s.contains(i)||e.contains(i)},this.positionPanel(),this.bindPanelEvents(),this.addListener(window,"resize",()=>this.positionPanel())},positionPanel:function(){if(!this.elements.panel||!this.elements.trigger)return;if(window.innerWidth<768)this.elements.panel.style.top="",this.elements.panel.style.right="",this.elements.panel.style.left="",this.elements.panel.style.height="",this.elements.panel.style.maxHeight="";else{let t=this.elements.trigger.getBoundingClientRect(),n=320,s=t.bottom+8,i=window.innerWidth,a=i-t.right;i-a-n<8&&(a=i-n-8),this.elements.panel.style.top=s+"px",this.elements.panel.style.right=a+"px",this.elements.panel.style.left="",this.elements.panel.style.height="auto",this.elements.panel.style.maxHeight="calc(100vh - "+s+"px)"}},bindPanelEvents:function(){if(!this.elements.panel||this.elements.panel.getAttribute("data-customizer-initialized")==="true")return;this.elements.panel.setAttribute("data-customizer-initialized","true"),this.elements.panel.querySelectorAll("[data-color]").forEach(s=>{this.addListener(s,"click",()=>{this.applyPrimary(s.dataset.color),this.updateUI()})}),this.elements.panel.querySelectorAll("[data-neutral]").forEach(s=>{this.addListener(s,"click",()=>{this.applyNeutral(s.dataset.neutral),this.updateUI()})}),this.elements.panel.querySelectorAll("[data-radius]").forEach(s=>{this.addListener(s,"click",()=>{this.applyRadius(s.dataset.radius),this.updateUI()})});let e=this.elements.panel.querySelector("[data-customizer-font]");e&&this.addListener(e,"change",s=>{this.applyFont(s.target.value),this.updateUI()});let t=this.elements.panel.querySelector(".customizer-reset");t&&this.addListener(t,"click",()=>{this.reset()});let n=this.elements.panel.querySelector(".customizer-mobile-close");n&&this.addListener(n,"click",()=>{this.close()}),this.elements.overlay&&this.addListener(this.elements.overlay,"click",()=>{this.close()})},getPanelHTML:function(){let e=typeof escapeHtml=="function"?escapeHtml:function(o){let r=document.createElement("div");return r.textContent=String(o??""),r.innerHTML},t=function(o){let r=String(o??"").trim();return/^(#[0-9a-fA-F]{3,8}|rgb[a]?\([^)]{1,60}\)|hsl[a]?\([^)]{1,60}\)|var\(--[a-zA-Z0-9_-]{1,40}\))$/.test(r)?r:"#000000"},n="";for(let[o,r]of Object.entries(this.PRIMARY_COLORS))n+=`<button class="tc-color-swatch${o===this.state.primary?" is-active":""}" data-color="${e(o)}" style="--swatch-color: ${t(r.color)}" title="${e(r.name)}"></button>`;let s="";for(let[o,r]of Object.entries(this.NEUTRAL_COLORS))s+=`<button class="tc-neutral-swatch${o===this.state.neutral?" is-active":""}" data-neutral="${e(o)}" style="--swatch-color: ${t(r.color)}" title="${e(r.name)}"><span>${e(r.name)}</span></button>`;let i="";this.RADIUS_OPTIONS.forEach(o=>{i+=`<button class="tc-radius-btn${o===this.state.radius?" is-active":""}" data-radius="${e(o)}">${e(o)}</button>`});let a="";for(let[o,r]of Object.entries(this.FONT_OPTIONS))a+=`<option value="${e(o)}"${o===this.state.font?" selected":""}>${e(r.name)}</option>`;return`
6
6
  <div class="tc-header">
7
7
  <h3 class="tc-title">Customize Theme</h3>
8
8
  <button class="customizer-mobile-close" aria-label="Close">
@@ -39,5 +39,5 @@
39
39
  <div class="tc-footer">
40
40
  <button class="customizer-reset btn btn-sm btn-outline">Reset to Defaults</button>
41
41
  </div>
42
- `},isUsingDefaultPrimary:function(){return this.state.primary===this.DEFAULTS.PRIMARY_LIGHT||this.state.primary===this.DEFAULTS.PRIMARY_DARK},bindEvents:function(){if(this.elements.trigger&&this.addListener(this.elements.trigger,"click",e=>{e.preventDefault(),e.stopPropagation(),this.toggle()}),this.bindPanelEvents(),window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{if(this.state.theme==="system"&&this.isUsingDefaultPrimary()){let n=this.getDefaultPrimary("system");n!==this.state.primary&&(this.applyPrimary(n),this.updateUI())}};e.addEventListener("change",t),this._cleanup.push(()=>e.removeEventListener("change",t))}this.addListener(document,"click",e=>{this.state.isOpen&&this.elements.customizer&&!this.elements.customizer.contains(e.target)&&this.close()}),this.addListener(document,"keydown",e=>{e.key==="Escape"&&this.state.isOpen&&this.close()})},toggle:function(){this.state.isOpen?this.close():this.open()},open:function(){this.state.isOpen=!0,this.positionPanel(),this.elements.panel&&this.elements.panel.classList.add("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","true"),this.elements.overlay&&this.elements.overlay.classList.add("is-active"),this.dispatchEvent("panel-open",{isOpen:!0})},close:function(){this.state.isOpen=!1,this.elements.panel&&this.elements.panel.classList.remove("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","false"),this.elements.overlay&&this.elements.overlay.classList.remove("is-active"),this.dispatchEvent("panel-close",{isOpen:!1})},updateUI:function(){if(!this.elements.panel)return;this.elements.panel.querySelectorAll("[data-color]").forEach(t=>{t.classList.toggle("is-active",t.dataset.color===this.state.primary)}),this.elements.panel.querySelectorAll("[data-neutral]").forEach(t=>{t.classList.toggle("is-active",t.dataset.neutral===this.state.neutral)}),this.elements.panel.querySelectorAll("[data-radius]").forEach(t=>{t.classList.toggle("is-active",t.dataset.radius===this.state.radius)});let e=this.elements.panel.querySelector("[data-customizer-font]");e&&(e.value=this.state.font)},reset:function(){this.applyTheme(this.DEFAULTS.THEME),this.applyPrimary(this.getDefaultPrimary(this.DEFAULTS.THEME)),this.applyNeutral(this.DEFAULTS.NEUTRAL),this.applyRadius(this.DEFAULTS.RADIUS),this.applyFont(this.DEFAULTS.FONT),this.updateUI(),this.dispatchEvent("reset",{state:{...this.state}})},getState:function(){return{...this.state}},setPreferences:function(e){e.primary&&this.applyPrimary(e.primary),e.neutral&&this.applyNeutral(e.neutral),e.radius&&this.applyRadius(e.radius),e.font&&this.applyFont(e.font),e.theme&&this.applyTheme(e.theme),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},destroyAll:function(){this._cleanup.forEach(e=>e()),this._cleanup=[],this.elements.panel&&this.elements.panel.removeAttribute("data-customizer-initialized"),this.close(),this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeCustomizer",m),window.ThemeCustomizer=m})();(function(){"use strict";let m={isInitialized:!1,_mediaQuery:null,_onMediaChange:null,init:function(){if(this.STORAGE_KEY="vanduo-theme-preference",this.state={preference:this.getPreference()},this.isInitialized){this.applyTheme(),this.renderUI(),this.updateUI();return}this.isInitialized=!0,this.applyTheme(),this.listenForSystemChanges(),this.renderUI(),console.log("Vanduo Theme Switcher initialized")},getPreference:function(){return this.getStorageValue(this.STORAGE_KEY,"system")},setPreference:function(e){this.state.preference=e,this.setStorageValue(this.STORAGE_KEY,e),this.applyTheme(),window.ThemeCustomizer&&window.ThemeCustomizer.applyTheme&&!window.ThemeCustomizer._isApplying&&window.ThemeCustomizer.applyTheme(e),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},applyTheme:function(){let e=this.state.preference;e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)},listenForSystemChanges:function(){this._mediaQuery&&this._onMediaChange||(this._mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this._onMediaChange=e=>{this.state.preference==="system"&&this.applyTheme()},this._mediaQuery.addEventListener("change",this._onMediaChange))},renderUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.getAttribute("data-theme-initialized")==="true"){t.tagName==="SELECT"&&(t.value=this.state.preference);return}if(t.tagName==="SELECT"){t.value=this.state.preference;let n=s=>{this.setPreference(s.target.value)};t.addEventListener("change",n),t._themeToggleHandler=n}else{let n=()=>{let s=["system","light","dark"],i=(s.indexOf(this.state.preference)+1)%s.length;this.setPreference(s[i])};t.addEventListener("click",n),t._themeToggleHandler=n}t.setAttribute("data-theme-initialized","true")})},updateUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.tagName==="SELECT")t.value=this.state.preference;else{let n=t.querySelector(".theme-current-label");n&&(n.textContent=this.state.preference.charAt(0).toUpperCase()+this.state.preference.slice(1))}})},destroyAll:function(){document.querySelectorAll('[data-toggle="theme"][data-theme-initialized="true"]').forEach(t=>{if(t._themeToggleHandler){let n=t.tagName==="SELECT"?"change":"click";t.removeEventListener(n,t._themeToggleHandler),delete t._themeToggleHandler}t.removeAttribute("data-theme-initialized")}),this._mediaQuery&&this._onMediaChange&&this._mediaQuery.removeEventListener("change",this._onMediaChange),this._mediaQuery=null,this._onMediaChange=null,this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeSwitcher",m)})();(function(){"use strict";let m={defaults:{position:"top-right",duration:5e3,dismissible:!0,showProgress:!0,pauseOnHover:!0},containers:{},getContainer:function(e){if(this.containers[e])return this.containers[e];let t=document.createElement("div");return t.className=`vd-toast-container vd-toast-container-${e}`,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","false"),document.body.appendChild(t),this.containers[e]=t,t},show:function(e,t,n){typeof e=="string"&&(e={message:e,type:t,duration:n});let s=Object.assign({},this.defaults,e),i=this.getContainer(s.position),a=document.createElement("div");a.className="vd-toast",s.type&&a.classList.add(`vd-toast-${s.type}`),s.solid&&a.classList.add("vd-toast-solid"),s.showProgress&&s.duration>0&&a.classList.add("vd-toast-with-progress");let o="";if(s.icon){let v=typeof sanitizeHtml=="function"?sanitizeHtml(s.icon):escapeHtml(s.icon);o+=`<span class="vd-toast-icon">${v}</span>`}else s.type&&(o+=`<span class="vd-toast-icon">${this.getDefaultIcon(s.type)}</span>`);let r=typeof escapeHtml=="function"?escapeHtml:function(v){let y=document.createElement("div");return y.appendChild(document.createTextNode(v)),y.innerHTML};if(o+='<div class="vd-toast-content">',s.title&&(o+=`<div class="vd-toast-title">${r(String(s.title))}</div>`),s.message&&(o+=`<div class="vd-toast-message">${r(String(s.message))}</div>`),o+="</div>",s.dismissible&&(o+='<button type="button" class="vd-toast-close" aria-label="Close"></button>'),s.showProgress&&s.duration>0){let v=parseInt(s.duration,10)||0;o+=`<div class="vd-toast-progress" style="animation-duration: ${v}ms"></div>`}if(a.innerHTML=o,i.appendChild(a),a._toastCleanup=[],s.dismissible){let v=a.querySelector(".vd-toast-close"),y=()=>{this.dismiss(a)};v.addEventListener("click",y),a._toastCleanup.push(()=>v.removeEventListener("click",y))}let l=null,d=s.duration,c=null,u=()=>{if(s.duration>0){c=Date.now(),l=setTimeout(()=>{this.dismiss(a)},d),a._toastTimeoutId=l;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="running")}},h=()=>{if(l){clearTimeout(l),l=null,a._toastTimeoutId=null,d-=Date.now()-c;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="paused")}};s.pauseOnHover&&(a.addEventListener("mouseenter",h),a.addEventListener("mouseleave",u),a._toastCleanup.push(()=>a.removeEventListener("mouseenter",h),()=>a.removeEventListener("mouseleave",u))),requestAnimationFrame(()=>{a.classList.add("is-visible"),u()}),a._toastConfig=s;let p=new CustomEvent("toast:show",{bubbles:!0,detail:{toast:a,config:s}});return a.dispatchEvent(p),a},dismiss:function(e){if(!e||e.classList.contains("is-exiting"))return;e._toastTimeoutId&&(clearTimeout(e._toastTimeoutId),e._toastTimeoutId=null),e.classList.remove("is-visible"),e.classList.add("is-exiting");let t=new CustomEvent("toast:dismiss",{bubbles:!0,detail:{toast:e}});e.dispatchEvent(t);let n=()=>{e.removeEventListener("transitionend",n),e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)};e.addEventListener("transitionend",n),setTimeout(()=>{e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)},400)},destroyAll:function(){Object.keys(this.containers).forEach(e=>{let t=this.containers[e];if(!t)return;t.querySelectorAll(".vd-toast").forEach(s=>{s._toastTimeoutId&&clearTimeout(s._toastTimeoutId),s._toastCleanup&&(s._toastCleanup.forEach(i=>i()),delete s._toastCleanup),s.parentElement&&s.parentElement.removeChild(s)}),t.parentElement&&t.parentElement.removeChild(t)}),this.containers={}},dismissAll:function(e){e&&this.containers[e]?this.containers[e].querySelectorAll(".vd-toast").forEach(n=>this.dismiss(n)):Object.values(this.containers).forEach(t=>{t.querySelectorAll(".vd-toast").forEach(s=>this.dismiss(s))})},getDefaultIcon:function(e){return{success:'<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="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',error:'<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"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',warning:'<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.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',info:'<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"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>'}[e]||""},success:function(e,t){return this.show(Object.assign({message:e,type:"success"},t))},error:function(e,t){return this.show(Object.assign({message:e,type:"error"},t))},warning:function(e,t){return this.show(Object.assign({message:e,type:"warning"},t))},info:function(e,t){return this.show(Object.assign({message:e,type:"info"},t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("toast",m),window.Toast=m})();(function(){"use strict";let m={tooltips:new Map,delayTimers:new Map,sanitizeHtml:function(e){if(typeof sanitizeHtml=="function")return sanitizeHtml(e);let t=document.createElement("div");return t.textContent=e||"",t.innerHTML},init:function(){document.querySelectorAll("[data-tooltip], [data-tooltip-html]").forEach(t=>{this.tooltips.has(t)||this.initTooltip(t)})},initTooltip:function(e){let t=this.createTooltip(e),n=[],s=()=>{this.showTooltip(e,t)},i=()=>{this.hideTooltip(e,t)},a=()=>{this.showTooltip(e,t)},o=()=>{this.hideTooltip(e,t)};e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",i),e.addEventListener("focus",a),e.addEventListener("blur",o),n.push(()=>e.removeEventListener("mouseenter",s),()=>e.removeEventListener("mouseleave",i),()=>e.removeEventListener("focus",a),()=>e.removeEventListener("blur",o)),this.tooltips.set(e,{tooltip:t,cleanup:n})},createTooltip:function(e){let t=document.createElement("div");t.className="vd-tooltip",t.setAttribute("role","tooltip"),t.setAttribute("aria-hidden","true");let n="tooltip-"+Math.random().toString(36).substr(2,9);t.id=n,e.setAttribute("aria-describedby",n);let s=e.dataset.tooltipHtml,i=e.dataset.tooltip;s?(t.innerHTML=this.sanitizeHtml(s),t.classList.add("vd-tooltip-html")):i&&(t.textContent=i);let a=e.dataset.tooltipPlacement||e.dataset.placement||"top";t.setAttribute("data-placement",a),t.classList.add(`vd-tooltip-${a}`),e.dataset.tooltipVariant&&t.classList.add(`vd-tooltip-${e.dataset.tooltipVariant}`),e.dataset.tooltipSize&&t.classList.add(`vd-tooltip-${e.dataset.tooltipSize}`);let o=parseInt(e.dataset.tooltipDelay)||0;return t.dataset.delay=o,document.body.appendChild(t),t},showTooltip:function(e,t){let n=parseInt(t.dataset.delay)||0;if(n>0){let s=setTimeout(()=>{this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},n);this.delayTimers.set(e,s)}else this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},hideTooltip:function(e,t){let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.classList.remove("is-visible"),t.setAttribute("aria-hidden","true")},positionTooltip:function(e,t){let n=t.dataset.placement||"top",s=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,r=0,l=0;switch(n){case"top":r=s.top+a-i.height-8,l=s.left+o+s.width/2-i.width/2;break;case"bottom":r=s.bottom+a+8,l=s.left+o+s.width/2-i.width/2;break;case"left":r=s.top+a+s.height/2-i.height/2,l=s.left+o-i.width-8;break;case"right":r=s.top+a+s.height/2-i.height/2,l=s.right+o+8;break}let d=window.innerWidth,c=window.innerHeight,u=8;l<u?l=u:l+i.width>d-u&&(l=d-i.width-u),r<a+u?r=a+u:r+i.height>a+c-u&&(r=a+c-i.height-u),t.style.cssText=`position: absolute; top: 0; left: 0; transform: translate(${l}px, ${r}px);`},show:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.showTooltip(t,n)}},hide:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.hideTooltip(t,n)}},update:function(e,t,n=!1){let s=typeof e=="string"?document.querySelector(e):e;if(s&&this.tooltips.has(s)){let{tooltip:i}=this.tooltips.get(s);n?(i.innerHTML=this.sanitizeHtml(t),i.classList.add("vd-tooltip-html")):(i.textContent=t,i.classList.remove("vd-tooltip-html"))}},destroy:function(e){let t=this.tooltips.get(e);if(!t)return;let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.cleanup.forEach(s=>s()),t.tooltip&&t.tooltip.parentNode&&t.tooltip.parentNode.removeChild(t.tooltip),this.tooltips.delete(e)},destroyAll:function(){this.tooltips.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("tooltips",m),window.VanduoTooltips=m})();(function(){"use strict";let m={minQueryLength:2,maxResults:10,debounceMs:150,highlightTag:"mark",keyboardShortcut:!0,containerSelector:".vd-doc-search",inputSelector:".vd-doc-search-input",resultsSelector:".vd-doc-search-results",contentSelector:".doc-content section[id]",titleSelector:".demo-title, h2, h3",navSelector:".doc-nav-link",sectionSelector:".doc-nav-section",excludeFromContent:"pre, code, script, style",maxContentLength:500,data:null,categoryIcons:{"getting-started":"ph-rocket-launch",core:"ph-cube",components:"ph-puzzle-piece",interactive:"ph-cursor-click","data-display":"ph-table",feedback:"ph-bell",meta:"ph-info",default:"ph-file-text"},onSelect:null,onSearch:null,onOpen:null,onClose:null,emptyTitle:"No results found",emptyText:"Try different keywords or check spelling",placeholder:"Search..."};function e(n){let s=Object.assign({},m,n||{}),i={initialized:!1,index:[],results:[],activeIndex:-1,isOpen:!1,query:"",container:null,input:null,resultsContainer:null,debounceTimer:null,boundHandlers:{}};function a(b,S,...A){try{S(...A)}catch(_){console.warn('[Vanduo Search] Callback error in "'+b+'":',_)}}function o(b){if(i.resultsContainer)try{i.resultsContainer.innerHTML=b}catch(S){console.warn("[Vanduo Search] Failed to render results:",S)}}function r(){return i.initialized?U:(i.container=document.querySelector(s.containerSelector),!i.container||(i.input=i.container.querySelector(s.inputSelector),i.resultsContainer=i.container.querySelector(s.resultsSelector),!i.input||!i.resultsContainer)?(i.initialized=!1,null):(s.placeholder&&i.input.setAttribute("placeholder",s.placeholder),l(),v(),C(),i.initialized=!0,U))}function l(){if(i.index=[],s.data&&Array.isArray(s.data)){s.data.forEach(function(A){i.index.push({id:A.id||p(A.title),title:A.title||"",category:A.category||"",categorySlug:p(A.category||""),content:A.content||"",keywords:A.keywords||h(A.title+" "+A.content),url:A.url||"#"+(A.id||p(A.title)),icon:A.icon||""})});return}let b=document.querySelectorAll(s.contentSelector),S=d();b.forEach(function(A){let _=A.id;if(!_)return;let N=A.querySelector(s.titleSelector),q=N?N.textContent.replace(/v[\d.]+/g,"").trim():_,W=S[_]||"Documentation",$=c(A),B=u(A,q),Y=N?N.querySelector("i.ph"):null,X="";if(Y&&Y.classList){for(let K=0;K<Y.classList.length;K++)if(Y.classList[K].indexOf("ph-")===0){X=Y.classList[K];break}}i.index.push({id:_,title:q,category:W,categorySlug:p(W),content:$,keywords:B,url:"#"+_,icon:X})})}function d(){let b={},S="Documentation";return document.querySelectorAll(s.navSelector+", "+s.sectionSelector).forEach(function(_){if(_.classList.contains("doc-nav-section"))S=_.textContent.trim();else{let N=_.getAttribute("href");if(N&&N.startsWith("#")){let q=N.substring(1);b[q]=S}}}),b}function c(b){let S=b.cloneNode(!0);S.querySelectorAll(s.excludeFromContent).forEach(function(N){N.remove()});let _=S.textContent||"";return _=_.replace(/\s+/g," ").trim(),_.substring(0,s.maxContentLength)}function u(b,S){let A=[];return S.toLowerCase().split(/\s+/).forEach(function(q){q.length>2&&A.push(q)}),b.querySelectorAll("code").forEach(function(q){let $=(q.textContent||"").match(/\.([\w-]+)/g);$&&$.forEach(function(B){A.push(B.substring(1).toLowerCase())})}),b.querySelectorAll("[data-tooltip], [data-modal]").forEach(function(q){q.getAttributeNames().filter(function($){return $.startsWith("data-")}).forEach(function($){A.push($.replace("data-",""))})}),Array.from(new Set(A))}function h(b){return b.toLowerCase().split(/\s+/).filter(function(A){return A.length>2})}function p(b){return b.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}function v(){i.boundHandlers.handleInput=function(b){L(b)},i.boundHandlers.handleFocus=function(){i.query.length>=s.minQueryLength&&H()},i.boundHandlers.handleKeydown=function(b){P(b)},i.boundHandlers.handleOutsideClick=function(b){i.container.contains(b.target)||R()},i.boundHandlers.handleGlobalKeydown=function(b){s.keyboardShortcut&&(b.metaKey||b.ctrlKey)&&b.key==="k"&&(b.preventDefault(),i.input.focus(),i.input.select())},i.boundHandlers.handleResultClick=function(b){let S=b.target.closest(".vd-doc-search-result");if(S){let A=parseInt(S.dataset.index,10);I(A)}},i.input.addEventListener("input",i.boundHandlers.handleInput),i.input.addEventListener("focus",i.boundHandlers.handleFocus),i.input.addEventListener("keydown",i.boundHandlers.handleKeydown),document.addEventListener("click",i.boundHandlers.handleOutsideClick),document.addEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer.addEventListener("click",i.boundHandlers.handleResultClick)}function y(){i.input&&(i.input.removeEventListener("input",i.boundHandlers.handleInput),i.input.removeEventListener("focus",i.boundHandlers.handleFocus),i.input.removeEventListener("keydown",i.boundHandlers.handleKeydown)),document.removeEventListener("click",i.boundHandlers.handleOutsideClick),document.removeEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer&&i.resultsContainer.removeEventListener("click",i.boundHandlers.handleResultClick)}function C(){let b=i.resultsContainer.id||"search-results-"+Math.random().toString(36).substr(2,9);i.resultsContainer.id=b,i.input.setAttribute("role","combobox"),i.input.setAttribute("aria-autocomplete","list"),i.input.setAttribute("aria-controls",b),i.input.setAttribute("aria-expanded","false"),i.resultsContainer.setAttribute("role","listbox"),i.resultsContainer.setAttribute("aria-label","Search results")}function L(b){let S=b.target.value.trim();i.debounceTimer&&clearTimeout(i.debounceTimer),i.debounceTimer=setTimeout(function(){if(i.query=S,S.length<s.minQueryLength){R();return}i.results=x(S),i.activeIndex=-1,D(),H(),typeof s.onSearch=="function"&&a("onSearch",s.onSearch,S,i.results)},s.debounceMs)}function P(b){if(!i.isOpen){b.key==="ArrowDown"&&i.query.length>=s.minQueryLength&&(b.preventDefault(),i.results=x(i.query),D(),H());return}switch(b.key){case"ArrowDown":b.preventDefault(),w(1);break;case"ArrowUp":b.preventDefault(),w(-1);break;case"Enter":b.preventDefault(),i.activeIndex>=0?I(i.activeIndex):i.results.length>0&&I(0);break;case"Escape":b.preventDefault(),R();break;case"Tab":R();break}}function x(b){let S=b.toLowerCase().split(/\s+/).filter(function(_){return _.length>0}),A=[];return i.index.forEach(function(_){let N=0,q=_.title.toLowerCase(),W=_.category.toLowerCase(),$=_.content.toLowerCase();S.forEach(function(B){q.includes(B)&&(N+=100,q===B?N+=50:q.startsWith(B)&&(N+=25)),W.includes(B)&&(N+=50),_.keywords.some(function(X){return X.includes(B)})&&(N+=30),$.includes(B)&&(N+=10)}),N>0&&A.push({id:_.id,title:_.title,category:_.category,categorySlug:_.categorySlug,content:_.content,url:_.url,icon:_.icon,score:N})}),A.sort(function(_,N){return N.score-_.score}),A.slice(0,s.maxResults)}function D(){if(i.results.length===0){o(V());return}let b='<ul class="vd-doc-search-results-list" role="listbox">';i.results.forEach(function(S,A){let _=A===i.activeIndex,N=S.icon||k(S.categorySlug),q=T(S.content,i.query);b+='<li class="vd-doc-search-result'+(_?" is-active":"")+'" role="option" id="vd-doc-search-result-'+A+'" data-index="'+A+'" data-category="'+f(S.categorySlug)+'" aria-selected="'+_+'"><div class="vd-doc-search-result-icon"><i class="ph '+f(N)+'"></i></div><div class="vd-doc-search-result-content"><div class="vd-doc-search-result-title">'+M(S.title,i.query)+'</div><div class="vd-doc-search-result-category">'+f(S.category)+'</div><div class="vd-doc-search-result-excerpt">'+M(q,i.query)+"</div></div></li>"}),b+="</ul>",b+=g(),o(b)}function V(){return'<div class="vd-doc-search-empty"><div class="vd-doc-search-empty-icon"><i class="ph ph-magnifying-glass"></i></div><div class="vd-doc-search-empty-title">'+f(s.emptyTitle)+'</div><div class="vd-doc-search-empty-text">'+f(s.emptyText)+"</div></div>"}function g(){return'<div class="vd-doc-search-footer"><span class="vd-doc-search-footer-item"><kbd>\u2191</kbd><kbd>\u2193</kbd> to navigate</span><span class="vd-doc-search-footer-item"><kbd>\u21B5</kbd> to select</span><span class="vd-doc-search-footer-item"><kbd>esc</kbd> to close</span></div>'}function k(b){return s.categoryIcons[b]||s.categoryIcons.default||"ph-file-text"}function T(b,S){let A=S.toLowerCase().split(/\s+/),_=b.toLowerCase(),N=100,q=-1;for(let Y=0;Y<A.length;Y++){let X=_.indexOf(A[Y]);X!==-1&&(q===-1||X<q)&&(q=X)}if(q===-1)return b.substring(0,N)+"...";let W=Math.max(0,q-30),$=Math.min(b.length,q+N),B=b.substring(W,$);return W>0&&(B="..."+B),$<b.length&&(B=B+"..."),B}function M(b,S){if(!S)return f(b);let A=S.toLowerCase().split(/\s+/).filter(function(N){return N.length>0}),_=f(b);return A.forEach(function(N){if(N.length>50)return;let q=new RegExp("("+N.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")","gi");_=_.replace(q,"<"+s.highlightTag+">$1</"+s.highlightTag+">")}),_}function f(b){let S=document.createElement("div");return S.textContent=b,S.innerHTML}function w(b){let S=i.activeIndex+b;S<0?S=i.results.length-1:S>=i.results.length&&(S=0),E(S)}function E(b){let S=i.resultsContainer.querySelector(".vd-doc-search-result.is-active");S&&(S.classList.remove("is-active"),S.setAttribute("aria-selected","false")),i.activeIndex=b;let A=i.resultsContainer.querySelector('[data-index="'+b+'"]');A&&(A.classList.add("is-active"),A.setAttribute("aria-selected","true"),i.input.setAttribute("aria-activedescendant","vd-doc-search-result-"+b),A.scrollIntoView({block:"nearest"}))}function I(b){let S=i.results[b];if(!S)return;if(R(),i.input.value="",i.query="",typeof s.onSelect=="function"){a("onSelect",s.onSelect,S);return}let A=document.querySelector(S.url);A&&(A.scrollIntoView({behavior:"smooth",block:"start"}),window.history.pushState(null,"",S.url),O(S.id))}function O(b){document.querySelectorAll(s.navSelector).forEach(function(A){A.classList.remove("active"),A.getAttribute("href")==="#"+b&&A.classList.add("active")})}function H(){i.isOpen||(i.isOpen=!0,i.resultsContainer.classList.add("is-open"),i.input.setAttribute("aria-expanded","true"),typeof s.onOpen=="function"&&a("onOpen",s.onOpen))}function R(){i.isOpen&&(i.isOpen=!1,i.activeIndex=-1,i.resultsContainer.classList.remove("is-open"),i.input.setAttribute("aria-expanded","false"),i.input.removeAttribute("aria-activedescendant"),typeof s.onClose=="function"&&a("onClose",s.onClose))}function z(){y(),i.initialized=!1,i.index=[],i.results=[],i.isOpen=!1,i.query="",i.debounceTimer&&clearTimeout(i.debounceTimer),i.resultsContainer&&o("")}function j(){l()}function G(b){Object.assign(s,b)}function J(){return Object.assign({},s)}function F(){return i.index.slice()}let U={init:r,destroy:z,rebuild:j,search:x,open:H,close:R,setConfig:G,getConfig:J,getIndex:F};return U}let t={create:function(n){let s=e(n);return s&&s.init(),s||null},_instance:null,config:Object.assign({},m),init:function(n){return this._instance&&this._instance.destroy(),n&&Object.assign(this.config,n),this._instance=e(this.config),this._instance?this._instance.init():null},destroy:function(){this._instance&&(this._instance.destroy(),this._instance=null)},destroyAll:function(){this.destroy()},rebuild:function(){this._instance&&this._instance.rebuild()},search:function(n){return this._instance?this._instance.search(n):[]},open:function(){this._instance&&this._instance.open()},close:function(){this._instance&&this._instance.close()}};typeof window.Vanduo<"u"&&window.Vanduo.register("docSearch",t),window.Search=t,window.DocSearch=t,window.VanduoDocSearch=t})();(function(){"use strict";let m={instances:new Map,currentDrag:null,touchState:null,feedbackElement:null,init:function(){document.querySelectorAll(".vd-draggable, [data-draggable]").forEach(s=>{this.instances.has(s)||this.initDraggable(s)}),document.querySelectorAll(".vd-draggable-container, .vd-draggable-container-vertical").forEach(s=>{this.instances.has(s)||this.initContainer(s)}),document.querySelectorAll(".vd-drop-zone").forEach(s=>{this.instances.has(s)||this.initDropZone(s)}),this.createFeedbackElement()},initDraggable:function(e){let t=[];e.hasAttribute("draggable")||e.setAttribute("draggable","true"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.setAttribute("role","option"),e.setAttribute("aria-roledescription","draggable item"),e.setAttribute("aria-grabbed","false");let n=c=>{this.handleDragStart(c,e)};e.addEventListener("dragstart",n),t.push(()=>e.removeEventListener("dragstart",n));let s=c=>{this.handleDrag(c,e)};e.addEventListener("drag",s),t.push(()=>e.removeEventListener("drag",s));let i=c=>{this.handleDragEnd(c,e)};e.addEventListener("dragend",i),t.push(()=>e.removeEventListener("dragend",i));let a=c=>{this.handleTouchStart(c,e)};e.addEventListener("touchstart",a),t.push(()=>e.removeEventListener("touchstart",a));let o=c=>{this.handleTouchMove(c,e)};e.addEventListener("touchmove",o,{passive:!1}),t.push(()=>e.removeEventListener("touchmove",o));let r=c=>{this.handleTouchEnd(c,e)};e.addEventListener("touchend",r,{passive:!1}),t.push(()=>e.removeEventListener("touchend",r));let l=c=>{this.handleTouchEnd(c,e)};e.addEventListener("touchcancel",l),t.push(()=>e.removeEventListener("touchcancel",l));let d=c=>{this.handleKeydown(c,e)};e.addEventListener("keydown",d),t.push(()=>e.removeEventListener("keydown",d)),this.instances.set(e,{cleanup:t})},initContainer:function(e){e.setAttribute("role","listbox"),e.setAttribute("aria-label",e.getAttribute("aria-label")||"Draggable items"),e.querySelectorAll(".vd-draggable-item").forEach(o=>{this.instances.has(o)||this.initDraggable(o)});let n=[],s=o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},i=o=>{if(o.preventDefault(),o.dataTransfer.dropEffect="move",!this.currentDrag)return;let r=this.currentDrag.element;e.contains(r)&&(o.clientX===0&&o.clientY===0||this.handleReorder(e,r,o.clientX,o.clientY))},a=o=>{o.preventDefault()};e.addEventListener("dragenter",s),e.addEventListener("dragover",i),e.addEventListener("drop",a),n.push(()=>{e.removeEventListener("dragenter",s),e.removeEventListener("dragover",i),e.removeEventListener("drop",a)}),this.instances.set(e,{cleanup:n})},initDropZone:function(e){let t=[];e.setAttribute("role","region"),e.setAttribute("aria-dropeffect","move"),e.hasAttribute("aria-label")||e.setAttribute("aria-label","Drop zone");let n=o=>{o.preventDefault(),this.handleDragOver(o,e)};e.addEventListener("dragover",n),t.push(()=>e.removeEventListener("dragover",n));let s=o=>{o.preventDefault(),this.handleDragEnter(o,e)};e.addEventListener("dragenter",s),t.push(()=>e.removeEventListener("dragenter",s));let i=o=>{this.handleDragLeave(o,e)};e.addEventListener("dragleave",i),t.push(()=>e.removeEventListener("dragleave",i));let a=o=>{o.preventDefault(),this.handleDrop(o,e)};e.addEventListener("drop",a),t.push(()=>e.removeEventListener("drop",a)),this.instances.set(e,{cleanup:t})},createFeedbackElement:function(){if(!this.feedbackElement){let e=document.querySelector(".vd-drag-feedback");if(e){this.feedbackElement=e;return}this.feedbackElement=document.createElement("div"),this.feedbackElement.className="vd-drag-feedback hidden",this.feedbackElement.setAttribute("role","presentation"),document.body.appendChild(this.feedbackElement)}},handleDragStart:function(e,t){t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:e.clientX,y:e.clientY},initialBounds:t.getBoundingClientRect(),data:this.getData(t)},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",this.currentDrag.data),t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY}}}))},handleDrag:function(e,t){this.currentDrag&&t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-this.currentDrag.initialPosition.x,y:e.clientY-this.currentDrag.initialPosition.y}}}))},handleDragEnd:function(e,t){t.classList.remove("is-dragging"),t.classList.add("is-dropped"),setTimeout(()=>t.classList.remove("is-dropped"),300),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let n=this.currentDrag?.data||this.getData(t),s=this.currentDrag?.initialPosition||{x:0,y:0};t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:n,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-s.x,y:e.clientY-s.y}}})),this.currentDrag=null},handleTouchStart:function(e,t){let n=e.touches[0];this.touchState={element:t,startX:n.clientX,startY:n.clientY,startTime:Date.now(),isDragging:!1}},handleTouchMove:function(e,t){if(!this.touchState)return;let n=e.touches[0],s=n.clientX-this.touchState.startX,i=n.clientY-this.touchState.startY;if((Math.abs(s)>10||Math.abs(i)>10)&&(e.cancelable&&e.preventDefault(),this.touchState.isDragging||(this.touchState.isDragging=!0,t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:this.touchState.startX,y:this.touchState.startY},initialBounds:t.getBoundingClientRect(),data:this.getData(t)},t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY}}}))),this.updateFeedback(n.clientX,n.clientY),this.currentDrag)){t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY},delta:{x:s,y:i}}}));let a=t.closest(".vd-draggable-container");a&&a.contains(t)&&this.handleReorder(a,t,n.clientX,n.clientY)}},handleTouchEnd:function(e,t){if(this.touchState&&this.touchState.isDragging){e.cancelable&&e.preventDefault(),t.classList.remove("is-dragging"),t.classList.add("is-dropped"),t.setAttribute("aria-grabbed","false"),setTimeout(()=>t.classList.remove("is-dropped"),300),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let n=e.changedTouches[0],s=this.currentDrag?.data||this.getData(t),i=this.touchState?.startX||0,a=this.touchState?.startY||0;t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:s,position:{x:n.clientX,y:n.clientY},delta:{x:n.clientX-i,y:n.clientY-a}}}))}this.touchState=null,this.currentDrag=null},handleDragOver:function(e,t){e.preventDefault(),e.dataTransfer.dropEffect="move"},handleDragEnter:function(e,t){e.preventDefault(),t.classList.add("is-drag-over")},handleDragLeave:function(e,t){t.classList.remove("is-drag-over")},handleDrop:function(e,t){e.preventDefault(),t.classList.remove("is-drag-over"),t.dispatchEvent(new CustomEvent("draggable:drop",{bubbles:!0,detail:{zone:t,element:this.currentDrag?.element,data:this.currentDrag?.data,position:{x:e.clientX,y:e.clientY}}}))},handleReorder:function(e,t,n,s){let i=e.classList.contains("vd-draggable-container-vertical"),o=[...e.querySelectorAll(".vd-draggable-item:not(.is-dragging), .vd-draggable:not(.is-dragging)")].reduce((r,l)=>{let d=l.getBoundingClientRect(),c=i?s-d.top-d.height/2:n-d.left-d.width/2;return c<0&&c>r.offset?{offset:c,element:l}:r},{offset:Number.NEGATIVE_INFINITY}).element;o==null?e.appendChild(t):e.insertBefore(t,o)},handleKeydown:function(e,t){switch(e.key){case"Enter":case" ":e.preventDefault(),t.click();break;case"Escape":t.classList.contains("is-dragging")&&(t.classList.remove("is-dragging"),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden"),this.currentDrag=null);break;case"ArrowUp":case"ArrowLeft":{e.preventDefault();let n=t.previousElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(t,n),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"up"}})));break}case"ArrowDown":case"ArrowRight":{e.preventDefault();let n=t.nextElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(n,t),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"down"}})));break}}},getData:function(e){return e.dataset.draggable||e.textContent.trim()},updateFeedback:function(e,t){if(!this.currentDrag)return;this.feedbackElement.classList.remove("hidden");let n=this.currentDrag.initialBounds;this.feedbackElement.innerHTML="";let s=this.currentDrag.element.cloneNode(!0);this.feedbackElement.appendChild(s),Object.assign(this.feedbackElement.style,{left:e-20+"px",top:t-20+"px",width:n.width+"px",height:n.height+"px"})},makeDraggable:function(e,t={}){let n=typeof e=="string"?document.querySelector(e):e;n&&!this.instances.has(n)&&(n.classList.add("vd-draggable"),n.setAttribute("draggable","true"),t.data&&(n.dataset.draggable=t.data),this.initDraggable(n))},removeDraggable:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&this.instances.has(t)&&(this.instances.get(t).cleanup.forEach(s=>s()),this.instances.delete(t),t.classList.remove("vd-draggable"),t.removeAttribute("draggable"),t.removeAttribute("data-draggable"))},destroy:function(e){this.removeDraggable(e)},destroyAll:function(){Array.from(this.instances.keys()).forEach(t=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("draggable",m),window.VanduoDraggable=m})();(function(){"use strict";let m=new Map;function e(r){try{return new URL(r,window.location.href).origin===window.location.origin}catch{return!1}}function t(r,l){let c=new DOMParser().parseFromString(l.trim(),"text/html"),u=["SCRIPT","IFRAME","OBJECT","EMBED","FORM","BASE","LINK","META","STYLE"];for(let v of u){let y=c.querySelectorAll(v);for(let C=y.length-1;C>=0;C--)y[C].parentNode.removeChild(y[C])}function h(v){if(v.nodeType===Node.ELEMENT_NODE){let y=v.attributes;for(let L=y.length-1;L>=0;L--){let P=y[L].name.toLowerCase(),D=y[L].value.toLowerCase().trim();(P.startsWith("on")||D.startsWith("javascript:")||D.startsWith("data:")||D.startsWith("vbscript:"))&&v.removeAttribute(y[L].name)}let C=v.childNodes;for(let L=0;L<C.length;L++)h(C[L])}}h(c.body);let p=Array.from(c.body.childNodes);for(;r.firstChild;)r.removeChild(r.firstChild);p.forEach(function(v){r.appendChild(document.adoptNode(v))})}function n(){return'<div class="vd-skeleton-card" style="position:relative;min-height:200px;padding:2rem;overflow:hidden;"><div class="vd-skeleton vd-skeleton-heading-lg" style="margin-bottom:1.5rem;"></div><div class="vd-skeleton vd-skeleton-paragraph"><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div></div><div class="vd-dynamic-loader" style="position:absolute;inset:0;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div></div>'}function s(){return'<div class="vd-dynamic-loader" style="min-height:180px;display:flex;align-items:center;justify-content:center;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div>'}function i(r){return!r||r==="skeleton"?n():r==="spinner"?s():r}function a(r,l,d){r.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:d||{}}))}let o={observe:function(r,l,d){if(!(r instanceof Element)){console.warn("[VanduoLazyLoad] observe() requires a DOM Element.");return}if(typeof l!="function"){console.warn("[VanduoLazyLoad] observe() requires a callback function.");return}if(m.has(r))return;let c=d&&d.threshold!=null?d.threshold:0,u=d&&d.rootMargin?d.rootMargin:"0px",h=new IntersectionObserver(function(p,v){p.forEach(function(y){if(y.isIntersecting){v.unobserve(y.target),m.delete(y.target);try{l(y.target)}catch(C){console.error("[VanduoLazyLoad] Callback threw:",C)}}})},{threshold:c,rootMargin:u});m.set(r,h),h.observe(r)},unobserve:function(r){let l=m.get(r);l&&(l.unobserve(r),m.delete(r))},unobserveAll:function(){m.forEach(function(r,l){r.unobserve(l)}),m.clear()},loadSection:function(r,l,d){if(typeof r!="string"||!r){console.warn("[VanduoLazyLoad] loadSection() requires a non-empty URL string.");return}if(!(l instanceof Element)){console.warn("[VanduoLazyLoad] loadSection() requires a DOM Element as containerEl.");return}if(!e(r)){console.error("[VanduoLazyLoad] loadSection() blocked cross-origin URL:",r);return}let c=d||{},u=i(c.placeholder);t(l,u),a(l,"lazysection:loading",{url:r}),this.observe(l,function(){let h=new window.AbortController,p=setTimeout(function(){h.abort()},1e4);window.fetch(r,{signal:h.signal}).then(function(v){if(clearTimeout(p),!v.ok)throw new Error("HTTP "+v.status);return v.text()}).then(function(v){t(l,v),a(l,"lazysection:loaded",{url:r}),typeof window.Vanduo<"u"&&window.Vanduo.init(),typeof c.onLoaded=="function"&&c.onLoaded(l)}).catch(function(v){let y=document.createElement("div");y.className="vd-alert vd-alert-error",y.setAttribute("role","alert");let C=document.createElement("span");C.textContent="Failed to load content. ";let L=document.createElement("small");for(L.style.opacity="0.7",L.textContent=v.message,y.appendChild(C),y.appendChild(L);l.firstChild;)l.removeChild(l.firstChild);l.appendChild(y),a(l,"lazysection:error",{url:r,error:v}),console.error("[VanduoLazyLoad] loadSection failed:",v),typeof c.onError=="function"&&c.onError(v)})},{threshold:c.threshold,rootMargin:c.rootMargin})},init:function(){let r=this;document.querySelectorAll("[data-vd-lazy]").forEach(function(d){if(m.has(d)||d.dataset.vdLazyState==="loading"||d.dataset.vdLazyState==="loaded")return;let c=d.getAttribute("data-vd-lazy");if(!c)return;d.dataset.vdLazyState="loading";let u=d.getAttribute("data-vd-lazy-placeholder")||"skeleton";r.loadSection(c,d,{placeholder:u,onLoaded:function(){d.dataset.vdLazyState="loaded"},onError:function(){d.dataset.vdLazyState="error"}})})}};typeof window.Vanduo<"u"&&window.Vanduo.register("LazyLoad",o),window.VanduoLazyLoad=o})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-flow, .vd-carousel").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=e.querySelector(".vd-flow-track");if(!t)return;let n=Array.from(t.querySelectorAll(".vd-flow-slide"));if(n.length===0)return;let s=e.classList.contains("vd-flow-fade"),i=e.hasAttribute("data-vd-autoplay"),a=parseInt(e.getAttribute("data-vd-interval"),10)||5e3,o=e.getAttribute("data-vd-loop")!=="false",r={current:0,total:n.length,autoplayTimer:null,isFade:s,loop:o,isDragging:!1,startX:0,currentX:0,threshold:50},l=[];n.forEach((g,k)=>{g.setAttribute("role","group"),g.setAttribute("aria-roledescription","slide"),g.setAttribute("aria-label","Slide "+(k+1)+" of "+n.length),k===0&&g.classList.add("is-active")}),e.setAttribute("role","region"),e.setAttribute("aria-roledescription","carousel"),e.getAttribute("aria-label")||e.setAttribute("aria-label","Carousel");let d=document.createElement("div");d.setAttribute("aria-live","polite"),d.setAttribute("aria-atomic","true"),d.className="sr-only",d.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",e.appendChild(d);let c=(g,k)=>{k===void 0&&(k=!0);let T=g;r.loop?T=(g%r.total+r.total)%r.total:T=Math.max(0,Math.min(g,r.total-1));let M=r.current;r.current=T,r.isFade?n.forEach((w,E)=>{w.classList.toggle("is-active",E===T)}):t.style.transform="translateX(-"+T*100+"%)",e.querySelectorAll(".vd-flow-indicator").forEach((w,E)=>{w.classList.toggle("is-active",E===T),w.setAttribute("aria-selected",E===T?"true":"false")}),n.forEach((w,E)=>{w.setAttribute("aria-hidden",E!==T?"true":"false")}),k&&(d.textContent="Slide "+(T+1)+" of "+r.total),e.dispatchEvent(new CustomEvent("flow:change",{detail:{current:T,previous:M,total:r.total}}))},u=()=>c(r.current+1),h=()=>c(r.current-1),p=e.querySelector(".vd-flow-prev"),v=e.querySelector(".vd-flow-next");if(p){let g=()=>h();p.addEventListener("click",g),l.push(()=>p.removeEventListener("click",g))}if(v){let g=()=>u();v.addEventListener("click",g),l.push(()=>v.removeEventListener("click",g))}e.querySelectorAll(".vd-flow-indicator").forEach((g,k)=>{g.setAttribute("role","tab"),g.setAttribute("aria-selected",k===0?"true":"false"),g.setAttribute("aria-label","Go to slide "+(k+1));let T=()=>c(k);g.addEventListener("click",T),l.push(()=>g.removeEventListener("click",T))});let C=g=>{g.key==="ArrowLeft"&&(h(),g.preventDefault()),g.key==="ArrowRight"&&(u(),g.preventDefault())};e.setAttribute("tabindex","0"),e.addEventListener("keydown",C),l.push(()=>e.removeEventListener("keydown",C));let L=g=>{r.isDragging=!0,r.startX=g.clientX||g.touches&&g.touches[0].clientX||0,r.currentX=r.startX,e.classList.add("is-dragging")},P=g=>{r.isDragging&&(r.currentX=g.clientX||g.touches&&g.touches[0].clientX||0)},x=()=>{if(!r.isDragging)return;r.isDragging=!1,e.classList.remove("is-dragging");let g=r.startX-r.currentX;Math.abs(g)>r.threshold&&(g>0?u():h())};e.addEventListener("mousedown",L),e.addEventListener("mousemove",P),e.addEventListener("mouseup",x),e.addEventListener("mouseleave",x),e.addEventListener("touchstart",L,{passive:!0}),e.addEventListener("touchmove",P,{passive:!0}),e.addEventListener("touchend",x),l.push(()=>e.removeEventListener("mousedown",L),()=>e.removeEventListener("mousemove",P),()=>e.removeEventListener("mouseup",x),()=>e.removeEventListener("mouseleave",x),()=>e.removeEventListener("touchstart",L),()=>e.removeEventListener("touchmove",P),()=>e.removeEventListener("touchend",x));let D=()=>{V(),r.autoplayTimer=setInterval(u,a)},V=()=>{r.autoplayTimer&&(clearInterval(r.autoplayTimer),r.autoplayTimer=null)};if(i){D();let g=()=>V(),k=()=>D();e.addEventListener("mouseenter",g),e.addEventListener("mouseleave",k),e.addEventListener("focusin",g),e.addEventListener("focusout",k),l.push(()=>e.removeEventListener("mouseenter",g),()=>e.removeEventListener("mouseleave",k),()=>e.removeEventListener("focusin",g),()=>e.removeEventListener("focusout",k),()=>V())}c(0,!1),this.instances.set(e,{cleanup:l,goTo:c,next:u,prev:h,getState:()=>({...r})})},goTo:function(e,t){let n=this.instances.get(e);n&&n.goTo(t)},next:function(e){let t=this.instances.get(e);t&&t.next()},prev:function(e){let t=this.instances.get(e);t&&t.prev()},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("flow",m),window.VanduoFlow=m})();(function(){"use strict";let m={instances:new Map,_globalCleanups:[],init:function(){if(document.querySelectorAll("[data-vd-bubble], [data-vd-popover]").forEach(t=>{this.instances.has(t)||this.initInstance(t)}),this._globalCleanups.length===0){let t=s=>{this.instances.forEach((i,a)=>{!i.popover.contains(s.target)&&!a.contains(s.target)&&this.hide(a)})},n=s=>{s.key==="Escape"&&this.instances.forEach((i,a)=>this.hide(a))};document.addEventListener("click",t,!0),document.addEventListener("keydown",n),this._globalCleanups.push(()=>document.removeEventListener("click",t,!0),()=>document.removeEventListener("keydown",n))}},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-bubble-placement")||e.getAttribute("data-vd-popover-placement")||"bottom",s=document.createElement("div");s.className="vd-bubble-content",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","false"),s.setAttribute("data-placement",n);let i=e.getAttribute("data-vd-bubble-title")||e.getAttribute("data-vd-popover-title"),a=e.getAttribute("data-vd-bubble")||e.getAttribute("data-vd-popover")||"",o=e.getAttribute("data-vd-bubble-html")||e.getAttribute("data-vd-popover-html");if(i){let c=document.createElement("div");c.className="vd-bubble-header";let u=document.createElement("span");u.textContent=i;let h=document.createElement("button");h.className="vd-bubble-close",h.setAttribute("aria-label","Close"),h.innerHTML="&times;",c.appendChild(u),c.appendChild(h),s.appendChild(c);let p=v=>{v.stopPropagation(),this.hide(e)};h.addEventListener("click",p),t.push(()=>h.removeEventListener("click",p))}let r=document.createElement("div");r.className="vd-bubble-body",o?typeof sanitizeHtml=="function"?r.innerHTML=sanitizeHtml(o):r.textContent=o:r.textContent=a,s.appendChild(r),document.body.appendChild(s);let l="vd-bubble-"+Math.random().toString(36).slice(2,9);s.id=l,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",l);let d=c=>{c.stopPropagation(),s.classList.contains("is-visible")?this.hide(e):(this.hideAll(),this.show(e))};e.addEventListener("click",d),t.push(()=>e.removeEventListener("click",d)),this.instances.set(e,{popover:s,cleanup:t,placement:n})},position:function(e,t,n){let s=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=10,o,r;switch(n){case"top":o=s.top-i.height-a+window.scrollY,r=s.left+(s.width-i.width)/2+window.scrollX;break;case"left":o=s.top+(s.height-i.height)/2+window.scrollY,r=s.left-i.width-a+window.scrollX;break;case"right":o=s.top+(s.height-i.height)/2+window.scrollY,r=s.right+a+window.scrollX;break;default:o=s.bottom+a+window.scrollY,r=s.left+(s.width-i.width)/2+window.scrollX}r=Math.max(8,Math.min(r,window.innerWidth-i.width-8)),o=Math.max(8,o),t.style.top=o+"px",t.style.left=r+"px"},show:function(e){let t=this.instances.get(e);if(!t)return;let{popover:n,placement:s}=t;n.style.display="block",n.classList.add("is-visible"),e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.position(e,n,s)}),e.dispatchEvent(new CustomEvent("bubble:show",{bubbles:!0}))},hide:function(e){let t=this.instances.get(e);t&&(t.popover.classList.remove("is-visible"),e.setAttribute("aria-expanded","false"),e.dispatchEvent(new CustomEvent("bubble:hide",{bubbles:!0})))},hideAll:function(){this.instances.forEach((e,t)=>this.hide(t))},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.popover.parentNode&&t.popover.parentNode.removeChild(t.popover),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls"),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t)),this._globalCleanups.forEach(e=>e()),this._globalCleanups=[]}};typeof window.Vanduo<"u"&&window.Vanduo.register("bubble",m),window.VanduoBubble=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-waypoint-nav], [data-vd-scrollspy-nav]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=Array.from(e.querySelectorAll('a[href^="#"]'));if(t.length===0)return;let n=[],s=parseInt(e.getAttribute("data-vd-waypoint-offset")||"80",10),i=[];if(t.forEach(d=>{let c=d.getAttribute("href").slice(1),u=document.getElementById(c);u&&(u.setAttribute("data-vd-waypoint-section",""),i.push({id:c,link:d,section:u}))}),i.length===0)return;let a=new Set,o=d=>{t.forEach(u=>u.classList.remove("is-active"));let c=t.find(u=>u.getAttribute("href")==="#"+d);c&&(c.classList.add("is-active"),e.dispatchEvent(new CustomEvent("waypoint:change",{detail:{activeId:d,link:c}})))},r="-"+s+"px 0px -40% 0px",l=new IntersectionObserver(d=>{d.forEach(c=>{c.isIntersecting?a.add(c.target.id):a.delete(c.target.id)});for(let c=0;c<i.length;c++)if(a.has(i[c].id)){o(i[c].id);return}},{rootMargin:r,threshold:0});i.forEach(d=>l.observe(d.section)),t.forEach(d=>{let c=u=>{u.preventDefault();let h=d.getAttribute("href").slice(1),p=document.getElementById(h);p&&(p.scrollIntoView({behavior:"smooth"}),o(h))};d.addEventListener("click",c),n.push(()=>d.removeEventListener("click",c))}),n.push(()=>l.disconnect()),this.instances.set(e,{observer:l,cleanup:n,sections:i,setActive:o})},refresh:function(e){this.destroy(e),this.initInstance(e)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("waypoint",m),window.VanduoWaypoint=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-ripple, [data-vd-ripple]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=s=>{let i=e.getBoundingClientRect(),a=Math.max(i.width,i.height),o=(s.clientX||s.touches&&s.touches[0].clientX||i.left+i.width/2)-i.left-a/2,r=(s.clientY||s.touches&&s.touches[0].clientY||i.top+i.height/2)-i.top-a/2,l=document.createElement("span");l.className="vd-ripple-wave",l.style.width=a+"px",l.style.height=a+"px",l.style.left=o+"px",l.style.top=r+"px",e.appendChild(l),l.addEventListener("animationend",()=>{l.parentNode&&l.parentNode.removeChild(l)})};e.addEventListener("mousedown",n),e.addEventListener("touchstart",n,{passive:!0}),t.push(()=>e.removeEventListener("mousedown",n),()=>e.removeEventListener("touchstart",n)),this.instances.set(e,{cleanup:t})},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),e.querySelectorAll(".vd-ripple-wave").forEach(n=>n.remove()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("ripple",m),window.VanduoRipple=m})();(function(){"use strict";function m(n){if(!n||n===document.body)return!1;let s=window.getComputedStyle(n),i=s.overflowY,a=s.overflowX,o=/(auto|scroll|overlay)/.test(i)&&n.scrollHeight>n.clientHeight,r=/(auto|scroll|overlay)/.test(a)&&n.scrollWidth>n.clientWidth;return o||r}function e(n){let s=n.parentElement;for(;s&&s!==document.body&&s!==document.documentElement;){if(m(s))return s;s=s.parentElement}return null}let t={instances:new Map,init:function(){document.querySelectorAll(".vd-affix, .vd-sticky, [data-vd-affix]").forEach(s=>{this.instances.has(s)||this.initInstance(s)})},initInstance:function(n){let s=[],i=parseInt(n.getAttribute("data-vd-affix-offset")||"0",10),a=Number.isNaN(i)?0:i,o=e(n),r=!1,l=document.createElement("div");l.style.cssText="display:block;height:1px;margin-bottom:-1px;visibility:hidden;pointer-events:none;",n.parentNode.insertBefore(l,n),n.style.setProperty("--affix-top-offset",a+"px");function d(){r||(r=!0,n.classList.add("is-stuck"),n.dispatchEvent(new CustomEvent("affix:stuck",{bubbles:!0,detail:{offset:a,root:o||window}})))}function c(){r&&(r=!1,n.classList.remove("is-stuck"),n.dispatchEvent(new CustomEvent("affix:unstuck",{bubbles:!0,detail:{offset:a,root:o||window}})))}let u=new IntersectionObserver(function(h){h.forEach(p=>{p.isIntersecting?c():d()})},{root:o,rootMargin:"-"+a+"px 0px 0px 0px",threshold:0});u.observe(l),s.push(()=>u.disconnect(),()=>{l.parentNode&&l.parentNode.removeChild(l)},()=>{n.classList.remove("is-stuck"),n.style.removeProperty("--affix-top-offset")}),this.instances.set(n,{cleanup:s,observer:u,sentinel:l,scrollParent:o})},destroy:function(n){let s=this.instances.get(n);s&&(s.cleanup.forEach(i=>i()),n.classList.remove("is-stuck"),this.instances.delete(n))},destroyAll:function(){this.instances.forEach((n,s)=>this.destroy(s))}};typeof window.Vanduo<"u"&&window.Vanduo.register("affix",t),window.VanduoAffix=t})();(function(){"use strict";function m(t){let n=document.createElement("div");return n.textContent=t,n.innerHTML}let e={instances:new Map,init:function(){document.querySelectorAll("[data-vd-suggest], [data-vd-autocomplete]").forEach(n=>{this.instances.has(n)||this.initInstance(n)})},initInstance:function(t){let n=[],s=parseInt(t.getAttribute("data-vd-suggest-min-chars")||"1",10),i=t.getAttribute("data-vd-suggest-url")||"",a=t.getAttribute("data-vd-suggest")||t.getAttribute("data-vd-autocomplete")||"",o=[];try{o=JSON.parse(a)}catch{o=a.split(",").map(k=>k.trim()).filter(Boolean)}let r=t.closest(".vd-suggest-wrapper, .vd-autocomplete-wrapper");r||(r=document.createElement("div"),r.className="vd-suggest-wrapper",t.parentNode.insertBefore(r,t),r.appendChild(t));let l=document.createElement("ul");l.className="vd-suggest-list",l.setAttribute("role","listbox");let d="vd-suggest-"+Math.random().toString(36).slice(2,9);l.id=d,r.appendChild(l),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",d),t.setAttribute("autocomplete","off");let c=-1,u=[],h=null,p=(g,k)=>{if(l.innerHTML="",u=g,c=-1,g.length===0){let T=document.createElement("li");T.className="vd-suggest-empty",T.textContent="No results",l.appendChild(T);return}g.forEach((T,M)=>{let f=document.createElement("li");f.className="vd-suggest-item",f.setAttribute("role","option"),f.id=d+"-item-"+M;let w=typeof T=="object"&&(T.label||T.text)||String(T);if(k){let E=m(w),I=new RegExp("("+k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")","gi");f.innerHTML=E.replace(I,'<span class="vd-suggest-match">$1</span>')}else f.textContent=w;f.addEventListener("click",()=>C(M)),l.appendChild(f)})},v=()=>{l.classList.add("is-open"),t.setAttribute("aria-expanded","true")},y=()=>{l.classList.remove("is-open"),t.setAttribute("aria-expanded","false"),c=-1,t.removeAttribute("aria-activedescendant")},C=g=>{let k=u[g],T=typeof k=="object"&&(k.value||k.label)||String(k);t.value=T,y(),t.dispatchEvent(new CustomEvent("suggest:select",{detail:{value:T,item:k,index:g},bubbles:!0}))},L=g=>{let k=l.querySelectorAll(".vd-suggest-item");k.forEach(T=>T.classList.remove("is-highlighted")),g>=0&&g<k.length&&(c=g,k[g].classList.add("is-highlighted"),t.setAttribute("aria-activedescendant",k[g].id),k[g].scrollIntoView({block:"nearest"}))},P=async g=>{if(g.length<s){y();return}let k;if(i)try{let T=i.includes("?")?"&":"?";k=await(await window.fetch(i+T+"q="+encodeURIComponent(g))).json()}catch{k=[]}else{let T=g.toLowerCase();k=o.filter(M=>(typeof M=="object"&&(M.label||M.text)||String(M)).toLowerCase().includes(T))}p(k,g),k.length>0,v()},x=()=>{clearTimeout(h),h=setTimeout(()=>P(t.value),200)},D=g=>{if(!l.classList.contains("is-open")){g.key==="ArrowDown"&&(P(t.value),g.preventDefault());return}let k=u.length;switch(g.key){case"ArrowDown":g.preventDefault(),L(c<k-1?c+1:0);break;case"ArrowUp":g.preventDefault(),L(c>0?c-1:k-1);break;case"Enter":g.preventDefault(),c>=0&&C(c);break;case"Escape":y();break}},V=()=>{setTimeout(y,200)};t.addEventListener("input",x),t.addEventListener("keydown",D),t.addEventListener("blur",V),t.addEventListener("focus",()=>{t.value.length>=s&&P(t.value)}),n.push(()=>t.removeEventListener("input",x),()=>t.removeEventListener("keydown",D),()=>t.removeEventListener("blur",V),()=>clearTimeout(h),()=>{l.parentNode&&l.parentNode.removeChild(l)}),this.instances.set(t,{cleanup:n,list:l,close:y})},destroy:function(t){let n=this.instances.get(t);n&&(n.cleanup.forEach(s=>s()),this.instances.delete(t))},destroyAll:function(){this.instances.forEach((t,n)=>this.destroy(n))}};typeof window.Vanduo<"u"&&window.Vanduo.register("suggest",e),window.VanduoSuggest=e})();(function(){"use strict";let m={instances:new Map,rules:{required:e=>e.trim().length>0,email:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),url:e=>{try{return new URL(e),!0}catch{return!1}},number:e=>!isNaN(parseFloat(e))&&isFinite(e),min:(e,t)=>e.length>=parseInt(t,10),max:(e,t)=>e.length<=parseInt(t,10),minVal:(e,t)=>parseFloat(e)>=parseFloat(t),maxVal:(e,t)=>parseFloat(e)<=parseFloat(t),pattern:(e,t)=>{try{return t.length>100?!1:new RegExp(t).test(e)}catch{return!1}},match:(e,t)=>{try{let n=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t,s=document.querySelector('[name="'+n+'"]');return s?e===s.value:!1}catch{return!1}}},messages:{required:"This field is required",email:"Please enter a valid email address",url:"Please enter a valid URL",number:"Please enter a valid number",min:"Minimum {0} characters required",max:"Maximum {0} characters allowed",minVal:"Value must be at least {0}",maxVal:"Value must be at most {0}",pattern:"Invalid format",match:"Fields do not match"},init:function(){document.querySelectorAll("[data-vd-validate], .vd-validate").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-validate-mode")||"blur",s=e.querySelectorAll("[data-vd-rules]"),i=r=>{let d=(r.getAttribute("data-vd-rules")||"").split("|").map(h=>h.trim()).filter(Boolean),c=r.value,u=[];for(let h of d){let[p,...v]=h.split(":"),y=v.join(":"),C=this.rules[p];if(C&&!C(c,y)){let P=r.getAttribute("data-vd-msg-"+p)||this.messages[p]||"Invalid";y&&(P=P.replace("{0}",y)),u.push(P);break}}return this.setFieldState(r,u),u.length===0},a=()=>{let r=!0;return s.forEach(l=>{i(l)||(r=!1)}),r};s.forEach(r=>{if(n==="input"||n==="blur"){let l=n==="input"?"input":"blur",d=()=>i(r);if(r.addEventListener(l,d),t.push(()=>r.removeEventListener(l,d)),n==="blur"){let c=()=>{(r.classList.contains("is-invalid")||r.classList.contains("is-valid"))&&i(r)};r.addEventListener("input",c),t.push(()=>r.removeEventListener("input",c))}}});let o=r=>{let l=a();if(!l){r.preventDefault(),r.stopPropagation();let d=e.querySelector(".is-invalid");d&&d.focus()}e.dispatchEvent(new CustomEvent("validate:submit",{detail:{valid:l},bubbles:!0}))};e.addEventListener("submit",o),t.push(()=>e.removeEventListener("submit",o)),this.instances.set(e,{cleanup:t,validateAll:a,validateField:i})},setFieldState:function(e,t){let n=e.closest(".vd-form-group")||e.parentElement,s=n.querySelector(".vd-validate-error");e.classList.remove("is-valid","is-invalid"),t.length>0?(e.classList.add("is-invalid"),e.setAttribute("aria-invalid","true"),s||(s=document.createElement("div"),s.className="vd-validate-error",s.id="vd-err-"+Math.random().toString(36).slice(2,9),s.setAttribute("role","alert"),n.appendChild(s)),s.textContent=t[0],s.style.display="",e.setAttribute("aria-describedby",s.id)):e.value.trim()?(e.classList.add("is-valid"),e.removeAttribute("aria-invalid"),s&&(s.style.display="none")):(e.removeAttribute("aria-invalid"),s&&(s.style.display="none"))},validateForm:function(e){let t=this.instances.get(e);return t?t.validateAll():!1},addRule:function(e,t,n){this.rules[e]=t,n&&(this.messages[e]=n)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("validate",m),window.VanduoValidate=m})();(function(){"use strict";let m=["Su","Mo","Tu","We","Th","Fr","Sa"],e=["January","February","March","April","May","June","July","August","September","October","November","December"],t={instances:new Map,init:function(){document.querySelectorAll("[data-vd-datepicker]").forEach(s=>{this.instances.has(s)||this.initInstance(s)})},initInstance:function(n){let s=[],i=n.getAttribute("data-vd-datepicker-format")||"yyyy-mm-dd",a=n.getAttribute("data-vd-datepicker-min"),o=n.getAttribute("data-vd-datepicker-max"),r=a?new Date(a):null,l=o?new Date(o):null,d=new Date,c=d.getFullYear(),u=d.getMonth(),h=null,p="days";if(n.value){let f=new Date(n.value);isNaN(f.getTime())||(h=f,c=f.getFullYear(),u=f.getMonth())}let v=document.createElement("div");v.className="vd-datepicker-popup",v.setAttribute("role","dialog"),v.setAttribute("aria-label","Choose date");let y=document.createElement("div");y.className="vd-suggest-wrapper",y.style.position="relative",y.style.display="inline-block",n.parentNode.insertBefore(y,n),y.appendChild(n),y.appendChild(v);let C=f=>{let w=f.getFullYear(),E=String(f.getMonth()+1).padStart(2,"0"),I=String(f.getDate()).padStart(2,"0");return i.replace("yyyy",w).replace("mm",E).replace("dd",I)},L=f=>!!(r&&f<r||l&&f>l),P=(f,w)=>f&&w&&f.getFullYear()===w.getFullYear()&&f.getMonth()===w.getMonth()&&f.getDate()===w.getDate(),x=()=>{v.innerHTML="";let f=document.createElement("div");f.className="vd-datepicker-header";let w=document.createElement("button");w.type="button",w.className="vd-datepicker-prev",w.innerHTML="&#8249;",w.setAttribute("aria-label","Previous");let E=document.createElement("button");E.type="button",E.className="vd-datepicker-next",E.innerHTML="&#8250;",E.setAttribute("aria-label","Next");let I=document.createElement("span");if(I.className="vd-datepicker-title",p==="days")I.textContent=e[u]+" "+c,I.addEventListener("click",()=>{p="months",x()}),w.addEventListener("click",()=>{u--,u<0&&(u=11,c--),x()}),E.addEventListener("click",()=>{u++,u>11&&(u=0,c++),x()});else if(p==="months")I.textContent=String(c),I.addEventListener("click",()=>{p="years",x()}),w.addEventListener("click",()=>{c--,x()}),E.addEventListener("click",()=>{c++,x()});else{let O=Math.floor(c/10)*10;I.textContent=O+" - "+(O+9),w.addEventListener("click",()=>{c-=10,x()}),E.addEventListener("click",()=>{c+=10,x()})}if(f.appendChild(w),f.appendChild(I),f.appendChild(E),v.appendChild(f),p==="days"){let O=document.createElement("div");O.className="vd-datepicker-weekdays",m.forEach(F=>{let U=document.createElement("span");U.textContent=F,O.appendChild(U)}),v.appendChild(O);let H=document.createElement("div");H.className="vd-datepicker-days";let R=new Date(c,u,1).getDay(),z=new Date(c,u+1,0).getDate(),j=new Date(c,u,0).getDate();for(let F=R-1;F>=0;F--){let U=D(j-F,!0);H.appendChild(U)}for(let F=1;F<=z;F++){let U=new Date(c,u,F),b=D(F,!1,U);H.appendChild(b)}let G=R+z,J=G%7===0?0:7-G%7;for(let F=1;F<=J;F++){let U=D(F,!0);H.appendChild(U)}v.appendChild(H)}else if(p==="months"){let O=document.createElement("div");O.className="vd-datepicker-months",e.forEach((H,R)=>{let z=document.createElement("button");z.type="button",z.className="vd-datepicker-month-btn",z.textContent=H.slice(0,3),h&&h.getFullYear()===c&&h.getMonth()===R&&z.classList.add("is-selected"),z.addEventListener("click",()=>{u=R,p="days",x()}),O.appendChild(z)}),v.appendChild(O)}else{let O=document.createElement("div");O.className="vd-datepicker-years";let H=Math.floor(c/10)*10;for(let R=H-1;R<=H+10;R++){let z=document.createElement("button");z.type="button",z.className="vd-datepicker-year-btn",z.textContent=R,h&&h.getFullYear()===R&&z.classList.add("is-selected"),(R<H||R>H+9)&&(z.style.opacity="0.4"),z.addEventListener("click",()=>{c=R,p="months",x()}),O.appendChild(z)}v.appendChild(O)}},D=(f,w,E)=>{let I=document.createElement("button");return I.type="button",I.className="vd-datepicker-day",I.textContent=f,w?(I.classList.add("is-outside"),I.tabIndex=-1,I):(E&&P(E,d)&&I.classList.add("is-today"),E&&P(E,h)&&I.classList.add("is-selected"),E&&L(E)?(I.classList.add("is-disabled"),I):(E&&I.addEventListener("click",()=>{h=E,c=E.getFullYear(),u=E.getMonth(),n.value=C(E),g(),n.dispatchEvent(new CustomEvent("datepicker:select",{detail:{date:E,formatted:n.value},bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0}))}),I))},V=()=>{x(),v.classList.add("is-open"),n.setAttribute("aria-expanded","true")},g=()=>{v.classList.remove("is-open"),n.setAttribute("aria-expanded","false"),p="days"},k=()=>V(),T=f=>{y.contains(f.target)||g()},M=f=>{f.key==="Escape"&&g()};n.addEventListener("focus",k),document.addEventListener("click",T,!0),document.addEventListener("keydown",M),n.setAttribute("aria-haspopup","dialog"),n.setAttribute("aria-expanded","false"),n.setAttribute("autocomplete","off"),s.push(()=>n.removeEventListener("focus",k),()=>document.removeEventListener("click",T,!0),()=>document.removeEventListener("keydown",M)),this.instances.set(n,{cleanup:s,open:V,close:g,popup:v})},destroy:function(n){let s=this.instances.get(n);s&&(s.cleanup.forEach(i=>i()),this.instances.delete(n))},destroyAll:function(){this.instances.forEach((n,s)=>this.destroy(s))}};typeof window.Vanduo<"u"&&window.Vanduo.register("datepicker",t),window.VanduoDatepicker=t})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-timepicker]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-timepicker-format")==="24h",s=parseInt(e.getAttribute("data-vd-timepicker-step")||"30",10),i=e.closest(".vd-suggest-wrapper");i||(i=document.createElement("div"),i.style.position="relative",i.style.display="inline-block",e.parentNode.insertBefore(i,e),i.appendChild(e));let a=document.createElement("div");a.className="vd-timepicker-popup",a.setAttribute("role","listbox"),i.appendChild(a);let o=[];for(let p=0;p<24;p++)for(let v=0;v<60;v+=s){let y=String(p).padStart(2,"0"),C=String(v).padStart(2,"0");if(n)o.push({display:y+":"+C,value:y+":"+C});else{let L=p<12?"AM":"PM",x=(p===0?12:p>12?p-12:p)+":"+C+" "+L;o.push({display:x,value:y+":"+C})}}let r=()=>{a.innerHTML="",o.forEach(p=>{let v=document.createElement("div");v.className="vd-timepicker-item",v.setAttribute("role","option"),v.textContent=p.display,(e.value===p.value||e.value===p.display)&&v.classList.add("is-selected"),v.addEventListener("click",()=>{e.value=p.display,a.querySelectorAll(".vd-timepicker-item").forEach(y=>y.classList.remove("is-selected")),v.classList.add("is-selected"),d(),e.dispatchEvent(new CustomEvent("timepicker:select",{detail:{display:p.display,value:p.value},bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}),a.appendChild(v)})},l=()=>{r(),a.classList.add("is-open"),e.setAttribute("aria-expanded","true");let p=a.querySelector(".is-selected");p&&p.scrollIntoView({block:"center"})},d=()=>{a.classList.remove("is-open"),e.setAttribute("aria-expanded","false")},c=()=>l(),u=p=>{i.contains(p.target)||d()},h=p=>{p.key==="Escape"&&d()};e.addEventListener("focus",c),document.addEventListener("click",u,!0),document.addEventListener("keydown",h),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-expanded","false"),e.setAttribute("autocomplete","off"),e.readOnly=!0,t.push(()=>e.removeEventListener("focus",c),()=>document.removeEventListener("click",u,!0),()=>document.removeEventListener("keydown",h)),this.instances.set(e,{cleanup:t,open:l,close:d})},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("timepicker",m),window.VanduoTimepicker=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-stepper").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=Array.from(e.querySelectorAll(".vd-stepper-item")),s=e.classList.contains("vd-stepper-clickable"),i=n.findIndex(o=>o.classList.contains("is-active"));i===-1&&(i=0);let a=o=>{if(o<0||o>=n.length)return;let r=i;i=o,n.forEach((l,d)=>{l.classList.remove("is-active","is-completed"),d<o?l.classList.add("is-completed"):d===o&&l.classList.add("is-active")}),e.dispatchEvent(new CustomEvent("stepper:change",{detail:{current:o,previous:r,total:n.length},bubbles:!0}))};s&&n.forEach((o,r)=>{let l=()=>a(r);o.addEventListener("click",l),t.push(()=>o.removeEventListener("click",l))}),a(i),this.instances.set(e,{cleanup:t,setStep:a,next:()=>a(i+1),prev:()=>a(i-1),getCurrent:()=>i})},setStep:function(e,t){let n=this.instances.get(e);n&&n.setStep(t)},next:function(e){let t=this.instances.get(e);t&&t.next()},prev:function(e){let t=this.instances.get(e);t&&t.prev()},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("stepper",m),window.VanduoStepper=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-rating]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=parseInt(e.getAttribute("data-vd-rating-max")||"5",10),s=parseFloat(e.getAttribute("data-vd-rating-value")||"0"),i=e.classList.contains("vd-rating-readonly")||e.hasAttribute("data-vd-rating-readonly"),a=s;e.classList.add("vd-rating"),e.setAttribute("role","radiogroup"),e.setAttribute("aria-label",e.getAttribute("aria-label")||"Rating"),e.innerHTML="";let o=[];for(let d=1;d<=n;d++){let c=document.createElement("button");c.type="button",c.className="vd-rating-star",c.setAttribute("role","radio"),c.setAttribute("aria-label",d+" star"+(d>1?"s":"")),c.setAttribute("aria-checked",d<=a?"true":"false"),i&&(c.tabIndex=-1),o.push(c),e.appendChild(c)}let r=document.createElement("span");r.className="vd-rating-value",r.textContent=a>0?a.toString():"",e.appendChild(r);let l=d=>{o.forEach((c,u)=>{c.classList.remove("is-active","is-half");let h=u+1;h<=Math.floor(d)?c.classList.add("is-active"):h-.5<=d&&c.classList.add("is-half"),c.setAttribute("aria-checked",h<=d?"true":"false")}),r.textContent=d>0?d.toString():""};if(l(a),!i){o.forEach((c,u)=>{let h=()=>{o.forEach((y,C)=>{y.classList.toggle("is-hovered",C<=u)})},p=()=>{o.forEach(y=>y.classList.remove("is-hovered"))},v=()=>{a=u+1,e.setAttribute("data-vd-rating-value",a),l(a),e.dispatchEvent(new CustomEvent("rating:change",{detail:{value:a,max:n},bubbles:!0}))};c.addEventListener("mouseenter",h),c.addEventListener("mouseleave",p),c.addEventListener("click",v),t.push(()=>c.removeEventListener("mouseenter",h),()=>c.removeEventListener("mouseleave",p),()=>c.removeEventListener("click",v))});let d=c=>{c.key==="ArrowRight"||c.key==="ArrowUp"?(c.preventDefault(),a<n&&(a++,l(a),o[a-1].focus(),e.dispatchEvent(new CustomEvent("rating:change",{detail:{value:a,max:n},bubbles:!0})))):(c.key==="ArrowLeft"||c.key==="ArrowDown")&&(c.preventDefault(),a>1&&(a--,l(a),o[a-1].focus(),e.dispatchEvent(new CustomEvent("rating:change",{detail:{value:a,max:n},bubbles:!0}))))};e.addEventListener("keydown",d),t.push(()=>e.removeEventListener("keydown",d))}this.instances.set(e,{cleanup:t,getValue:()=>a,setValue:d=>{a=d,l(d)}})},getValue:function(e){let t=this.instances.get(e);return t?t.getValue():0},setValue:function(e,t){let n=this.instances.get(e);n&&n.setValue(t)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("rating",m),window.VanduoRating=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-transfer]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[];e.classList.add("vd-transfer");let n,s;try{n=JSON.parse(e.getAttribute("data-vd-transfer")||"[]").map((h,p)=>({id:h.id||"item-"+p,label:h.label||h.text||String(h),selected:!1}))}catch{n=[]}s=[];let i=new Set,a=new Set,o=()=>{e.innerHTML="";let u=r("Source",n,i,"source"),h=document.createElement("div");h.className="vd-transfer-actions";let p=document.createElement("button");p.type="button",p.className="vd-transfer-btn",p.innerHTML="&#8250;",p.setAttribute("aria-label","Move to target"),p.disabled=i.size===0,p.addEventListener("click",()=>l());let v=document.createElement("button");v.type="button",v.className="vd-transfer-btn",v.innerHTML="&#8249;",v.setAttribute("aria-label","Move to source"),v.disabled=a.size===0,v.addEventListener("click",()=>d()),h.appendChild(p),h.appendChild(v);let y=r("Target",s,a,"target");e.appendChild(u),e.appendChild(h),e.appendChild(y)},r=(u,h,p,v)=>{let y=document.createElement("div");y.className="vd-transfer-panel";let C=document.createElement("div");C.className="vd-transfer-header";let L=document.createElement("span");L.textContent=u;let P=document.createElement("span");P.className="vd-transfer-count",P.textContent=p.size+"/"+h.length,C.appendChild(L),C.appendChild(P),y.appendChild(C);let x=document.createElement("div");x.className="vd-transfer-search";let D=document.createElement("input");D.type="text",D.placeholder="Search...",D.setAttribute("aria-label","Search "+u.toLowerCase()),x.appendChild(D),y.appendChild(x);let V=document.createElement("ul");V.className="vd-transfer-list",V.setAttribute("role","listbox");let g=k=>{V.innerHTML="",(k?h.filter(M=>(M.label||M.text||String(M)).toLowerCase().includes(k.toLowerCase())):h).forEach(M=>{let f=document.createElement("li");f.className="vd-transfer-item",f.setAttribute("role","option"),p.has(M.id)&&f.classList.add("is-selected");let w=document.createElement("input");w.type="checkbox",w.checked=p.has(M.id),w.setAttribute("aria-label",M.label);let E=document.createElement("span");E.textContent=M.label,f.addEventListener("click",()=>{p.has(M.id)?p.delete(M.id):p.add(M.id),o()}),f.appendChild(w),f.appendChild(E),V.appendChild(f)})};return D.addEventListener("input",()=>g(D.value)),g(""),y.appendChild(V),y},l=()=>{let u=n.filter(h=>i.has(h.id));n=n.filter(h=>!i.has(h.id)),s=s.concat(u),i.clear(),o(),c()},d=()=>{let u=s.filter(h=>a.has(h.id));s=s.filter(h=>!a.has(h.id)),n=n.concat(u),a.clear(),o(),c()},c=()=>{e.dispatchEvent(new CustomEvent("transfer:change",{detail:{source:n.map(u=>u.id),target:s.map(u=>u.id)},bubbles:!0}))};o(),this.instances.set(e,{cleanup:t,getTarget:()=>s.map(u=>u.id),getSource:()=>n.map(u=>u.id)})},getSelected:function(e){let t=this.instances.get(e);return t?t.getTarget():[]},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),e.innerHTML="",this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("transfer",m),window.VanduoTransfer=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-tree]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-tree-cascade")!=="false",s;try{s=JSON.parse(e.getAttribute("data-vd-tree")||"[]")}catch{s=[]}e.classList.add("vd-tree"),e.setAttribute("role","tree");let i=(r,l)=>{l.innerHTML="",r.forEach(d=>{let c=document.createElement("li");c.className="vd-tree-node",c.setAttribute("role","treeitem"),c.setAttribute("aria-expanded",d.open?"true":"false"),d.open&&c.classList.add("is-open");let u=document.createElement("div");if(u.className="vd-tree-node-content",d.children&&d.children.length>0){let p=document.createElement("button");p.type="button",p.className="vd-tree-toggle",p.setAttribute("aria-label","Toggle"),p.addEventListener("click",v=>{v.stopPropagation(),d.open=!d.open,c.classList.toggle("is-open"),c.setAttribute("aria-expanded",d.open?"true":"false")}),u.appendChild(p)}else{let p=document.createElement("span");p.className="vd-tree-toggle-placeholder",u.appendChild(p)}if(e.hasAttribute("data-vd-tree-checkbox")){let p=document.createElement("input");p.type="checkbox",p.className="vd-tree-checkbox",p.checked=!!d.checked,p.setAttribute("aria-label",d.label),p.addEventListener("change",v=>{v.stopPropagation(),d.checked=p.checked,n&&d.children&&(a(d.children,p.checked),i(s,e)),e.dispatchEvent(new CustomEvent("tree:check",{detail:{id:d.id,checked:p.checked,label:d.label},bubbles:!0}))}),u.appendChild(p)}if(d.icon){let p=document.createElement("span");p.className="vd-tree-icon "+d.icon,u.appendChild(p)}let h=document.createElement("span");if(h.className="vd-tree-label",h.textContent=d.label||"",u.appendChild(h),c.appendChild(u),d.children&&d.children.length>0){let p=document.createElement("ul");p.className="vd-tree-children",p.setAttribute("role","group"),i(d.children,p),c.appendChild(p)}l.appendChild(c)})},a=(r,l)=>{r.forEach(d=>{d.checked=l,d.children&&a(d.children,l)})},o=r=>{let l=document.activeElement;if(!e.contains(l))return;let d=Array.from(e.querySelectorAll(".vd-tree-node-content")),c=d.indexOf(l.closest(".vd-tree-node-content"));if(c!==-1)switch(r.key){case"ArrowDown":if(r.preventDefault(),c<d.length-1){let u=d[c+1].querySelector(".vd-tree-toggle, .vd-tree-label");u&&u.focus()}break;case"ArrowUp":if(r.preventDefault(),c>0){let u=d[c-1].querySelector(".vd-tree-toggle, .vd-tree-label");u&&u.focus()}break}};e.addEventListener("keydown",o),t.push(()=>e.removeEventListener("keydown",o)),i(s,e),this.instances.set(e,{cleanup:t,getData:()=>s,getChecked:()=>{let r=[],l=d=>{d.forEach(c=>{c.checked&&r.push(c.id||c.label),c.children&&l(c.children)})};return l(s),r}})},getChecked:function(e){let t=this.instances.get(e);return t?t.getChecked():[]},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),e.innerHTML="",this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("tree",m),window.VanduoTree=m})();(function(){"use strict";let m={_active:!1,_steps:[],_currentStep:0,_elements:{},_cleanup:[],_boundTriggers:new WeakMap,_triggerElement:null,init:function(){document.querySelectorAll("[data-vd-spotlight]").forEach(t=>{if(this._boundTriggers.has(t))return;let n=s=>{s.preventDefault();let i=this._parseSteps(t.getAttribute("data-vd-spotlight"));i.length!==0&&this.start(i,{trigger:t})};t.addEventListener("click",n),this._boundTriggers.set(t,n)})},_parseSteps:function(e){if(typeof e!="string"||e.trim()==="")return[];try{let t=JSON.parse(e);return this._normalizeSteps(t)}catch(t){return console.error("VanduoSpotlight: invalid data-vd-spotlight payload.",t),[]}},_normalizeStep:function(e){if(!e||typeof e!="object")return null;let t=e.target,n=typeof t=="string"&&t.trim()!=="",s=typeof Element<"u"&&t instanceof Element;if(!n&&!s)return null;let i=typeof e.title=="string"?e.title:"",a=typeof e.description=="string"?e.description:typeof e.content=="string"?e.content:"";return{target:t,title:i,description:a}},_normalizeSteps:function(e){return Array.isArray(e)?e.map(t=>this._normalizeStep(t)).filter(Boolean):[]},start:function(e,t){this._active&&this.stop();let n=this._normalizeSteps(e);if(n.length===0)return;let s=t||{};this._steps=n,this._currentStep=0,this._active=!0,this._triggerElement=s.trigger||(document.activeElement instanceof HTMLElement?document.activeElement:null);let i=document.createElement("div");i.className="vd-spotlight-overlay",i.setAttribute("aria-hidden","true"),document.body.appendChild(i);let a=document.createElement("div");a.className="vd-spotlight-tooltip",a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.tabIndex=-1,document.body.appendChild(a),this._elements={overlay:i,tooltip:a};let o=r=>{r.key==="Escape"&&this.stop()};document.addEventListener("keydown",o),this._cleanup.push(()=>document.removeEventListener("keydown",o)),i.addEventListener("click",()=>this.stop()),this._showStep(this._currentStep)},_showStep:function(e){let t=this._steps[e];if(!t)return;let n=typeof t.target=="string"?document.querySelector(t.target):t.target,{tooltip:s}=this._elements;document.querySelectorAll(".vd-spotlight-target").forEach(d=>{d.classList.remove("vd-spotlight-target")}),n&&(n.classList.add("vd-spotlight-target"),n.scrollIntoView({behavior:"smooth",block:"center"}));let i=this._steps.length;if(s.innerHTML="",s.removeAttribute("aria-labelledby"),s.removeAttribute("aria-describedby"),t.title){let d=document.createElement("h4");d.className="vd-spotlight-title",d.id="vd-spotlight-title-"+e+"-"+Date.now(),d.textContent=t.title,s.appendChild(d),s.setAttribute("aria-labelledby",d.id)}if(t.description){let d=document.createElement("p");d.className="vd-spotlight-description",d.id="vd-spotlight-description-"+e+"-"+Date.now(),d.textContent=t.description,s.appendChild(d),s.setAttribute("aria-describedby",d.id)}let a=document.createElement("div");a.className="vd-spotlight-footer",a.setAttribute("aria-label","Step "+(e+1)+" of "+i);let o=document.createElement("span");o.className="vd-spotlight-counter",o.textContent=e+1+" / "+i;let r=document.createElement("div");if(r.className="vd-spotlight-actions",e>0){let d=document.createElement("button");d.type="button",d.className="vd-spotlight-btn",d.textContent="Back",d.addEventListener("click",()=>this.prev()),r.appendChild(d)}let l=document.createElement("button");if(l.type="button",l.className="vd-spotlight-btn",l.textContent="Skip",l.addEventListener("click",()=>this.stop()),r.appendChild(l),e<i-1){let d=document.createElement("button");d.type="button",d.className="vd-spotlight-btn vd-spotlight-btn-primary",d.textContent="Next",d.addEventListener("click",()=>this.next()),r.appendChild(d)}else{let d=document.createElement("button");d.type="button",d.className="vd-spotlight-btn vd-spotlight-btn-primary",d.textContent="Done",d.addEventListener("click",()=>this.stop()),r.appendChild(d)}a.appendChild(o),a.appendChild(r),s.appendChild(a),n&&requestAnimationFrame(()=>{let d=n.getBoundingClientRect(),c=s.getBoundingClientRect(),u=d.bottom+12+window.scrollY,h=d.left+(d.width-c.width)/2+window.scrollX;h=Math.max(8,Math.min(h,window.innerWidth-c.width-8)),u+c.height>window.innerHeight+window.scrollY&&(u=d.top-c.height-12+window.scrollY),s.style.top=u+"px",s.style.left=h+"px"}),document.dispatchEvent(new CustomEvent("spotlight:step",{detail:{index:e,step:e,total:i,data:t}}))},next:function(){this._currentStep<this._steps.length-1&&(this._currentStep++,this._showStep(this._currentStep))},prev:function(){this._currentStep>0&&(this._currentStep--,this._showStep(this._currentStep))},stop:function(){if(!this._active)return;let e=this._steps.length,t={completedSteps:e===0?0:Math.min(this._currentStep+1,e),total:e,completed:e>0&&this._currentStep>=e-1};this._active=!1,document.querySelectorAll(".vd-spotlight-target").forEach(n=>{n.classList.remove("vd-spotlight-target")}),this._elements.overlay&&this._elements.overlay.parentNode&&this._elements.overlay.parentNode.removeChild(this._elements.overlay),this._elements.tooltip&&this._elements.tooltip.parentNode&&this._elements.tooltip.parentNode.removeChild(this._elements.tooltip),this._cleanup.forEach(n=>n()),this._cleanup=[],this._elements={},this._steps=[],this._currentStep=0,this._triggerElement&&this._triggerElement.isConnected&&typeof this._triggerElement.focus=="function"&&this._triggerElement.focus(),this._triggerElement=null,document.dispatchEvent(new CustomEvent("spotlight:end",{detail:t}))},destroyAll:function(){this.stop()}};typeof window.Vanduo<"u"&&window.Vanduo.register("spotlight",m),window.VanduoSpotlight=m})();(function(){"use strict";function m(i){let a=i.slice();for(let o=a.length-1;o>0;o--){let r=Math.floor(Math.random()*(o+1)),l=a[o];a[o]=a[r],a[r]=l}return a}function e(i){if(!isFinite(i)||i<0)return"0:00";let a=Math.floor(i/60),o=Math.floor(i%60);return a+":"+(o<10?"0":"")+o}function t(i){let a=parseFloat(i.min)||0,o=parseFloat(i.max)||1,l=((parseFloat(i.value)||0)-a)/(o-a)*100;i.style.setProperty("--fill",l+"%"),i.style.backgroundImage="linear-gradient(to right, var(--music-player-track-fill, currentColor) 0%, var(--music-player-track-fill, currentColor) "+l+"%, var(--music-player-track-bg, #ccc) "+l+"%, var(--music-player-track-bg, #ccc) 100%)"}function n(i){let a=document.createElement("i");return a.className="ph ph-"+i,a.setAttribute("aria-hidden","true"),a}let s={instances:new Map,defaults:{tracks:[],volume:.5,shuffle:!1,showProgress:!1,showPlaylist:!1,autoAdvance:!0},init:function(){document.querySelectorAll(".vd-music-player, [data-music-player]").forEach(i=>{if(this.instances.has(i))return;let a={},o=i.getAttribute("data-music-player-options");if(o)try{a=JSON.parse(o)}catch{}this.initPlayer(i,a)})},initPlayer:function(i,a){let o=Object.assign({},this.defaults,a||{}),l=(Array.isArray(o.tracks)?o.tracks:[]).filter(f=>f&&typeof f.url=="string"&&f.url.trim()),c={tracks:o.shuffle?m(l):l.slice(),originalTracks:l.slice(),currentIndex:0,isPlaying:!1,volume:Math.max(0,Math.min(1,o.volume)),shuffle:o.shuffle,showProgress:o.showProgress,showPlaylist:o.showPlaylist,autoAdvance:o.autoAdvance,audio:null},u=new Audio;u.volume=c.volume,u.preload="metadata",c.audio=u,this._buildDOM(i,c);let h={btnPlay:i.querySelector(".vd-music-player-btn-play"),btnPrev:i.querySelector(".vd-music-player-btn-prev"),btnNext:i.querySelector(".vd-music-player-btn-next"),btnShuffle:i.querySelector(".vd-music-player-btn-shuffle"),btnPlaylist:i.querySelector(".vd-music-player-btn-playlist"),trackName:i.querySelector(".vd-music-player-track-name"),volumeSlider:i.querySelector(".vd-music-player-volume-slider"),volumeIcon:i.querySelector(".vd-music-player-volume-icon"),progressBar:i.querySelector(".vd-music-player-progress-bar"),timeElapsed:i.querySelector(".vd-music-player-time-elapsed"),timeDuration:i.querySelector(".vd-music-player-time-duration"),playlistPanel:i.querySelector(".vd-music-player-playlist")},p=()=>{let f=h.btnPlay;f&&(f.innerHTML="",f.appendChild(n(c.isPlaying?"pause":"play")),f.setAttribute("aria-label",c.isPlaying?"Pause":"Play"),f.classList.toggle("is-active",c.isPlaying))},v=()=>{let f=h.trackName;if(!f)return;let w=c.tracks[c.currentIndex];w?(f.textContent=w.name||"Unknown Track",f.classList.remove("is-idle")):(f.textContent="No tracks loaded",f.classList.add("is-idle"))},y=()=>{let f=h.volumeIcon;if(!f)return;f.innerHTML="";let w=c.volume,E=w===0?"speaker-none":w<.5?"speaker-low":"speaker-high";f.appendChild(n(E))},C=()=>{let f=h.btnShuffle;f&&(f.classList.toggle("is-active",c.shuffle),f.setAttribute("aria-pressed",c.shuffle?"true":"false"))},L=()=>{let f=h.playlistPanel;f&&(f.innerHTML="",c.tracks.forEach((w,E)=>{let I=document.createElement("button");I.className="vd-music-player-playlist-item"+(E===c.currentIndex?" is-active":""),I.type="button",I.setAttribute("data-index",String(E)),I.setAttribute("aria-current",E===c.currentIndex?"true":"false");let O=document.createElement("span");O.className="vd-music-player-playlist-num",O.textContent=String(E+1);let H=document.createElement("span");H.className="vd-music-player-playlist-name",H.textContent=w.name||"Track "+(E+1),I.appendChild(O),I.appendChild(H),f.appendChild(I)}))},P=()=>{let f=h.progressBar;if(!f||!u.duration)return;let w=u.currentTime/u.duration*100;f.value=String(w),t(f),h.timeElapsed&&(h.timeElapsed.textContent=e(u.currentTime)),h.timeDuration&&(h.timeDuration.textContent=e(u.duration))},x=(f,w)=>{let E=c.tracks[f];E&&(c.currentIndex=f,u.src=E.url,v(),L(),h.progressBar&&(h.progressBar.value="0",t(h.progressBar)),h.timeElapsed&&(h.timeElapsed.textContent="0:00"),h.timeDuration&&(h.timeDuration.textContent="0:00"),i.dispatchEvent(new CustomEvent("musicplayer:trackchange",{bubbles:!0,detail:{index:f,name:E.name,url:E.url}})),w&&u.play().catch(()=>{}))},D=[],V=()=>{c.isPlaying=!0,p(),i.dispatchEvent(new CustomEvent("musicplayer:play",{bubbles:!0}))},g=()=>{c.isPlaying=!1,p(),i.dispatchEvent(new CustomEvent("musicplayer:pause",{bubbles:!0}))},k=()=>{if(c.autoAdvance&&c.tracks.length>1){let f=(c.currentIndex+1)%c.tracks.length;x(f,!0)}else c.isPlaying=!1,p(),i.dispatchEvent(new CustomEvent("musicplayer:ended",{bubbles:!0}))},T=()=>{c.showProgress&&P()},M=()=>{h.timeDuration&&(h.timeDuration.textContent=e(u.duration)),h.progressBar&&(h.progressBar.max="100",t(h.progressBar))};if(u.addEventListener("play",V),u.addEventListener("pause",g),u.addEventListener("ended",k),u.addEventListener("timeupdate",T),u.addEventListener("loadedmetadata",M),D.push(()=>{u.removeEventListener("play",V),u.removeEventListener("pause",g),u.removeEventListener("ended",k),u.removeEventListener("timeupdate",T),u.removeEventListener("loadedmetadata",M),u.pause(),u.src=""}),h.btnPlay){let f=()=>{!u.src&&c.tracks.length&&x(c.currentIndex,!1),c.isPlaying?u.pause():u.play().catch(()=>{})};h.btnPlay.addEventListener("click",f),D.push(()=>h.btnPlay.removeEventListener("click",f));let w=E=>{(E.key===" "||E.key==="Enter")&&(E.preventDefault(),f())};h.btnPlay.addEventListener("keydown",w),D.push(()=>h.btnPlay.removeEventListener("keydown",w))}if(h.btnPrev){let f=()=>{if(c.tracks.length)if(u.currentTime>3)u.currentTime=0;else{let w=c.currentIndex===0?c.tracks.length-1:c.currentIndex-1;x(w,c.isPlaying)}};h.btnPrev.addEventListener("click",f),D.push(()=>h.btnPrev.removeEventListener("click",f))}if(h.btnNext){let f=()=>{if(!c.tracks.length)return;let w=(c.currentIndex+1)%c.tracks.length;x(w,c.isPlaying)};h.btnNext.addEventListener("click",f),D.push(()=>h.btnNext.removeEventListener("click",f))}if(h.btnShuffle){let f=()=>{if(c.shuffle=!c.shuffle,c.shuffle){let w=c.tracks[c.currentIndex];c.tracks=m(c.tracks);let E=c.tracks.findIndex(I=>I===w);E>0&&(c.tracks.splice(E,1),c.tracks.unshift(w)),c.currentIndex=0}else{let w=c.tracks[c.currentIndex];c.tracks=c.originalTracks.slice(),c.currentIndex=c.tracks.findIndex(E=>E===w),c.currentIndex<0&&(c.currentIndex=0)}C(),L()};h.btnShuffle.addEventListener("click",f),D.push(()=>h.btnShuffle.removeEventListener("click",f))}if(h.btnPlaylist){let f=()=>{let w=h.playlistPanel;if(!w)return;let E=w.classList.toggle("is-open");h.btnPlaylist.classList.toggle("is-active",E),h.btnPlaylist.setAttribute("aria-expanded",E?"true":"false")};h.btnPlaylist.addEventListener("click",f),D.push(()=>h.btnPlaylist.removeEventListener("click",f))}if(h.volumeSlider){let f=w=>{let E=parseFloat(w.target.value);c.volume=E,u.volume=E,y(),t(h.volumeSlider),i.dispatchEvent(new CustomEvent("musicplayer:volumechange",{bubbles:!0,detail:{volume:E}}))};h.volumeSlider.addEventListener("input",f),D.push(()=>h.volumeSlider.removeEventListener("input",f)),t(h.volumeSlider)}if(h.progressBar){let f=w=>{if(!u.duration)return;let E=parseFloat(w.target.value);u.currentTime=E/100*u.duration,t(h.progressBar)};h.progressBar.addEventListener("input",f),D.push(()=>h.progressBar.removeEventListener("input",f))}if(h.playlistPanel){let f=w=>{let E=w.target.closest(".vd-music-player-playlist-item");if(!E)return;let I=parseInt(E.getAttribute("data-index"),10);isNaN(I)||x(I,!0)};h.playlistPanel.addEventListener("click",f),D.push(()=>h.playlistPanel.removeEventListener("click",f))}p(),v(),y(),o.showPlaylist&&L(),this.instances.set(i,{state:c,audio:u,refs:h,cleanup:D}),i.setAttribute("data-music-player-initialized","true")},_buildDOM:function(i,a){if(i.querySelector(".vd-music-player-controls"))return;i.setAttribute("role","region"),i.setAttribute("aria-label","Music Player"),a.showProgress&&i.classList.add("has-progress"),a.showPlaylist&&i.classList.add("has-playlist");let o=document.createElement("div");o.className="vd-music-player-info";let r=document.createElement("span");r.className="vd-music-player-icon",r.setAttribute("aria-hidden","true"),r.appendChild(n("music-note"));let l=document.createElement("span");l.className="vd-music-player-track-name",l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),o.appendChild(r),o.appendChild(l),i.appendChild(o);let d=document.createElement("div");d.className="vd-music-player-controls",d.setAttribute("role","group"),d.setAttribute("aria-label","Playback controls");let c=document.createElement("button");c.type="button",c.className="vd-music-player-btn vd-music-player-btn-prev",c.setAttribute("aria-label","Previous track"),c.appendChild(n("skip-back"));let u=document.createElement("button");u.type="button",u.className="vd-music-player-btn vd-music-player-btn-play",u.setAttribute("aria-label","Play"),u.appendChild(n("play"));let h=document.createElement("button");if(h.type="button",h.className="vd-music-player-btn vd-music-player-btn-next",h.setAttribute("aria-label","Next track"),h.appendChild(n("skip-forward")),d.appendChild(c),d.appendChild(u),d.appendChild(h),a.showPlaylist||a.shuffle!==void 0){let L=document.createElement("button");L.type="button",L.className="vd-music-player-btn vd-music-player-btn-shuffle",L.setAttribute("aria-label","Shuffle"),L.setAttribute("aria-pressed",a.shuffle?"true":"false"),L.appendChild(n("shuffle")),d.appendChild(L)}let p=document.createElement("span");p.className="vd-music-player-spacer",p.setAttribute("aria-hidden","true"),d.appendChild(p);let v=document.createElement("div");v.className="vd-music-player-volume";let y=document.createElement("span");y.className="vd-music-player-volume-icon",y.setAttribute("aria-hidden","true");let C=document.createElement("input");if(C.type="range",C.className="vd-music-player-volume-slider",C.min="0",C.max="1",C.step="0.01",C.value=String(a.volume),C.setAttribute("aria-label","Volume"),v.appendChild(y),v.appendChild(C),d.appendChild(v),a.showPlaylist){let L=document.createElement("button");L.type="button",L.className="vd-music-player-btn vd-music-player-btn-playlist",L.setAttribute("aria-label","Show playlist"),L.setAttribute("aria-expanded","false"),L.appendChild(n("playlist")),d.appendChild(L)}if(i.appendChild(d),a.showProgress){let L=document.createElement("div");L.className="vd-music-player-progress";let P=document.createElement("span");P.className="vd-music-player-time vd-music-player-time-elapsed",P.textContent="0:00",P.setAttribute("aria-hidden","true");let x=document.createElement("input");x.type="range",x.className="vd-music-player-progress-bar",x.min="0",x.max="100",x.step="0.1",x.value="0",x.setAttribute("aria-label","Seek");let D=document.createElement("span");D.className="vd-music-player-time vd-music-player-time-duration",D.textContent="0:00",D.setAttribute("aria-hidden","true"),L.appendChild(P),L.appendChild(x),L.appendChild(D),i.appendChild(L)}if(a.showPlaylist){let L=document.createElement("div");L.className="vd-music-player-playlist",L.setAttribute("aria-label","Playlist"),i.appendChild(L)}},play:function(i){let a=this.instances.get(i);a&&(!a.audio.src&&a.state.tracks.length&&(a.audio.src=a.state.tracks[a.state.currentIndex].url),a.audio.play().catch(()=>{}))},pause:function(i){let a=this.instances.get(i);a&&a.audio.pause()},toggle:function(i){let a=this.instances.get(i);a&&(a.state.isPlaying?this.pause(i):this.play(i))},next:function(i){let a=this.instances.get(i);if(!a||!a.state.tracks.length)return;let o=(a.state.currentIndex+1)%a.state.tracks.length;this._loadTrack(a,o,a.state.isPlaying)},previous:function(i){let a=this.instances.get(i);if(!a||!a.state.tracks.length)return;let o=a.state.tracks.length,r=(a.state.currentIndex-1+o)%o;this._loadTrack(a,r,a.state.isPlaying)},setVolume:function(i,a){let o=this.instances.get(i);if(!o)return;let r=Math.max(0,Math.min(1,a));o.state.volume=r,o.audio.volume=r,o.refs.volumeSlider&&(o.refs.volumeSlider.value=String(r),t(o.refs.volumeSlider)),i.dispatchEvent(new CustomEvent("musicplayer:volumechange",{bubbles:!0,detail:{volume:r}}))},setTrack:function(i,a){let o=this.instances.get(i);o&&this._loadTrack(o,a,o.state.isPlaying)},shuffle:function(i){let a=this.instances.get(i);!a||!a.refs.btnShuffle||a.refs.btnShuffle.click()},getState:function(i){let a=this.instances.get(i);if(!a)return null;let o=a.state;return{isPlaying:o.isPlaying,currentIndex:o.currentIndex,currentTrack:o.tracks[o.currentIndex]||null,volume:o.volume,shuffle:o.shuffle,tracks:o.tracks.slice()}},destroy:function(i){let a=this.instances.get(i);a&&(a.cleanup.forEach(o=>o()),this.instances.delete(i),i.removeAttribute("data-music-player-initialized"))},destroyAll:function(){this.instances.forEach((i,a)=>this.destroy(a))},_loadTrack:function(i,a,o){let r=i.state.tracks[a];if(!r)return;let l=this._containerOf(i);i.state.currentIndex=a,i.audio.src=r.url,i.refs.trackName&&(i.refs.trackName.textContent=r.name||"Unknown Track",i.refs.trackName.classList.remove("is-idle")),i.refs.playlistPanel&&i.refs.playlistPanel.querySelectorAll(".vd-music-player-playlist-item").forEach((d,c)=>{let u=c===a;d.classList.toggle("is-active",u),d.setAttribute("aria-current",u?"true":"false")}),i.refs.progressBar&&(i.refs.progressBar.value="0",t(i.refs.progressBar)),i.refs.timeElapsed&&(i.refs.timeElapsed.textContent="0:00"),i.refs.timeDuration&&(i.refs.timeDuration.textContent="0:00"),l&&l.dispatchEvent(new CustomEvent("musicplayer:trackchange",{bubbles:!0,detail:{index:a,name:r.name,url:r.url}})),o&&i.audio.play().catch(()=>{})},_containerOf:function(i){for(let[a,o]of this.instances)if(o===i)return a;return null}};typeof window.Vanduo<"u"&&window.Vanduo.register("musicPlayer",s),window.VanduoMusicPlayer=s})();var Q=window.Vanduo;var Oe=Q;})();
42
+ `},isUsingDefaultPrimary:function(){return this.state.primary===this.DEFAULTS.PRIMARY_LIGHT||this.state.primary===this.DEFAULTS.PRIMARY_DARK},_normalizeDefaultPrimaryIfStaleWithStoredTheme:function(){if(!this.isUsingDefaultPrimary())return;let e=this.getDefaultPrimary(this.state.theme);this.state.primary!==e&&(this.state.primary=e)},bindEvents:function(){if(this.elements.trigger&&this.addListener(this.elements.trigger,"click",e=>{e.preventDefault(),e.stopPropagation(),this.toggle()}),this.bindPanelEvents(),window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{if(this.state.theme==="system"&&this.isUsingDefaultPrimary()){let n=this.getDefaultPrimary("system");n!==this.state.primary&&(this.applyPrimary(n),this.updateUI())}};e.addEventListener("change",t),this._cleanup.push(()=>e.removeEventListener("change",t))}this.addListener(document,"click",e=>{this.state.isOpen&&this.elements.customizer&&!this.elements.customizer.contains(e.target)&&this.close()}),this.addListener(document,"keydown",e=>{e.key==="Escape"&&this.state.isOpen&&this.close()})},toggle:function(){this.state.isOpen?this.close():this.open()},open:function(){this.state.isOpen=!0,this.positionPanel(),this.elements.panel&&this.elements.panel.classList.add("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","true"),this.elements.overlay&&this.elements.overlay.classList.add("is-active"),this.dispatchEvent("panel-open",{isOpen:!0})},close:function(){this.state.isOpen=!1,this.elements.panel&&this.elements.panel.classList.remove("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","false"),this.elements.overlay&&this.elements.overlay.classList.remove("is-active"),this.dispatchEvent("panel-close",{isOpen:!1})},updateUI:function(){if(!this.elements.panel)return;this.elements.panel.querySelectorAll("[data-color]").forEach(t=>{t.classList.toggle("is-active",t.dataset.color===this.state.primary)}),this.elements.panel.querySelectorAll("[data-neutral]").forEach(t=>{t.classList.toggle("is-active",t.dataset.neutral===this.state.neutral)}),this.elements.panel.querySelectorAll("[data-radius]").forEach(t=>{t.classList.toggle("is-active",t.dataset.radius===this.state.radius)});let e=this.elements.panel.querySelector("[data-customizer-font]");e&&(e.value=this.state.font)},reset:function(){this.applyTheme(this.DEFAULTS.THEME),this.applyPrimary(this.getDefaultPrimary(this.DEFAULTS.THEME)),this.applyNeutral(this.DEFAULTS.NEUTRAL),this.applyRadius(this.DEFAULTS.RADIUS),this.applyFont(this.DEFAULTS.FONT),this.updateUI(),this.dispatchEvent("reset",{state:{...this.state}})},getState:function(){return{...this.state}},setPreferences:function(e){e.primary&&this.applyPrimary(e.primary),e.neutral&&this.applyNeutral(e.neutral),e.radius&&this.applyRadius(e.radius),e.font&&this.applyFont(e.font),e.theme&&this.applyTheme(e.theme),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},destroyAll:function(){this._cleanup.forEach(e=>e()),this._cleanup=[],this.elements.panel&&this.elements.panel.removeAttribute("data-customizer-initialized"),this.close(),this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeCustomizer",m),window.ThemeCustomizer=m})();(function(){"use strict";let m={isInitialized:!1,_mediaQuery:null,_onMediaChange:null,init:function(){if(this.STORAGE_KEY="vanduo-theme-preference",this.state={preference:this.getPreference()},this.isInitialized){this.applyTheme(),this.renderUI(),this.updateUI();return}this.isInitialized=!0,this.applyTheme(),this.listenForSystemChanges(),this.renderUI(),console.log("Vanduo Theme Switcher initialized")},getPreference:function(){return this.getStorageValue(this.STORAGE_KEY,"system")},setPreference:function(e){this.state.preference=e,this.setStorageValue(this.STORAGE_KEY,e),this.applyTheme(),window.ThemeCustomizer&&window.ThemeCustomizer.applyTheme&&!window.ThemeCustomizer._isApplying&&window.ThemeCustomizer.applyTheme(e),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},applyTheme:function(){let e=this.state.preference;e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)},listenForSystemChanges:function(){this._mediaQuery&&this._onMediaChange||(this._mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this._onMediaChange=e=>{this.state.preference==="system"&&(this.applyTheme(),window.ThemeCustomizer&&typeof window.ThemeCustomizer.applyTheme=="function"&&!window.ThemeCustomizer._isApplying&&window.ThemeCustomizer.applyTheme("system"))},this._mediaQuery.addEventListener("change",this._onMediaChange))},renderUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.getAttribute("data-theme-initialized")==="true"){t.tagName==="SELECT"&&(t.value=this.state.preference);return}if(t.tagName==="SELECT"){t.value=this.state.preference;let n=s=>{this.setPreference(s.target.value)};t.addEventListener("change",n),t._themeToggleHandler=n}else{let n=()=>{let s=["system","light","dark"],i=(s.indexOf(this.state.preference)+1)%s.length;this.setPreference(s[i])};t.addEventListener("click",n),t._themeToggleHandler=n}t.setAttribute("data-theme-initialized","true")})},updateUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.tagName==="SELECT")t.value=this.state.preference;else{let n=t.querySelector(".theme-current-label");n&&(n.textContent=this.state.preference.charAt(0).toUpperCase()+this.state.preference.slice(1))}})},destroyAll:function(){document.querySelectorAll('[data-toggle="theme"][data-theme-initialized="true"]').forEach(t=>{if(t._themeToggleHandler){let n=t.tagName==="SELECT"?"change":"click";t.removeEventListener(n,t._themeToggleHandler),delete t._themeToggleHandler}t.removeAttribute("data-theme-initialized")}),this._mediaQuery&&this._onMediaChange&&this._mediaQuery.removeEventListener("change",this._onMediaChange),this._mediaQuery=null,this._onMediaChange=null,this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeSwitcher",m)})();(function(){"use strict";let m={defaults:{position:"top-right",duration:5e3,dismissible:!0,showProgress:!0,pauseOnHover:!0},containers:{},getContainer:function(e){if(this.containers[e])return this.containers[e];let t=document.createElement("div");return t.className=`vd-toast-container vd-toast-container-${e}`,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","false"),document.body.appendChild(t),this.containers[e]=t,t},show:function(e,t,n){typeof e=="string"&&(e={message:e,type:t,duration:n});let s=Object.assign({},this.defaults,e),i=this.getContainer(s.position),a=document.createElement("div");a.className="vd-toast",s.type&&a.classList.add(`vd-toast-${s.type}`),s.solid&&a.classList.add("vd-toast-solid"),s.showProgress&&s.duration>0&&a.classList.add("vd-toast-with-progress");let o="";if(s.icon){let v=typeof sanitizeHtml=="function"?sanitizeHtml(s.icon):escapeHtml(s.icon);o+=`<span class="vd-toast-icon">${v}</span>`}else s.type&&(o+=`<span class="vd-toast-icon">${this.getDefaultIcon(s.type)}</span>`);let r=typeof escapeHtml=="function"?escapeHtml:function(v){let y=document.createElement("div");return y.appendChild(document.createTextNode(v)),y.innerHTML};if(o+='<div class="vd-toast-content">',s.title&&(o+=`<div class="vd-toast-title">${r(String(s.title))}</div>`),s.message&&(o+=`<div class="vd-toast-message">${r(String(s.message))}</div>`),o+="</div>",s.dismissible&&(o+='<button type="button" class="vd-toast-close" aria-label="Close"></button>'),s.showProgress&&s.duration>0){let v=parseInt(s.duration,10)||0;o+=`<div class="vd-toast-progress" style="animation-duration: ${v}ms"></div>`}if(a.innerHTML=o,i.appendChild(a),a._toastCleanup=[],s.dismissible){let v=a.querySelector(".vd-toast-close"),y=()=>{this.dismiss(a)};v.addEventListener("click",y),a._toastCleanup.push(()=>v.removeEventListener("click",y))}let l=null,d=s.duration,c=null,u=()=>{if(s.duration>0){c=Date.now(),l=setTimeout(()=>{this.dismiss(a)},d),a._toastTimeoutId=l;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="running")}},h=()=>{if(l){clearTimeout(l),l=null,a._toastTimeoutId=null,d-=Date.now()-c;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="paused")}};s.pauseOnHover&&(a.addEventListener("mouseenter",h),a.addEventListener("mouseleave",u),a._toastCleanup.push(()=>a.removeEventListener("mouseenter",h),()=>a.removeEventListener("mouseleave",u))),requestAnimationFrame(()=>{a.classList.add("is-visible"),u()}),a._toastConfig=s;let p=new CustomEvent("toast:show",{bubbles:!0,detail:{toast:a,config:s}});return a.dispatchEvent(p),a},dismiss:function(e){if(!e||e.classList.contains("is-exiting"))return;e._toastTimeoutId&&(clearTimeout(e._toastTimeoutId),e._toastTimeoutId=null),e.classList.remove("is-visible"),e.classList.add("is-exiting");let t=new CustomEvent("toast:dismiss",{bubbles:!0,detail:{toast:e}});e.dispatchEvent(t);let n=()=>{e.removeEventListener("transitionend",n),e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)};e.addEventListener("transitionend",n),setTimeout(()=>{e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)},400)},destroyAll:function(){Object.keys(this.containers).forEach(e=>{let t=this.containers[e];if(!t)return;t.querySelectorAll(".vd-toast").forEach(s=>{s._toastTimeoutId&&clearTimeout(s._toastTimeoutId),s._toastCleanup&&(s._toastCleanup.forEach(i=>i()),delete s._toastCleanup),s.parentElement&&s.parentElement.removeChild(s)}),t.parentElement&&t.parentElement.removeChild(t)}),this.containers={}},dismissAll:function(e){e&&this.containers[e]?this.containers[e].querySelectorAll(".vd-toast").forEach(n=>this.dismiss(n)):Object.values(this.containers).forEach(t=>{t.querySelectorAll(".vd-toast").forEach(s=>this.dismiss(s))})},getDefaultIcon:function(e){return{success:'<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="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',error:'<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"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',warning:'<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.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',info:'<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"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>'}[e]||""},success:function(e,t){return this.show(Object.assign({message:e,type:"success"},t))},error:function(e,t){return this.show(Object.assign({message:e,type:"error"},t))},warning:function(e,t){return this.show(Object.assign({message:e,type:"warning"},t))},info:function(e,t){return this.show(Object.assign({message:e,type:"info"},t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("toast",m),window.Toast=m})();(function(){"use strict";let m={tooltips:new Map,delayTimers:new Map,sanitizeHtml:function(e){if(typeof sanitizeHtml=="function")return sanitizeHtml(e);let t=document.createElement("div");return t.textContent=e||"",t.innerHTML},init:function(){document.querySelectorAll("[data-tooltip], [data-tooltip-html]").forEach(t=>{this.tooltips.has(t)||this.initTooltip(t)})},initTooltip:function(e){let t=this.createTooltip(e),n=[],s=()=>{this.showTooltip(e,t)},i=()=>{this.hideTooltip(e,t)},a=()=>{this.showTooltip(e,t)},o=()=>{this.hideTooltip(e,t)};e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",i),e.addEventListener("focus",a),e.addEventListener("blur",o),n.push(()=>e.removeEventListener("mouseenter",s),()=>e.removeEventListener("mouseleave",i),()=>e.removeEventListener("focus",a),()=>e.removeEventListener("blur",o)),this.tooltips.set(e,{tooltip:t,cleanup:n})},createTooltip:function(e){let t=document.createElement("div");t.className="vd-tooltip",t.setAttribute("role","tooltip"),t.setAttribute("aria-hidden","true");let n="tooltip-"+Math.random().toString(36).substr(2,9);t.id=n,e.setAttribute("aria-describedby",n);let s=e.dataset.tooltipHtml,i=e.dataset.tooltip;s?(t.innerHTML=this.sanitizeHtml(s),t.classList.add("vd-tooltip-html")):i&&(t.textContent=i);let a=e.dataset.tooltipPlacement||e.dataset.placement||"top";t.setAttribute("data-placement",a),t.classList.add(`vd-tooltip-${a}`),e.dataset.tooltipVariant&&t.classList.add(`vd-tooltip-${e.dataset.tooltipVariant}`),e.dataset.tooltipSize&&t.classList.add(`vd-tooltip-${e.dataset.tooltipSize}`);let o=parseInt(e.dataset.tooltipDelay)||0;return t.dataset.delay=o,document.body.appendChild(t),t},showTooltip:function(e,t){let n=parseInt(t.dataset.delay)||0;if(n>0){let s=setTimeout(()=>{this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},n);this.delayTimers.set(e,s)}else this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},hideTooltip:function(e,t){let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.classList.remove("is-visible"),t.setAttribute("aria-hidden","true")},positionTooltip:function(e,t){let n=t.dataset.placement||"top",s=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,r=0,l=0;switch(n){case"top":r=s.top+a-i.height-8,l=s.left+o+s.width/2-i.width/2;break;case"bottom":r=s.bottom+a+8,l=s.left+o+s.width/2-i.width/2;break;case"left":r=s.top+a+s.height/2-i.height/2,l=s.left+o-i.width-8;break;case"right":r=s.top+a+s.height/2-i.height/2,l=s.right+o+8;break}let d=window.innerWidth,c=window.innerHeight,u=8;l<u?l=u:l+i.width>d-u&&(l=d-i.width-u),r<a+u?r=a+u:r+i.height>a+c-u&&(r=a+c-i.height-u),t.style.cssText=`position: absolute; top: 0; left: 0; transform: translate(${l}px, ${r}px);`},show:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.showTooltip(t,n)}},hide:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.hideTooltip(t,n)}},update:function(e,t,n=!1){let s=typeof e=="string"?document.querySelector(e):e;if(s&&this.tooltips.has(s)){let{tooltip:i}=this.tooltips.get(s);n?(i.innerHTML=this.sanitizeHtml(t),i.classList.add("vd-tooltip-html")):(i.textContent=t,i.classList.remove("vd-tooltip-html"))}},destroy:function(e){let t=this.tooltips.get(e);if(!t)return;let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.cleanup.forEach(s=>s()),t.tooltip&&t.tooltip.parentNode&&t.tooltip.parentNode.removeChild(t.tooltip),this.tooltips.delete(e)},destroyAll:function(){this.tooltips.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("tooltips",m),window.VanduoTooltips=m})();(function(){"use strict";let m={minQueryLength:2,maxResults:10,debounceMs:150,highlightTag:"mark",keyboardShortcut:!0,containerSelector:".vd-doc-search",inputSelector:".vd-doc-search-input",resultsSelector:".vd-doc-search-results",contentSelector:".doc-content section[id]",titleSelector:".demo-title, h2, h3",navSelector:".doc-nav-link",sectionSelector:".doc-nav-section",excludeFromContent:"pre, code, script, style",maxContentLength:500,data:null,categoryIcons:{"getting-started":"ph-rocket-launch",core:"ph-cube",components:"ph-puzzle-piece",interactive:"ph-cursor-click","data-display":"ph-table",feedback:"ph-bell",meta:"ph-info",default:"ph-file-text"},onSelect:null,onSearch:null,onOpen:null,onClose:null,emptyTitle:"No results found",emptyText:"Try different keywords or check spelling",placeholder:"Search..."};function e(n){let s=Object.assign({},m,n||{}),i={initialized:!1,index:[],results:[],activeIndex:-1,isOpen:!1,query:"",container:null,input:null,resultsContainer:null,debounceTimer:null,boundHandlers:{}};function a(b,S,...A){try{S(...A)}catch(D){console.warn('[Vanduo Search] Callback error in "'+b+'":',D)}}function o(b){if(i.resultsContainer)try{i.resultsContainer.innerHTML=b}catch(S){console.warn("[Vanduo Search] Failed to render results:",S)}}function r(){return i.initialized?U:(i.container=document.querySelector(s.containerSelector),!i.container||(i.input=i.container.querySelector(s.inputSelector),i.resultsContainer=i.container.querySelector(s.resultsSelector),!i.input||!i.resultsContainer)?(i.initialized=!1,null):(s.placeholder&&i.input.setAttribute("placeholder",s.placeholder),l(),v(),C(),i.initialized=!0,U))}function l(){if(i.index=[],s.data&&Array.isArray(s.data)){s.data.forEach(function(A){i.index.push({id:A.id||p(A.title),title:A.title||"",category:A.category||"",categorySlug:p(A.category||""),content:A.content||"",keywords:A.keywords||h(A.title+" "+A.content),url:A.url||"#"+(A.id||p(A.title)),icon:A.icon||""})});return}let b=document.querySelectorAll(s.contentSelector),S=d();b.forEach(function(A){let D=A.id;if(!D)return;let N=A.querySelector(s.titleSelector),q=N?N.textContent.replace(/v[\d.]+/g,"").trim():D,X=S[D]||"Documentation",$=c(A),B=u(A,q),Y=N?N.querySelector("i.ph"):null,W="";if(Y&&Y.classList){for(let K=0;K<Y.classList.length;K++)if(Y.classList[K].indexOf("ph-")===0){W=Y.classList[K];break}}i.index.push({id:D,title:q,category:X,categorySlug:p(X),content:$,keywords:B,url:"#"+D,icon:W})})}function d(){let b={},S="Documentation";return document.querySelectorAll(s.navSelector+", "+s.sectionSelector).forEach(function(D){if(D.classList.contains("doc-nav-section"))S=D.textContent.trim();else{let N=D.getAttribute("href");if(N&&N.startsWith("#")){let q=N.substring(1);b[q]=S}}}),b}function c(b){let S=b.cloneNode(!0);S.querySelectorAll(s.excludeFromContent).forEach(function(N){N.remove()});let D=S.textContent||"";return D=D.replace(/\s+/g," ").trim(),D.substring(0,s.maxContentLength)}function u(b,S){let A=[];return S.toLowerCase().split(/\s+/).forEach(function(q){q.length>2&&A.push(q)}),b.querySelectorAll("code").forEach(function(q){let $=(q.textContent||"").match(/\.([\w-]+)/g);$&&$.forEach(function(B){A.push(B.substring(1).toLowerCase())})}),b.querySelectorAll("[data-tooltip], [data-modal]").forEach(function(q){q.getAttributeNames().filter(function($){return $.startsWith("data-")}).forEach(function($){A.push($.replace("data-",""))})}),Array.from(new Set(A))}function h(b){return b.toLowerCase().split(/\s+/).filter(function(A){return A.length>2})}function p(b){return b.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}function v(){i.boundHandlers.handleInput=function(b){L(b)},i.boundHandlers.handleFocus=function(){i.query.length>=s.minQueryLength&&H()},i.boundHandlers.handleKeydown=function(b){P(b)},i.boundHandlers.handleOutsideClick=function(b){i.container.contains(b.target)||z()},i.boundHandlers.handleGlobalKeydown=function(b){s.keyboardShortcut&&(b.metaKey||b.ctrlKey)&&b.key==="k"&&(b.preventDefault(),i.input.focus(),i.input.select())},i.boundHandlers.handleResultClick=function(b){let S=b.target.closest(".vd-doc-search-result");if(S){let A=parseInt(S.dataset.index,10);I(A)}},i.input.addEventListener("input",i.boundHandlers.handleInput),i.input.addEventListener("focus",i.boundHandlers.handleFocus),i.input.addEventListener("keydown",i.boundHandlers.handleKeydown),document.addEventListener("click",i.boundHandlers.handleOutsideClick),document.addEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer.addEventListener("click",i.boundHandlers.handleResultClick)}function y(){i.input&&(i.input.removeEventListener("input",i.boundHandlers.handleInput),i.input.removeEventListener("focus",i.boundHandlers.handleFocus),i.input.removeEventListener("keydown",i.boundHandlers.handleKeydown)),document.removeEventListener("click",i.boundHandlers.handleOutsideClick),document.removeEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer&&i.resultsContainer.removeEventListener("click",i.boundHandlers.handleResultClick)}function C(){let b=i.resultsContainer.id||"search-results-"+Math.random().toString(36).substr(2,9);i.resultsContainer.id=b,i.input.setAttribute("role","combobox"),i.input.setAttribute("aria-autocomplete","list"),i.input.setAttribute("aria-controls",b),i.input.setAttribute("aria-expanded","false"),i.resultsContainer.setAttribute("role","listbox"),i.resultsContainer.setAttribute("aria-label","Search results")}function L(b){let S=b.target.value.trim();i.debounceTimer&&clearTimeout(i.debounceTimer),i.debounceTimer=setTimeout(function(){if(i.query=S,S.length<s.minQueryLength){z();return}i.results=x(S),i.activeIndex=-1,_(),H(),typeof s.onSearch=="function"&&a("onSearch",s.onSearch,S,i.results)},s.debounceMs)}function P(b){if(!i.isOpen){b.key==="ArrowDown"&&i.query.length>=s.minQueryLength&&(b.preventDefault(),i.results=x(i.query),_(),H());return}switch(b.key){case"ArrowDown":b.preventDefault(),w(1);break;case"ArrowUp":b.preventDefault(),w(-1);break;case"Enter":b.preventDefault(),i.activeIndex>=0?I(i.activeIndex):i.results.length>0&&I(0);break;case"Escape":b.preventDefault(),z();break;case"Tab":z();break}}function x(b){let S=b.toLowerCase().split(/\s+/).filter(function(D){return D.length>0}),A=[];return i.index.forEach(function(D){let N=0,q=D.title.toLowerCase(),X=D.category.toLowerCase(),$=D.content.toLowerCase();S.forEach(function(B){q.includes(B)&&(N+=100,q===B?N+=50:q.startsWith(B)&&(N+=25)),X.includes(B)&&(N+=50),D.keywords.some(function(W){return W.includes(B)})&&(N+=30),$.includes(B)&&(N+=10)}),N>0&&A.push({id:D.id,title:D.title,category:D.category,categorySlug:D.categorySlug,content:D.content,url:D.url,icon:D.icon,score:N})}),A.sort(function(D,N){return N.score-D.score}),A.slice(0,s.maxResults)}function _(){if(i.results.length===0){o(V());return}let b='<ul class="vd-doc-search-results-list" role="listbox">';i.results.forEach(function(S,A){let D=A===i.activeIndex,N=S.icon||k(S.categorySlug),q=T(S.content,i.query);b+='<li class="vd-doc-search-result'+(D?" is-active":"")+'" role="option" id="vd-doc-search-result-'+A+'" data-index="'+A+'" data-category="'+f(S.categorySlug)+'" aria-selected="'+D+'"><div class="vd-doc-search-result-icon"><i class="ph '+f(N)+'"></i></div><div class="vd-doc-search-result-content"><div class="vd-doc-search-result-title">'+M(S.title,i.query)+'</div><div class="vd-doc-search-result-category">'+f(S.category)+'</div><div class="vd-doc-search-result-excerpt">'+M(q,i.query)+"</div></div></li>"}),b+="</ul>",b+=g(),o(b)}function V(){return'<div class="vd-doc-search-empty"><div class="vd-doc-search-empty-icon"><i class="ph ph-magnifying-glass"></i></div><div class="vd-doc-search-empty-title">'+f(s.emptyTitle)+'</div><div class="vd-doc-search-empty-text">'+f(s.emptyText)+"</div></div>"}function g(){return'<div class="vd-doc-search-footer"><span class="vd-doc-search-footer-item"><kbd>\u2191</kbd><kbd>\u2193</kbd> to navigate</span><span class="vd-doc-search-footer-item"><kbd>\u21B5</kbd> to select</span><span class="vd-doc-search-footer-item"><kbd>esc</kbd> to close</span></div>'}function k(b){return s.categoryIcons[b]||s.categoryIcons.default||"ph-file-text"}function T(b,S){let A=S.toLowerCase().split(/\s+/),D=b.toLowerCase(),N=100,q=-1;for(let Y=0;Y<A.length;Y++){let W=D.indexOf(A[Y]);W!==-1&&(q===-1||W<q)&&(q=W)}if(q===-1)return b.substring(0,N)+"...";let X=Math.max(0,q-30),$=Math.min(b.length,q+N),B=b.substring(X,$);return X>0&&(B="..."+B),$<b.length&&(B=B+"..."),B}function M(b,S){if(!S)return f(b);let A=S.toLowerCase().split(/\s+/).filter(function(N){return N.length>0}),D=f(b);return A.forEach(function(N){if(N.length>50)return;let q=new RegExp("("+N.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")","gi");D=D.replace(q,"<"+s.highlightTag+">$1</"+s.highlightTag+">")}),D}function f(b){let S=document.createElement("div");return S.textContent=b,S.innerHTML}function w(b){let S=i.activeIndex+b;S<0?S=i.results.length-1:S>=i.results.length&&(S=0),E(S)}function E(b){let S=i.resultsContainer.querySelector(".vd-doc-search-result.is-active");S&&(S.classList.remove("is-active"),S.setAttribute("aria-selected","false")),i.activeIndex=b;let A=i.resultsContainer.querySelector('[data-index="'+b+'"]');A&&(A.classList.add("is-active"),A.setAttribute("aria-selected","true"),i.input.setAttribute("aria-activedescendant","vd-doc-search-result-"+b),A.scrollIntoView({block:"nearest"}))}function I(b){let S=i.results[b];if(!S)return;if(z(),i.input.value="",i.query="",typeof s.onSelect=="function"){a("onSelect",s.onSelect,S);return}let A=document.querySelector(S.url);A&&(A.scrollIntoView({behavior:"smooth",block:"start"}),window.history.pushState(null,"",S.url),O(S.id))}function O(b){document.querySelectorAll(s.navSelector).forEach(function(A){A.classList.remove("active"),A.getAttribute("href")==="#"+b&&A.classList.add("active")})}function H(){i.isOpen||(i.isOpen=!0,i.resultsContainer.classList.add("is-open"),i.input.setAttribute("aria-expanded","true"),typeof s.onOpen=="function"&&a("onOpen",s.onOpen))}function z(){i.isOpen&&(i.isOpen=!1,i.activeIndex=-1,i.resultsContainer.classList.remove("is-open"),i.input.setAttribute("aria-expanded","false"),i.input.removeAttribute("aria-activedescendant"),typeof s.onClose=="function"&&a("onClose",s.onClose))}function R(){y(),i.initialized=!1,i.index=[],i.results=[],i.isOpen=!1,i.query="",i.debounceTimer&&clearTimeout(i.debounceTimer),i.resultsContainer&&o("")}function j(){l()}function G(b){Object.assign(s,b)}function Z(){return Object.assign({},s)}function F(){return i.index.slice()}let U={init:r,destroy:R,rebuild:j,search:x,open:H,close:z,setConfig:G,getConfig:Z,getIndex:F};return U}let t={create:function(n){let s=e(n);return s&&s.init(),s||null},_instance:null,config:Object.assign({},m),init:function(n){return this._instance&&this._instance.destroy(),n&&Object.assign(this.config,n),this._instance=e(this.config),this._instance?this._instance.init():null},destroy:function(){this._instance&&(this._instance.destroy(),this._instance=null)},destroyAll:function(){this.destroy()},rebuild:function(){this._instance&&this._instance.rebuild()},search:function(n){return this._instance?this._instance.search(n):[]},open:function(){this._instance&&this._instance.open()},close:function(){this._instance&&this._instance.close()}};typeof window.Vanduo<"u"&&window.Vanduo.register("docSearch",t),window.Search=t,window.DocSearch=t,window.VanduoDocSearch=t})();(function(){"use strict";let m={instances:new Map,currentDrag:null,touchState:null,feedbackElement:null,containerSelector:".vd-draggable-container, .vd-draggable-container-vertical",init:function(){document.querySelectorAll(".vd-draggable, [data-draggable]").forEach(s=>{this.instances.has(s)||this.initDraggable(s)}),document.querySelectorAll(this.containerSelector).forEach(s=>{this.instances.has(s)||this.initContainer(s)}),document.querySelectorAll(".vd-drop-zone").forEach(s=>{this.instances.has(s)||this.initDropZone(s)}),this.createFeedbackElement()},initDraggable:function(e){let t=[];e.hasAttribute("draggable")||e.setAttribute("draggable","true"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.setAttribute("role","option"),e.setAttribute("aria-roledescription","draggable item"),e.setAttribute("aria-grabbed","false");let n=c=>{this.handleDragStart(c,e)};e.addEventListener("dragstart",n),t.push(()=>e.removeEventListener("dragstart",n));let s=c=>{this.handleDrag(c,e)};e.addEventListener("drag",s),t.push(()=>e.removeEventListener("drag",s));let i=c=>{this.handleDragEnd(c,e)};e.addEventListener("dragend",i),t.push(()=>e.removeEventListener("dragend",i));let a=c=>{this.handleTouchStart(c,e)};e.addEventListener("touchstart",a),t.push(()=>e.removeEventListener("touchstart",a));let o=c=>{this.handleTouchMove(c,e)};e.addEventListener("touchmove",o,{passive:!1}),t.push(()=>e.removeEventListener("touchmove",o));let r=c=>{this.handleTouchEnd(c,e)};e.addEventListener("touchend",r,{passive:!1}),t.push(()=>e.removeEventListener("touchend",r));let l=c=>{this.handleTouchEnd(c,e)};e.addEventListener("touchcancel",l),t.push(()=>e.removeEventListener("touchcancel",l));let d=c=>{this.handleKeydown(c,e)};e.addEventListener("keydown",d),t.push(()=>e.removeEventListener("keydown",d)),this.instances.set(e,{cleanup:t})},initContainer:function(e){e.setAttribute("role","listbox"),e.setAttribute("aria-label",e.getAttribute("aria-label")||"Draggable items"),e.querySelectorAll(".vd-draggable-item").forEach(o=>{this.instances.has(o)||this.initDraggable(o)});let n=[],s=o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},i=o=>{if(o.preventDefault(),o.dataTransfer.dropEffect="move",!this.currentDrag)return;let r=this.currentDrag.element;e.contains(r)&&(o.clientX===0&&o.clientY===0||this.handleReorder(e,r,o.clientX,o.clientY))},a=o=>{o.preventDefault()};e.addEventListener("dragenter",s),e.addEventListener("dragover",i),e.addEventListener("drop",a),n.push(()=>{e.removeEventListener("dragenter",s),e.removeEventListener("dragover",i),e.removeEventListener("drop",a)}),this.instances.set(e,{cleanup:n})},initDropZone:function(e){let t=[];e.setAttribute("role","region"),e.setAttribute("aria-dropeffect","move"),e.hasAttribute("aria-label")||e.setAttribute("aria-label","Drop zone");let n=o=>{o.preventDefault(),this.handleDragOver(o,e)};e.addEventListener("dragover",n),t.push(()=>e.removeEventListener("dragover",n));let s=o=>{o.preventDefault(),this.handleDragEnter(o,e)};e.addEventListener("dragenter",s),t.push(()=>e.removeEventListener("dragenter",s));let i=o=>{this.handleDragLeave(o,e)};e.addEventListener("dragleave",i),t.push(()=>e.removeEventListener("dragleave",i));let a=o=>{o.preventDefault(),this.handleDrop(o,e)};e.addEventListener("drop",a),t.push(()=>e.removeEventListener("drop",a)),this.instances.set(e,{cleanup:t})},createFeedbackElement:function(){if(!this.feedbackElement){let e=document.querySelector(".vd-drag-feedback");if(e){this.feedbackElement=e;return}this.feedbackElement=document.createElement("div"),this.feedbackElement.className="vd-drag-feedback hidden",this.feedbackElement.setAttribute("role","presentation"),document.body.appendChild(this.feedbackElement)}},handleDragStart:function(e,t){t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:e.clientX,y:e.clientY},initialBounds:t.getBoundingClientRect(),data:this.getData(t)},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",this.currentDrag.data),t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY}}}))},handleDrag:function(e,t){this.currentDrag&&t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-this.currentDrag.initialPosition.x,y:e.clientY-this.currentDrag.initialPosition.y}}}))},handleDragEnd:function(e,t){t.classList.remove("is-dragging"),t.classList.add("is-dropped"),setTimeout(()=>t.classList.remove("is-dropped"),300),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let n=this.currentDrag?.data||this.getData(t),s=this.currentDrag?.initialPosition||{x:0,y:0};t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:n,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-s.x,y:e.clientY-s.y}}})),this.currentDrag=null},handleTouchStart:function(e,t){let n=e.touches[0],s=t.getBoundingClientRect();this.touchState={element:t,startX:n.clientX,startY:n.clientY,lastX:n.clientX,lastY:n.clientY,offsetX:n.clientX-s.left,offsetY:n.clientY-s.top,startTime:Date.now(),isDragging:!1}},handleTouchMove:function(e,t){if(!this.touchState)return;let n=e.touches[0];this.touchState.lastX=n.clientX,this.touchState.lastY=n.clientY;let s=n.clientX-this.touchState.startX,i=n.clientY-this.touchState.startY;if((Math.abs(s)>10||Math.abs(i)>10)&&(e.cancelable&&e.preventDefault(),this.touchState.isDragging||(this.touchState.isDragging=!0,t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:this.touchState.startX,y:this.touchState.startY},initialBounds:t.getBoundingClientRect(),data:this.getData(t),offsetX:this.touchState.offsetX,offsetY:this.touchState.offsetY},t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY}}}))),this.updateFeedback(n.clientX,n.clientY),this.currentDrag)){t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY},delta:{x:s,y:i}}})),this.updateTouchDropZone(n.clientX,n.clientY);let a=t.closest(this.containerSelector);a&&a.contains(t)&&this.handleReorder(a,t,n.clientX,n.clientY)}},handleTouchEnd:function(e,t){if(this.touchState&&this.touchState.isDragging){e.cancelable&&e.preventDefault();let n=e.changedTouches?.[0],s={x:n?.clientX??this.touchState.lastX??this.touchState.startX,y:n?.clientY??this.touchState.lastY??this.touchState.startY},i=this.resolveDropZoneAtPoint(s.x,s.y)||this.touchState.overZone;i?this.dispatchDrop(i,s):this.touchState.overZone&&this.touchState.overZone.classList.remove("is-drag-over"),t.classList.remove("is-dragging"),t.classList.add("is-dropped"),t.setAttribute("aria-grabbed","false"),setTimeout(()=>t.classList.remove("is-dropped"),300),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let a=this.currentDrag?.data||this.getData(t),o=this.touchState?.startX||0,r=this.touchState?.startY||0;t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:a,position:s,delta:{x:s.x-o,y:s.y-r}}}))}this.touchState=null,this.currentDrag=null},handleDragOver:function(e,t){e.preventDefault(),e.dataTransfer.dropEffect="move"},handleDragEnter:function(e,t){e.preventDefault(),t.classList.add("is-drag-over")},handleDragLeave:function(e,t){t.classList.remove("is-drag-over")},handleDrop:function(e,t){e.preventDefault(),this.dispatchDrop(t,{x:e.clientX,y:e.clientY})},resolveDropZoneAtPoint:function(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return null;if(typeof document.elementsFromPoint=="function"){let a=document.elementsFromPoint(e,t);for(let o of a){let r=o.closest(".vd-drop-zone");if(r)return r}}let n=document.elementFromPoint(e,t),s=n?n.closest(".vd-drop-zone"):null;if(s)return s;let i=document.querySelectorAll(".vd-drop-zone");for(let a of i){let o=a.getBoundingClientRect();if(e>=o.left&&e<=o.right&&t>=o.top&&t<=o.bottom)return a}return null},updateTouchDropZone:function(e,t){if(!this.touchState)return;let n=this.resolveDropZoneAtPoint(e,t),s=this.touchState.overZone||null;s&&s!==n&&s.classList.remove("is-drag-over"),n&&n!==s&&n.classList.add("is-drag-over"),this.touchState.overZone=n||null},dispatchDrop:function(e,t){e.classList.remove("is-drag-over"),e.dispatchEvent(new CustomEvent("draggable:drop",{bubbles:!0,detail:{zone:e,element:this.currentDrag?.element,data:this.currentDrag?.data,position:t}}))},handleReorder:function(e,t,n,s){let i=e.classList.contains("vd-draggable-container-vertical"),o=[...e.querySelectorAll(".vd-draggable-item:not(.is-dragging), .vd-draggable:not(.is-dragging)")].reduce((r,l)=>{let d=l.getBoundingClientRect(),c=i?s-d.top-d.height/2:n-d.left-d.width/2;return c<0&&c>r.offset?{offset:c,element:l}:r},{offset:Number.NEGATIVE_INFINITY}).element;o==null?e.appendChild(t):e.insertBefore(t,o)},handleKeydown:function(e,t){switch(e.key){case"Enter":case" ":e.preventDefault(),t.click();break;case"Escape":t.classList.contains("is-dragging")&&(t.classList.remove("is-dragging"),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden"),this.currentDrag=null);break;case"ArrowUp":case"ArrowLeft":{e.preventDefault();let n=t.previousElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(t,n),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"up"}})));break}case"ArrowDown":case"ArrowRight":{e.preventDefault();let n=t.nextElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(n,t),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"down"}})));break}}},getData:function(e){return e.dataset.draggable||e.textContent.trim()},updateFeedback:function(e,t){if(!this.currentDrag)return;this.feedbackElement.classList.remove("hidden");let n=this.currentDrag.initialBounds;this.feedbackElement.innerHTML="";let s=this.currentDrag.element.cloneNode(!0);this.feedbackElement.appendChild(s);let i=this.currentDrag.offsetX??20,a=this.currentDrag.offsetY??20;Object.assign(this.feedbackElement.style,{left:e-i+"px",top:t-a+"px",width:n.width+"px",height:n.height+"px"})},makeDraggable:function(e,t={}){let n=typeof e=="string"?document.querySelector(e):e;n&&!this.instances.has(n)&&(n.classList.add("vd-draggable"),n.setAttribute("draggable","true"),t.data&&(n.dataset.draggable=t.data),this.initDraggable(n))},removeDraggable:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&this.instances.has(t)&&(this.instances.get(t).cleanup.forEach(s=>s()),this.instances.delete(t),t.classList.remove("vd-draggable"),t.removeAttribute("draggable"),t.removeAttribute("data-draggable"))},destroy:function(e){this.removeDraggable(e)},destroyAll:function(){Array.from(this.instances.keys()).forEach(t=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("draggable",m),window.VanduoDraggable=m})();(function(){"use strict";let m=new Map;function e(r){try{return new URL(r,window.location.href).origin===window.location.origin}catch{return!1}}function t(r,l){let c=new DOMParser().parseFromString(l.trim(),"text/html"),u=["SCRIPT","IFRAME","OBJECT","EMBED","FORM","BASE","LINK","META","STYLE"];for(let v of u){let y=c.querySelectorAll(v);for(let C=y.length-1;C>=0;C--)y[C].parentNode.removeChild(y[C])}function h(v){if(v.nodeType===Node.ELEMENT_NODE){let y=v.attributes;for(let L=y.length-1;L>=0;L--){let P=y[L].name.toLowerCase(),_=y[L].value.toLowerCase().trim();(P.startsWith("on")||_.startsWith("javascript:")||_.startsWith("data:")||_.startsWith("vbscript:"))&&v.removeAttribute(y[L].name)}let C=v.childNodes;for(let L=0;L<C.length;L++)h(C[L])}}h(c.body);let p=Array.from(c.body.childNodes);for(;r.firstChild;)r.removeChild(r.firstChild);p.forEach(function(v){r.appendChild(document.adoptNode(v))})}function n(){return'<div class="vd-skeleton-card" style="position:relative;min-height:200px;padding:2rem;overflow:hidden;"><div class="vd-skeleton vd-skeleton-heading-lg" style="margin-bottom:1.5rem;"></div><div class="vd-skeleton vd-skeleton-paragraph"><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div></div><div class="vd-dynamic-loader" style="position:absolute;inset:0;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div></div>'}function s(){return'<div class="vd-dynamic-loader" style="min-height:180px;display:flex;align-items:center;justify-content:center;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div>'}function i(r){return!r||r==="skeleton"?n():r==="spinner"?s():r}function a(r,l,d){r.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:d||{}}))}let o={observe:function(r,l,d){if(!(r instanceof Element)){console.warn("[VanduoLazyLoad] observe() requires a DOM Element.");return}if(typeof l!="function"){console.warn("[VanduoLazyLoad] observe() requires a callback function.");return}if(m.has(r))return;let c=d&&d.threshold!=null?d.threshold:0,u=d&&d.rootMargin?d.rootMargin:"0px",h=new IntersectionObserver(function(p,v){p.forEach(function(y){if(y.isIntersecting){v.unobserve(y.target),m.delete(y.target);try{l(y.target)}catch(C){console.error("[VanduoLazyLoad] Callback threw:",C)}}})},{threshold:c,rootMargin:u});m.set(r,h),h.observe(r)},unobserve:function(r){let l=m.get(r);l&&(l.unobserve(r),m.delete(r))},unobserveAll:function(){m.forEach(function(r,l){r.unobserve(l)}),m.clear()},loadSection:function(r,l,d){if(typeof r!="string"||!r){console.warn("[VanduoLazyLoad] loadSection() requires a non-empty URL string.");return}if(!(l instanceof Element)){console.warn("[VanduoLazyLoad] loadSection() requires a DOM Element as containerEl.");return}if(!e(r)){console.error("[VanduoLazyLoad] loadSection() blocked cross-origin URL:",r);return}let c=d||{},u=i(c.placeholder);t(l,u),a(l,"lazysection:loading",{url:r}),this.observe(l,function(){let h=new window.AbortController,p=setTimeout(function(){h.abort()},1e4);window.fetch(r,{signal:h.signal}).then(function(v){if(clearTimeout(p),!v.ok)throw new Error("HTTP "+v.status);return v.text()}).then(function(v){t(l,v),a(l,"lazysection:loaded",{url:r}),typeof window.Vanduo<"u"&&window.Vanduo.init(),typeof c.onLoaded=="function"&&c.onLoaded(l)}).catch(function(v){let y=document.createElement("div");y.className="vd-alert vd-alert-error",y.setAttribute("role","alert");let C=document.createElement("span");C.textContent="Failed to load content. ";let L=document.createElement("small");for(L.style.opacity="0.7",L.textContent=v.message,y.appendChild(C),y.appendChild(L);l.firstChild;)l.removeChild(l.firstChild);l.appendChild(y),a(l,"lazysection:error",{url:r,error:v}),console.error("[VanduoLazyLoad] loadSection failed:",v),typeof c.onError=="function"&&c.onError(v)})},{threshold:c.threshold,rootMargin:c.rootMargin})},init:function(){let r=this;document.querySelectorAll("[data-vd-lazy]").forEach(function(d){if(m.has(d)||d.dataset.vdLazyState==="loading"||d.dataset.vdLazyState==="loaded")return;let c=d.getAttribute("data-vd-lazy");if(!c)return;d.dataset.vdLazyState="loading";let u=d.getAttribute("data-vd-lazy-placeholder")||"skeleton";r.loadSection(c,d,{placeholder:u,onLoaded:function(){d.dataset.vdLazyState="loaded"},onError:function(){d.dataset.vdLazyState="error"}})})}};typeof window.Vanduo<"u"&&window.Vanduo.register("LazyLoad",o),window.VanduoLazyLoad=o})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-flow, .vd-carousel").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=e.querySelector(".vd-flow-track");if(!t)return;let n=Array.from(t.querySelectorAll(".vd-flow-slide"));if(n.length===0)return;let s=e.classList.contains("vd-flow-fade"),i=e.hasAttribute("data-vd-autoplay"),a=parseInt(e.getAttribute("data-vd-interval"),10)||5e3,o=e.getAttribute("data-vd-loop")!=="false",r={current:0,total:n.length,autoplayTimer:null,isFade:s,loop:o,isDragging:!1,startX:0,currentX:0,threshold:50},l=[];n.forEach((g,k)=>{g.setAttribute("role","group"),g.setAttribute("aria-roledescription","slide"),g.setAttribute("aria-label","Slide "+(k+1)+" of "+n.length),k===0&&g.classList.add("is-active")}),e.setAttribute("role","region"),e.setAttribute("aria-roledescription","carousel"),e.getAttribute("aria-label")||e.setAttribute("aria-label","Carousel");let d=document.createElement("div");d.setAttribute("aria-live","polite"),d.setAttribute("aria-atomic","true"),d.className="sr-only",d.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",e.appendChild(d);let c=(g,k)=>{k===void 0&&(k=!0);let T=g;r.loop?T=(g%r.total+r.total)%r.total:T=Math.max(0,Math.min(g,r.total-1));let M=r.current;r.current=T,r.isFade?n.forEach((w,E)=>{w.classList.toggle("is-active",E===T)}):t.style.transform="translateX(-"+T*100+"%)",e.querySelectorAll(".vd-flow-indicator").forEach((w,E)=>{w.classList.toggle("is-active",E===T),w.setAttribute("aria-selected",E===T?"true":"false")}),n.forEach((w,E)=>{w.setAttribute("aria-hidden",E!==T?"true":"false")}),k&&(d.textContent="Slide "+(T+1)+" of "+r.total),e.dispatchEvent(new CustomEvent("flow:change",{detail:{current:T,previous:M,total:r.total}}))},u=()=>c(r.current+1),h=()=>c(r.current-1),p=e.querySelector(".vd-flow-prev"),v=e.querySelector(".vd-flow-next");if(p){let g=()=>h();p.addEventListener("click",g),l.push(()=>p.removeEventListener("click",g))}if(v){let g=()=>u();v.addEventListener("click",g),l.push(()=>v.removeEventListener("click",g))}e.querySelectorAll(".vd-flow-indicator").forEach((g,k)=>{g.setAttribute("role","tab"),g.setAttribute("aria-selected",k===0?"true":"false"),g.setAttribute("aria-label","Go to slide "+(k+1));let T=()=>c(k);g.addEventListener("click",T),l.push(()=>g.removeEventListener("click",T))});let C=g=>{g.key==="ArrowLeft"&&(h(),g.preventDefault()),g.key==="ArrowRight"&&(u(),g.preventDefault())};e.setAttribute("tabindex","0"),e.addEventListener("keydown",C),l.push(()=>e.removeEventListener("keydown",C));let L=g=>{r.isDragging=!0,r.startX=g.clientX||g.touches&&g.touches[0].clientX||0,r.currentX=r.startX,e.classList.add("is-dragging")},P=g=>{r.isDragging&&(r.currentX=g.clientX||g.touches&&g.touches[0].clientX||0)},x=()=>{if(!r.isDragging)return;r.isDragging=!1,e.classList.remove("is-dragging");let g=r.startX-r.currentX;Math.abs(g)>r.threshold&&(g>0?u():h())};e.addEventListener("mousedown",L),e.addEventListener("mousemove",P),e.addEventListener("mouseup",x),e.addEventListener("mouseleave",x),e.addEventListener("touchstart",L,{passive:!0}),e.addEventListener("touchmove",P,{passive:!0}),e.addEventListener("touchend",x),l.push(()=>e.removeEventListener("mousedown",L),()=>e.removeEventListener("mousemove",P),()=>e.removeEventListener("mouseup",x),()=>e.removeEventListener("mouseleave",x),()=>e.removeEventListener("touchstart",L),()=>e.removeEventListener("touchmove",P),()=>e.removeEventListener("touchend",x));let _=()=>{V(),r.autoplayTimer=setInterval(u,a)},V=()=>{r.autoplayTimer&&(clearInterval(r.autoplayTimer),r.autoplayTimer=null)};if(i){_();let g=()=>V(),k=()=>_();e.addEventListener("mouseenter",g),e.addEventListener("mouseleave",k),e.addEventListener("focusin",g),e.addEventListener("focusout",k),l.push(()=>e.removeEventListener("mouseenter",g),()=>e.removeEventListener("mouseleave",k),()=>e.removeEventListener("focusin",g),()=>e.removeEventListener("focusout",k),()=>V())}c(0,!1),this.instances.set(e,{cleanup:l,goTo:c,next:u,prev:h,getState:()=>({...r})})},goTo:function(e,t){let n=this.instances.get(e);n&&n.goTo(t)},next:function(e){let t=this.instances.get(e);t&&t.next()},prev:function(e){let t=this.instances.get(e);t&&t.prev()},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("flow",m),window.VanduoFlow=m})();(function(){"use strict";let m={instances:new Map,_globalCleanups:[],init:function(){if(document.querySelectorAll("[data-vd-bubble], [data-vd-popover]").forEach(t=>{this.instances.has(t)||this.initInstance(t)}),this._globalCleanups.length===0){let t=s=>{this.instances.forEach((i,a)=>{!i.popover.contains(s.target)&&!a.contains(s.target)&&this.hide(a)})},n=s=>{s.key==="Escape"&&this.instances.forEach((i,a)=>this.hide(a))};document.addEventListener("click",t,!0),document.addEventListener("keydown",n),this._globalCleanups.push(()=>document.removeEventListener("click",t,!0),()=>document.removeEventListener("keydown",n))}},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-bubble-placement")||e.getAttribute("data-vd-popover-placement")||"bottom",s=document.createElement("div");s.className="vd-bubble-content",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","false"),s.setAttribute("data-placement",n);let i=e.getAttribute("data-vd-bubble-title")||e.getAttribute("data-vd-popover-title"),a=e.getAttribute("data-vd-bubble")||e.getAttribute("data-vd-popover")||"",o=e.getAttribute("data-vd-bubble-html")||e.getAttribute("data-vd-popover-html");if(i){let c=document.createElement("div");c.className="vd-bubble-header";let u=document.createElement("span");u.textContent=i;let h=document.createElement("button");h.className="vd-bubble-close",h.setAttribute("aria-label","Close"),h.innerHTML="&times;",c.appendChild(u),c.appendChild(h),s.appendChild(c);let p=v=>{v.stopPropagation(),this.hide(e)};h.addEventListener("click",p),t.push(()=>h.removeEventListener("click",p))}let r=document.createElement("div");r.className="vd-bubble-body",o?typeof sanitizeHtml=="function"?r.innerHTML=sanitizeHtml(o):r.textContent=o:r.textContent=a,s.appendChild(r),document.body.appendChild(s);let l="vd-bubble-"+Math.random().toString(36).slice(2,9);s.id=l,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",l);let d=c=>{c.stopPropagation(),s.classList.contains("is-visible")?this.hide(e):(this.hideAll(),this.show(e))};e.addEventListener("click",d),t.push(()=>e.removeEventListener("click",d)),this.instances.set(e,{popover:s,cleanup:t,placement:n})},position:function(e,t,n){let s=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=10,o,r;switch(n){case"top":o=s.top-i.height-a+window.scrollY,r=s.left+(s.width-i.width)/2+window.scrollX;break;case"left":o=s.top+(s.height-i.height)/2+window.scrollY,r=s.left-i.width-a+window.scrollX;break;case"right":o=s.top+(s.height-i.height)/2+window.scrollY,r=s.right+a+window.scrollX;break;default:o=s.bottom+a+window.scrollY,r=s.left+(s.width-i.width)/2+window.scrollX}r=Math.max(8,Math.min(r,window.innerWidth-i.width-8)),o=Math.max(8,o),t.style.top=o+"px",t.style.left=r+"px"},show:function(e){let t=this.instances.get(e);if(!t)return;let{popover:n,placement:s}=t;n.style.display="block",n.classList.add("is-visible"),e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.position(e,n,s)}),e.dispatchEvent(new CustomEvent("bubble:show",{bubbles:!0}))},hide:function(e){let t=this.instances.get(e);t&&(t.popover.classList.remove("is-visible"),e.setAttribute("aria-expanded","false"),e.dispatchEvent(new CustomEvent("bubble:hide",{bubbles:!0})))},hideAll:function(){this.instances.forEach((e,t)=>this.hide(t))},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.popover.parentNode&&t.popover.parentNode.removeChild(t.popover),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls"),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t)),this._globalCleanups.forEach(e=>e()),this._globalCleanups=[]}};typeof window.Vanduo<"u"&&window.Vanduo.register("bubble",m),window.VanduoBubble=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-waypoint-nav], [data-vd-scrollspy-nav]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=Array.from(e.querySelectorAll('a[href^="#"]'));if(t.length===0)return;let n=[],s=parseInt(e.getAttribute("data-vd-waypoint-offset")||"80",10),i=[];if(t.forEach(d=>{let c=d.getAttribute("href").slice(1),u=document.getElementById(c);u&&(u.setAttribute("data-vd-waypoint-section",""),i.push({id:c,link:d,section:u}))}),i.length===0)return;let a=new Set,o=d=>{t.forEach(u=>u.classList.remove("is-active"));let c=t.find(u=>u.getAttribute("href")==="#"+d);c&&(c.classList.add("is-active"),e.dispatchEvent(new CustomEvent("waypoint:change",{detail:{activeId:d,link:c}})))},r="-"+s+"px 0px -40% 0px",l=new IntersectionObserver(d=>{d.forEach(c=>{c.isIntersecting?a.add(c.target.id):a.delete(c.target.id)});for(let c=0;c<i.length;c++)if(a.has(i[c].id)){o(i[c].id);return}},{rootMargin:r,threshold:0});i.forEach(d=>l.observe(d.section)),t.forEach(d=>{let c=u=>{u.preventDefault();let h=d.getAttribute("href").slice(1),p=document.getElementById(h);p&&(p.scrollIntoView({behavior:"smooth"}),o(h))};d.addEventListener("click",c),n.push(()=>d.removeEventListener("click",c))}),n.push(()=>l.disconnect()),this.instances.set(e,{observer:l,cleanup:n,sections:i,setActive:o})},refresh:function(e){this.destroy(e),this.initInstance(e)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("waypoint",m),window.VanduoWaypoint=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-ripple, [data-vd-ripple]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=s=>{let i=e.getBoundingClientRect(),a=Math.max(i.width,i.height),o=(s.clientX||s.touches&&s.touches[0].clientX||i.left+i.width/2)-i.left-a/2,r=(s.clientY||s.touches&&s.touches[0].clientY||i.top+i.height/2)-i.top-a/2,l=document.createElement("span");l.className="vd-ripple-wave",l.style.width=a+"px",l.style.height=a+"px",l.style.left=o+"px",l.style.top=r+"px",e.appendChild(l),l.addEventListener("animationend",()=>{l.parentNode&&l.parentNode.removeChild(l)})};e.addEventListener("mousedown",n),e.addEventListener("touchstart",n,{passive:!0}),t.push(()=>e.removeEventListener("mousedown",n),()=>e.removeEventListener("touchstart",n)),this.instances.set(e,{cleanup:t})},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),e.querySelectorAll(".vd-ripple-wave").forEach(n=>n.remove()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("ripple",m),window.VanduoRipple=m})();(function(){"use strict";function m(n){if(!n||n===document.body)return!1;let s=window.getComputedStyle(n),i=s.overflowY,a=s.overflowX,o=/(auto|scroll|overlay)/.test(i)&&n.scrollHeight>n.clientHeight,r=/(auto|scroll|overlay)/.test(a)&&n.scrollWidth>n.clientWidth;return o||r}function e(n){let s=n.parentElement;for(;s&&s!==document.body&&s!==document.documentElement;){if(m(s))return s;s=s.parentElement}return null}let t={instances:new Map,init:function(){document.querySelectorAll(".vd-affix, .vd-sticky, [data-vd-affix]").forEach(s=>{this.instances.has(s)||this.initInstance(s)})},initInstance:function(n){let s=[],i=parseInt(n.getAttribute("data-vd-affix-offset")||"0",10),a=Number.isNaN(i)?0:i,o=e(n),r=!1,l=document.createElement("div");l.style.cssText="display:block;height:1px;margin-bottom:-1px;visibility:hidden;pointer-events:none;",n.parentNode.insertBefore(l,n),n.style.setProperty("--affix-top-offset",a+"px");function d(){r||(r=!0,n.classList.add("is-stuck"),n.dispatchEvent(new CustomEvent("affix:stuck",{bubbles:!0,detail:{offset:a,root:o||window}})))}function c(){r&&(r=!1,n.classList.remove("is-stuck"),n.dispatchEvent(new CustomEvent("affix:unstuck",{bubbles:!0,detail:{offset:a,root:o||window}})))}let u=new IntersectionObserver(function(h){h.forEach(p=>{p.isIntersecting?c():d()})},{root:o,rootMargin:"-"+a+"px 0px 0px 0px",threshold:0});u.observe(l),s.push(()=>u.disconnect(),()=>{l.parentNode&&l.parentNode.removeChild(l)},()=>{n.classList.remove("is-stuck"),n.style.removeProperty("--affix-top-offset")}),this.instances.set(n,{cleanup:s,observer:u,sentinel:l,scrollParent:o})},destroy:function(n){let s=this.instances.get(n);s&&(s.cleanup.forEach(i=>i()),n.classList.remove("is-stuck"),this.instances.delete(n))},destroyAll:function(){this.instances.forEach((n,s)=>this.destroy(s))}};typeof window.Vanduo<"u"&&window.Vanduo.register("affix",t),window.VanduoAffix=t})();(function(){"use strict";function m(t){let n=document.createElement("div");return n.textContent=t,n.innerHTML}let e={instances:new Map,init:function(){document.querySelectorAll("[data-vd-suggest], [data-vd-autocomplete]").forEach(n=>{this.instances.has(n)||this.initInstance(n)})},initInstance:function(t){let n=[],s=parseInt(t.getAttribute("data-vd-suggest-min-chars")||"1",10),i=t.getAttribute("data-vd-suggest-url")||"",a=t.getAttribute("data-vd-suggest")||t.getAttribute("data-vd-autocomplete")||"",o=[];try{o=JSON.parse(a)}catch{o=a.split(",").map(k=>k.trim()).filter(Boolean)}let r=t.closest(".vd-suggest-wrapper, .vd-autocomplete-wrapper");r||(r=document.createElement("div"),r.className="vd-suggest-wrapper",t.parentNode.insertBefore(r,t),r.appendChild(t));let l=document.createElement("ul");l.className="vd-suggest-list",l.setAttribute("role","listbox");let d="vd-suggest-"+Math.random().toString(36).slice(2,9);l.id=d,r.appendChild(l),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",d),t.setAttribute("autocomplete","off");let c=-1,u=[],h=null,p=(g,k)=>{if(l.innerHTML="",u=g,c=-1,g.length===0){let T=document.createElement("li");T.className="vd-suggest-empty",T.textContent="No results",l.appendChild(T);return}g.forEach((T,M)=>{let f=document.createElement("li");f.className="vd-suggest-item",f.setAttribute("role","option"),f.id=d+"-item-"+M;let w=typeof T=="object"&&(T.label||T.text)||String(T);if(k){let E=m(w),I=new RegExp("("+k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")","gi");f.innerHTML=E.replace(I,'<span class="vd-suggest-match">$1</span>')}else f.textContent=w;f.addEventListener("click",()=>C(M)),l.appendChild(f)})},v=()=>{l.classList.add("is-open"),t.setAttribute("aria-expanded","true")},y=()=>{l.classList.remove("is-open"),t.setAttribute("aria-expanded","false"),c=-1,t.removeAttribute("aria-activedescendant")},C=g=>{let k=u[g],T=typeof k=="object"&&(k.value||k.label)||String(k);t.value=T,y(),t.dispatchEvent(new CustomEvent("suggest:select",{detail:{value:T,item:k,index:g},bubbles:!0}))},L=g=>{let k=l.querySelectorAll(".vd-suggest-item");k.forEach(T=>T.classList.remove("is-highlighted")),g>=0&&g<k.length&&(c=g,k[g].classList.add("is-highlighted"),t.setAttribute("aria-activedescendant",k[g].id),k[g].scrollIntoView({block:"nearest"}))},P=async g=>{if(g.length<s){y();return}let k;if(i)try{let T=i.includes("?")?"&":"?";k=await(await window.fetch(i+T+"q="+encodeURIComponent(g))).json()}catch{k=[]}else{let T=g.toLowerCase();k=o.filter(M=>(typeof M=="object"&&(M.label||M.text)||String(M)).toLowerCase().includes(T))}p(k,g),k.length>0,v()},x=()=>{clearTimeout(h),h=setTimeout(()=>P(t.value),200)},_=g=>{if(!l.classList.contains("is-open")){g.key==="ArrowDown"&&(P(t.value),g.preventDefault());return}let k=u.length;switch(g.key){case"ArrowDown":g.preventDefault(),L(c<k-1?c+1:0);break;case"ArrowUp":g.preventDefault(),L(c>0?c-1:k-1);break;case"Enter":g.preventDefault(),c>=0&&C(c);break;case"Escape":y();break}},V=()=>{setTimeout(y,200)};t.addEventListener("input",x),t.addEventListener("keydown",_),t.addEventListener("blur",V),t.addEventListener("focus",()=>{t.value.length>=s&&P(t.value)}),n.push(()=>t.removeEventListener("input",x),()=>t.removeEventListener("keydown",_),()=>t.removeEventListener("blur",V),()=>clearTimeout(h),()=>{l.parentNode&&l.parentNode.removeChild(l)}),this.instances.set(t,{cleanup:n,list:l,close:y})},destroy:function(t){let n=this.instances.get(t);n&&(n.cleanup.forEach(s=>s()),this.instances.delete(t))},destroyAll:function(){this.instances.forEach((t,n)=>this.destroy(n))}};typeof window.Vanduo<"u"&&window.Vanduo.register("suggest",e),window.VanduoSuggest=e})();(function(){"use strict";let m={instances:new Map,rules:{required:e=>e.trim().length>0,email:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),url:e=>{try{return new URL(e),!0}catch{return!1}},number:e=>!isNaN(parseFloat(e))&&isFinite(e),min:(e,t)=>e.length>=parseInt(t,10),max:(e,t)=>e.length<=parseInt(t,10),minVal:(e,t)=>parseFloat(e)>=parseFloat(t),maxVal:(e,t)=>parseFloat(e)<=parseFloat(t),pattern:(e,t)=>{try{return t.length>100?!1:new RegExp(t).test(e)}catch{return!1}},match:(e,t)=>{try{let n=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t,s=document.querySelector('[name="'+n+'"]');return s?e===s.value:!1}catch{return!1}}},messages:{required:"This field is required",email:"Please enter a valid email address",url:"Please enter a valid URL",number:"Please enter a valid number",min:"Minimum {0} characters required",max:"Maximum {0} characters allowed",minVal:"Value must be at least {0}",maxVal:"Value must be at most {0}",pattern:"Invalid format",match:"Fields do not match"},init:function(){document.querySelectorAll("[data-vd-validate], .vd-validate").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-validate-mode")||"blur",s=e.querySelectorAll("[data-vd-rules]"),i=r=>{let d=(r.getAttribute("data-vd-rules")||"").split("|").map(h=>h.trim()).filter(Boolean),c=r.value,u=[];for(let h of d){let[p,...v]=h.split(":"),y=v.join(":"),C=this.rules[p];if(C&&!C(c,y)){let P=r.getAttribute("data-vd-msg-"+p)||this.messages[p]||"Invalid";y&&(P=P.replace("{0}",y)),u.push(P);break}}return this.setFieldState(r,u),u.length===0},a=()=>{let r=!0;return s.forEach(l=>{i(l)||(r=!1)}),r};s.forEach(r=>{if(n==="input"||n==="blur"){let l=n==="input"?"input":"blur",d=()=>i(r);if(r.addEventListener(l,d),t.push(()=>r.removeEventListener(l,d)),n==="blur"){let c=()=>{(r.classList.contains("is-invalid")||r.classList.contains("is-valid"))&&i(r)};r.addEventListener("input",c),t.push(()=>r.removeEventListener("input",c))}}});let o=r=>{let l=a();if(!l){r.preventDefault(),r.stopPropagation();let d=e.querySelector(".is-invalid");d&&d.focus()}e.dispatchEvent(new CustomEvent("validate:submit",{detail:{valid:l},bubbles:!0}))};e.addEventListener("submit",o),t.push(()=>e.removeEventListener("submit",o)),this.instances.set(e,{cleanup:t,validateAll:a,validateField:i})},setFieldState:function(e,t){let n=e.closest(".vd-form-group")||e.parentElement,s=n.querySelector(".vd-validate-error");e.classList.remove("is-valid","is-invalid"),t.length>0?(e.classList.add("is-invalid"),e.setAttribute("aria-invalid","true"),s||(s=document.createElement("div"),s.className="vd-validate-error",s.id="vd-err-"+Math.random().toString(36).slice(2,9),s.setAttribute("role","alert"),n.appendChild(s)),s.textContent=t[0],s.style.display="",e.setAttribute("aria-describedby",s.id)):e.value.trim()?(e.classList.add("is-valid"),e.removeAttribute("aria-invalid"),s&&(s.style.display="none")):(e.removeAttribute("aria-invalid"),s&&(s.style.display="none"))},validateForm:function(e){let t=this.instances.get(e);return t?t.validateAll():!1},addRule:function(e,t,n){this.rules[e]=t,n&&(this.messages[e]=n)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("validate",m),window.VanduoValidate=m})();(function(){"use strict";let m=["Su","Mo","Tu","We","Th","Fr","Sa"],e=["January","February","March","April","May","June","July","August","September","October","November","December"],t={instances:new Map,init:function(){document.querySelectorAll("[data-vd-datepicker]").forEach(s=>{this.instances.has(s)||this.initInstance(s)})},initInstance:function(n){let s=[],i=n.getAttribute("data-vd-datepicker-format")||"yyyy-mm-dd",a=n.getAttribute("data-vd-datepicker-min"),o=n.getAttribute("data-vd-datepicker-max"),r=a?new Date(a):null,l=o?new Date(o):null,d=new Date,c=d.getFullYear(),u=d.getMonth(),h=null,p="days";if(n.value){let f=new Date(n.value);isNaN(f.getTime())||(h=f,c=f.getFullYear(),u=f.getMonth())}let v=document.createElement("div");v.className="vd-datepicker-popup",v.setAttribute("role","dialog"),v.setAttribute("aria-label","Choose date");let y=document.createElement("div");y.className="vd-suggest-wrapper",y.style.position="relative",y.style.display="inline-block",n.parentNode.insertBefore(y,n),y.appendChild(n),y.appendChild(v);let C=f=>{let w=f.getFullYear(),E=String(f.getMonth()+1).padStart(2,"0"),I=String(f.getDate()).padStart(2,"0");return i.replace("yyyy",w).replace("mm",E).replace("dd",I)},L=f=>!!(r&&f<r||l&&f>l),P=(f,w)=>f&&w&&f.getFullYear()===w.getFullYear()&&f.getMonth()===w.getMonth()&&f.getDate()===w.getDate(),x=()=>{v.innerHTML="";let f=document.createElement("div");f.className="vd-datepicker-header";let w=document.createElement("button");w.type="button",w.className="vd-datepicker-prev",w.innerHTML="&#8249;",w.setAttribute("aria-label","Previous");let E=document.createElement("button");E.type="button",E.className="vd-datepicker-next",E.innerHTML="&#8250;",E.setAttribute("aria-label","Next");let I=document.createElement("span");if(I.className="vd-datepicker-title",p==="days")I.textContent=e[u]+" "+c,I.addEventListener("click",()=>{p="months",x()}),w.addEventListener("click",()=>{u--,u<0&&(u=11,c--),x()}),E.addEventListener("click",()=>{u++,u>11&&(u=0,c++),x()});else if(p==="months")I.textContent=String(c),I.addEventListener("click",()=>{p="years",x()}),w.addEventListener("click",()=>{c--,x()}),E.addEventListener("click",()=>{c++,x()});else{let O=Math.floor(c/10)*10;I.textContent=O+" - "+(O+9),w.addEventListener("click",()=>{c-=10,x()}),E.addEventListener("click",()=>{c+=10,x()})}if(f.appendChild(w),f.appendChild(I),f.appendChild(E),v.appendChild(f),p==="days"){let O=document.createElement("div");O.className="vd-datepicker-weekdays",m.forEach(F=>{let U=document.createElement("span");U.textContent=F,O.appendChild(U)}),v.appendChild(O);let H=document.createElement("div");H.className="vd-datepicker-days";let z=new Date(c,u,1).getDay(),R=new Date(c,u+1,0).getDate(),j=new Date(c,u,0).getDate();for(let F=z-1;F>=0;F--){let U=_(j-F,!0);H.appendChild(U)}for(let F=1;F<=R;F++){let U=new Date(c,u,F),b=_(F,!1,U);H.appendChild(b)}let G=z+R,Z=G%7===0?0:7-G%7;for(let F=1;F<=Z;F++){let U=_(F,!0);H.appendChild(U)}v.appendChild(H)}else if(p==="months"){let O=document.createElement("div");O.className="vd-datepicker-months",e.forEach((H,z)=>{let R=document.createElement("button");R.type="button",R.className="vd-datepicker-month-btn",R.textContent=H.slice(0,3),h&&h.getFullYear()===c&&h.getMonth()===z&&R.classList.add("is-selected"),R.addEventListener("click",()=>{u=z,p="days",x()}),O.appendChild(R)}),v.appendChild(O)}else{let O=document.createElement("div");O.className="vd-datepicker-years";let H=Math.floor(c/10)*10;for(let z=H-1;z<=H+10;z++){let R=document.createElement("button");R.type="button",R.className="vd-datepicker-year-btn",R.textContent=z,h&&h.getFullYear()===z&&R.classList.add("is-selected"),(z<H||z>H+9)&&(R.style.opacity="0.4"),R.addEventListener("click",()=>{c=z,p="months",x()}),O.appendChild(R)}v.appendChild(O)}},_=(f,w,E)=>{let I=document.createElement("button");return I.type="button",I.className="vd-datepicker-day",I.textContent=f,w?(I.classList.add("is-outside"),I.tabIndex=-1,I):(E&&P(E,d)&&I.classList.add("is-today"),E&&P(E,h)&&I.classList.add("is-selected"),E&&L(E)?(I.classList.add("is-disabled"),I):(E&&I.addEventListener("click",()=>{h=E,c=E.getFullYear(),u=E.getMonth(),n.value=C(E),g(),n.dispatchEvent(new CustomEvent("datepicker:select",{detail:{date:E,formatted:n.value},bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0}))}),I))},V=()=>{x(),v.classList.add("is-open"),n.setAttribute("aria-expanded","true")},g=()=>{v.classList.remove("is-open"),n.setAttribute("aria-expanded","false"),p="days"},k=()=>V(),T=f=>{y.contains(f.target)||g()},M=f=>{f.key==="Escape"&&g()};n.addEventListener("focus",k),document.addEventListener("click",T,!0),document.addEventListener("keydown",M),n.setAttribute("aria-haspopup","dialog"),n.setAttribute("aria-expanded","false"),n.setAttribute("autocomplete","off"),s.push(()=>n.removeEventListener("focus",k),()=>document.removeEventListener("click",T,!0),()=>document.removeEventListener("keydown",M)),this.instances.set(n,{cleanup:s,open:V,close:g,popup:v})},destroy:function(n){let s=this.instances.get(n);s&&(s.cleanup.forEach(i=>i()),this.instances.delete(n))},destroyAll:function(){this.instances.forEach((n,s)=>this.destroy(s))}};typeof window.Vanduo<"u"&&window.Vanduo.register("datepicker",t),window.VanduoDatepicker=t})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-timepicker]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-timepicker-format")==="24h",s=parseInt(e.getAttribute("data-vd-timepicker-step")||"30",10),i=e.closest(".vd-suggest-wrapper");i||(i=document.createElement("div"),i.style.position="relative",i.style.display="inline-block",e.parentNode.insertBefore(i,e),i.appendChild(e));let a=document.createElement("div");a.className="vd-timepicker-popup",a.setAttribute("role","listbox"),i.appendChild(a);let o=[];for(let p=0;p<24;p++)for(let v=0;v<60;v+=s){let y=String(p).padStart(2,"0"),C=String(v).padStart(2,"0");if(n)o.push({display:y+":"+C,value:y+":"+C});else{let L=p<12?"AM":"PM",x=(p===0?12:p>12?p-12:p)+":"+C+" "+L;o.push({display:x,value:y+":"+C})}}let r=()=>{a.innerHTML="",o.forEach(p=>{let v=document.createElement("div");v.className="vd-timepicker-item",v.setAttribute("role","option"),v.textContent=p.display,(e.value===p.value||e.value===p.display)&&v.classList.add("is-selected"),v.addEventListener("click",()=>{e.value=p.display,a.querySelectorAll(".vd-timepicker-item").forEach(y=>y.classList.remove("is-selected")),v.classList.add("is-selected"),d(),e.dispatchEvent(new CustomEvent("timepicker:select",{detail:{display:p.display,value:p.value},bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}),a.appendChild(v)})},l=()=>{r(),a.classList.add("is-open"),e.setAttribute("aria-expanded","true");let p=a.querySelector(".is-selected");p&&p.scrollIntoView({block:"center"})},d=()=>{a.classList.remove("is-open"),e.setAttribute("aria-expanded","false")},c=()=>l(),u=p=>{i.contains(p.target)||d()},h=p=>{p.key==="Escape"&&d()};e.addEventListener("focus",c),document.addEventListener("click",u,!0),document.addEventListener("keydown",h),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-expanded","false"),e.setAttribute("autocomplete","off"),e.readOnly=!0,t.push(()=>e.removeEventListener("focus",c),()=>document.removeEventListener("click",u,!0),()=>document.removeEventListener("keydown",h)),this.instances.set(e,{cleanup:t,open:l,close:d})},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("timepicker",m),window.VanduoTimepicker=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll(".vd-stepper").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=Array.from(e.querySelectorAll(".vd-stepper-item")),s=e.classList.contains("vd-stepper-clickable"),i=n.findIndex(o=>o.classList.contains("is-active"));i===-1&&(i=0);let a=o=>{if(o<0||o>=n.length)return;let r=i;i=o,n.forEach((l,d)=>{l.classList.remove("is-active","is-completed"),d<o?l.classList.add("is-completed"):d===o&&l.classList.add("is-active")}),e.dispatchEvent(new CustomEvent("stepper:change",{detail:{current:o,previous:r,total:n.length},bubbles:!0}))};s&&n.forEach((o,r)=>{let l=()=>a(r);o.addEventListener("click",l),t.push(()=>o.removeEventListener("click",l))}),a(i),this.instances.set(e,{cleanup:t,setStep:a,next:()=>a(i+1),prev:()=>a(i-1),getCurrent:()=>i})},setStep:function(e,t){let n=this.instances.get(e);n&&n.setStep(t)},next:function(e){let t=this.instances.get(e);t&&t.next()},prev:function(e){let t=this.instances.get(e);t&&t.prev()},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("stepper",m),window.VanduoStepper=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-rating]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=parseInt(e.getAttribute("data-vd-rating-max")||"5",10),s=parseFloat(e.getAttribute("data-vd-rating-value")||"0"),i=e.classList.contains("vd-rating-readonly")||e.hasAttribute("data-vd-rating-readonly"),a=s;e.classList.add("vd-rating"),e.setAttribute("role","radiogroup"),e.setAttribute("aria-label",e.getAttribute("aria-label")||"Rating"),e.innerHTML="";let o=[];for(let d=1;d<=n;d++){let c=document.createElement("button");c.type="button",c.className="vd-rating-star",c.setAttribute("role","radio"),c.setAttribute("aria-label",d+" star"+(d>1?"s":"")),c.setAttribute("aria-checked",d<=a?"true":"false"),i&&(c.tabIndex=-1),o.push(c),e.appendChild(c)}let r=document.createElement("span");r.className="vd-rating-value",r.textContent=a>0?a.toString():"",e.appendChild(r);let l=d=>{o.forEach((c,u)=>{c.classList.remove("is-active","is-half");let h=u+1;h<=Math.floor(d)?c.classList.add("is-active"):h-.5<=d&&c.classList.add("is-half"),c.setAttribute("aria-checked",h<=d?"true":"false")}),r.textContent=d>0?d.toString():""};if(l(a),!i){o.forEach((c,u)=>{let h=()=>{o.forEach((y,C)=>{y.classList.toggle("is-hovered",C<=u)})},p=()=>{o.forEach(y=>y.classList.remove("is-hovered"))},v=()=>{a=u+1,e.setAttribute("data-vd-rating-value",a),l(a),e.dispatchEvent(new CustomEvent("rating:change",{detail:{value:a,max:n},bubbles:!0}))};c.addEventListener("mouseenter",h),c.addEventListener("mouseleave",p),c.addEventListener("click",v),t.push(()=>c.removeEventListener("mouseenter",h),()=>c.removeEventListener("mouseleave",p),()=>c.removeEventListener("click",v))});let d=c=>{c.key==="ArrowRight"||c.key==="ArrowUp"?(c.preventDefault(),a<n&&(a++,l(a),o[a-1].focus(),e.dispatchEvent(new CustomEvent("rating:change",{detail:{value:a,max:n},bubbles:!0})))):(c.key==="ArrowLeft"||c.key==="ArrowDown")&&(c.preventDefault(),a>1&&(a--,l(a),o[a-1].focus(),e.dispatchEvent(new CustomEvent("rating:change",{detail:{value:a,max:n},bubbles:!0}))))};e.addEventListener("keydown",d),t.push(()=>e.removeEventListener("keydown",d))}this.instances.set(e,{cleanup:t,getValue:()=>a,setValue:d=>{a=d,l(d)}})},getValue:function(e){let t=this.instances.get(e);return t?t.getValue():0},setValue:function(e,t){let n=this.instances.get(e);n&&n.setValue(t)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("rating",m),window.VanduoRating=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-transfer]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[];e.classList.add("vd-transfer");let n,s;try{n=JSON.parse(e.getAttribute("data-vd-transfer")||"[]").map((h,p)=>({id:h.id||"item-"+p,label:h.label||h.text||String(h),selected:!1}))}catch{n=[]}s=[];let i=new Set,a=new Set,o=()=>{e.innerHTML="";let u=r("Source",n,i,"source"),h=document.createElement("div");h.className="vd-transfer-actions";let p=document.createElement("button");p.type="button",p.className="vd-transfer-btn",p.innerHTML="&#8250;",p.setAttribute("aria-label","Move to target"),p.disabled=i.size===0,p.addEventListener("click",()=>l());let v=document.createElement("button");v.type="button",v.className="vd-transfer-btn",v.innerHTML="&#8249;",v.setAttribute("aria-label","Move to source"),v.disabled=a.size===0,v.addEventListener("click",()=>d()),h.appendChild(p),h.appendChild(v);let y=r("Target",s,a,"target");e.appendChild(u),e.appendChild(h),e.appendChild(y)},r=(u,h,p,v)=>{let y=document.createElement("div");y.className="vd-transfer-panel";let C=document.createElement("div");C.className="vd-transfer-header";let L=document.createElement("span");L.textContent=u;let P=document.createElement("span");P.className="vd-transfer-count",P.textContent=p.size+"/"+h.length,C.appendChild(L),C.appendChild(P),y.appendChild(C);let x=document.createElement("div");x.className="vd-transfer-search";let _=document.createElement("input");_.type="text",_.placeholder="Search...",_.setAttribute("aria-label","Search "+u.toLowerCase()),x.appendChild(_),y.appendChild(x);let V=document.createElement("ul");V.className="vd-transfer-list",V.setAttribute("role","listbox");let g=k=>{V.innerHTML="",(k?h.filter(M=>(M.label||M.text||String(M)).toLowerCase().includes(k.toLowerCase())):h).forEach(M=>{let f=document.createElement("li");f.className="vd-transfer-item",f.setAttribute("role","option"),p.has(M.id)&&f.classList.add("is-selected");let w=document.createElement("input");w.type="checkbox",w.checked=p.has(M.id),w.setAttribute("aria-label",M.label);let E=document.createElement("span");E.textContent=M.label,f.addEventListener("click",()=>{p.has(M.id)?p.delete(M.id):p.add(M.id),o()}),f.appendChild(w),f.appendChild(E),V.appendChild(f)})};return _.addEventListener("input",()=>g(_.value)),g(""),y.appendChild(V),y},l=()=>{let u=n.filter(h=>i.has(h.id));n=n.filter(h=>!i.has(h.id)),s=s.concat(u),i.clear(),o(),c()},d=()=>{let u=s.filter(h=>a.has(h.id));s=s.filter(h=>!a.has(h.id)),n=n.concat(u),a.clear(),o(),c()},c=()=>{e.dispatchEvent(new CustomEvent("transfer:change",{detail:{source:n.map(u=>u.id),target:s.map(u=>u.id)},bubbles:!0}))};o(),this.instances.set(e,{cleanup:t,getTarget:()=>s.map(u=>u.id),getSource:()=>n.map(u=>u.id)})},getSelected:function(e){let t=this.instances.get(e);return t?t.getTarget():[]},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),e.innerHTML="",this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("transfer",m),window.VanduoTransfer=m})();(function(){"use strict";let m={instances:new Map,init:function(){document.querySelectorAll("[data-vd-tree]").forEach(t=>{this.instances.has(t)||this.initInstance(t)})},initInstance:function(e){let t=[],n=e.getAttribute("data-vd-tree-cascade")!=="false",s;try{s=JSON.parse(e.getAttribute("data-vd-tree")||"[]")}catch{s=[]}e.classList.add("vd-tree"),e.setAttribute("role","tree");let i=(r,l)=>{l.innerHTML="",r.forEach(d=>{let c=document.createElement("li");c.className="vd-tree-node",c.setAttribute("role","treeitem"),c.setAttribute("aria-expanded",d.open?"true":"false"),d.open&&c.classList.add("is-open");let u=document.createElement("div");if(u.className="vd-tree-node-content",d.children&&d.children.length>0){let p=document.createElement("button");p.type="button",p.className="vd-tree-toggle",p.setAttribute("aria-label","Toggle"),p.addEventListener("click",v=>{v.stopPropagation(),d.open=!d.open,c.classList.toggle("is-open"),c.setAttribute("aria-expanded",d.open?"true":"false")}),u.appendChild(p)}else{let p=document.createElement("span");p.className="vd-tree-toggle-placeholder",u.appendChild(p)}if(e.hasAttribute("data-vd-tree-checkbox")){let p=document.createElement("input");p.type="checkbox",p.className="vd-tree-checkbox",p.checked=!!d.checked,p.setAttribute("aria-label",d.label),p.addEventListener("change",v=>{v.stopPropagation(),d.checked=p.checked,n&&d.children&&(a(d.children,p.checked),i(s,e)),e.dispatchEvent(new CustomEvent("tree:check",{detail:{id:d.id,checked:p.checked,label:d.label},bubbles:!0}))}),u.appendChild(p)}if(d.icon){let p=document.createElement("span");p.className="vd-tree-icon "+d.icon,u.appendChild(p)}let h=document.createElement("span");if(h.className="vd-tree-label",h.textContent=d.label||"",u.appendChild(h),c.appendChild(u),d.children&&d.children.length>0){let p=document.createElement("ul");p.className="vd-tree-children",p.setAttribute("role","group"),i(d.children,p),c.appendChild(p)}l.appendChild(c)})},a=(r,l)=>{r.forEach(d=>{d.checked=l,d.children&&a(d.children,l)})},o=r=>{let l=document.activeElement;if(!e.contains(l))return;let d=Array.from(e.querySelectorAll(".vd-tree-node-content")),c=d.indexOf(l.closest(".vd-tree-node-content"));if(c!==-1)switch(r.key){case"ArrowDown":if(r.preventDefault(),c<d.length-1){let u=d[c+1].querySelector(".vd-tree-toggle, .vd-tree-label");u&&u.focus()}break;case"ArrowUp":if(r.preventDefault(),c>0){let u=d[c-1].querySelector(".vd-tree-toggle, .vd-tree-label");u&&u.focus()}break}};e.addEventListener("keydown",o),t.push(()=>e.removeEventListener("keydown",o)),i(s,e),this.instances.set(e,{cleanup:t,getData:()=>s,getChecked:()=>{let r=[],l=d=>{d.forEach(c=>{c.checked&&r.push(c.id||c.label),c.children&&l(c.children)})};return l(s),r}})},getChecked:function(e){let t=this.instances.get(e);return t?t.getChecked():[]},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),e.innerHTML="",this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("tree",m),window.VanduoTree=m})();(function(){"use strict";let m={_active:!1,_steps:[],_currentStep:0,_elements:{},_cleanup:[],_boundTriggers:new WeakMap,_triggerElement:null,init:function(){document.querySelectorAll("[data-vd-spotlight]").forEach(t=>{if(this._boundTriggers.has(t))return;let n=s=>{s.preventDefault();let i=this._parseSteps(t.getAttribute("data-vd-spotlight"));i.length!==0&&this.start(i,{trigger:t})};t.addEventListener("click",n),this._boundTriggers.set(t,n)})},_parseSteps:function(e){if(typeof e!="string"||e.trim()==="")return[];try{let t=JSON.parse(e);return this._normalizeSteps(t)}catch(t){return console.error("VanduoSpotlight: invalid data-vd-spotlight payload.",t),[]}},_normalizeStep:function(e){if(!e||typeof e!="object")return null;let t=e.target,n=typeof t=="string"&&t.trim()!=="",s=typeof Element<"u"&&t instanceof Element;if(!n&&!s)return null;let i=typeof e.title=="string"?e.title:"",a=typeof e.description=="string"?e.description:typeof e.content=="string"?e.content:"";return{target:t,title:i,description:a}},_normalizeSteps:function(e){return Array.isArray(e)?e.map(t=>this._normalizeStep(t)).filter(Boolean):[]},start:function(e,t){this._active&&this.stop();let n=this._normalizeSteps(e);if(n.length===0)return;let s=t||{};this._steps=n,this._currentStep=0,this._active=!0,this._triggerElement=s.trigger||(document.activeElement instanceof HTMLElement?document.activeElement:null);let i=document.createElement("div");i.className="vd-spotlight-overlay",i.setAttribute("aria-hidden","true"),document.body.appendChild(i);let a=document.createElement("div");a.className="vd-spotlight-tooltip",a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.tabIndex=-1,document.body.appendChild(a),this._elements={overlay:i,tooltip:a};let o=r=>{r.key==="Escape"&&this.stop()};document.addEventListener("keydown",o),this._cleanup.push(()=>document.removeEventListener("keydown",o)),i.addEventListener("click",()=>this.stop()),this._showStep(this._currentStep)},_showStep:function(e){let t=this._steps[e];if(!t)return;let n=typeof t.target=="string"?document.querySelector(t.target):t.target,{tooltip:s}=this._elements;document.querySelectorAll(".vd-spotlight-target").forEach(d=>{d.classList.remove("vd-spotlight-target")}),n&&(n.classList.add("vd-spotlight-target"),n.scrollIntoView({behavior:"smooth",block:"center"}));let i=this._steps.length;if(s.innerHTML="",s.removeAttribute("aria-labelledby"),s.removeAttribute("aria-describedby"),t.title){let d=document.createElement("h4");d.className="vd-spotlight-title",d.id="vd-spotlight-title-"+e+"-"+Date.now(),d.textContent=t.title,s.appendChild(d),s.setAttribute("aria-labelledby",d.id)}if(t.description){let d=document.createElement("p");d.className="vd-spotlight-description",d.id="vd-spotlight-description-"+e+"-"+Date.now(),d.textContent=t.description,s.appendChild(d),s.setAttribute("aria-describedby",d.id)}let a=document.createElement("div");a.className="vd-spotlight-footer",a.setAttribute("aria-label","Step "+(e+1)+" of "+i);let o=document.createElement("span");o.className="vd-spotlight-counter",o.textContent=e+1+" / "+i;let r=document.createElement("div");if(r.className="vd-spotlight-actions",e>0){let d=document.createElement("button");d.type="button",d.className="vd-spotlight-btn",d.textContent="Back",d.addEventListener("click",()=>this.prev()),r.appendChild(d)}let l=document.createElement("button");if(l.type="button",l.className="vd-spotlight-btn",l.textContent="Skip",l.addEventListener("click",()=>this.stop()),r.appendChild(l),e<i-1){let d=document.createElement("button");d.type="button",d.className="vd-spotlight-btn vd-spotlight-btn-primary",d.textContent="Next",d.addEventListener("click",()=>this.next()),r.appendChild(d)}else{let d=document.createElement("button");d.type="button",d.className="vd-spotlight-btn vd-spotlight-btn-primary",d.textContent="Done",d.addEventListener("click",()=>this.stop()),r.appendChild(d)}a.appendChild(o),a.appendChild(r),s.appendChild(a),n&&requestAnimationFrame(()=>{let d=n.getBoundingClientRect(),c=s.getBoundingClientRect(),u=d.bottom+12+window.scrollY,h=d.left+(d.width-c.width)/2+window.scrollX;h=Math.max(8,Math.min(h,window.innerWidth-c.width-8)),u+c.height>window.innerHeight+window.scrollY&&(u=d.top-c.height-12+window.scrollY),s.style.top=u+"px",s.style.left=h+"px"}),document.dispatchEvent(new CustomEvent("spotlight:step",{detail:{index:e,step:e,total:i,data:t}}))},next:function(){this._currentStep<this._steps.length-1&&(this._currentStep++,this._showStep(this._currentStep))},prev:function(){this._currentStep>0&&(this._currentStep--,this._showStep(this._currentStep))},stop:function(){if(!this._active)return;let e=this._steps.length,t={completedSteps:e===0?0:Math.min(this._currentStep+1,e),total:e,completed:e>0&&this._currentStep>=e-1};this._active=!1,document.querySelectorAll(".vd-spotlight-target").forEach(n=>{n.classList.remove("vd-spotlight-target")}),this._elements.overlay&&this._elements.overlay.parentNode&&this._elements.overlay.parentNode.removeChild(this._elements.overlay),this._elements.tooltip&&this._elements.tooltip.parentNode&&this._elements.tooltip.parentNode.removeChild(this._elements.tooltip),this._cleanup.forEach(n=>n()),this._cleanup=[],this._elements={},this._steps=[],this._currentStep=0,this._triggerElement&&this._triggerElement.isConnected&&typeof this._triggerElement.focus=="function"&&this._triggerElement.focus(),this._triggerElement=null,document.dispatchEvent(new CustomEvent("spotlight:end",{detail:t}))},destroyAll:function(){this.stop()}};typeof window.Vanduo<"u"&&window.Vanduo.register("spotlight",m),window.VanduoSpotlight=m})();(function(){"use strict";function m(i){let a=i.slice();for(let o=a.length-1;o>0;o--){let r=Math.floor(Math.random()*(o+1)),l=a[o];a[o]=a[r],a[r]=l}return a}function e(i){if(!isFinite(i)||i<0)return"0:00";let a=Math.floor(i/60),o=Math.floor(i%60);return a+":"+(o<10?"0":"")+o}function t(i){let a=parseFloat(i.min)||0,o=parseFloat(i.max)||1,l=((parseFloat(i.value)||0)-a)/(o-a)*100;i.style.setProperty("--fill",l+"%"),i.style.backgroundImage="linear-gradient(to right, var(--music-player-track-fill, currentColor) 0%, var(--music-player-track-fill, currentColor) "+l+"%, var(--music-player-track-bg, #ccc) "+l+"%, var(--music-player-track-bg, #ccc) 100%)"}function n(i){let a=document.createElement("i");return a.className="ph ph-"+i,a.setAttribute("aria-hidden","true"),a}let s={instances:new Map,defaults:{tracks:[],volume:.5,shuffle:!1,showProgress:!1,showPlaylist:!1,autoAdvance:!0},init:function(){document.querySelectorAll(".vd-music-player, [data-music-player]").forEach(i=>{if(this.instances.has(i))return;let a={},o=i.getAttribute("data-music-player-options");if(o)try{a=JSON.parse(o)}catch{}this.initPlayer(i,a)})},initPlayer:function(i,a){let o=Object.assign({},this.defaults,a||{}),l=(Array.isArray(o.tracks)?o.tracks:[]).filter(f=>f&&typeof f.url=="string"&&f.url.trim()),c={tracks:o.shuffle?m(l):l.slice(),originalTracks:l.slice(),currentIndex:0,isPlaying:!1,volume:Math.max(0,Math.min(1,o.volume)),shuffle:o.shuffle,showProgress:o.showProgress,showPlaylist:o.showPlaylist,autoAdvance:o.autoAdvance,audio:null},u=new Audio;u.volume=c.volume,u.preload="metadata",c.audio=u,this._buildDOM(i,c);let h={btnPlay:i.querySelector(".vd-music-player-btn-play"),btnPrev:i.querySelector(".vd-music-player-btn-prev"),btnNext:i.querySelector(".vd-music-player-btn-next"),btnShuffle:i.querySelector(".vd-music-player-btn-shuffle"),btnPlaylist:i.querySelector(".vd-music-player-btn-playlist"),trackName:i.querySelector(".vd-music-player-track-name"),volumeSlider:i.querySelector(".vd-music-player-volume-slider"),volumeIcon:i.querySelector(".vd-music-player-volume-icon"),progressBar:i.querySelector(".vd-music-player-progress-bar"),timeElapsed:i.querySelector(".vd-music-player-time-elapsed"),timeDuration:i.querySelector(".vd-music-player-time-duration"),playlistPanel:i.querySelector(".vd-music-player-playlist")},p=()=>{let f=h.btnPlay;f&&(f.innerHTML="",f.appendChild(n(c.isPlaying?"pause":"play")),f.setAttribute("aria-label",c.isPlaying?"Pause":"Play"),f.classList.toggle("is-active",c.isPlaying))},v=()=>{let f=h.trackName;if(!f)return;let w=c.tracks[c.currentIndex];w?(f.textContent=w.name||"Unknown Track",f.classList.remove("is-idle")):(f.textContent="No tracks loaded",f.classList.add("is-idle"))},y=()=>{let f=h.volumeIcon;if(!f)return;f.innerHTML="";let w=c.volume,E=w===0?"speaker-none":w<.5?"speaker-low":"speaker-high";f.appendChild(n(E))},C=()=>{let f=h.btnShuffle;f&&(f.classList.toggle("is-active",c.shuffle),f.setAttribute("aria-pressed",c.shuffle?"true":"false"))},L=()=>{let f=h.playlistPanel;f&&(f.innerHTML="",c.tracks.forEach((w,E)=>{let I=document.createElement("button");I.className="vd-music-player-playlist-item"+(E===c.currentIndex?" is-active":""),I.type="button",I.setAttribute("data-index",String(E)),I.setAttribute("aria-current",E===c.currentIndex?"true":"false");let O=document.createElement("span");O.className="vd-music-player-playlist-num",O.textContent=String(E+1);let H=document.createElement("span");H.className="vd-music-player-playlist-name",H.textContent=w.name||"Track "+(E+1),I.appendChild(O),I.appendChild(H),f.appendChild(I)}))},P=()=>{let f=h.progressBar;if(!f||!u.duration)return;let w=u.currentTime/u.duration*100;f.value=String(w),t(f),h.timeElapsed&&(h.timeElapsed.textContent=e(u.currentTime)),h.timeDuration&&(h.timeDuration.textContent=e(u.duration))},x=(f,w)=>{let E=c.tracks[f];E&&(c.currentIndex=f,u.src=E.url,v(),L(),h.progressBar&&(h.progressBar.value="0",t(h.progressBar)),h.timeElapsed&&(h.timeElapsed.textContent="0:00"),h.timeDuration&&(h.timeDuration.textContent="0:00"),i.dispatchEvent(new CustomEvent("musicplayer:trackchange",{bubbles:!0,detail:{index:f,name:E.name,url:E.url}})),w&&u.play().catch(()=>{}))},_=[],V=()=>{c.isPlaying=!0,p(),i.dispatchEvent(new CustomEvent("musicplayer:play",{bubbles:!0}))},g=()=>{c.isPlaying=!1,p(),i.dispatchEvent(new CustomEvent("musicplayer:pause",{bubbles:!0}))},k=()=>{if(c.autoAdvance&&c.tracks.length>1){let f=(c.currentIndex+1)%c.tracks.length;x(f,!0)}else c.isPlaying=!1,p(),i.dispatchEvent(new CustomEvent("musicplayer:ended",{bubbles:!0}))},T=()=>{c.showProgress&&P()},M=()=>{h.timeDuration&&(h.timeDuration.textContent=e(u.duration)),h.progressBar&&(h.progressBar.max="100",t(h.progressBar))};if(u.addEventListener("play",V),u.addEventListener("pause",g),u.addEventListener("ended",k),u.addEventListener("timeupdate",T),u.addEventListener("loadedmetadata",M),_.push(()=>{u.removeEventListener("play",V),u.removeEventListener("pause",g),u.removeEventListener("ended",k),u.removeEventListener("timeupdate",T),u.removeEventListener("loadedmetadata",M),u.pause(),u.src=""}),h.btnPlay){let f=()=>{!u.src&&c.tracks.length&&x(c.currentIndex,!1),c.isPlaying?u.pause():u.play().catch(()=>{})};h.btnPlay.addEventListener("click",f),_.push(()=>h.btnPlay.removeEventListener("click",f));let w=E=>{(E.key===" "||E.key==="Enter")&&(E.preventDefault(),f())};h.btnPlay.addEventListener("keydown",w),_.push(()=>h.btnPlay.removeEventListener("keydown",w))}if(h.btnPrev){let f=()=>{if(c.tracks.length)if(u.currentTime>3)u.currentTime=0;else{let w=c.currentIndex===0?c.tracks.length-1:c.currentIndex-1;x(w,c.isPlaying)}};h.btnPrev.addEventListener("click",f),_.push(()=>h.btnPrev.removeEventListener("click",f))}if(h.btnNext){let f=()=>{if(!c.tracks.length)return;let w=(c.currentIndex+1)%c.tracks.length;x(w,c.isPlaying)};h.btnNext.addEventListener("click",f),_.push(()=>h.btnNext.removeEventListener("click",f))}if(h.btnShuffle){let f=()=>{if(c.shuffle=!c.shuffle,c.shuffle){let w=c.tracks[c.currentIndex];c.tracks=m(c.tracks);let E=c.tracks.findIndex(I=>I===w);E>0&&(c.tracks.splice(E,1),c.tracks.unshift(w)),c.currentIndex=0}else{let w=c.tracks[c.currentIndex];c.tracks=c.originalTracks.slice(),c.currentIndex=c.tracks.findIndex(E=>E===w),c.currentIndex<0&&(c.currentIndex=0)}C(),L()};h.btnShuffle.addEventListener("click",f),_.push(()=>h.btnShuffle.removeEventListener("click",f))}if(h.btnPlaylist){let f=()=>{let w=h.playlistPanel;if(!w)return;let E=w.classList.toggle("is-open");h.btnPlaylist.classList.toggle("is-active",E),h.btnPlaylist.setAttribute("aria-expanded",E?"true":"false")};h.btnPlaylist.addEventListener("click",f),_.push(()=>h.btnPlaylist.removeEventListener("click",f))}if(h.volumeSlider){let f=w=>{let E=parseFloat(w.target.value);c.volume=E,u.volume=E,y(),t(h.volumeSlider),i.dispatchEvent(new CustomEvent("musicplayer:volumechange",{bubbles:!0,detail:{volume:E}}))};h.volumeSlider.addEventListener("input",f),_.push(()=>h.volumeSlider.removeEventListener("input",f)),t(h.volumeSlider)}if(h.progressBar){let f=w=>{if(!u.duration)return;let E=parseFloat(w.target.value);u.currentTime=E/100*u.duration,t(h.progressBar)};h.progressBar.addEventListener("input",f),_.push(()=>h.progressBar.removeEventListener("input",f))}if(h.playlistPanel){let f=w=>{let E=w.target.closest(".vd-music-player-playlist-item");if(!E)return;let I=parseInt(E.getAttribute("data-index"),10);isNaN(I)||x(I,!0)};h.playlistPanel.addEventListener("click",f),_.push(()=>h.playlistPanel.removeEventListener("click",f))}p(),v(),y(),o.showPlaylist&&L(),this.instances.set(i,{state:c,audio:u,refs:h,cleanup:_}),i.setAttribute("data-music-player-initialized","true")},_buildDOM:function(i,a){if(i.querySelector(".vd-music-player-controls"))return;i.setAttribute("role","region"),i.setAttribute("aria-label","Music Player"),a.showProgress&&i.classList.add("has-progress"),a.showPlaylist&&i.classList.add("has-playlist");let o=document.createElement("div");o.className="vd-music-player-info";let r=document.createElement("span");r.className="vd-music-player-icon",r.setAttribute("aria-hidden","true"),r.appendChild(n("music-note"));let l=document.createElement("span");l.className="vd-music-player-track-name",l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),o.appendChild(r),o.appendChild(l),i.appendChild(o);let d=document.createElement("div");d.className="vd-music-player-controls",d.setAttribute("role","group"),d.setAttribute("aria-label","Playback controls");let c=document.createElement("button");c.type="button",c.className="vd-music-player-btn vd-music-player-btn-prev",c.setAttribute("aria-label","Previous track"),c.appendChild(n("skip-back"));let u=document.createElement("button");u.type="button",u.className="vd-music-player-btn vd-music-player-btn-play",u.setAttribute("aria-label","Play"),u.appendChild(n("play"));let h=document.createElement("button");if(h.type="button",h.className="vd-music-player-btn vd-music-player-btn-next",h.setAttribute("aria-label","Next track"),h.appendChild(n("skip-forward")),d.appendChild(c),d.appendChild(u),d.appendChild(h),a.showPlaylist||a.shuffle!==void 0){let L=document.createElement("button");L.type="button",L.className="vd-music-player-btn vd-music-player-btn-shuffle",L.setAttribute("aria-label","Shuffle"),L.setAttribute("aria-pressed",a.shuffle?"true":"false"),L.appendChild(n("shuffle")),d.appendChild(L)}let p=document.createElement("span");p.className="vd-music-player-spacer",p.setAttribute("aria-hidden","true"),d.appendChild(p);let v=document.createElement("div");v.className="vd-music-player-volume";let y=document.createElement("span");y.className="vd-music-player-volume-icon",y.setAttribute("aria-hidden","true");let C=document.createElement("input");if(C.type="range",C.className="vd-music-player-volume-slider",C.min="0",C.max="1",C.step="0.01",C.value=String(a.volume),C.setAttribute("aria-label","Volume"),v.appendChild(y),v.appendChild(C),d.appendChild(v),a.showPlaylist){let L=document.createElement("button");L.type="button",L.className="vd-music-player-btn vd-music-player-btn-playlist",L.setAttribute("aria-label","Show playlist"),L.setAttribute("aria-expanded","false"),L.appendChild(n("playlist")),d.appendChild(L)}if(i.appendChild(d),a.showProgress){let L=document.createElement("div");L.className="vd-music-player-progress";let P=document.createElement("span");P.className="vd-music-player-time vd-music-player-time-elapsed",P.textContent="0:00",P.setAttribute("aria-hidden","true");let x=document.createElement("input");x.type="range",x.className="vd-music-player-progress-bar",x.min="0",x.max="100",x.step="0.1",x.value="0",x.setAttribute("aria-label","Seek");let _=document.createElement("span");_.className="vd-music-player-time vd-music-player-time-duration",_.textContent="0:00",_.setAttribute("aria-hidden","true"),L.appendChild(P),L.appendChild(x),L.appendChild(_),i.appendChild(L)}if(a.showPlaylist){let L=document.createElement("div");L.className="vd-music-player-playlist",L.setAttribute("aria-label","Playlist"),i.appendChild(L)}},play:function(i){let a=this.instances.get(i);a&&(!a.audio.src&&a.state.tracks.length&&(a.audio.src=a.state.tracks[a.state.currentIndex].url),a.audio.play().catch(()=>{}))},pause:function(i){let a=this.instances.get(i);a&&a.audio.pause()},toggle:function(i){let a=this.instances.get(i);a&&(a.state.isPlaying?this.pause(i):this.play(i))},next:function(i){let a=this.instances.get(i);if(!a||!a.state.tracks.length)return;let o=(a.state.currentIndex+1)%a.state.tracks.length;this._loadTrack(a,o,a.state.isPlaying)},previous:function(i){let a=this.instances.get(i);if(!a||!a.state.tracks.length)return;let o=a.state.tracks.length,r=(a.state.currentIndex-1+o)%o;this._loadTrack(a,r,a.state.isPlaying)},setVolume:function(i,a){let o=this.instances.get(i);if(!o)return;let r=Math.max(0,Math.min(1,a));o.state.volume=r,o.audio.volume=r,o.refs.volumeSlider&&(o.refs.volumeSlider.value=String(r),t(o.refs.volumeSlider)),i.dispatchEvent(new CustomEvent("musicplayer:volumechange",{bubbles:!0,detail:{volume:r}}))},setTrack:function(i,a){let o=this.instances.get(i);o&&this._loadTrack(o,a,o.state.isPlaying)},shuffle:function(i){let a=this.instances.get(i);!a||!a.refs.btnShuffle||a.refs.btnShuffle.click()},getState:function(i){let a=this.instances.get(i);if(!a)return null;let o=a.state;return{isPlaying:o.isPlaying,currentIndex:o.currentIndex,currentTrack:o.tracks[o.currentIndex]||null,volume:o.volume,shuffle:o.shuffle,tracks:o.tracks.slice()}},destroy:function(i){let a=this.instances.get(i);a&&(a.cleanup.forEach(o=>o()),this.instances.delete(i),i.removeAttribute("data-music-player-initialized"))},destroyAll:function(){this.instances.forEach((i,a)=>this.destroy(a))},_loadTrack:function(i,a,o){let r=i.state.tracks[a];if(!r)return;let l=this._containerOf(i);i.state.currentIndex=a,i.audio.src=r.url,i.refs.trackName&&(i.refs.trackName.textContent=r.name||"Unknown Track",i.refs.trackName.classList.remove("is-idle")),i.refs.playlistPanel&&i.refs.playlistPanel.querySelectorAll(".vd-music-player-playlist-item").forEach((d,c)=>{let u=c===a;d.classList.toggle("is-active",u),d.setAttribute("aria-current",u?"true":"false")}),i.refs.progressBar&&(i.refs.progressBar.value="0",t(i.refs.progressBar)),i.refs.timeElapsed&&(i.refs.timeElapsed.textContent="0:00"),i.refs.timeDuration&&(i.refs.timeDuration.textContent="0:00"),l&&l.dispatchEvent(new CustomEvent("musicplayer:trackchange",{bubbles:!0,detail:{index:a,name:r.name,url:r.url}})),o&&i.audio.play().catch(()=>{})},_containerOf:function(i){for(let[a,o]of this.instances)if(o===i)return a;return null}};typeof window.Vanduo<"u"&&window.Vanduo.register("musicPlayer",s),window.VanduoMusicPlayer=s})();var J=window.Vanduo;var Oe=J;})();
43
43
  //# sourceMappingURL=vanduo.min.js.map