@pure-ds/core 0.4.1 → 0.4.2

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,9 +1,9 @@
1
- declare var PDS2: {
1
+ declare var f: {
2
2
  addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
3
3
  dispatchEvent(event: Event): boolean;
4
4
  removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
5
5
  };
6
- export function validateDesign(designConfig?: {}, options?: {}): {
6
+ declare function zt(n?: {}, e?: {}): {
7
7
  ok: boolean;
8
8
  issues: ({
9
9
  path: string;
@@ -19,5 +19,5 @@ export function validateDesign(designConfig?: {}, options?: {}): {
19
19
  context?: undefined;
20
20
  })[];
21
21
  };
22
- export { PDS2 as PDS };
22
+ export { f as PDS, zt as validateDesign };
23
23
  //# sourceMappingURL=pds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":"AA6iSA;;;;EAAyB;AAyKzB;;;;;;;;;;;;;;;EA+GC"}
1
+ {"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":"AAo4Gs4R;;;;EAAQ;AAAsnF;;;;;;;;;;;;;;;EAA8sE"}
@@ -1 +1 @@
1
- {"version":3,"file":"pds-enhancers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-enhancers.js"],"names":[],"mappings":"AA6VA;;;;;IAGI;AAEJ;;;;IAA2D;AAhW3D,kDAiFC"}
1
+ {"version":3,"file":"pds-enhancers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-enhancers.js"],"names":[],"mappings":"AAyWA;;;;;IAGI;AAEJ;;;;IAA2D;AA5W3D,kDAiFC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.4.1",
4
+ "version": "0.4.2",
5
5
  "description": "Pure Design System - Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -3437,8 +3437,8 @@ export const ${e}CSS = \`${i}\`;
3437
3437
  <span data-label>Volume</span>
3438
3438
  <input type="range" min="0" max="100" value="40">
3439
3439
  </label>
3440
- `.trim()},{selector:"form [required]",description:"Enhances required form fields using an asterisk in the label.",demoHtml:`
3441
- <form action'#" method="post">
3440
+ `.trim()},{selector:"form[data-required]",description:"Enhances required form fields using an asterisk in the label.",demoHtml:`
3441
+ <form data-required action="#" method="post">
3442
3442
  <label>
3443
3443
  <span>Field Label</span>
3444
3444
  <input type="text" required>
@@ -3458,7 +3458,7 @@ export const ${e}CSS = \`${i}\`;
3458
3458
  <button class="btn-primary btn-working">
3459
3459
  <span>Saving</span>
3460
3460
  </button>
3461
- `.trim()}];function Gr(r){if(r.dataset.enhancedDropdown)return;r.dataset.enhancedDropdown="true";let e=r.querySelector("menu");if(!e)return;let t=r.querySelector("[data-dropdown-toggle]")||r.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let i=()=>{let n=(r.getAttribute("data-mode")||"auto").toLowerCase();if(n==="up"||n==="down")return n;let c=r.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},o=()=>{r.dataset.dropdownDirection=i(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},a=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},s=()=>{e.getAttribute("aria-hidden")==="false"?a():o()};t?.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),s()}),document.addEventListener("click",n=>{r.contains(n.target)||a()}),r.addEventListener("keydown",n=>{n.key==="Escape"&&(a(),t?.focus())}),r.addEventListener("focusout",n=>{(!n.relatedTarget||!r.contains(n.relatedTarget))&&a()})}function Vr(r){if(r.dataset.enhancedToggle)return;r.dataset.enhancedToggle="true";let e=r.querySelector('input[type="checkbox"]');if(!e)return;r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("role","switch"),r.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let i=document.createElement("span");i.className="toggle-knob",t.appendChild(i),r.insertBefore(t,e.nextSibling);let o=()=>{r.setAttribute("aria-checked",e.checked?"true":"false")},a=()=>{e.disabled||(e.checked=!e.checked,o(),e.dispatchEvent(new Event("change",{bubbles:!0})))};r.addEventListener("click",s=>{s.preventDefault(),a()}),r.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),a())}),e.addEventListener("change",o)}function Jr(r){if(r.dataset.enhancedRange)return;let e=r.closest("label"),t=e?.classList.contains("range-output"),i=r.id||`range-${Math.random().toString(36).substring(2,11)}`,o=`${i}-output`;if(r.id=i,t){let a=e.querySelector("span");if(a&&!a.classList.contains("range-output-wrapper")){let s=document.createElement("span");s.className="range-output-wrapper",s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center";let n=document.createElement("span");n.textContent=a.textContent,s.appendChild(n);let c=document.createElement("output");c.id=o,c.setAttribute("for",i),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=r.value,s.appendChild(c),a.textContent="",a.appendChild(s);let l=()=>{c.textContent=r.value};r.addEventListener("input",l)}}else{let a=r.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",r.parentNode?.insertBefore(a,r),a.appendChild(r)),a.style.position="relative";let s=document.createElement("output");s.id=o,s.setAttribute("for",i),s.className="range-bubble",s.setAttribute("aria-live","polite"),a.appendChild(s);let n=()=>{let d=parseFloat(r.min)||0,p=parseFloat(r.max)||100,h=parseFloat(r.value),g=(h-d)/(p-d);s.style.left=`calc(${g*100}% )`,s.textContent=String(h)},c=()=>s.classList.add("visible"),l=()=>s.classList.remove("visible");r.addEventListener("input",n),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerleave",l),r.addEventListener("focus",c),r.addEventListener("blur",l),n()}r.dataset.enhancedRange="1"}function Kr(r){let e=r.closest("label");if(!e||e.querySelector(".required-asterisk"))return;let t=document.createElement("span");t.classList.add("required-asterisk"),t.textContent="*",t.style.marginLeft="4px",e.querySelector("span").appendChild(t);let i=r.closest("form");if(i&&!i.querySelector(".required-legend")){let o=document.createElement("small");o.classList.add("required-legend"),o.textContent="* Required fields",i.insertBefore(o,i.querySelector(".form-actions")||i.lastElementChild)}}function Qr(r){if(r.dataset.enhancedOpenGroup)return;r.dataset.enhancedOpenGroup="true",r.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=r.querySelector('input[type="radio"], input[type="checkbox"]');r.appendChild(e),e.addEventListener("keydown",i=>{if(i.key==="Enter"||i.key==="Tab"){let o=e.value.trim();if(o){i.preventDefault();let a=t.type==="radio"?"radio":"checkbox",s=`open-group-${Math.random().toString(36).substring(2,11)}`,n=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=o;let l=document.createElement("input");l.type=a,l.name=t.name||r.getAttribute("data-name")||"open-group",l.value=o,l.id=s,n.appendChild(c),n.appendChild(l),r.insertBefore(n,e),e.value=""}}else if(i.key==="Backspace"&&e.value===""){i.preventDefault();let o=r.querySelectorAll("label");o.length>0&&o[o.length-1].remove()}})}function Yr(r){if(r.dataset.enhancedBtnWorking)return;r.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(o=>{o.forEach(a=>{if(a.attributeName==="class"){let s=r.classList.contains("btn-working"),n=r.querySelector("pds-icon");if(s)if(n)e||(e=n.getAttribute("icon")),n.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),r.insertBefore(c,r.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&n&&(t?(n.remove(),t=!1):e&&(n.setAttribute("icon",e),e=null))}})}).observe(r,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Zr=new Map([["nav[data-dropdown]",Gr],["label[data-toggle]",Vr],['input[type="range"]',Jr],["form[data-required] [required]",Kr],["fieldset[role=group][data-open]",Qr],["button, a[class*='btn-']",Yr]]),er=Xt.map(r=>({...r,run:Zr.get(r.selector)||(()=>{})}));var rr="pds",Xr=/^([a-z][a-z0-9+\-.]*:)?\/\//i,tr=/^[a-z]:/i;function ge(r=""){return r.endsWith("/")?r:`${r}/`}function eo(r="",e=rr){let t=r.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function to(r){return r.replace(/^\.\/+/,"")}function ro(r){return tr.test(r)?r.replace(tr,"").replace(/^\/+/,""):r}function oo(r){return r.startsWith("public/")?r.substring(7):r}function or(r,e={}){let t=e.segment||rr,i=e.defaultRoot||`/assets/${t}/`,o=r?.public&&r.public?.root||r?.static&&r.static?.root||null;if(!o||typeof o!="string")return ge(i);let a=o.trim();return a?(a=a.replace(/\\/g,"/"),a=eo(a,t),a=ge(a),Xr.test(a)?a:(a=to(a),a=ro(a),a.startsWith("/")||(a=oo(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(s,n)=>n===0?s:"/")),ge(a))):ge(i)}function ir(r){let e=r.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let o=document.createElement("canvas").getContext("2d");if(!o)return!1;let a="mmmmmmmmmmlli",s="72px",n="monospace";o.font=`${s} ${n}`;let c=o.measureText(a).width;o.font=`${s} "${e}", ${n}`;let l=o.measureText(a).width;return c!==l}function io(r){return r?r.split(",").map(i=>i.trim())[0].replace(/['"]/g,"").trim():null}async function ao(r,e={}){if(!r)return Promise.resolve();let{weights:t=[400,500,600,700],italic:i=!1}=e,o=io(r);if(!o||ir(o))return Promise.resolve();let a=encodeURIComponent(o);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${o}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${o}" from Google Fonts...`),new Promise((n,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=i?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${a}:${d}&display=swap`,l.setAttribute("data-font-loader",o),l.onload=()=>{console.log(`Successfully loaded font "${o}"`),n()},l.onerror=()=>{console.warn(`Failed to load font "${o}" from Google Fonts`),c(new Error(`Failed to load font: ${o}`))},document.head.appendChild(l),setTimeout(()=>{ir(o)||console.warn(`Font "${o}" did not load within timeout`),n()},5e3)}))}async function je(r){if(!r)return Promise.resolve();let e=new Set;r.fontFamilyHeadings&&e.add(r.fontFamilyHeadings),r.fontFamilyBody&&e.add(r.fontFamilyBody),r.fontFamilyMono&&e.add(r.fontFamilyMono);let t=Array.from(e).map(i=>ao(i).catch(o=>{console.warn(`Could not load font: ${i}`,o)}));await Promise.all(t)}var pt=class extends EventTarget{},m=new pt;m.initializing=!1;m.currentPreset=null;m.Generator=$;m.registry=he;m.ontology=Jt;m.adoptLayers=Qt;m.adoptPrimitives=Kt;m.createStylesheet=Yt;m.isLiveMode=()=>he.isLive;m.enums=u;m.ask=Zt;m.common=ct;m.presets=C;m.findComponentForElement=Vt;m.query=async function(r){return await new Ne(m).search(r)};function cr(r){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:r}):new Event("pds:ready");m.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:r,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(m,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(m,"compiled",{get(){return m.registry?.isLive&&$.instance?$.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=m);typeof document<"u"&&m.addEventListener("pds:ready",r=>{let e=r.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var dt="pure-ds-theme",X=null,me=null;function lr(r){try{if(typeof document>"u")return;let e="light";r?r==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=r:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function dr(r){try{if(X&&me){try{typeof X.removeEventListener=="function"?X.removeEventListener("change",me):typeof X.removeListener=="function"&&X.removeListener(me)}catch{}X=null,me=null}if(r==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=i=>{let o=i?.matches===void 0?e.matches:i.matches;try{let a=o?"dark":"light";document.documentElement.setAttribute("data-theme",a),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:a,source:"system"}}))}catch{}};X=e,me=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(m,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(dt)||null}catch{return null}},set(r){try{if(typeof window>"u")return;r==null?localStorage.removeItem(dt):localStorage.setItem(dt,r),lr(r),dr(r),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"api"}}))}catch{}}});m.defaultEnhancers=er;function He(r={},e={}){let t=Number(e.minContrast||4.5),i=n=>{let c=String(n||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},o=n=>{let{r:c,g:l,b:d}=i(n),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(n,c)=>{if(!n||!c)return 0;let l=o(n),d=o(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},s=[];try{let c=new m.Generator({design:structuredClone(r)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=a(l.primaryFill,"#ffffff");d<t&&s.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=a(l.surfaceBg,l.surfaceText);p<t&&s.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=a(l.primaryText,l.surfaceBg);h<t&&s.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let y={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},f=a(y.primaryFill,"#ffffff");f<t&&s.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${f.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:f,min:t,context:"dark/btn-primary"});let b=a(y.primaryText,y.surfaceBg);b<t&&s.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${b.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:b,min:t,context:"dark/outline"})}}catch(n){s.push({path:"/",message:`Validation failed: ${String(n?.message||n)}`,ratio:0,min:0})}return{ok:s.length===0,issues:s}}m.validateDesign=He;function no(r=[],e={}){let t=[],i=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(let o of i){let a,s=null;if(typeof o=="string"){let l=String(o).toLowerCase(),d=C?.[l]||Object.values(C||{}).find(p=>fe(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:o,ok:!1,issues:[{path:"/",message:`Preset not found: ${o}`,ratio:0,min:0}]});continue}a=d.name||l,s=structuredClone(d)}else if(o&&typeof o=="object")if(a=o.name||o.preset||void 0,"preset"in o||"design"in o){let l=String(o.preset||"default").toLowerCase(),d=C?.[l]||Object.values(C||{}).find(h=>fe(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:a,ok:!1,issues:[{path:"/",message:`Preset not found: ${o.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);o.design&&typeof o.design=="object"&&(p=ut(p,structuredClone(o.design))),s=p}else s=o;if(!s){t.push({name:a,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:n,issues:c}=He(s,e);t.push({name:a,ok:n,issues:c})}return{ok:t.every(o=>o.ok),results:t}}m.validateDesigns=no;function pr({manageTheme:r,themeStorageKey:e}){let t="light",i=null;if(r&&typeof window<"u"){try{i=localStorage.getItem(e)||null}catch{i=null}try{lr(i),dr(i)}catch{}i?i==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=i:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:i}}function ut(r={},e={}){if(!e||typeof e!="object")return r;let t=Array.isArray(r)?[...r]:{...r};for(let[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?t[i]=ut(t[i]&&typeof t[i]=="object"?t[i]:{},o):t[i]=o;return t}function fe(r=""){return String(r).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ye(r){if(r==null)return r;if(typeof r=="function")return;if(typeof r!="object")return r;if(Array.isArray(r))return r.map(t=>ye(t)).filter(t=>t!==void 0);let e={};for(let t in r)if(r.hasOwnProperty(t)){let i=r[t];if(typeof i!="function"){let o=ye(i);o!==void 0&&(e[t]=o)}}return e}var co=/^[a-z][a-z0-9+\-.]*:\/\//i,be=(()=>{try{return import.meta.url}catch{return}})();function Ue(r,e={}){if(!r||co.test(r))return r;let{preferModule:t=!0}=e,i=()=>{if(!be)return null;try{return new URL(r,be).href}catch{return null}},o=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(r,window.location.origin).href}catch{return null}};return(t?i()||o():o()||i())||r}var We=r=>typeof r=="string"&&r.length&&!r.endsWith("/")?`${r}/`:r,nr=(()=>{if(be)try{let r=new URL(be);if(/\/public\/assets\/js\//.test(r.pathname))return new URL("../pds/",be).href}catch{return}})();function ur(r){let e=!!(r?.public?.root||r?.static?.root),t=or(r);return!e&&nr&&(t=nr),We(Ue(t))}function hr(r={},e={}){let t=typeof r=="object"&&("colors"in r||"typography"in r||"spatialRhythm"in r||"shape"in r||"behavior"in r||"layout"in r||"advanced"in r||"a11y"in r||"components"in r||"icons"in r),i=r&&r.enhancers;i&&!Array.isArray(i)&&(i=Object.values(i));let o=i??e.enhancers??[],a=r&&r.preset,s=r&&r.design,n="preset"in(r||{})||"design"in(r||{})||"enhancers"in(r||{}),c,l=null;if(n){let d=String(a||"default").toLowerCase(),p=C?.[d]||Object.values(C||{}).find(D=>fe(D.name)===d||String(D.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${a||"default"}"`);l={id:p.id||fe(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(s&&typeof s=="object"){let D=ye(s);h=ut(h,structuredClone(D))}let{mode:g,autoDefine:y,applyGlobalStyles:f,manageTheme:b,themeStorageKey:_,preloadStyles:O,criticalLayers:R,preset:E,design:A,enhancers:M,log:I,...Ge}=r;c={...Ge,design:h,preset:l.name,log:I||Ie}}else if(t){let{log:d,...p}=r;c={design:structuredClone(p),log:d||Ie}}else{let d=C?.default||Object.values(C||{}).find(p=>fe(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:Ie}}return{generatorConfig:c,enhancers:o,presetInfo:l}}async function gr(r){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:i=null,enhancers:o=[],autoDefineOverrides:a=null,autoDefinePreferModule:s=!0}=r,n=(()=>{let l=new Map;return(m.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(o||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let f=await Promise.resolve().then(()=>(sr(),ar));l=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let d=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:p,...h}=a&&typeof a=="object"?a:{},y={baseURL:e&&We(Ue(e,{preferModule:s})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:n,onError:(f,b)=>{typeof f=="string"&&f.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${f}>:`,b)},...h,mapper:f=>{if(customElements.get(f))return null;if(typeof i=="function")try{let b=i(f);return b===void 0?d(f):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),d(f)}return d(f)}};l&&(c=new l(y),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:y.mapper,onError:y.onError}))}return{autoDefiner:c}}async function lo(r){if(!r||typeof r!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let n=`
3461
+ `.trim()}];function Gr(r){if(r.dataset.enhancedDropdown)return;r.dataset.enhancedDropdown="true";let e=r.querySelector("menu");if(!e)return;let t=r.querySelector("[data-dropdown-toggle]")||r.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let i=()=>{let n=(r.getAttribute("data-mode")||"auto").toLowerCase();if(n==="up"||n==="down")return n;let c=r.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},o=()=>{r.dataset.dropdownDirection=i(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},a=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},s=()=>{e.getAttribute("aria-hidden")==="false"?a():o()};t?.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),s()}),document.addEventListener("click",n=>{r.contains(n.target)||a()}),r.addEventListener("keydown",n=>{n.key==="Escape"&&(a(),t?.focus())}),r.addEventListener("focusout",n=>{(!n.relatedTarget||!r.contains(n.relatedTarget))&&a()})}function Vr(r){if(r.dataset.enhancedToggle)return;r.dataset.enhancedToggle="true";let e=r.querySelector('input[type="checkbox"]');if(!e)return;r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("role","switch"),r.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let i=document.createElement("span");i.className="toggle-knob",t.appendChild(i),r.insertBefore(t,e.nextSibling);let o=()=>{r.setAttribute("aria-checked",e.checked?"true":"false")},a=()=>{e.disabled||(e.checked=!e.checked,o(),e.dispatchEvent(new Event("change",{bubbles:!0})))};r.addEventListener("click",s=>{s.preventDefault(),a()}),r.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),a())}),e.addEventListener("change",o)}function Jr(r){if(r.dataset.enhancedRange)return;let e=r.closest("label"),t=e?.classList.contains("range-output"),i=r.id||`range-${Math.random().toString(36).substring(2,11)}`,o=`${i}-output`;if(r.id=i,t){let a=e.querySelector("span");if(a&&!a.classList.contains("range-output-wrapper")){let s=document.createElement("span");s.className="range-output-wrapper",s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center";let n=document.createElement("span");n.textContent=a.textContent,s.appendChild(n);let c=document.createElement("output");c.id=o,c.setAttribute("for",i),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=r.value,s.appendChild(c),a.textContent="",a.appendChild(s);let l=()=>{c.textContent=r.value};r.addEventListener("input",l)}}else{let a=r.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",r.parentNode?.insertBefore(a,r),a.appendChild(r)),a.style.position="relative";let s=document.createElement("output");s.id=o,s.setAttribute("for",i),s.className="range-bubble",s.setAttribute("aria-live","polite"),a.appendChild(s);let n=()=>{let d=parseFloat(r.min)||0,p=parseFloat(r.max)||100,h=parseFloat(r.value),g=(h-d)/(p-d);s.style.left=`calc(${g*100}% )`,s.textContent=String(h)},c=()=>s.classList.add("visible"),l=()=>s.classList.remove("visible");r.addEventListener("input",n),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerleave",l),r.addEventListener("focus",c),r.addEventListener("blur",l),n()}r.dataset.enhancedRange="1"}function Kr(r){if(r.dataset.enhancedRequired)return;r.dataset.enhancedRequired="true";let e=t=>{let i=t.closest("label");if(!i||i.querySelector(".required-asterisk"))return;let o=document.createElement("span");o.classList.add("required-asterisk"),o.textContent="*",o.style.marginLeft="4px",i.querySelector("span").appendChild(o);let a=t.closest("form");if(a&&!a.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",a.insertBefore(s,a.querySelector(".form-actions")||a.lastElementChild)}};r.querySelectorAll("[required]").forEach(t=>{e(t)})}function Qr(r){if(r.dataset.enhancedOpenGroup)return;r.dataset.enhancedOpenGroup="true",r.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=r.querySelector('input[type="radio"], input[type="checkbox"]');r.appendChild(e),e.addEventListener("keydown",i=>{if(i.key==="Enter"||i.key==="Tab"){let o=e.value.trim();if(o){i.preventDefault();let a=t.type==="radio"?"radio":"checkbox",s=`open-group-${Math.random().toString(36).substring(2,11)}`,n=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=o;let l=document.createElement("input");l.type=a,l.name=t.name||r.getAttribute("data-name")||"open-group",l.value=o,l.id=s,n.appendChild(c),n.appendChild(l),r.insertBefore(n,e),e.value=""}}else if(i.key==="Backspace"&&e.value===""){i.preventDefault();let o=r.querySelectorAll("label");o.length>0&&o[o.length-1].remove()}})}function Yr(r){if(r.dataset.enhancedBtnWorking)return;r.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(o=>{o.forEach(a=>{if(a.attributeName==="class"){let s=r.classList.contains("btn-working"),n=r.querySelector("pds-icon");if(s)if(n)e||(e=n.getAttribute("icon")),n.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),r.insertBefore(c,r.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&n&&(t?(n.remove(),t=!1):e&&(n.setAttribute("icon",e),e=null))}})}).observe(r,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Zr=new Map([["nav[data-dropdown]",Gr],["label[data-toggle]",Vr],['input[type="range"]',Jr],["form[data-required]",Kr],["fieldset[role=group][data-open]",Qr],["button, a[class*='btn-']",Yr]]),er=Xt.map(r=>({...r,run:Zr.get(r.selector)||(()=>{})}));var rr="pds",Xr=/^([a-z][a-z0-9+\-.]*:)?\/\//i,tr=/^[a-z]:/i;function ge(r=""){return r.endsWith("/")?r:`${r}/`}function eo(r="",e=rr){let t=r.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function to(r){return r.replace(/^\.\/+/,"")}function ro(r){return tr.test(r)?r.replace(tr,"").replace(/^\/+/,""):r}function oo(r){return r.startsWith("public/")?r.substring(7):r}function or(r,e={}){let t=e.segment||rr,i=e.defaultRoot||`/assets/${t}/`,o=r?.public&&r.public?.root||r?.static&&r.static?.root||null;if(!o||typeof o!="string")return ge(i);let a=o.trim();return a?(a=a.replace(/\\/g,"/"),a=eo(a,t),a=ge(a),Xr.test(a)?a:(a=to(a),a=ro(a),a.startsWith("/")||(a=oo(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(s,n)=>n===0?s:"/")),ge(a))):ge(i)}function ir(r){let e=r.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let o=document.createElement("canvas").getContext("2d");if(!o)return!1;let a="mmmmmmmmmmlli",s="72px",n="monospace";o.font=`${s} ${n}`;let c=o.measureText(a).width;o.font=`${s} "${e}", ${n}`;let l=o.measureText(a).width;return c!==l}function io(r){return r?r.split(",").map(i=>i.trim())[0].replace(/['"]/g,"").trim():null}async function ao(r,e={}){if(!r)return Promise.resolve();let{weights:t=[400,500,600,700],italic:i=!1}=e,o=io(r);if(!o||ir(o))return Promise.resolve();let a=encodeURIComponent(o);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${o}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${o}" from Google Fonts...`),new Promise((n,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=i?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${a}:${d}&display=swap`,l.setAttribute("data-font-loader",o),l.onload=()=>{console.log(`Successfully loaded font "${o}"`),n()},l.onerror=()=>{console.warn(`Failed to load font "${o}" from Google Fonts`),c(new Error(`Failed to load font: ${o}`))},document.head.appendChild(l),setTimeout(()=>{ir(o)||console.warn(`Font "${o}" did not load within timeout`),n()},5e3)}))}async function je(r){if(!r)return Promise.resolve();let e=new Set;r.fontFamilyHeadings&&e.add(r.fontFamilyHeadings),r.fontFamilyBody&&e.add(r.fontFamilyBody),r.fontFamilyMono&&e.add(r.fontFamilyMono);let t=Array.from(e).map(i=>ao(i).catch(o=>{console.warn(`Could not load font: ${i}`,o)}));await Promise.all(t)}var pt=class extends EventTarget{},m=new pt;m.initializing=!1;m.currentPreset=null;m.Generator=$;m.registry=he;m.ontology=Jt;m.adoptLayers=Qt;m.adoptPrimitives=Kt;m.createStylesheet=Yt;m.isLiveMode=()=>he.isLive;m.enums=u;m.ask=Zt;m.common=ct;m.presets=C;m.findComponentForElement=Vt;m.query=async function(r){return await new Ne(m).search(r)};function cr(r){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:r}):new Event("pds:ready");m.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:r,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(m,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(m,"compiled",{get(){return m.registry?.isLive&&$.instance?$.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=m);typeof document<"u"&&m.addEventListener("pds:ready",r=>{let e=r.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var dt="pure-ds-theme",X=null,me=null;function lr(r){try{if(typeof document>"u")return;let e="light";r?r==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=r:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function dr(r){try{if(X&&me){try{typeof X.removeEventListener=="function"?X.removeEventListener("change",me):typeof X.removeListener=="function"&&X.removeListener(me)}catch{}X=null,me=null}if(r==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=i=>{let o=i?.matches===void 0?e.matches:i.matches;try{let a=o?"dark":"light";document.documentElement.setAttribute("data-theme",a),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:a,source:"system"}}))}catch{}};X=e,me=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(m,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(dt)||null}catch{return null}},set(r){try{if(typeof window>"u")return;r==null?localStorage.removeItem(dt):localStorage.setItem(dt,r),lr(r),dr(r),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"api"}}))}catch{}}});m.defaultEnhancers=er;function He(r={},e={}){let t=Number(e.minContrast||4.5),i=n=>{let c=String(n||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},o=n=>{let{r:c,g:l,b:d}=i(n),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(n,c)=>{if(!n||!c)return 0;let l=o(n),d=o(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},s=[];try{let c=new m.Generator({design:structuredClone(r)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=a(l.primaryFill,"#ffffff");d<t&&s.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=a(l.surfaceBg,l.surfaceText);p<t&&s.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=a(l.primaryText,l.surfaceBg);h<t&&s.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let y={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},f=a(y.primaryFill,"#ffffff");f<t&&s.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${f.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:f,min:t,context:"dark/btn-primary"});let b=a(y.primaryText,y.surfaceBg);b<t&&s.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${b.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:b,min:t,context:"dark/outline"})}}catch(n){s.push({path:"/",message:`Validation failed: ${String(n?.message||n)}`,ratio:0,min:0})}return{ok:s.length===0,issues:s}}m.validateDesign=He;function no(r=[],e={}){let t=[],i=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(let o of i){let a,s=null;if(typeof o=="string"){let l=String(o).toLowerCase(),d=C?.[l]||Object.values(C||{}).find(p=>fe(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:o,ok:!1,issues:[{path:"/",message:`Preset not found: ${o}`,ratio:0,min:0}]});continue}a=d.name||l,s=structuredClone(d)}else if(o&&typeof o=="object")if(a=o.name||o.preset||void 0,"preset"in o||"design"in o){let l=String(o.preset||"default").toLowerCase(),d=C?.[l]||Object.values(C||{}).find(h=>fe(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:a,ok:!1,issues:[{path:"/",message:`Preset not found: ${o.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);o.design&&typeof o.design=="object"&&(p=ut(p,structuredClone(o.design))),s=p}else s=o;if(!s){t.push({name:a,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:n,issues:c}=He(s,e);t.push({name:a,ok:n,issues:c})}return{ok:t.every(o=>o.ok),results:t}}m.validateDesigns=no;function pr({manageTheme:r,themeStorageKey:e}){let t="light",i=null;if(r&&typeof window<"u"){try{i=localStorage.getItem(e)||null}catch{i=null}try{lr(i),dr(i)}catch{}i?i==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=i:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:i}}function ut(r={},e={}){if(!e||typeof e!="object")return r;let t=Array.isArray(r)?[...r]:{...r};for(let[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?t[i]=ut(t[i]&&typeof t[i]=="object"?t[i]:{},o):t[i]=o;return t}function fe(r=""){return String(r).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ye(r){if(r==null)return r;if(typeof r=="function")return;if(typeof r!="object")return r;if(Array.isArray(r))return r.map(t=>ye(t)).filter(t=>t!==void 0);let e={};for(let t in r)if(r.hasOwnProperty(t)){let i=r[t];if(typeof i!="function"){let o=ye(i);o!==void 0&&(e[t]=o)}}return e}var co=/^[a-z][a-z0-9+\-.]*:\/\//i,be=(()=>{try{return import.meta.url}catch{return}})();function Ue(r,e={}){if(!r||co.test(r))return r;let{preferModule:t=!0}=e,i=()=>{if(!be)return null;try{return new URL(r,be).href}catch{return null}},o=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(r,window.location.origin).href}catch{return null}};return(t?i()||o():o()||i())||r}var We=r=>typeof r=="string"&&r.length&&!r.endsWith("/")?`${r}/`:r,nr=(()=>{if(be)try{let r=new URL(be);if(/\/public\/assets\/js\//.test(r.pathname))return new URL("../pds/",be).href}catch{return}})();function ur(r){let e=!!(r?.public?.root||r?.static?.root),t=or(r);return!e&&nr&&(t=nr),We(Ue(t))}function hr(r={},e={}){let t=typeof r=="object"&&("colors"in r||"typography"in r||"spatialRhythm"in r||"shape"in r||"behavior"in r||"layout"in r||"advanced"in r||"a11y"in r||"components"in r||"icons"in r),i=r&&r.enhancers;i&&!Array.isArray(i)&&(i=Object.values(i));let o=i??e.enhancers??[],a=r&&r.preset,s=r&&r.design,n="preset"in(r||{})||"design"in(r||{})||"enhancers"in(r||{}),c,l=null;if(n){let d=String(a||"default").toLowerCase(),p=C?.[d]||Object.values(C||{}).find(D=>fe(D.name)===d||String(D.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${a||"default"}"`);l={id:p.id||fe(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(s&&typeof s=="object"){let D=ye(s);h=ut(h,structuredClone(D))}let{mode:g,autoDefine:y,applyGlobalStyles:f,manageTheme:b,themeStorageKey:_,preloadStyles:O,criticalLayers:R,preset:E,design:A,enhancers:M,log:I,...Ge}=r;c={...Ge,design:h,preset:l.name,log:I||Ie}}else if(t){let{log:d,...p}=r;c={design:structuredClone(p),log:d||Ie}}else{let d=C?.default||Object.values(C||{}).find(p=>fe(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:Ie}}return{generatorConfig:c,enhancers:o,presetInfo:l}}async function gr(r){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:i=null,enhancers:o=[],autoDefineOverrides:a=null,autoDefinePreferModule:s=!0}=r,n=(()=>{let l=new Map;return(m.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(o||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let f=await Promise.resolve().then(()=>(sr(),ar));l=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let d=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:p,...h}=a&&typeof a=="object"?a:{},y={baseURL:e&&We(Ue(e,{preferModule:s})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:n,onError:(f,b)=>{typeof f=="string"&&f.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${f}>:`,b)},...h,mapper:f=>{if(customElements.get(f))return null;if(typeof i=="function")try{let b=i(f);return b===void 0?d(f):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),d(f)}return d(f)}};l&&(c=new l(y),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:y.mapper,onError:y.onError}))}return{autoDefiner:c}}async function lo(r){if(!r||typeof r!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let n=`
3462
3462
  html { opacity: 0; }
3463
3463
  html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
3464
3464
  `;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(n),l._pdsFouc=!0,document.adoptedStyleSheets=[l,...document.adoptedStyleSheets]}}catch(c){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",c),!document.head.querySelector("style[data-pds-fouc]")){let d=document.createElement("style");d.setAttribute("data-pds-fouc",""),d.textContent=n,document.head.insertBefore(d,document.head.firstChild)}}}let e=r.applyGlobalStyles??!0,t=r.manageTheme??!0,i=r.themeStorageKey??"pure-ds-theme",o=r.preloadStyles??!1,a=r.criticalLayers??["tokens","primitives"],s=r&&r.autoDefine||null;try{let{resolvedTheme:n,storedTheme:c}=pr({manageTheme:t,themeStorageKey:i}),l=hr(r,{}),d=l.enhancers,{log:p,...h}=l.generatorConfig,g=structuredClone(h);g.log=p,t&&(g.theme=n);let y=new m.Generator(g);if(g.design?.typography)try{await je(g.design.typography)}catch(E){g?.log?.("warn","Failed to load some fonts from Google Fonts:",E)}if(o&&typeof window<"u"&&document.head)try{let E=a.map(A=>{try{return y.css?.[A]||""}catch(M){return g?.log?.("warn",`Failed to generate critical CSS for layer "${A}":`,M),""}}).filter(A=>A.trim()).join(`
@@ -86,10 +86,10 @@ var Tt=Object.defineProperty;var _t=(n,e)=>()=>(n&&(e=n(n=0)),e);var je=(n,e)=>{
86
86
  `}#H(e){let t=[` /* Layout */
87
87
  `];return Object.entries(e).forEach(([o,r])=>{let a=o.replace(/([A-Z])/g,"-$1").toLowerCase();o!=="breakpoints"&&t.push(` --layout-${a}: ${r};
88
88
  `)}),`${t.join("")}
89
- `}#G(e){let t=[` /* Transitions */
89
+ `}#q(e){let t=[` /* Transitions */
90
90
  `];return Object.entries(e).forEach(([o,r])=>{t.push(` --transition-${o}: ${r};
91
91
  `)}),`${t.join("")}
92
- `}#q(e){let t=[` /* Z-Index */
92
+ `}#G(e){let t=[` /* Z-Index */
93
93
  `];return Object.entries(e).forEach(([o,r])=>{t.push(` --z-${o}: ${r};
94
94
  `)}),`${t.join("")}
95
95
  `}#V(e){let t=[` /* Icon System */
@@ -2815,8 +2815,8 @@ nav[data-dropdown] {
2815
2815
  ${this.#N(a)}
2816
2816
  ${this.#I(i)}
2817
2817
  ${this.#H(s)}
2818
- ${this.#G(c)}
2819
- ${this.#q(l)}
2818
+ ${this.#q(c)}
2819
+ ${this.#G(l)}
2820
2820
  ${this.#V(d)}
2821
2821
  }
2822
2822
  ${this.#Z(e)}
@@ -3381,9 +3381,9 @@ export const ${e} = new CSSStyleSheet();
3381
3381
  ${e}.replaceSync(\`${o}\`);
3382
3382
 
3383
3383
  export const ${e}CSS = \`${o}\`;
3384
- `}static applyStyles(e){let t=e||n.instance;if(!t||typeof t!="object"){console.error("[Generator] applyStyles requires a generator object or active singleton");return}let o=t.layeredCSS||t.css||"";if(!o){t.options?.log?.("warn","[Generator] No CSS available on designer to apply");return}n.installRuntimeStyles(o)}static installRuntimeStyles(e){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(e),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(i=>i._pds!==!0);document.adoptedStyleSheets=[...a,r],n.__pdsRuntimeSheet=r;return}let t="pds-runtime-stylesheet",o=document.getElementById(t);if(!o){o=document.createElement("style"),o.id=t,o.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(o):document.documentElement.appendChild(o)}o.textContent=e}catch(t){console.warn("Generator.installRuntimeStyles failed:",t)}}};async function Ie(n,e=[]){try{let t=await PDS.registry.getStylesheet("primitives");if(n.adoptedStyleSheets=[t,...e],PDS.registry.isLive){let o=n.host?.tagName?.toLowerCase()||"unknown"}}catch(t){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt primitives:`,t),n.adoptedStyleSheets=e}}async function He(n,e=["primitives"],t=[]){try{let r=(await Promise.all(e.map(async a=>{if(E.instance)switch(a){case"tokens":return E.instance.tokensStylesheet;case"primitives":return E.instance.primitivesStylesheet;case"components":return E.instance.componentsStylesheet;case"utilities":return E.instance.utilitiesStylesheet;default:break}return V.getStylesheet(a)}))).filter(a=>a!==null);if(n.adoptedStyleSheets=[...r,...t],PDS.registry.isLive){let a=n.host?.tagName?.toLowerCase()||"unknown"}}catch(o){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt layers:`,o),n.adoptedStyleSheets=t}}function Ge(n){let e=new CSSStyleSheet;return e.replaceSync(n),e}var T={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1,backgroundMesh:2},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};T.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function ie(n="log",e,...t){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;t.length>0?r(e,...t):r(e)}}var se=globalThis,le=se.ShadowRoot&&(se.ShadyCSS===void 0||se.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ve=Symbol(),qe=new WeakMap,ce=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==Ve)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(le&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=qe.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&qe.set(t,e))}return e}toString(){return this.cssText}},Ke=n=>new ce(typeof n=="string"?n:n+"",void 0,Ve);var Ze=(n,e)=>{if(le)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let o=document.createElement("style"),r=se.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=t.cssText,n.appendChild(o)}},ve=le?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return Ke(t)})(n):n;var{is:Lt,defineProperty:Ft,getOwnPropertyDescriptor:Rt,getOwnPropertyNames:Pt,getOwnPropertySymbols:Dt,getPrototypeOf:Bt}=Object,de=globalThis,Je=de.trustedTypes,Wt=Je?Je.emptyScript:"",jt=de.reactiveElementPolyfillSupport,K=(n,e)=>n,xe={toAttribute(n,e){switch(e){case Boolean:n=n?Wt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ye=(n,e)=>!Lt(n,e),Qe={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:Ye};Symbol.metadata??=Symbol("metadata"),de.litPropertyMetadata??=new WeakMap;var F=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Qe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,t);r!==void 0&&Ft(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){let{get:r,set:a}=Rt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:r,set(i){let s=r?.call(this);a?.call(this,i),this.requestUpdate(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qe}static _$Ei(){if(this.hasOwnProperty(K("elementProperties")))return;let e=Bt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(K("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K("properties"))){let t=this.properties,o=[...Pt(t),...Dt(t)];for(let r of o)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,r]of t)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let r=this._$Eu(t,o);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)t.unshift(ve(r))}else e!==void 0&&t.push(ve(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ze(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let a=(o.converter?.toAttribute!==void 0?o.converter:xe).toAttribute(t,o.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,t){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let a=o.getPropertyOptions(r),i=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:xe;this._$Em=r;let s=i.fromAttribute(t,a.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let r=this.constructor,a=this[e];if(o??=r.getPropertyOptions(e),!((o.hasChanged??Ye)(a,t)||o.useDefault&&o.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:r,wrapped:a},i){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),a!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,a]of o){let{wrapped:i}=a,s=this[r];i!==!0||this._$AL.has(r)||s===void 0||this.C(r,void 0,a,s)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[K("elementProperties")]=new Map,F[K("finalized")]=new Map,jt?.({ReactiveElement:F}),(de.reactiveElementVersions??=[]).push("2.1.1");var Me=globalThis,pe=Me.trustedTypes,Xe=pe?pe.createPolicy("lit-html",{createHTML:n=>n}):void 0,nt="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+P,Ut=`<${it}>`,j=document,J=()=>j.createComment(""),Q=n=>n===null||typeof n!="object"&&typeof n!="function",Ae=Array.isArray,Ot=n=>Ae(n)||typeof n?.[Symbol.iterator]=="function",we=`[
3384
+ `}static applyStyles(e){let t=e||n.instance;if(!t||typeof t!="object"){console.error("[Generator] applyStyles requires a generator object or active singleton");return}let o=t.layeredCSS||t.css||"";if(!o){t.options?.log?.("warn","[Generator] No CSS available on designer to apply");return}n.installRuntimeStyles(o)}static installRuntimeStyles(e){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(e),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(i=>i._pds!==!0);document.adoptedStyleSheets=[...a,r],n.__pdsRuntimeSheet=r;return}let t="pds-runtime-stylesheet",o=document.getElementById(t);if(!o){o=document.createElement("style"),o.id=t,o.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(o):document.documentElement.appendChild(o)}o.textContent=e}catch(t){console.warn("Generator.installRuntimeStyles failed:",t)}}};async function Ie(n,e=[]){try{let t=await PDS.registry.getStylesheet("primitives");if(n.adoptedStyleSheets=[t,...e],PDS.registry.isLive){let o=n.host?.tagName?.toLowerCase()||"unknown"}}catch(t){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt primitives:`,t),n.adoptedStyleSheets=e}}async function He(n,e=["primitives"],t=[]){try{let r=(await Promise.all(e.map(async a=>{if(E.instance)switch(a){case"tokens":return E.instance.tokensStylesheet;case"primitives":return E.instance.primitivesStylesheet;case"components":return E.instance.componentsStylesheet;case"utilities":return E.instance.utilitiesStylesheet;default:break}return V.getStylesheet(a)}))).filter(a=>a!==null);if(n.adoptedStyleSheets=[...r,...t],PDS.registry.isLive){let a=n.host?.tagName?.toLowerCase()||"unknown"}}catch(o){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt layers:`,o),n.adoptedStyleSheets=t}}function qe(n){let e=new CSSStyleSheet;return e.replaceSync(n),e}var T={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1,backgroundMesh:2},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};T.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function ie(n="log",e,...t){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;t.length>0?r(e,...t):r(e)}}var se=globalThis,le=se.ShadowRoot&&(se.ShadyCSS===void 0||se.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ve=Symbol(),Ge=new WeakMap,ce=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==Ve)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(le&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=Ge.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Ge.set(t,e))}return e}toString(){return this.cssText}},Ke=n=>new ce(typeof n=="string"?n:n+"",void 0,Ve);var Ze=(n,e)=>{if(le)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let o=document.createElement("style"),r=se.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=t.cssText,n.appendChild(o)}},ve=le?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return Ke(t)})(n):n;var{is:Lt,defineProperty:Ft,getOwnPropertyDescriptor:Rt,getOwnPropertyNames:Pt,getOwnPropertySymbols:Dt,getPrototypeOf:Bt}=Object,de=globalThis,Je=de.trustedTypes,Wt=Je?Je.emptyScript:"",jt=de.reactiveElementPolyfillSupport,K=(n,e)=>n,xe={toAttribute(n,e){switch(e){case Boolean:n=n?Wt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ye=(n,e)=>!Lt(n,e),Qe={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:Ye};Symbol.metadata??=Symbol("metadata"),de.litPropertyMetadata??=new WeakMap;var F=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Qe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,t);r!==void 0&&Ft(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){let{get:r,set:a}=Rt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:r,set(i){let s=r?.call(this);a?.call(this,i),this.requestUpdate(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qe}static _$Ei(){if(this.hasOwnProperty(K("elementProperties")))return;let e=Bt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(K("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K("properties"))){let t=this.properties,o=[...Pt(t),...Dt(t)];for(let r of o)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,r]of t)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let r=this._$Eu(t,o);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)t.unshift(ve(r))}else e!==void 0&&t.push(ve(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ze(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let a=(o.converter?.toAttribute!==void 0?o.converter:xe).toAttribute(t,o.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,t){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let a=o.getPropertyOptions(r),i=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:xe;this._$Em=r;let s=i.fromAttribute(t,a.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let r=this.constructor,a=this[e];if(o??=r.getPropertyOptions(e),!((o.hasChanged??Ye)(a,t)||o.useDefault&&o.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:r,wrapped:a},i){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),a!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,a]of o){let{wrapped:i}=a,s=this[r];i!==!0||this._$AL.has(r)||s===void 0||this.C(r,void 0,a,s)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[K("elementProperties")]=new Map,F[K("finalized")]=new Map,jt?.({ReactiveElement:F}),(de.reactiveElementVersions??=[]).push("2.1.1");var Me=globalThis,pe=Me.trustedTypes,Xe=pe?pe.createPolicy("lit-html",{createHTML:n=>n}):void 0,nt="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+P,Ut=`<${it}>`,j=document,J=()=>j.createComment(""),Q=n=>n===null||typeof n!="object"&&typeof n!="function",Ae=Array.isArray,Ot=n=>Ae(n)||typeof n?.[Symbol.iterator]=="function",we=`[
3385
3385
  \f\r]`,Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,tt=/>/g,B=RegExp(`>|${we}(?:([^\\s"'>=/]+)(${we}*=${we}*(?:[^
3386
- \f\r"'\`<>=]|("|')|))|$)`,"g"),rt=/'/g,ot=/"/g,st=/^(?:script|style|textarea|title)$/i,Ce=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),Ar=Ce(1),Cr=Ce(2),Tr=Ce(3),U=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),at=new WeakMap,W=j.createTreeWalker(j,129);function ct(n,e){if(!Ae(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xe!==void 0?Xe.createHTML(e):e}var Nt=(n,e)=>{let t=n.length-1,o=[],r,a=e===2?"<svg>":e===3?"<math>":"",i=Z;for(let s=0;s<t;s++){let c=n[s],l,d,p=-1,h=0;for(;h<c.length&&(i.lastIndex=h,d=i.exec(c),d!==null);)h=i.lastIndex,i===Z?d[1]==="!--"?i=et:d[1]!==void 0?i=tt:d[2]!==void 0?(st.test(d[2])&&(r=RegExp("</"+d[2],"g")),i=B):d[3]!==void 0&&(i=B):i===B?d[0]===">"?(i=r??Z,p=-1):d[1]===void 0?p=-2:(p=i.lastIndex-d[2].length,l=d[1],i=d[3]===void 0?B:d[3]==='"'?ot:rt):i===ot||i===rt?i=B:i===et||i===tt?i=Z:(i=B,r=void 0);let g=i===B&&n[s+1].startsWith("/>")?" ":"";a+=i===Z?c+Ut:p>=0?(o.push(l),c.slice(0,p)+nt+c.slice(p)+P+g):c+P+(p===-2?s:g)}return[ct(n,a+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},Y=class n{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let a=0,i=0,s=e.length-1,c=this.parts,[l,d]=Nt(e,t);if(this.el=n.createElement(l,o),W.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=W.nextNode())!==null&&c.length<s;){if(r.nodeType===1){if(r.hasAttributes())for(let p of r.getAttributeNames())if(p.endsWith(nt)){let h=d[i++],g=r.getAttribute(p).split(P),w=/([.?@])?(.*)/.exec(h);c.push({type:1,index:a,name:w[2],strings:g,ctor:w[1]==="."?Se:w[1]==="?"?$e:w[1]==="@"?ze:G}),r.removeAttribute(p)}else p.startsWith(P)&&(c.push({type:6,index:a}),r.removeAttribute(p));if(st.test(r.tagName)){let p=r.textContent.split(P),h=p.length-1;if(h>0){r.textContent=pe?pe.emptyScript:"";for(let g=0;g<h;g++)r.append(p[g],J()),W.nextNode(),c.push({type:2,index:++a});r.append(p[h],J())}}}else if(r.nodeType===8)if(r.data===it)c.push({type:2,index:a});else{let p=-1;for(;(p=r.data.indexOf(P,p+1))!==-1;)c.push({type:7,index:a}),p+=P.length-1}a++}}static createElement(e,t){let o=j.createElement("template");return o.innerHTML=e,o}};function H(n,e,t=n,o){if(e===U)return e;let r=o!==void 0?t._$Co?.[o]:t._$Cl,a=Q(e)?void 0:e._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),a===void 0?r=void 0:(r=new a(n),r._$AT(n,t,o)),o!==void 0?(t._$Co??=[])[o]=r:t._$Cl=r),r!==void 0&&(e=H(n,r._$AS(n,e.values),r,o)),e}var ke=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:o}=this._$AD,r=(e?.creationScope??j).importNode(t,!0);W.currentNode=r;let a=W.nextNode(),i=0,s=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new X(a,a.nextSibling,this,e):c.type===1?l=new c.ctor(a,c.name,c.strings,this,e):c.type===6&&(l=new Ee(a,this,e)),this._$AV.push(l),c=o[++s]}i!==c?.index&&(a=W.nextNode(),i++)}return W.currentNode=j,r}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},X=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=H(this,e,t),Q(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ot(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:o}=e,r=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Y.createElement(ct(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(t);else{let a=new ke(r,this),i=a.u(this.options);a.p(t),this.T(i),this._$AH=a}}_$AC(e){let t=at.get(e.strings);return t===void 0&&at.set(e.strings,t=new Y(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,r=0;for(let a of e)r===t.length?t.push(o=new n(this.O(J()),this.O(J()),this,this.options)):o=t[r],o._$AI(a),r++;r<t.length&&(this._$AR(o&&o._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},G=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,r,a){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=a,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=k}_$AI(e,t=this,o,r){let a=this.strings,i=!1;if(a===void 0)e=H(this,e,t,0),i=!Q(e)||e!==this._$AH&&e!==U,i&&(this._$AH=e);else{let s=e,c,l;for(e=a[0],c=0;c<a.length-1;c++)l=H(this,s[o+c],t,c),l===U&&(l=this._$AH[c]),i||=!Q(l)||l!==this._$AH[c],l===k?e=k:e!==k&&(e+=(l??"")+a[c+1]),this._$AH[c]=l}i&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Se=class extends G{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},$e=class extends G{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},ze=class extends G{constructor(e,t,o,r,a){super(e,t,o,r,a),this.type=5}_$AI(e,t=this){if((e=H(this,e,t,0)??k)===U)return;let o=this._$AH,r=e===k&&o!==k||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==k&&(o===k||r);r&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ee=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){H(this,e)}};var It=Me.litHtmlPolyfillSupport;It?.(Y,X),(Me.litHtmlVersions??=[]).push("3.3.1");var O=(n,e,t)=>{let o=t?.renderBefore??e,r=o._$litPart$;if(r===void 0){let a=t?.renderBefore??null;o._$litPart$=r=new X(e.insertBefore(J(),a),a,void 0,t??{})}return r._$AI(n),r};var Te=globalThis,q=class extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=O(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};q._$litElement$=!0,q.finalized=!0,Te.litElementHydrateSupport?.({LitElement:q});var Ht=Te.litElementPolyfillSupport;Ht?.({LitElement:q});(Te.litElementVersions??=[]).push("4.2.1");var lt={mode:"live",preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(n,e,...t){console[n](e,...t)}};async function dt(n,e={}){return e={...{title:"Confirm",type:"confirm",buttons:{ok:{name:"OK",primary:!0},cancel:{name:"Cancel",cancel:!0}}},...e},new Promise(o=>{let r=document.createElement("dialog");lt.options?.liquidGlassEffects&&r.classList.add("liquid-glass"),e.size&&r.classList.add(`dialog-${e.size}`),e.type&&r.classList.add(`dialog-${e.type}`),e.class&&(Array.isArray(e.class)?r.classList.add(...e.class):r.classList.add(e.class));let a=Object.entries(e.buttons).map(([s,c])=>{let l=c.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${c.cancel?"button":"submit"}" class="${l}" value="${s}">${c.name}</button>`});if(e.useForm){r.innerHTML=`
3386
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),rt=/'/g,ot=/"/g,st=/^(?:script|style|textarea|title)$/i,Ce=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),Ar=Ce(1),Cr=Ce(2),Tr=Ce(3),U=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),at=new WeakMap,W=j.createTreeWalker(j,129);function ct(n,e){if(!Ae(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xe!==void 0?Xe.createHTML(e):e}var Nt=(n,e)=>{let t=n.length-1,o=[],r,a=e===2?"<svg>":e===3?"<math>":"",i=Z;for(let s=0;s<t;s++){let c=n[s],l,d,p=-1,h=0;for(;h<c.length&&(i.lastIndex=h,d=i.exec(c),d!==null);)h=i.lastIndex,i===Z?d[1]==="!--"?i=et:d[1]!==void 0?i=tt:d[2]!==void 0?(st.test(d[2])&&(r=RegExp("</"+d[2],"g")),i=B):d[3]!==void 0&&(i=B):i===B?d[0]===">"?(i=r??Z,p=-1):d[1]===void 0?p=-2:(p=i.lastIndex-d[2].length,l=d[1],i=d[3]===void 0?B:d[3]==='"'?ot:rt):i===ot||i===rt?i=B:i===et||i===tt?i=Z:(i=B,r=void 0);let g=i===B&&n[s+1].startsWith("/>")?" ":"";a+=i===Z?c+Ut:p>=0?(o.push(l),c.slice(0,p)+nt+c.slice(p)+P+g):c+P+(p===-2?s:g)}return[ct(n,a+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},Y=class n{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let a=0,i=0,s=e.length-1,c=this.parts,[l,d]=Nt(e,t);if(this.el=n.createElement(l,o),W.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=W.nextNode())!==null&&c.length<s;){if(r.nodeType===1){if(r.hasAttributes())for(let p of r.getAttributeNames())if(p.endsWith(nt)){let h=d[i++],g=r.getAttribute(p).split(P),w=/([.?@])?(.*)/.exec(h);c.push({type:1,index:a,name:w[2],strings:g,ctor:w[1]==="."?Se:w[1]==="?"?$e:w[1]==="@"?ze:q}),r.removeAttribute(p)}else p.startsWith(P)&&(c.push({type:6,index:a}),r.removeAttribute(p));if(st.test(r.tagName)){let p=r.textContent.split(P),h=p.length-1;if(h>0){r.textContent=pe?pe.emptyScript:"";for(let g=0;g<h;g++)r.append(p[g],J()),W.nextNode(),c.push({type:2,index:++a});r.append(p[h],J())}}}else if(r.nodeType===8)if(r.data===it)c.push({type:2,index:a});else{let p=-1;for(;(p=r.data.indexOf(P,p+1))!==-1;)c.push({type:7,index:a}),p+=P.length-1}a++}}static createElement(e,t){let o=j.createElement("template");return o.innerHTML=e,o}};function H(n,e,t=n,o){if(e===U)return e;let r=o!==void 0?t._$Co?.[o]:t._$Cl,a=Q(e)?void 0:e._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),a===void 0?r=void 0:(r=new a(n),r._$AT(n,t,o)),o!==void 0?(t._$Co??=[])[o]=r:t._$Cl=r),r!==void 0&&(e=H(n,r._$AS(n,e.values),r,o)),e}var ke=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:o}=this._$AD,r=(e?.creationScope??j).importNode(t,!0);W.currentNode=r;let a=W.nextNode(),i=0,s=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new X(a,a.nextSibling,this,e):c.type===1?l=new c.ctor(a,c.name,c.strings,this,e):c.type===6&&(l=new Ee(a,this,e)),this._$AV.push(l),c=o[++s]}i!==c?.index&&(a=W.nextNode(),i++)}return W.currentNode=j,r}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},X=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=H(this,e,t),Q(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ot(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:o}=e,r=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Y.createElement(ct(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(t);else{let a=new ke(r,this),i=a.u(this.options);a.p(t),this.T(i),this._$AH=a}}_$AC(e){let t=at.get(e.strings);return t===void 0&&at.set(e.strings,t=new Y(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,r=0;for(let a of e)r===t.length?t.push(o=new n(this.O(J()),this.O(J()),this,this.options)):o=t[r],o._$AI(a),r++;r<t.length&&(this._$AR(o&&o._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,r,a){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=a,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=k}_$AI(e,t=this,o,r){let a=this.strings,i=!1;if(a===void 0)e=H(this,e,t,0),i=!Q(e)||e!==this._$AH&&e!==U,i&&(this._$AH=e);else{let s=e,c,l;for(e=a[0],c=0;c<a.length-1;c++)l=H(this,s[o+c],t,c),l===U&&(l=this._$AH[c]),i||=!Q(l)||l!==this._$AH[c],l===k?e=k:e!==k&&(e+=(l??"")+a[c+1]),this._$AH[c]=l}i&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Se=class extends q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},$e=class extends q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},ze=class extends q{constructor(e,t,o,r,a){super(e,t,o,r,a),this.type=5}_$AI(e,t=this){if((e=H(this,e,t,0)??k)===U)return;let o=this._$AH,r=e===k&&o!==k||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==k&&(o===k||r);r&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ee=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){H(this,e)}};var It=Me.litHtmlPolyfillSupport;It?.(Y,X),(Me.litHtmlVersions??=[]).push("3.3.1");var O=(n,e,t)=>{let o=t?.renderBefore??e,r=o._$litPart$;if(r===void 0){let a=t?.renderBefore??null;o._$litPart$=r=new X(e.insertBefore(J(),a),a,void 0,t??{})}return r._$AI(n),r};var Te=globalThis,G=class extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=O(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};G._$litElement$=!0,G.finalized=!0,Te.litElementHydrateSupport?.({LitElement:G});var Ht=Te.litElementPolyfillSupport;Ht?.({LitElement:G});(Te.litElementVersions??=[]).push("4.2.1");var lt={mode:"live",preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(n,e,...t){console[n](e,...t)}};async function dt(n,e={}){return e={...{title:"Confirm",type:"confirm",buttons:{ok:{name:"OK",primary:!0},cancel:{name:"Cancel",cancel:!0}}},...e},new Promise(o=>{let r=document.createElement("dialog");lt.options?.liquidGlassEffects&&r.classList.add("liquid-glass"),e.size&&r.classList.add(`dialog-${e.size}`),e.type&&r.classList.add(`dialog-${e.type}`),e.class&&(Array.isArray(e.class)?r.classList.add(...e.class):r.classList.add(e.class));let a=Object.entries(e.buttons).map(([s,c])=>{let l=c.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${c.cancel?"button":"submit"}" class="${l}" value="${s}">${c.name}</button>`});if(e.useForm){r.innerHTML=`
3387
3387
  <header>
3388
3388
  <h2>${e.title}</h2>
3389
3389
  </header>
@@ -3437,8 +3437,8 @@ export const ${e}CSS = \`${o}\`;
3437
3437
  <span data-label>Volume</span>
3438
3438
  <input type="range" min="0" max="100" value="40">
3439
3439
  </label>
3440
- `.trim()},{selector:"form [required]",description:"Enhances required form fields using an asterisk in the label.",demoHtml:`
3441
- <form action'#" method="post">
3440
+ `.trim()},{selector:"form[data-required]",description:"Enhances required form fields using an asterisk in the label.",demoHtml:`
3441
+ <form data-required action="#" method="post">
3442
3442
  <label>
3443
3443
  <span>Field Label</span>
3444
3444
  <input type="text" required>
@@ -3458,7 +3458,7 @@ export const ${e}CSS = \`${o}\`;
3458
3458
  <button class="btn-primary btn-working">
3459
3459
  <span>Saving</span>
3460
3460
  </button>
3461
- `.trim()}];function Gt(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let e=n.querySelector("menu");if(!e)return;let t=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let o=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let c=n.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},r=()=>{n.dataset.dropdownDirection=o(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},a=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},i=()=>{e.getAttribute("aria-hidden")==="false"?a():r()};t?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),i()}),document.addEventListener("click",s=>{n.contains(s.target)||a()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(a(),t?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&a()})}function qt(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let e=n.querySelector('input[type="checkbox"]');if(!e)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let o=document.createElement("span");o.className="toggle-knob",t.appendChild(o),n.insertBefore(t,e.nextSibling);let r=()=>{n.setAttribute("aria-checked",e.checked?"true":"false")},a=()=>{e.disabled||(e.checked=!e.checked,r(),e.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),a()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),a())}),e.addEventListener("change",r)}function Vt(n){if(n.dataset.enhancedRange)return;let e=n.closest("label"),t=e?.classList.contains("range-output"),o=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${o}-output`;if(n.id=o,t){let a=e.querySelector("span");if(a&&!a.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let s=document.createElement("span");s.textContent=a.textContent,i.appendChild(s);let c=document.createElement("output");c.id=r,c.setAttribute("for",o),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=n.value,i.appendChild(c),a.textContent="",a.appendChild(i);let l=()=>{c.textContent=n.value};n.addEventListener("input",l)}}else{let a=n.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",n.parentNode?.insertBefore(a,n),a.appendChild(n)),a.style.position="relative";let i=document.createElement("output");i.id=r,i.setAttribute("for",o),i.className="range-bubble",i.setAttribute("aria-live","polite"),a.appendChild(i);let s=()=>{let d=parseFloat(n.min)||0,p=parseFloat(n.max)||100,h=parseFloat(n.value),g=(h-d)/(p-d);i.style.left=`calc(${g*100}% )`,i.textContent=String(h)},c=()=>i.classList.add("visible"),l=()=>i.classList.remove("visible");n.addEventListener("input",s),n.addEventListener("pointerdown",c),n.addEventListener("pointerup",l),n.addEventListener("pointerleave",l),n.addEventListener("focus",c),n.addEventListener("blur",l),s()}n.dataset.enhancedRange="1"}function Kt(n){let e=n.closest("label");if(!e||e.querySelector(".required-asterisk"))return;let t=document.createElement("span");t.classList.add("required-asterisk"),t.textContent="*",t.style.marginLeft="4px",e.querySelector("span").appendChild(t);let o=n.closest("form");if(o&&!o.querySelector(".required-legend")){let r=document.createElement("small");r.classList.add("required-legend"),r.textContent="* Required fields",o.insertBefore(r,o.querySelector(".form-actions")||o.lastElementChild)}}function Zt(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(e),e.addEventListener("keydown",o=>{if(o.key==="Enter"||o.key==="Tab"){let r=e.value.trim();if(r){o.preventDefault();let a=t.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=r;let l=document.createElement("input");l.type=a,l.name=t.name||n.getAttribute("data-name")||"open-group",l.value=r,l.id=i,s.appendChild(c),s.appendChild(l),n.insertBefore(s,e),e.value=""}}else if(o.key==="Backspace"&&e.value===""){o.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Jt(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="class"){let i=n.classList.contains("btn-working"),s=n.querySelector("pds-icon");if(i)if(s)e||(e=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),n.insertBefore(c,n.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&s&&(t?(s.remove(),t=!1):e&&(s.setAttribute("icon",e),e=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Qt=new Map([["nav[data-dropdown]",Gt],["label[data-toggle]",qt],['input[type="range"]',Vt],["form[data-required] [required]",Kt],["fieldset[role=group][data-open]",Zt],["button, a[class*='btn-']",Jt]]),ht=ut.map(n=>({...n,run:Qt.get(n.selector)||(()=>{})}));var mt="pds",Yt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,gt=/^[a-z]:/i;function ee(n=""){return n.endsWith("/")?n:`${n}/`}function Xt(n="",e=mt){let t=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function er(n){return n.replace(/^\.\/+/,"")}function tr(n){return gt.test(n)?n.replace(gt,"").replace(/^\/+/,""):n}function rr(n){return n.startsWith("public/")?n.substring(7):n}function ft(n,e={}){let t=e.segment||mt,o=e.defaultRoot||`/assets/${t}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return ee(o);let a=r.trim();return a?(a=a.replace(/\\/g,"/"),a=Xt(a,t),a=ee(a),Yt.test(a)?a:(a=er(a),a=tr(a),a.startsWith("/")||(a=rr(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(i,s)=>s===0?i:"/")),ee(a))):ee(o)}function bt(n){let e=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let a="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let c=r.measureText(a).width;r.font=`${i} "${e}", ${s}`;let l=r.measureText(a).width;return c!==l}function or(n){return n?n.split(",").map(o=>o.trim())[0].replace(/['"]/g,"").trim():null}async function ar(n,e={}){if(!n)return Promise.resolve();let{weights:t=[400,500,600,700],italic:o=!1}=e,r=or(n);if(!r||bt(r))return Promise.resolve();let a=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=o?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${a}:${d}&display=swap`,l.setAttribute("data-font-loader",r),l.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},l.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),c(new Error(`Failed to load font: ${r}`))},document.head.appendChild(l),setTimeout(()=>{bt(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function yt(n){if(!n)return Promise.resolve();let e=new Set;n.fontFamilyHeadings&&e.add(n.fontFamilyHeadings),n.fontFamilyBody&&e.add(n.fontFamilyBody),n.fontFamilyMono&&e.add(n.fontFamilyMono);let t=Array.from(e).map(o=>ar(o).catch(r=>{console.warn(`Could not load font: ${o}`,r)}));await Promise.all(t)}var Re=class extends EventTarget{},f=new Re;f.initializing=!1;f.currentPreset=null;f.Generator=E;f.registry=V;f.ontology=Ne;f.adoptLayers=He;f.adoptPrimitives=Ie;f.createStylesheet=Ge;f.isLiveMode=()=>V.isLive;f.enums=u;f.ask=dt;f.common=_e;f.presets=T;f.findComponentForElement=Oe;f.query=async function(n){return await new ue(f).search(n)};function kt(n){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:n}):new Event("pds:ready");f.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(f,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(f,"compiled",{get(){return f.registry?.isLive&&E.instance?E.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=f);typeof document<"u"&&f.addEventListener("pds:ready",n=>{let e=n.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var Fe="pure-ds-theme",N=null,te=null;function St(n){try{if(typeof document>"u")return;let e="light";n?n==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=n:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function $t(n){try{if(N&&te){try{typeof N.removeEventListener=="function"?N.removeEventListener("change",te):typeof N.removeListener=="function"&&N.removeListener(te)}catch{}N=null,te=null}if(n==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=o=>{let r=o?.matches===void 0?e.matches:o.matches;try{let a=r?"dark":"light";document.documentElement.setAttribute("data-theme",a),f.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:a,source:"system"}}))}catch{}};N=e,te=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(f,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(Fe)||null}catch{return null}},set(n){try{if(typeof window>"u")return;n==null?localStorage.removeItem(Fe):localStorage.setItem(Fe,n),St(n),$t(n),f.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:n,source:"api"}}))}catch{}}});f.defaultEnhancers=ht;function zt(n={},e={}){let t=Number(e.minContrast||4.5),o=s=>{let c=String(s||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},r=s=>{let{r:c,g:l,b:d}=o(s),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(s,c)=>{if(!s||!c)return 0;let l=r(s),d=r(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},i=[];try{let c=new f.Generator({design:structuredClone(n)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=a(l.primaryFill,"#ffffff");d<t&&i.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=a(l.surfaceBg,l.surfaceText);p<t&&i.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=a(l.primaryText,l.surfaceBg);h<t&&i.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let w={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},b=a(w.primaryFill,"#ffffff");b<t&&i.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${b.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:b,min:t,context:"dark/btn-primary"});let m=a(w.primaryText,w.surfaceBg);m<t&&i.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${m.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:m,min:t,context:"dark/outline"})}}catch(s){i.push({path:"/",message:`Validation failed: ${String(s?.message||s)}`,ratio:0,min:0})}return{ok:i.length===0,issues:i}}f.validateDesign=zt;function ir(n=[],e={}){let t=[],o=Array.isArray(n)?n:n&&typeof n=="object"?Object.values(n):[];for(let r of o){let a,i=null;if(typeof r=="string"){let l=String(r).toLowerCase(),d=T?.[l]||Object.values(T||{}).find(p=>re(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:r,ok:!1,issues:[{path:"/",message:`Preset not found: ${r}`,ratio:0,min:0}]});continue}a=d.name||l,i=structuredClone(d)}else if(r&&typeof r=="object")if(a=r.name||r.preset||void 0,"preset"in r||"design"in r){let l=String(r.preset||"default").toLowerCase(),d=T?.[l]||Object.values(T||{}).find(h=>re(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:a,ok:!1,issues:[{path:"/",message:`Preset not found: ${r.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);r.design&&typeof r.design=="object"&&(p=Pe(p,structuredClone(r.design))),i=p}else i=r;if(!i){t.push({name:a,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:s,issues:c}=zt(i,e);t.push({name:a,ok:s,issues:c})}return{ok:t.every(r=>r.ok),results:t}}f.validateDesigns=ir;function Et({manageTheme:n,themeStorageKey:e}){let t="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{St(o),$t(o)}catch{}o?o==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=o:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:o}}function Pe(n={},e={}){if(!e||typeof e!="object")return n;let t=Array.isArray(n)?[...n]:{...n};for(let[o,r]of Object.entries(e))r&&typeof r=="object"&&!Array.isArray(r)?t[o]=Pe(t[o]&&typeof t[o]=="object"?t[o]:{},r):t[o]=r;return t}function re(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ae(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>ae(t)).filter(t=>t!==void 0);let e={};for(let t in n)if(n.hasOwnProperty(t)){let o=n[t];if(typeof o!="function"){let r=ae(o);r!==void 0&&(e[t]=r)}}return e}var sr=/^[a-z][a-z0-9+\-.]*:\/\//i,oe=(()=>{try{return import.meta.url}catch{return}})();function ge(n,e={}){if(!n||sr.test(n))return n;let{preferModule:t=!0}=e,o=()=>{if(!oe)return null;try{return new URL(n,oe).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(t?o()||r():r()||o())||n}var me=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n,wt=(()=>{if(oe)try{let n=new URL(oe);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",oe).href}catch{return}})();function Mt(n){let e=!!(n?.public?.root||n?.static?.root),t=ft(n);return!e&&wt&&(t=wt),me(ge(t))}function At(n={},e={}){let t=typeof n=="object"&&("colors"in n||"typography"in n||"spatialRhythm"in n||"shape"in n||"behavior"in n||"layout"in n||"advanced"in n||"a11y"in n||"components"in n||"icons"in n),o=n&&n.enhancers;o&&!Array.isArray(o)&&(o=Object.values(o));let r=o??e.enhancers??[],a=n&&n.preset,i=n&&n.design,s="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,l=null;if(s){let d=String(a||"default").toLowerCase(),p=T?.[d]||Object.values(T||{}).find(A=>re(A.name)===d||String(A.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${a||"default"}"`);l={id:p.id||re(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(i&&typeof i=="object"){let A=ae(i);h=Pe(h,structuredClone(A))}let{mode:g,autoDefine:w,applyGlobalStyles:b,manageTheme:m,themeStorageKey:M,preloadStyles:R,criticalLayers:_,preset:S,design:$,enhancers:z,log:L,...fe}=n;c={...fe,design:h,preset:l.name,log:L||ie}}else if(t){let{log:d,...p}=n;c={design:structuredClone(p),log:d||ie}}else{let d=T?.default||Object.values(T||{}).find(p=>re(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:ie}}return{generatorConfig:c,enhancers:r,presetInfo:l}}async function Ct(n){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:o=null,enhancers:r=[],autoDefineOverrides:a=null,autoDefinePreferModule:i=!0}=n,s=(()=>{let l=new Map;return(f.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(r||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let b=await Promise.resolve().then(()=>(xt(),vt));l=b?.AutoDefiner||b?.default?.AutoDefiner||b?.default||null}catch(b){console.warn("AutoDefiner not available:",b?.message||b)}let d=b=>{switch(b){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${b}.js`}},{mapper:p,...h}=a&&typeof a=="object"?a:{},w={baseURL:e&&me(ge(e,{preferModule:i})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(b,m)=>{typeof b=="string"&&b.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${b}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${b}>:`,m)},...h,mapper:b=>{if(customElements.get(b))return null;if(typeof o=="function")try{let m=o(b);return m===void 0?d(b):m}catch(m){return console.warn("Custom autoDefine.mapper error; falling back to default:",m?.message||m),d(b)}return d(b)}};l&&(c=new l(w),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:w.mapper,onError:w.onError}))}return{autoDefiner:c}}async function cr(n){if(!n||typeof n!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let s=`
3461
+ `.trim()}];function qt(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let e=n.querySelector("menu");if(!e)return;let t=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let o=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let c=n.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},r=()=>{n.dataset.dropdownDirection=o(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},a=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},i=()=>{e.getAttribute("aria-hidden")==="false"?a():r()};t?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),i()}),document.addEventListener("click",s=>{n.contains(s.target)||a()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(a(),t?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&a()})}function Gt(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let e=n.querySelector('input[type="checkbox"]');if(!e)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let o=document.createElement("span");o.className="toggle-knob",t.appendChild(o),n.insertBefore(t,e.nextSibling);let r=()=>{n.setAttribute("aria-checked",e.checked?"true":"false")},a=()=>{e.disabled||(e.checked=!e.checked,r(),e.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),a()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),a())}),e.addEventListener("change",r)}function Vt(n){if(n.dataset.enhancedRange)return;let e=n.closest("label"),t=e?.classList.contains("range-output"),o=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${o}-output`;if(n.id=o,t){let a=e.querySelector("span");if(a&&!a.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let s=document.createElement("span");s.textContent=a.textContent,i.appendChild(s);let c=document.createElement("output");c.id=r,c.setAttribute("for",o),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=n.value,i.appendChild(c),a.textContent="",a.appendChild(i);let l=()=>{c.textContent=n.value};n.addEventListener("input",l)}}else{let a=n.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",n.parentNode?.insertBefore(a,n),a.appendChild(n)),a.style.position="relative";let i=document.createElement("output");i.id=r,i.setAttribute("for",o),i.className="range-bubble",i.setAttribute("aria-live","polite"),a.appendChild(i);let s=()=>{let d=parseFloat(n.min)||0,p=parseFloat(n.max)||100,h=parseFloat(n.value),g=(h-d)/(p-d);i.style.left=`calc(${g*100}% )`,i.textContent=String(h)},c=()=>i.classList.add("visible"),l=()=>i.classList.remove("visible");n.addEventListener("input",s),n.addEventListener("pointerdown",c),n.addEventListener("pointerup",l),n.addEventListener("pointerleave",l),n.addEventListener("focus",c),n.addEventListener("blur",l),s()}n.dataset.enhancedRange="1"}function Kt(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let e=t=>{let o=t.closest("label");if(!o||o.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px",o.querySelector("span").appendChild(r);let a=t.closest("form");if(a&&!a.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",a.insertBefore(i,a.querySelector(".form-actions")||a.lastElementChild)}};n.querySelectorAll("[required]").forEach(t=>{e(t)})}function Zt(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(e),e.addEventListener("keydown",o=>{if(o.key==="Enter"||o.key==="Tab"){let r=e.value.trim();if(r){o.preventDefault();let a=t.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=r;let l=document.createElement("input");l.type=a,l.name=t.name||n.getAttribute("data-name")||"open-group",l.value=r,l.id=i,s.appendChild(c),s.appendChild(l),n.insertBefore(s,e),e.value=""}}else if(o.key==="Backspace"&&e.value===""){o.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Jt(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="class"){let i=n.classList.contains("btn-working"),s=n.querySelector("pds-icon");if(i)if(s)e||(e=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),n.insertBefore(c,n.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&s&&(t?(s.remove(),t=!1):e&&(s.setAttribute("icon",e),e=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Qt=new Map([["nav[data-dropdown]",qt],["label[data-toggle]",Gt],['input[type="range"]',Vt],["form[data-required]",Kt],["fieldset[role=group][data-open]",Zt],["button, a[class*='btn-']",Jt]]),ht=ut.map(n=>({...n,run:Qt.get(n.selector)||(()=>{})}));var mt="pds",Yt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,gt=/^[a-z]:/i;function ee(n=""){return n.endsWith("/")?n:`${n}/`}function Xt(n="",e=mt){let t=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function er(n){return n.replace(/^\.\/+/,"")}function tr(n){return gt.test(n)?n.replace(gt,"").replace(/^\/+/,""):n}function rr(n){return n.startsWith("public/")?n.substring(7):n}function ft(n,e={}){let t=e.segment||mt,o=e.defaultRoot||`/assets/${t}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return ee(o);let a=r.trim();return a?(a=a.replace(/\\/g,"/"),a=Xt(a,t),a=ee(a),Yt.test(a)?a:(a=er(a),a=tr(a),a.startsWith("/")||(a=rr(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(i,s)=>s===0?i:"/")),ee(a))):ee(o)}function bt(n){let e=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let a="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let c=r.measureText(a).width;r.font=`${i} "${e}", ${s}`;let l=r.measureText(a).width;return c!==l}function or(n){return n?n.split(",").map(o=>o.trim())[0].replace(/['"]/g,"").trim():null}async function ar(n,e={}){if(!n)return Promise.resolve();let{weights:t=[400,500,600,700],italic:o=!1}=e,r=or(n);if(!r||bt(r))return Promise.resolve();let a=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=o?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${a}:${d}&display=swap`,l.setAttribute("data-font-loader",r),l.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},l.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),c(new Error(`Failed to load font: ${r}`))},document.head.appendChild(l),setTimeout(()=>{bt(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function yt(n){if(!n)return Promise.resolve();let e=new Set;n.fontFamilyHeadings&&e.add(n.fontFamilyHeadings),n.fontFamilyBody&&e.add(n.fontFamilyBody),n.fontFamilyMono&&e.add(n.fontFamilyMono);let t=Array.from(e).map(o=>ar(o).catch(r=>{console.warn(`Could not load font: ${o}`,r)}));await Promise.all(t)}var Re=class extends EventTarget{},f=new Re;f.initializing=!1;f.currentPreset=null;f.Generator=E;f.registry=V;f.ontology=Ne;f.adoptLayers=He;f.adoptPrimitives=Ie;f.createStylesheet=qe;f.isLiveMode=()=>V.isLive;f.enums=u;f.ask=dt;f.common=_e;f.presets=T;f.findComponentForElement=Oe;f.query=async function(n){return await new ue(f).search(n)};function kt(n){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:n}):new Event("pds:ready");f.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(f,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(f,"compiled",{get(){return f.registry?.isLive&&E.instance?E.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=f);typeof document<"u"&&f.addEventListener("pds:ready",n=>{let e=n.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var Fe="pure-ds-theme",N=null,te=null;function St(n){try{if(typeof document>"u")return;let e="light";n?n==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=n:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function $t(n){try{if(N&&te){try{typeof N.removeEventListener=="function"?N.removeEventListener("change",te):typeof N.removeListener=="function"&&N.removeListener(te)}catch{}N=null,te=null}if(n==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=o=>{let r=o?.matches===void 0?e.matches:o.matches;try{let a=r?"dark":"light";document.documentElement.setAttribute("data-theme",a),f.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:a,source:"system"}}))}catch{}};N=e,te=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(f,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(Fe)||null}catch{return null}},set(n){try{if(typeof window>"u")return;n==null?localStorage.removeItem(Fe):localStorage.setItem(Fe,n),St(n),$t(n),f.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:n,source:"api"}}))}catch{}}});f.defaultEnhancers=ht;function zt(n={},e={}){let t=Number(e.minContrast||4.5),o=s=>{let c=String(s||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},r=s=>{let{r:c,g:l,b:d}=o(s),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(s,c)=>{if(!s||!c)return 0;let l=r(s),d=r(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},i=[];try{let c=new f.Generator({design:structuredClone(n)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=a(l.primaryFill,"#ffffff");d<t&&i.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=a(l.surfaceBg,l.surfaceText);p<t&&i.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=a(l.primaryText,l.surfaceBg);h<t&&i.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let w={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},b=a(w.primaryFill,"#ffffff");b<t&&i.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${b.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:b,min:t,context:"dark/btn-primary"});let m=a(w.primaryText,w.surfaceBg);m<t&&i.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${m.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:m,min:t,context:"dark/outline"})}}catch(s){i.push({path:"/",message:`Validation failed: ${String(s?.message||s)}`,ratio:0,min:0})}return{ok:i.length===0,issues:i}}f.validateDesign=zt;function ir(n=[],e={}){let t=[],o=Array.isArray(n)?n:n&&typeof n=="object"?Object.values(n):[];for(let r of o){let a,i=null;if(typeof r=="string"){let l=String(r).toLowerCase(),d=T?.[l]||Object.values(T||{}).find(p=>re(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:r,ok:!1,issues:[{path:"/",message:`Preset not found: ${r}`,ratio:0,min:0}]});continue}a=d.name||l,i=structuredClone(d)}else if(r&&typeof r=="object")if(a=r.name||r.preset||void 0,"preset"in r||"design"in r){let l=String(r.preset||"default").toLowerCase(),d=T?.[l]||Object.values(T||{}).find(h=>re(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:a,ok:!1,issues:[{path:"/",message:`Preset not found: ${r.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);r.design&&typeof r.design=="object"&&(p=Pe(p,structuredClone(r.design))),i=p}else i=r;if(!i){t.push({name:a,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:s,issues:c}=zt(i,e);t.push({name:a,ok:s,issues:c})}return{ok:t.every(r=>r.ok),results:t}}f.validateDesigns=ir;function Et({manageTheme:n,themeStorageKey:e}){let t="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{St(o),$t(o)}catch{}o?o==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=o:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:o}}function Pe(n={},e={}){if(!e||typeof e!="object")return n;let t=Array.isArray(n)?[...n]:{...n};for(let[o,r]of Object.entries(e))r&&typeof r=="object"&&!Array.isArray(r)?t[o]=Pe(t[o]&&typeof t[o]=="object"?t[o]:{},r):t[o]=r;return t}function re(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ae(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>ae(t)).filter(t=>t!==void 0);let e={};for(let t in n)if(n.hasOwnProperty(t)){let o=n[t];if(typeof o!="function"){let r=ae(o);r!==void 0&&(e[t]=r)}}return e}var sr=/^[a-z][a-z0-9+\-.]*:\/\//i,oe=(()=>{try{return import.meta.url}catch{return}})();function ge(n,e={}){if(!n||sr.test(n))return n;let{preferModule:t=!0}=e,o=()=>{if(!oe)return null;try{return new URL(n,oe).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(t?o()||r():r()||o())||n}var me=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n,wt=(()=>{if(oe)try{let n=new URL(oe);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",oe).href}catch{return}})();function Mt(n){let e=!!(n?.public?.root||n?.static?.root),t=ft(n);return!e&&wt&&(t=wt),me(ge(t))}function At(n={},e={}){let t=typeof n=="object"&&("colors"in n||"typography"in n||"spatialRhythm"in n||"shape"in n||"behavior"in n||"layout"in n||"advanced"in n||"a11y"in n||"components"in n||"icons"in n),o=n&&n.enhancers;o&&!Array.isArray(o)&&(o=Object.values(o));let r=o??e.enhancers??[],a=n&&n.preset,i=n&&n.design,s="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,l=null;if(s){let d=String(a||"default").toLowerCase(),p=T?.[d]||Object.values(T||{}).find(A=>re(A.name)===d||String(A.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${a||"default"}"`);l={id:p.id||re(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(i&&typeof i=="object"){let A=ae(i);h=Pe(h,structuredClone(A))}let{mode:g,autoDefine:w,applyGlobalStyles:b,manageTheme:m,themeStorageKey:M,preloadStyles:R,criticalLayers:_,preset:S,design:$,enhancers:z,log:L,...fe}=n;c={...fe,design:h,preset:l.name,log:L||ie}}else if(t){let{log:d,...p}=n;c={design:structuredClone(p),log:d||ie}}else{let d=T?.default||Object.values(T||{}).find(p=>re(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:ie}}return{generatorConfig:c,enhancers:r,presetInfo:l}}async function Ct(n){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:o=null,enhancers:r=[],autoDefineOverrides:a=null,autoDefinePreferModule:i=!0}=n,s=(()=>{let l=new Map;return(f.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(r||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let b=await Promise.resolve().then(()=>(xt(),vt));l=b?.AutoDefiner||b?.default?.AutoDefiner||b?.default||null}catch(b){console.warn("AutoDefiner not available:",b?.message||b)}let d=b=>{switch(b){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${b}.js`}},{mapper:p,...h}=a&&typeof a=="object"?a:{},w={baseURL:e&&me(ge(e,{preferModule:i})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(b,m)=>{typeof b=="string"&&b.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${b}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${b}>:`,m)},...h,mapper:b=>{if(customElements.get(b))return null;if(typeof o=="function")try{let m=o(b);return m===void 0?d(b):m}catch(m){return console.warn("Custom autoDefine.mapper error; falling back to default:",m?.message||m),d(b)}return d(b)}};l&&(c=new l(w),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:w.mapper,onError:w.onError}))}return{autoDefiner:c}}async function cr(n){if(!n||typeof n!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let s=`
3462
3462
  html { opacity: 0; }
3463
3463
  html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
3464
3464
  `;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(s),l._pdsFouc=!0,document.adoptedStyleSheets=[l,...document.adoptedStyleSheets]}}catch(c){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",c),!document.head.querySelector("style[data-pds-fouc]")){let d=document.createElement("style");d.setAttribute("data-pds-fouc",""),d.textContent=s,document.head.insertBefore(d,document.head.firstChild)}}}let e=n.applyGlobalStyles??!0,t=n.manageTheme??!0,o=n.themeStorageKey??"pure-ds-theme",r=n.preloadStyles??!1,a=n.criticalLayers??["tokens","primitives"],i=n&&n.autoDefine||null;try{let{resolvedTheme:s,storedTheme:c}=Et({manageTheme:t,themeStorageKey:o}),l=At(n,{}),d=l.enhancers,{log:p,...h}=l.generatorConfig,g=structuredClone(h);g.log=p,t&&(g.theme=s);let w=new f.Generator(g);if(g.design?.typography)try{await yt(g.design.typography)}catch(S){g?.log?.("warn","Failed to load some fonts from Google Fonts:",S)}if(r&&typeof window<"u"&&document.head)try{let S=a.map($=>{try{return w.css?.[$]||""}catch(z){return g?.log?.("warn",`Failed to generate critical CSS for layer "${$}":`,z),""}}).filter($=>$.trim()).join(`
@@ -34,11 +34,11 @@ export const enhancerMetadata = [
34
34
  `.trim(),
35
35
  },
36
36
  {
37
- selector: "form [required]",
37
+ selector: "form[data-required]",
38
38
  description:
39
39
  "Enhances required form fields using an asterisk in the label.",
40
40
  demoHtml: `
41
- <form action'#" method="post">
41
+ <form data-required action="#" method="post">
42
42
  <label>
43
43
  <span>Field Label</span>
44
44
  <input type="text" required>
@@ -212,26 +212,38 @@ function enhanceRange(elem) {
212
212
  }
213
213
 
214
214
  function enhanceRequired(elem) {
215
- const label = elem.closest("label");
216
- if (!label) return;
217
- if (label.querySelector(".required-asterisk")) return;
218
-
219
- const asterisk = document.createElement("span");
220
- asterisk.classList.add("required-asterisk");
221
- asterisk.textContent = "*";
222
- asterisk.style.marginLeft = "4px";
223
- label.querySelector("span").appendChild(asterisk);
224
-
225
- const form = elem.closest("form");
226
- if (form && !form.querySelector(".required-legend")) {
227
- const legend = document.createElement("small");
228
- legend.classList.add("required-legend");
229
- legend.textContent = "* Required fields";
230
- form.insertBefore(
231
- legend,
232
- form.querySelector(".form-actions") || form.lastElementChild
233
- );
215
+
216
+ if (elem.dataset.enhancedRequired) return;
217
+ elem.dataset.enhancedRequired = "true";
218
+
219
+ const enhanceRequiredField = (input) => {
220
+
221
+ const label = input.closest("label");
222
+ if (!label) return;
223
+ if (label.querySelector(".required-asterisk")) return;
224
+
225
+ const asterisk = document.createElement("span");
226
+ asterisk.classList.add("required-asterisk");
227
+ asterisk.textContent = "*";
228
+ asterisk.style.marginLeft = "4px";
229
+ label.querySelector("span").appendChild(asterisk);
230
+
231
+ const form = input.closest("form");
232
+ if (form && !form.querySelector(".required-legend")) {
233
+ const legend = document.createElement("small");
234
+ legend.classList.add("required-legend");
235
+ legend.textContent = "* Required fields";
236
+ form.insertBefore(
237
+ legend,
238
+ form.querySelector(".form-actions") || form.lastElementChild
239
+ );
240
+ }
234
241
  }
242
+
243
+ elem.querySelectorAll("[required]").forEach((input) => {
244
+ enhanceRequiredField(input);
245
+ });
246
+
235
247
  }
236
248
 
237
249
  function enhanceOpenGroup(elem) {
@@ -342,7 +354,7 @@ const enhancerRunners = new Map([
342
354
  ["nav[data-dropdown]", enhanceDropdown],
343
355
  ["label[data-toggle]", enhanceToggle],
344
356
  ['input[type="range"]', enhanceRange],
345
- ["form[data-required] [required]", enhanceRequired],
357
+ ["form[data-required]", enhanceRequired],
346
358
  ["fieldset[role=group][data-open]", enhanceOpenGroup],
347
359
  ["button, a[class*='btn-']", enhanceButtonWorking],
348
360
  ]);