@domphy/ui 0.20.12 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
- "use strict";var Domphy=(()=>{var ot=Object.defineProperty,tn=Object.defineProperties,on=Object.getOwnPropertyDescriptor,rn=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertyNames,So=Object.getOwnPropertySymbols;var wo=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable;var xo=(e,t,r)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))wo.call(t,r)&&xo(e,r,t[r]);if(So)for(var r of So(t))an.call(t,r)&&xo(e,r,t[r]);return e},te=(e,t)=>tn(e,rn(t));var rt=(e,t)=>{for(var r in t)ot(e,r,{get:t[r],enumerable:!0})},ln=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nn(t))!wo.call(e,i)&&i!==r&&ot(e,i,{get:()=>t[i],enumerable:!(o=on(t,i))||o.enumerable});return e};var sn=e=>ln(ot({},"__esModule",{value:!0}),e);var Xl={};rt(Xl,{core:()=>it,theme:()=>mt,ui:()=>Ct});var it={};rt(it,{AttributeList:()=>Fo,BooleanAttributes:()=>Vt,CamelAttributes:()=>Mo,ElementList:()=>Ko,ElementNode:()=>U,HtmlAttributeNames:()=>Ot,HtmlTags:()=>Bt,Notifier:()=>Ke,PrefixCSS:()=>ve,RawHTML:()=>Uo,RecordState:()=>An,State:()=>Pt,SvgTags:()=>Oo,VoidTags:()=>Do,_microtask:()=>Ht,_resetKeylessWarnings:()=>Tn,batch:()=>Rn,behavior:()=>jt,computed:()=>Pn,configure:()=>hn,effect:()=>Go,effectScope:()=>Ln,flushPendingNotifiers:()=>Ao,flushSync:()=>Mn,hasPendingNotifiers:()=>zo,hashString:()=>Ie,isRawHTML:()=>Ue,isState:()=>gn,merge:()=>z,nextTick:()=>zn,peek:()=>bn,rawHtml:()=>we,readonly:()=>yn,runBatched:()=>$o,toState:()=>y,untrack:()=>In,watch:()=>$n});var cn=Object.defineProperty,ko=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,Co=(e,t,r)=>t in e?cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Eo=(e,t)=>{for(var r in t||(t={}))mn.call(t,r)&&Co(e,r,t[r]);if(ko)for(var r of ko(t))un.call(t,r)&&Co(e,r,t[r]);return e},Vt=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","controls","declare","default","defer","disabled","formNoValidate","hidden","isMap","itemScope","loop","multiple","muted","noHref","noShade","noValidate","open","playsInline","readonly","required","reversed","scoped","selected","sortable","trueSpeed","typeMustMatch","wmode","inert","download","noModule","paused","autoPictureInPicture"],Mo=["viewBox","preserveAspectRatio","gradientTransform","gradientUnits","spreadMethod","markerStart","markerMid","markerEnd","markerHeight","markerWidth","markerUnits","refX","refY","patternContentUnits","patternTransform","patternUnits","filterUnits","primitiveUnits","kernelUnitLength","clipPathUnits","maskContentUnits","maskUnits","baseFrequency","numOctaves","xChannelSelector","yChannelSelector","stdDeviation","colorInterpolationFilters","pathLength"],Ot={htmlFor:"for",allowFullScreen:"allowfullscreen",autoFocus:"autofocus",autoPlay:"autoplay",formNoValidate:"formnovalidate",isMap:"ismap",itemScope:"itemscope",noHref:"nohref",noShade:"noshade",noValidate:"novalidate",playsInline:"playsinline",trueSpeed:"truespeed",typeMustMatch:"typemustmatch",noModule:"nomodule",autoPictureInPicture:"autopictureinpicture",autoCapitalize:"autocapitalize",contentEditable:"contenteditable",spellCheck:"spellcheck",accessKey:"accesskey",enterKeyHint:"enterkeyhint",inputMode:"inputmode",itemId:"itemid",itemProp:"itemprop",itemRef:"itemref",itemType:"itemtype",tabIndex:"tabindex",writingSuggestions:"writingsuggestions",charSet:"charset",hrefLang:"hreflang",crossOrigin:"crossorigin",aLink:"alink",bgColor:"bgcolor",vLink:"vlink",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formTarget:"formtarget",popoverTarget:"popovertarget",popoverTargetAction:"popovertargetaction",allowPaymentRequest:"allowpaymentrequest",allowUserMedia:"allowusermedia",frameBorder:"frameborder",longDesc:"longdesc",marginHeight:"marginheight",marginWidth:"marginwidth",referrerPolicy:"referrerpolicy",srcDoc:"srcdoc",hSpace:"hspace",fetchPriority:"fetchpriority",srcSet:"srcset",srcLang:"srclang",useMap:"usemap",vSpace:"vspace",dirName:"dirname",imageSizes:"imagesizes",imageSrcSet:"imagesrcset",classId:"classid",codeBase:"codebase",codeType:"codetype",valueType:"valuetype",shadowRootClonable:"shadowrootclonable",shadowRootDelegatesFocus:"shadowrootdelegatesfocus",shadowRootMode:"shadowrootmode",colSpan:"colspan",rowSpan:"rowspan",noWrap:"nowrap",vAlign:"valign",charOff:"charoff",maxLength:"maxlength",minLength:"minlength",autoComplete:"autocomplete",encType:"enctype",dateTime:"datetime"},Bt=["a","abbr","address","article","aside","audio","b","base","blockquote","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","slot","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","bdi","bdo","math","menu","search","area","embed","hr","animate","animateMotion","animateTransform","circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","tbreak","text","textPath","tspan","use","view"],ve={transform:["webkit","ms"],transition:["webkit","ms"],animation:["webkit"],userSelect:["webkit","ms"],flexDirection:["webkit","ms"],flexWrap:["webkit","ms"],justifyContent:["webkit","ms"],alignItems:["webkit","ms"],alignSelf:["webkit","ms"],order:["webkit","ms"],flexGrow:["webkit","ms"],flexShrink:["webkit","ms"],flexBasis:["webkit","ms"],columns:["webkit"],columnCount:["webkit"],columnGap:["webkit"],columnRule:["webkit"],columnWidth:["webkit"],boxSizing:["webkit"],appearance:["webkit","moz"],filter:["webkit"],backdropFilter:["webkit"],clipPath:["webkit"],mask:["webkit"],maskImage:["webkit"],textSizeAdjust:["webkit","ms"],hyphens:["webkit","ms"],writingMode:["webkit","ms"],gridTemplateColumns:["ms"],gridTemplateRows:["ms"],gridAutoColumns:["ms"],gridAutoRows:["ms"],gridColumn:["ms"],gridRow:["ms"],marginInlineStart:["webkit"],marginInlineEnd:["webkit"],paddingInlineStart:["webkit"],paddingInlineEnd:["webkit"],minInlineSize:["webkit"],maxInlineSize:["webkit"],minBlockSize:["webkit"],maxBlockSize:["webkit"],inlineSize:["webkit"],blockSize:["webkit"],tabSize:["moz"],overscrollBehavior:["webkit","ms"],touchAction:["ms"],resize:["webkit"],printColorAdjust:["webkit"],backgroundClip:["webkit"],boxDecorationBreak:["webkit"],overflowScrolling:["webkit"]},Oo=["svg","circle","path","rect","ellipse","line","polyline","polygon","g","defs","use","symbol","linearGradient","radialGradient","stop","clipPath","mask","filter","text","tspan","textPath","image","pattern","marker","animate","animateTransform","animateMotion","feGaussianBlur","feComposite","feColorMatrix","feMerge","feMergeNode","feOffset","feFlood","feBlend","feTurbulence","feDisplacementMap","feComponentTransfer","feFuncR","feFuncG","feFuncB","feFuncA","foreignObject"],Do=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],Lo={};function hn(e){Object.assign(Lo,e)}function dn(){return Lo}var fn=["onAbort","onAuxClick","onBeforeMatch","onBeforeToggle","onBlur","onCancel","onCanPlay","onCanPlayThrough","onChange","onClick","onClose","onContextLost","onContextMenu","onContextRestored","onCopy","onCueChange","onCut","onDblClick","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onDurationChange","onEmptied","onEnded","onError","onFocus","onFormData","onInput","onInvalid","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadedData","onLoadedMetadata","onLoadStart","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","onPause","onPlay","onPlaying","onProgress","onRateChange","onReset","onResize","onScroll","onScrollEnd","onSecurityPolicyViolation","onSeeked","onSeeking","onSelect","onSlotChange","onStalled","onSubmit","onSuspend","onTimeUpdate","onToggle","onVolumeChange","onWaiting","onWheel","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onCompositionStart","onCompositionUpdate","onCompositionEnd","onTransitionEnd","onTransitionStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onFullscreenChange","onFullscreenError","onFocusIn","onFocusOut"],pn=fn.reduce((e,t)=>{let r=t.slice(2).toLowerCase();return e[r]=t,e},{}),Po=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=r=>{this._releases.add(r)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},Fe=[],Dt=0;function Nt(){return Dt>0?null:Fe.length?Fe[Fe.length-1]:null}function Ro(e,t){Fe.push(e);try{return t()}finally{Fe.pop()}}function Io(e){Dt++;try{return e()}finally{Dt--}}var oe=[],Ht=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},_o=100,nt=0,Lt=new Set,Re=new Set;function $o(e){nt++;try{return e()}finally{if(nt--,nt===0){let t=Lt;Lt=new Set;for(let r of t)r._scheduleFlush()}}}var Ke=class{constructor(){this._listeners=Object.create(null),this._pending=new Map,this._scheduled=!1,this._flushing=new Map,this._selfDepth=0}_dispose(){if(this._listeners)for(let e in this._listeners)this._listeners[e].clear();this._listeners=null}addListener(e,t){if(!this._listeners)return()=>{};if(typeof e!="string"||typeof t!="function")throw new Error("Event name must be a string, listener must be a function");this._listeners[e]||(this._listeners[e]=new Set);let r=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(r)),r}removeListener(e,t){if(!this._listeners)return;let r=this._listeners[e];r&&r.has(t)&&(r.delete(t),r.size===0&&delete this._listeners[e])}listenerCount(e){var t,r,o;return(o=(r=(t=this._listeners)==null?void 0:t[e])==null?void 0:r.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let r=oe.length?oe[oe.length-1]:null;if(r&&r[0]===this&&r[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=_o){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${_o} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...oe]})}nt>0?Lt.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,Re.add(this),Ht(()=>this._flushAll()))}_isCircular(e){let t=oe.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let r=[...oe.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
2
- ${r.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,Re.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:r,chain:o}]of e)oe=o,this._flush(t,r);oe=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let r=this._listeners[e];if(r){oe.push([this,e]),this._flushing.set(e,t);for(let o of[...r])if(r.has(o))try{o(...t)}catch(i){console.error(i)}this._flushing.delete(e),oe.pop()}}};function zo(){return Re.size>0}function Ao(){let e=0;for(;Re.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...Re];Re.clear();for(let r of t)r._flushAll()}}var Pt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new Ke,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Nt();t&&this.addListener(t.handler)}return this._value}set(e){this._notifier&&(this._value=e,this._notifier.notify(this.name,e))}reset(){this.set(this.initialValue)}addListener(e){return this._notifier?this._notifier.addListener(this.name,e):()=>{}}removeListener(e){this._notifier&&this._notifier.removeListener(this.name,e)}_dispose(){this._notifier&&(this._notifier._dispose(),this._notifier=null)}};function z(e={},t={}){let r=["animation","transition","boxShadow","textShadow","background","fontFamily"],o=["class","rel","transform","acceptCharset","sandbox"],i=["content"];Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t)===Object.prototype&&(t=de(t));for(let n in t){let a=t[n];if(a!=null)if(typeof a=="object"&&!Array.isArray(a))typeof e[n]=="object"?e[n]=z(e[n],a):e[n]=a;else if(r.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(", ")}}else e[n]=[e[n],a].filter(s=>s).join(", ");else if(i.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join("")}}else e[n]=[e[n],a].filter(s=>s).join("");else if(o.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(" ")}}else e[n]=[e[n],a].filter(s=>s).join(" ");else if(n.startsWith("on")){let s=n.replace("on","").toLowerCase();Sn(e,s,a)}else if(n.startsWith("_on")){let s=n.replace("_on","");vn(e,s,a)}else e[n]=a}return e}function Ie(e=""){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return String.fromCharCode(97+t%26)+t.toString(16)}function y(e,t){return e instanceof Pt||e!=null&&e._isState?e:new Pt(e,t)}function gn(e){return typeof e=="object"&&e!==null&&e._isState===!0}function yn(e){return{_isState:!0,get(t){return e.get(t)}}}function bn(e){return Io(()=>e(void 0))}function jt(e,t,r){return{_behaviors:{[e]:{attach:t,props:r}}}}function vn(e,t,r){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...n)=>{i(...n),r(...n)}:e[o]=r}function Sn(e,t,r){let o=pn[t];if(!o)throw Error(`invalid event name "${t}"`);let i=e[o];typeof i=="function"?e[o]=(n,a)=>{i(n,a),r(n,a)}:e[o]=r}function de(e,t=new WeakMap){if(e===null||typeof e!="object"||typeof e=="function")return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e)){r=[],t.set(e,r);for(let i of e)r.push(de(i,t));return r}if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Map){r=new Map,t.set(e,r);for(let[i,n]of e)r.set(de(i,t),de(n,t));return r}if(e instanceof Set){r=new Set,t.set(e,r);for(let i of e)r.add(de(i,t));return r}if(ArrayBuffer.isView(e))return new e.constructor(e);if(e instanceof ArrayBuffer)return e.slice(0);let o=Object.getPrototypeOf(e);if(o!==Object.prototype)return e;r=Object.create(o),t.set(e,r);for(let i of Reflect.ownKeys(e))r[i]=de(e[i],t);return r}function Vo(e,t=!1){if(Object.prototype.toString.call(e)!=="[object Object]")throw Error(`typeof ${e} is invalid DomphyElement`);let r=Object.keys(e);if(r.length===0&&!t)throw Error("element object has no tag key");for(let o=0;o<r.length;o++){let i=r[o],n=e[i];if(o===0&&!Bt.includes(i)&&!t)throw Error(`key ${i} is not valid HTML tag name`);if(i==="style"&&n&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"style" must be a object');if(i==="$")e.$.forEach(a=>Vo(a,!0));else{if(i.startsWith("_on")&&typeof n!="function")throw Error(`hook ${i} value "${n}" must be a function `);if(i.startsWith("on")&&typeof n!="function")throw Error(`event ${i} value "${n}" must be a function `);if(i==="_portal"&&typeof n!="function")throw Error('"_portal" must be a function return HTMLElement');if(i==="_context"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_context" must be a object');if(i==="_metadata"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_metadata" must be a object');if(i==="_key"&&typeof n!="string"&&typeof n!="number")throw Error('"_key" must be a string or number')}}return!0}function xn(e){let t=e.replace(/<script\b[^>]*>[\s\S]*?<\/script\s*>/gi,"");return t=t.replace(/<script\b[^>]*\/>/gi,""),t=t.replace(/<script\b[^>]*>[\s\S]*$/gi,""),t=t.replace(/\s+on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,""),t=t.replace(/\/on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,"/"),t=t.replace(/((?:href|src|action|formaction)\s*=\s*)(["']?)[\s]*javascript:[^"'\s>]*/gi,"$1$2#"),t}function Bo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function No(e){return Object.keys(e).find(t=>Bt.includes(t))}function Ho(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function wn(e){if(e.indexOf("@")===0)return[e];for(var t=[],r=0,o=0,i="",n=0,a=e.length;n<a;n++){var s=e[n];if(s==="(")r+=1;else if(s===")")r-=1;else if(s==="[")o+=1;else if(s==="]")o-=1;else if(s===","&&!r&&!o){t.push(i.trim()),i="";continue}i+=s}return t.push(i.trim()),t}function Rt(e){let t=e.trim();return t.startsWith("@")?t.replace(/\s+/g,""):t.replace(/\s*([>+~,])\s*/g,"$1").replace(/\s+/g," ").replace(/\(\s*odd\s*\)/g,"(2n+1)").replace(/\(\s*even\s*\)/g,"(2n)").trim()}function kn(e,t){for(let r=0;r<e.length;r++){let o=e[r],i=null;typeof o.selectorText=="string"?i=Rt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Rt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function jo(e,t){var r;let o=e.querySelector("#domphy-style");if(!o){o=document.createElement("style"),o.id="domphy-style";let i=t!=null?t:dn().cspNonce;i&&(o.nonce=i),e.appendChild(o)}return o.dataset.domphyBase!=="true"&&((r=o.sheet)==null||r.insertRule("[hidden] { display: none !important; }",0),o.dataset.domphyBase="true"),o}var It=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(r=>z(t,It(r))),delete e.$,z(t,e),t}else return e},Cn={translate:["yes","no"],autoCapitalize:["on","off"],contentEditable:["true","false"],spellCheck:["true","false"]},En=class{constructor(e,t,r){this.declaredValue=void 0,this._notifier=new Ke,this._releases=[],this._removeHooked=!1,this.parent=r,this.isBoolean=Vt.includes(e),this.enumeratedBoolean=Cn[e],Mo.includes(e)?this.name=e:Object.hasOwn(Ot,e)?this.name=Ot[e]:this.name=Ho(e),this.value=void 0,this.set(t)}normalize(e){return this.enumeratedBoolean&&typeof e=="boolean"?e?this.enumeratedBoolean[0]:this.enumeratedBoolean[1]:e}render(){if(!this.parent||!this.parent.domElement)return;let e=this.parent.domElement,t=["value"];this.isBoolean?this.value===!1||this.value==null?e.removeAttribute(this.name):e.setAttribute(this.name,this.value===!0?"":this.value):this.value==null?e.removeAttribute(this.name):t.includes(this.name)?e[this.name]=this.value:e.setAttribute(this.name,this.value)}set(e){var t,r;let o=this.value;if(this.declaredValue=e,this._releases.length){for(let i of this._releases)i();this._releases=[]}if(e==null)this.value=null;else if(typeof e=="function"){let i=()=>{if(!this.parent||this.parent._disposed)return;let n=this.value;this.value=this.isBoolean?!!e(i):this.normalize(e(i)),this.render(),n!==this.value&&this._notifier.notify(this.name,this.value)};i.elementNode=this.parent,i.debug=`class:${(t=this.parent)==null?void 0:t.tagName}_${(r=this.parent)==null?void 0:r.nodeId} attribute:${this.name}`,i.onSubscribe=n=>{this._releases.push(n),this.parent&&!this._removeHooked&&(this._removeHooked=!0,this.parent.addHook("BeforeRemove",()=>{for(let a of this._releases)a();this._releases=[],i=null}))},this.value=this.isBoolean?!!e(i):this.normalize(e(i))}else this.value=this.isBoolean?!!e:this.normalize(e);this.render(),o!==this.value&&this._notifier.notify(this.name,this.value)}addListener(e){let t=e;t.onSubscribe=r=>{var o;return(o=this.parent)==null?void 0:o.addHook("BeforeRemove",r)},this._notifier.addListener(this.name,t)}remove(){this.parent&&this.parent.attributes&&this.parent.attributes.remove(this.name),this._dispose()}_dispose(){for(let e of this._releases)e();this._releases=[],this._notifier._dispose(),this.value=null,this.parent=null}generateHTML(){let{name:e,value:t}=this;if(this.isBoolean)return t?`${e}`:"";if(t==null)return"";let r=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${Bo(String(r))}"`}},Fo=class{constructor(e){this.items={},this.parent=e}generateHTML(){if(!this.items)return"";let e=Object.values(this.items).map(t=>t.generateHTML()).filter(Boolean).join(" ");return e?` ${e}`:""}get(e){var t;if(this.items)return(t=this.items[e])==null?void 0:t.value}set(e,t){!this.items||!this.parent||(this.items[e]?this.items[e].set(t):this.items[e]=new En(e,t,this.parent))}addListener(e,t){this.has(e)&&this.items[e].addListener(t)}has(e){return this.items?Object.hasOwn(this.items,e):!1}remove(e){var t,r;if(!this.items)return;let o=(r=(t=this.items[e])==null?void 0:t.name)!=null?r:e;this.items[e]&&(this.items[e]._dispose(),delete this.items[e]),this.parent&&this.parent.domElement&&this.parent.domElement instanceof Element&&this.parent.domElement.removeAttribute(o)}_dispose(){if(this.items)for(let e in this.items)this.items[e]._dispose();this.items=null,this.parent=null}toggle(e,t){if(!Vt.includes(e))throw Error(`${e} is not a boolean attribute`);t===!0?this.set(e,!0):t===!1?this.remove(e):this.has(e)?this.remove(e):this.set(e,!0)}addClass(e){var t,r;if(!e||typeof e!="string"&&typeof e!="function")return;let o=(u,d)=>{let m=(u||"").split(" ").filter(h=>h);return!m.includes(d)&&m.push(d),m.join(" ")},i=(r=(t=this.items)==null?void 0:t.class)==null?void 0:r.declaredValue,n=typeof i=="function",a=n?i:this.get("class"),s=typeof e=="function";if(!n&&!s){this.set("class",o(a,e));return}this.set("class",u=>o(n?a(u):a,s?e(u):e))}hasClass(e){return!e||typeof e!="string"?!1:(this.get("class")||"").split(" ").filter(t=>t).includes(e)}toggleClass(e){!e||typeof e!="string"||(this.hasClass(e)?this.removeClass(e):this.addClass(e))}removeClass(e){if(!e||typeof e!="string")return;let t=(this.get("class")||"").split(" ").filter(r=>r).filter(r=>r!==e);t.length>0?this.set("class",t.join(" ")):this.remove("class")}replaceClass(e,t){!e||!t||typeof e!="string"||typeof t!="string"||this.hasClass(e)&&(this.removeClass(e),this.addClass(t))}},Se=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",_n=class{constructor(e,t,r){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Ho(e),this.parentRule=r,this.set(t)}_domUpdate(){if(!this.parentRule)return;let e=this.parentRule.domRule;if(e&&e.style){let t=e.style;t.setProperty(this.cssName,String(this.value)),ve[this.name]&&ve[this.name].forEach(r=>{t.setProperty(`-${r}-${this.cssName}`,String(this.value))})}}_dispose(){if(this._releases.length){for(let e of this._releases)e();this._releases=[]}this.value="",this.parentRule=null}set(e){var t,r,o,i;if(this._releases.length){for(let n of this._releases)n();this._releases=[]}if(typeof e=="function"){let n=(()=>{var a;!this.parentRule||(a=this.parentRule.parentNode)!=null&&a._disposed||(this.value=e(n),this._domUpdate())});n.onSubscribe=a=>{this._releases.push(a)},n.elementNode=this.parentRule.root,n.debug=`class:${(r=(t=this.parentRule)==null?void 0:t.root)==null?void 0:r.tagName}_${(i=(o=this.parentRule)==null?void 0:o.root)==null?void 0:i.nodeId} style:${this.name}`,this.value=e(n)}else this.value=e;this._domUpdate()}remove(){if(this.parentRule){if(this.parentRule.domRule instanceof CSSStyleRule){let e=this.parentRule.domRule.style;e.removeProperty(this.cssName),ve[this.name]&&ve[this.name].forEach(t=>{e.removeProperty(`-${t}-${this.cssName}`)})}delete this.parentRule.styleBlock[this.name],this._dispose()}}cssText(){let e=`${this.cssName}: ${this.value}`;return ve[this.name]&&ve[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},he=class $t{constructor(t,r){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Wo(this),this.parent=r}_dispose(){if(this.styleBlock)for(let t of Object.values(this.styleBlock))t._dispose();this.styleList&&this.styleList._dispose(),this.styleBlock=null,this.styleList=null,this.domRule=null,this.parent=null}get root(){let t=this.parent;for(;t instanceof $t;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof $t;)t=t.parent;return t}insertStyle(t,r){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(r):this.styleBlock[t]=new _n(t,r,this))}removeStyle(t){this.styleBlock&&this.styleBlock[t]&&this.styleBlock[t].remove()}cssText(){if(!this.styleBlock||!this.styleList)return"";let t=Object.values(this.styleBlock).map(o=>o.cssText()).join(";"),r=this.styleList.cssText();return`${this.selectorText} { ${t} ${r} } `}mount(t){!t||!this.styleList||(this.domRule=t,"cssRules"in t&&this.styleList.mount(t.cssRules))}remove(){if(this.domRule&&this.domRule.parentStyleSheet){let t=this.domRule.parentStyleSheet,r=t.cssRules;for(let o=0;o<r.length;o++)if(r[o]===this.domRule){t.deleteRule(o);break}}this._dispose()}render(t){if(!this.styleBlock||!this.styleList)return;let r=Object.values(this.styleBlock).map(o=>o.cssText()).join(";");try{if(this.selectorText.startsWith("@")){if(/^@(media|supports|container|layer)\b/.test(this.selectorText)){let o=t.insertRule(`${this.selectorText} {}`,t.cssRules.length),i=t.cssRules[o];"cssRules"in i&&(this.mount(i),this.styleList.render(i))}else if(this.selectorText.startsWith("@keyframes")||this.selectorText.startsWith("@font-face")){let o=this.cssText(),i=t.insertRule(o,t.cssRules.length),n=t.cssRules[i];this.mount(n)}}else{let o=`${this.selectorText} { ${r} }`,i=t.insertRule(o,t.cssRules.length),n=t.cssRules[i];n&&"selectorText"in n&&this.mount(n)}}catch(o){console.warn("Failed to insert rule:",this.selectorText,o)}}},Wo=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof he;)e=e.parent;return e}addCSS(e,t=""){if(!this.items||!this.parent)return;let r={},o=[];function i(n,a){return n.startsWith("&")?`${a}${n.slice(1)}`:`${a} ${n}`}for(let n in e){let a=e[n],s=wn(n);for(let u of s){let d=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new he(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new he(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new he(u,this.parent);for(let h in a)m.insertStyle(h,a[h]);this.items.push(m)}else if(typeof a=="object"&&a!=null){let m=new he(d,this.parent);this.items.push(m);for(let[h,g]of Object.entries(a))if(typeof g=="object"&&g!=null){let S=i(h,d);this.addCSS(g,S)}else m.insertStyle(h,g)}else r[u]=a}}if(Object.keys(r).length){let n=new he(t,this.parent);for(let a in r)n.insertStyle(a,r[a]);this.items.push(n)}for(let n of o)this.items.push(n)}cssText(){return this.items?this.items.map(e=>e.cssText()).join(""):""}patchCSS(e,t=""){var r;if(!this.items||!this.parent)return;let o={};for(let s in e){let u=e[s];typeof u=="object"&&u!=null||(o[s]=u)}let i=this.items.find(s=>s.selectorText===t);i||(i=new he(t,this.parent),this.items.push(i));let n=new Set(Object.keys(o));for(let s in o)i.insertStyle(s,o[s]);if(i.styleBlock)for(let s of Object.keys(i.styleBlock))n.has(s)||i.removeStyle(s);let a=(r=this.domStyle)==null?void 0:r.sheet;!i.domRule&&a&&i.render(a)}insertRule(e){if(!this.items||!this.parent)return null;let t=this.items.find(r=>r.selectorText===e);return t||(t=new he(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let r=e.get(Rt(t.selectorText));r&&t.mount(r)}}mount(e){if(!this.items)return;if(!e)throw Error("Require domRuleList argument");let t=0,r=o=>o.replace("(odd)","(2n+1)").replace("(even)","(2n)");this.items.forEach((o,i)=>{let n=i-t,a=e[n];a&&(o.selectorText.startsWith("@")&&a instanceof CSSKeyframesRule||"keyText"in a?o.mount(a):"selectorText"in a?a.selectorText!==r(o.selectorText)?t+=1:o.mount(a):"cssRules"in a&&o.mount(a))})}render(e){e instanceof HTMLStyleElement?(this.domStyle=e,this.items.forEach(t=>t.render(e.sheet))):e instanceof CSSGroupingRule&&this.items.forEach(t=>t.render(e))}_dispose(){if(this.items)for(let e=0;e<this.items.length;e++)this.items[e]._dispose();this.items=[],this.parent=null,this.domStyle=null}},U=class Pe{constructor(t,r=null,o=0){this._disposed=!1,this._beforeRemoveFired=!1,this._imperative=!1,this.type="ElementNode",this.parent=null,this._childrenReleaseHooked=!1,this._behaviorInstances=new Map,this._pendingBehaviors=new Map,this._behaviorMountHooked=!1,this._behaviorTeardownHooked=!1,this.children=new Ko(this),this.styles=new Wo(this),this.attributes=new Fo(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,n;t=de(t),Vo(t),t.style=t.style||{},this.parent=r,this.tagName=No(t),t=It(t),this.key=(i=t._key)!=null?i:null,this._context=t._context||{},this._metadata=t._metadata||{};let a=`${(n=this.parent)==null?void 0:n.nodeId}.${o}`,s=JSON.stringify(t.style||{},(d,m)=>typeof m=="function"?a:m);this.nodeId=Ie(a+s),this.attributes.addClass(`${this.tagName}_${this.nodeId}`),t._onSchedule&&t._onSchedule(this,t),this.merge(t);let u=t[this.tagName];u!=null&&(typeof u=="function"?this._setupFunctionChildren(u):this.children.update(Array.isArray(u)?u:[u])),this._hooks.Init&&this._hooks.Init(this)}_setupFunctionChildren(t){let r=()=>{if(!this._disposed)try{let i=t(r);this.children.update(Array.isArray(i)?i:[i])}catch(i){this._handleError(i)}};r.elementNode=this,r.debug=`class:${this.tagName}_${this.nodeId} children`;let o=[];r.onSubscribe=i=>{o.push(i),this._childrenRelease=()=>{for(let n of o)n();o.length=0,r=null},this._childrenReleaseHooked||(this._childrenReleaseHooked=!0,this.addHook("BeforeRemove",()=>{var n;(n=this._childrenRelease)==null||n.call(this),this._childrenRelease=void 0}))},r()}_createDOMNode(){let t=Oo.includes(this.tagName)?document.createElementNS("http://www.w3.org/2000/svg",this.tagName):document.createElement(this.tagName);if(this.domElement=t,this._events)for(let r in this._events)this._bindEvent(r);return this.attributes&&Object.values(this.attributes.items).forEach(r=>r.render()),t}_bindEvent(t){if(!this.domElement||this._boundEvents.has(t))return;this._boundEvents.add(t);let r=o=>{var i,n;return(n=(i=this._events)==null?void 0:i[t])==null?void 0:n.call(i,o,this)};this.domElement.addEventListener(t,r),this.addHook("BeforeRemove",o=>{var i;(i=o.domElement)==null||i.removeEventListener(t,r),r=null})}_dispose(){var t,r,o,i;this._disposed||(this._disposed=!0,this._beforeRemoveFired||(this._beforeRemoveFired=!0,(r=(t=this._hooks).BeforeRemove)==null||r.call(t,this,()=>{})),this.children&&this.children._dispose(),this.styles&&(this.styles.items.forEach(n=>n.remove()),this.styles._dispose()),this.attributes&&this.attributes._dispose(),(i=(o=this._hooks).Remove)==null||i.call(o,this),this.domElement=null,this._hooks={},this._events=null,this._context={},this._metadata={},this.parent=null)}merge(t){z(this._context,t._context),z(this._metadata,t._metadata),this._processBehaviors(t._behaviors);let r=Object.keys(t);for(let o=0;o<r.length;o++){let i=r[o],n=t[i];["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName].includes(i)||(["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"].includes(i)?this.addHook(i.substring(3),n):i.startsWith("on")?this.addEvent(i.substring(2).toLowerCase(),n):i==="_portal"?this._portal=n:i==="class"?(typeof n=="string"||typeof n=="function")&&this.attributes.addClass(n):this.attributes.set(i,n))}t.style&&this.styles.addCSS(t.style||{},`.${`${this.tagName}_${this.nodeId}`}`)}patch(t){var r;let o=de(t);o.style=o.style||{},o=It(o);let i=o[this.tagName];if(typeof i=="function")(r=this._childrenRelease)==null||r.call(this),this._childrenRelease=void 0,this._setupFunctionChildren(i);else if(i!=null){let m=Array.isArray(i)?i:[i];this.children.update(m,!!this.domElement,!0)}o._context&&z(this._context,o._context),o._metadata&&z(this._metadata,o._metadata),this._processBehaviors(o._behaviors),this.styles.patchCSS(o.style||{},`.${this.tagName}_${this.nodeId}`);let n=`${this.tagName}_${this.nodeId}`,a=["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName],s=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),d=null;this._events={};for(let m of Object.keys(o)){if(a.includes(m)||s.includes(m)||m==="_portal")continue;let h=o[m];m.startsWith("on")&&typeof h=="function"?this.addEvent(m.substring(2).toLowerCase(),h):m==="class"&&(typeof h=="string"||typeof h=="function")?d=h:(this.attributes.set(m,h),u.add(m))}if(typeof d=="function"){let m=d;this.attributes.set("class",h=>`${n} ${m(h)}`)}else this.attributes.set("class",d?`${n} ${d}`:n);if(this.attributes.items)for(let m of Object.keys(this.attributes.items))u.has(m)||this.attributes.remove(m);if(this._events)for(let m in this._events)this._bindEvent(m)}_handleError(t){let r=this;for(;r;){if(r._hooks.Error){let o=r;r._hooks.Error(o,t,()=>{o.children.update([])});return}r=r.parent}console.error("[Domphy] Unhandled error in reactive child:",t)}addEvent(t,r){this._events=this._events||{};let o=this._events[t];typeof o=="function"?this._events[t]=(i,n)=>{o(i,n),r(i,n)}:this._events[t]=r}addHook(t,r){let o=this._hooks[t];if(typeof o=="function"){let i=((...n)=>{o(...n),r(...n)});try{Object.defineProperty(i,"length",{value:Math.max(o.length,r.length),configurable:!0})}catch(n){}this._hooks[t]=i}else this._hooks[t]=r}getRoot(){let t=this;for(;t&&t instanceof Pe&&t.parent;)t=t.parent;return t}_processBehaviors(t){var r;if(t)for(let o of Object.keys(t)){let i=t[o],n=this._behaviorInstances.get(o);n?(r=n.update)==null||r.call(n,i.props):this.domElement?this._attachBehaviorNow(o,i):(this._pendingBehaviors.set(o,i),this._ensureBehaviorMountHook())}}_attachBehaviorNow(t,r){let o=r.attach(this,r.props)||{};this._behaviorInstances.set(t,o),this._ensureBehaviorTeardownHook()}_ensureBehaviorMountHook(){this._behaviorMountHooked||(this._behaviorMountHooked=!0,this.addHook("Mount",()=>{if(this._pendingBehaviors.size===0)return;let t=this._pendingBehaviors;this._pendingBehaviors=new Map,t.forEach((r,o)=>this._attachBehaviorNow(o,r))}))}_ensureBehaviorTeardownHook(){this._behaviorTeardownHooked||(this._behaviorTeardownHooked=!0,this.addHook("BeforeRemove",()=>{this._behaviorInstances.forEach(t=>{var r;return(r=t.destroy)==null?void 0:r.call(t)}),this._behaviorInstances.clear()}))}getBehavior(t){let r=this;for(;r;){let o=r._behaviorInstances.get(t);if(o)return o;r=r.parent}}getContext(t){let r=this;for(;r&&(!r._context||!Object.hasOwn(r._context,t));)r=r.parent;return r&&r._context?r._context[t]:void 0}setContext(t,r){this._context=this._context||{},this._context[t]=r}getMetadata(t){return this._metadata?this._metadata[t]:void 0}setMetadata(t,r){this._metadata=this._metadata||{},this._metadata[t]=r}generateCSS(){if(!this.styles||!this.children)return"";let t=this.styles.cssText();return t+=this.children.items.map(r=>r instanceof Pe?r.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(Do.includes(this.tagName))return`<${this.tagName}${t}>`;let r=this.children.generateHTML();return`<${this.tagName}${t}>${r}</${this.tagName}>`}mount(t,r){if(!t)throw new Error("Missing dom node on bind");if(Se&&!r&&this.parent===null&&t.childNodes.length>0&&console.warn("[Domphy] mount() was called without a style element on already-rendered DOM. Reactive style updates after hydration will be dropped \u2014 pass the server-rendered <style> element as the second argument to mount()."),this.domElement=t,this._events)for(let o in this._events)this._bindEvent(o);if(this.children&&this.children.items.forEach((o,i)=>{let n=t.childNodes[i];if(o instanceof Pe){if(!n)return;o.mount(n)}else n?o.domText=n:this.tagName==="textarea"&&o.render(t)}),r){let o=r.sheet;o&&this._hydrateStyles(kn(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_hydrateStyles(t){var r;if((r=this.styles)==null||r.hydrate(t),this.children)for(let o of this.children.items)o instanceof Pe&&o._hydrateStyles(t)}render(t){let r=this._createDOMNode();t.appendChild(r),this._hooks.Mount&&this._hooks.Mount(this);let o=this.getRoot().styles.domStyle,i=t.getRootNode(),n=i instanceof ShadowRoot?i:document.head;return o||(o=jo(n)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Pe&&a._portal){let s=a._portal(this.getRoot());s&&a.render(s)}else a.render(r)}),r}remove(){if(this.parent)this.parent.children.remove(this);else{let t=()=>{var r;(r=this.domElement)==null||r.remove(),this._dispose()};if(this._hooks.BeforeRemove&&this.domElement){let r=!1,o=()=>{r||(r=!0,t())},i=this._hooks.BeforeRemove;this._beforeRemoveFired=!0,i(this,o),i.length<2&&!r?o():Se&&!r&&setTimeout(()=>{r||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else t()}}},Uo=class{constructor(e){this.__domphyRawHTML=!0,this.html=e}};function we(e){return new Uo(e)}function Ue(e){return typeof e=="object"&&e!==null&&e.__domphyRawHTML===!0}var To="\u200B",Mt=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.html=Ue(e);let r=this.html?e.html:e;this.text=r===""?this.emptyText():String(r)}emptyText(){var e;return((e=this.parent)==null?void 0:e.tagName)==="textarea"?"":To}_createDOMNode(){let e;if(this.html){let t=document.createElement("template");t.innerHTML=this.text.trim(),t.content.querySelectorAll("*").forEach(r=>{for(let o of Array.from(r.attributes))/^on/i.test(o.name)?r.removeAttribute(o.name):/^(?:href|src|action|formaction)$/i.test(o.name)&&/^\s*javascript:/i.test(o.value)&&r.setAttribute(o.name,"#")}),e=t.content.firstChild||document.createTextNode("")}else e=document.createTextNode(this.text);return this.domText=e,e}setText(e){var t;let r=Ue(e),o=r?e.html:e,i=o===""?this.emptyText():String(o);if(i===this.text&&r===this.html&&this.domText)return;let n=this.html;if(this.text=i,this.html=r,!this.domText)return;if(!n&&!r&&this.domText.nodeType===3){this.domText.nodeValue=i;return}let a=this.domText,s=this._createDOMNode();(t=a.parentNode)==null||t.replaceChild(s,a)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text===To?"&#8203;":this.html?xn(this.text):Bo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},zt=new Set;function Tn(){zt.clear()}var Ko=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return Ue(e)?new Mt(e,this.owner):typeof e=="object"&&e!==null?new U(e,this.owner,this._nextKey++):new Mt(e==null?"":String(e),this.owner)}_domReferenceAfter(e){let t=this.owner.domElement;if(!t)return null;for(let r=e;r<this.items.length;r++){let o=this.items[r],i=o instanceof U?o.domElement:o.domText;if(i&&i.parentNode===t)return i}return null}_moveDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof U?e.domElement:e.domText;if(!o)return;let i=this._domReferenceAfter(t+1);o!==i&&r.insertBefore(o,i)}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof U?e.domElement:e.domText,i=t instanceof U?t.domElement:t.domText;if(!o||!i)return;let n=o.nextSibling,a=i.nextSibling;r.insertBefore(o,a),r.insertBefore(i,n)}update(e,t=!0,r=!1){var o,i,n,a;if(this.items.some(p=>p._imperative)){let p=this.items.filter(b=>!b._imperative),f=this.items.filter(b=>b._imperative);this.items=p.concat(f)}let s=this.items.slice(),u=new Map;for(let p of s)p instanceof U&&p.key!==null&&p.key!==void 0&&!p._imperative&&!p._beforeRemoveFired&&u.set(p.key,p);!r&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let d=new Set(s),m=new Set,h=0,g=Se&&s.length>0?e.length!==s.length:!1;for(let p=0;p<e.length;p++){let f=e[p],b=typeof f=="object"&&f!==null&&!Ue(f),k=b?f._key:void 0,_=b?No(f):void 0;if(Se&&b&&k===void 0&&h++,k!==void 0){let w=u.get(k);if(w instanceof U&&w.tagName===_){u.delete(k);let O=this.items.indexOf(w);if(O!==p&&O>=0){let D=!!w._portal;this.move(O,p,D?!1:t,!0)}w.parent=this.owner,w.patch(f),m.add(w);continue}}else if(b){let w=this.items[p];if(w instanceof U&&w.key==null&&w.tagName===_&&d.has(w)&&!m.has(w)&&!w._imperative&&!w._beforeRemoveFired){w.parent=this.owner,w.patch(f),m.add(w);continue}}else{let w=this.items[p];if(w instanceof Mt&&d.has(w)&&!m.has(w)&&!w._imperative){w.setText(f==null?"":f),m.add(w);continue}}m.add(this.insert(f,p,t,!0,!0))}let S=this.items.slice(e.length);for(let p of S)p._imperative||this.remove(p,t,!0);if(u.forEach(p=>this.remove(p,t,!0)),Se&&s.length>0&&h>0&&g){let p=this.owner.nodeId;if(!zt.has(p)){zt.add(p);let f=`[domphy] unkeyed list length changed \u2014 DOM nodes reused by position may not match their data slot (focus/scroll/input-value drift). Add _key to each item. (parent <${this.owner.tagName}>, ${h} unkeyed item${h===1?"":"s"})`;console.warn(f)}}r||(a=(n=this.owner._hooks)==null?void 0:n.Update)==null||a.call(n,this.owner)}insert(e,t,r=!0,o=!1,i=!1){let n=this.items.length,a=typeof t!="number"||Number.isNaN(t)||t<0||t>n?n:t,s=this._createNode(e);if(s._imperative=!i,this.items.splice(a,0,s),s instanceof U){s._hooks.Insert&&s._hooks.Insert(s);let u=this.owner.domElement;if(r&&u)if(s._portal){let d=s._portal(this.owner.getRoot());d&&s.render(d)}else{let d=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m);let h=u.getRootNode(),g=h instanceof ShadowRoot?h:document.head,S=jo(g);s.styles.render(S),s._hooks.Mount&&s._hooks.Mount(s),s.children.items.forEach(p=>{if(p instanceof U&&p._portal){let f=p._portal(p.getRoot());f&&p.render(f)}else p.render(d)})}}else{let u=this.owner.domElement;if(r&&u){let d=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),s}remove(e,t=!0,r=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof U){if(e._beforeRemoveFired)return;let i=()=>{let n=e.domElement,a=this.items.indexOf(e);a>=0&&this.items.splice(a,1),t&&n&&n.remove(),e._dispose()};if(e._hooks.BeforeRemove&&e.domElement){let n=!1,a=()=>{n||(n=!0,i())},s=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,s(e,a),s.length<2&&!n?a():Se&&!n&&setTimeout(()=>{n||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter (e.g. an exit animation) but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else i()}else{let i=e.domText;this.items.splice(o,1),t&&i&&i.remove(),e._dispose()}!r&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}}clear(e=!0,t=!1){if(this.items.length===0)return;let r=this.items.slice();for(let o of r)this.remove(o,e,!0);!t&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}_dispose(){this.items.forEach(e=>e._dispose()),this.items=[]}swap(e,t,r=!0,o=!1){if(e<0||t<0||e>=this.items.length||t>=this.items.length||e===t)return;let i=this.items[e],n=this.items[t];this.items[e]=n,this.items[t]=i,r&&this._swapDomElement(i,n),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}move(e,t,r=!0,o=!1){if(e<0||e>=this.items.length||t<0||t>=this.items.length||e===t)return;let i=this.items[e];this.items.splice(e,1),this.items.splice(t,0,i),r&&this._moveDomElement(i,t),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}generateHTML(){let e="";for(let t of this.items)e+=t.generateHTML();return e}},xe=new Set,At=!1;function qo(e){xe.add(e),!At&&(At=!0,Ht(Yo))}function Yo(){for(At=!1;xe.size>0;){let e=[...xe];xe.clear();for(let t of e)try{t()}catch(r){console.error("[Domphy] Uncaught error in effect:",r)}}}function Mn(){let e=0;for(;zo()||xe.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}Ao(),Yo()}}var We=[];function On(){return We.length?We[We.length-1]:null}function Ft(e){let t=On();t&&t._add(e)}var Dn=class{constructor(){this._disposers=new Set,this._stopped=!1}_add(e){if(this._stopped){e();return}this._disposers.add(e)}run(e){if(this._stopped)return Se&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();We.push(this);try{return e()}finally{We.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function Ln(){let e=new Dn;return Ft(()=>e.stop()),e}function Go(e){let t=!1,r=!1,o=()=>{t||n()},i=new Po(()=>{t||qo(o)}),n=()=>{if(!(t||r)){r=!0,i.reset();try{Ro(i,e)}finally{r=!1}}},a=()=>{t||(t=!0,i.reset(),xe.delete(o))};return Ft(a),n(),a}function Pn(e){let t="computed",r=new Ke,o,i=!0,n=!1,a=()=>{i&&r.listenerCount(t)>0&&d()},s=new Po(()=>{i||(i=!0,qo(a))}),u=()=>{s.reset(),o=Ro(s,e),i=!1,n=!0},d=()=>{let h=o,g=n;u(),!(g&&o===h)&&r.notify(t,o)},m=h=>{if(h)r.addListener(t,h);else{let g=Nt();g&&r.addListener(t,g.handler)}return i&&(n&&r.listenerCount(t)>0?d():u()),o};return Ft(()=>{s.reset(),xe.delete(a),r._dispose()}),{_isState:!0,_notifier:r,get:m}}function Rn(e){return $o(e)}function In(e){return Io(e)}function $n(e,t,r){let o,i=!0;return Go(()=>{let n=typeof e=="function"?e():e.get();(!i||r!=null&&r.immediate)&&t(n,o),o=n,i=!1})}function zn(e){return e?Promise.resolve().then(e):Promise.resolve()}var An=class{constructor(e){this._notifier=new Ke,this.initialRecord=Eo({},e),this._record=Eo({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let r=Nt();r&&this._notifier.addListener(e,r.handler)}return this._record[e]}set(e,t){this._record[e]=t,this._notifier.notify(e,t)}addListener(e,t){return this._notifier.addListener(e,t)}removeListener(e,t){this._notifier.removeListener(e,t)}reset(e){this.set(e,this.initialRecord[e])}_dispose(){this._notifier._dispose()}};var mt={};rt(mt,{COLOR_ROLES:()=>ti,ElementTones:()=>qe,applySystemTheme:()=>ei,generateTheme:()=>li,getTheme:()=>re,setTheme:()=>Zn,themeApply:()=>Jn,themeCSS:()=>qt,themeColor:()=>l,themeColorToken:()=>Qt,themeDensity:()=>v,themeFluidSpacing:()=>Qn,themeName:()=>ct,themeSize:()=>x,themeSpacing:()=>c,themeTokens:()=>rr,themeVars:()=>st});var Vn=e=>{let t=r=>{let o=Math.max(0,Math.min(1,r)),i=o<=.0031308?12.92*o:1.055*Math.pow(o,1/2.4)-.055;return Math.max(0,Math.min(255,Math.round(i*255)))};return e.map(t)},Bn=e=>{let t=r=>r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;return e.map(t)},Nn=e=>{let[t,r,o]=Vn(e);return t=t.toString(16).padStart(2,"0"),r=r.toString(16).padStart(2,"0"),o=o.toString(16).padStart(2,"0"),`#${t}${r}${o}`},at=e=>{let t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255;return Bn([t,r,o])},Hn=e=>{let t=.4122214708*e[0]+.5363325363*e[1]+.0514459929*e[2],r=.2119034982*e[0]+.6806995451*e[1]+.1073969566*e[2],o=.0883024619*e[0]+.2817188376*e[1]+.6299787005*e[2],i=Math.cbrt(t),n=Math.cbrt(r),a=Math.cbrt(o);return[.2104542553*i+.793617785*n-.0040720468*a,1.9779984951*i-2.428592205*n+.4505937099*a,.0259040371*i+.7827717662*n-.808675766*a]},jn=e=>{let[t,r,o]=e,i=t+.3963377774*r+.2158037573*o,n=t-.1055613458*r-.0638541728*o,a=t-.0894841775*r-1.291485548*o,s=i*i*i,u=n*n*n,d=a*a*a;return[4.0767416621*s-3.3077115913*u+.2309699292*d,-1.2684380046*s+2.6097574011*u-.3413193965*d,-.0041960863*s-.7034186147*u+1.707614701*d]};var Ut=e=>{let[t,r,o]=e,i=.4124564*t+.3575761*r+.1804375*o,n=.2126729*t+.7151522*r+.072175*o,a=.0193339*t+.119192*r+.9503041*o,s=.95047,u=1,d=1.08883,m=p=>p>.008856?Math.cbrt(p):7.787*p+16/116,h=m(i/s),g=m(n/u),S=m(a/d);return[116*g-16,500*(h-g),200*(g-S)]};var Xo=(e,t)=>{let[r,o,i]=e,[n,a,s]=t,u=(r+n)/2,d=Math.sqrt(o*o+i*i),m=Math.sqrt(a*a+s*s),h=(d+m)/2,g=.5*(1-Math.sqrt(Math.pow(h,7)/(Math.pow(h,7)+Math.pow(25,7)))),S=o*(1+g),p=a*(1+g),f=Math.sqrt(S*S+i*i),b=Math.sqrt(p*p+s*s),k=(f+b)/2,_=Math.atan2(i,S)*180/Math.PI+(Math.atan2(i,S)<0?360:0),w=Math.atan2(s,p)*180/Math.PI+(Math.atan2(s,p)<0?360:0),O=w-_;Math.abs(O)>180&&(O+=w<=_?360:-360);let D=Math.abs(_-w)>180?(_+w+360)/2:(_+w)/2,M=1-.17*Math.cos((D-30)*Math.PI/180)+.24*Math.cos(2*D*Math.PI/180)+.32*Math.cos((3*D+6)*Math.PI/180)-.2*Math.cos((4*D-63)*Math.PI/180),P=n-r,V=b-f,H=2*Math.sqrt(f*b)*Math.sin(O/2*Math.PI/180),j=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),ye=1+.045*k,De=1+.015*k*M,ue=30*Math.exp(-Math.pow((D-275)/25,2)),W=-(2*Math.sqrt(Math.pow(k,7)/(Math.pow(k,7)+Math.pow(25,7))))*Math.sin(2*ue*Math.PI/180);return Math.sqrt(Math.pow(P/j,2)+Math.pow(V/ye,2)+Math.pow(H/De,2)+W*(V/ye)*(H/De))};var Zo=e=>{if(e.length<1)return d=>0;let t=[...e].sort((d,m)=>d[0]-m[0]),r=[];for(let d=0;d<t.length;d++)(d===0||t[d][0]!==t[d-1][0])&&r.push(t[d]);let o=r.length;if(o===1)return d=>r[0][1];let i=r.map(d=>d[0]),n=r.map(d=>d[1]),a=[],s=[];for(let d=0;d<o-1;d++)a[d]=i[d+1]-i[d],s[d]=(n[d+1]-n[d])/a[d];let u=new Array(o);u[0]=s[0],u[o-1]=s[o-2];for(let d=1;d<o-1;d++){let m=s[d-1],h=s[d];if(m*h<=0)u[d]=0;else{let g=(1+a[d]/(a[d-1]+a[d]))/3;u[d]=m*h/((1-g)*m+g*h)}}return d=>{if(d<=i[0])return n[0];if(d>=i[o-1])return n[o-1];let m=0,h=o-2,g=0;for(;m<=h;){let w=Math.floor((m+h)/2);if(d>=i[w]&&d<=i[w+1]){g=w;break}d<i[w]?h=w-1:m=w+1}let S=a[g],p=(d-i[g])/S,f=p*p,b=f*p,k=u[g]*S,_=u[g+1]*S;return(2*b-3*f+1)*n[g]+(b-2*f+p)*k+(-2*b+3*f)*n[g+1]+(b-f)*_}};var Jo=.605,Wt=.685;function Fn(e){let t=Math.pow(e,Jo);return t/(1+Wt*(1-t))}function Wn(e){let t=e*(1+Wt)/(1+e*Wt);return Math.pow(t,1/Jo)}function Un(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function Kn(e){let t=[[0,0,0],...e,[1,1,1]].map(g=>Hn(g)).sort((g,S)=>g[0]-S[0]),r=t.map(g=>g[0]),o=t.map(g=>g[1]),i=t.map(g=>g[2]),n=[0],a=0;for(let g=1;g<t.length;g++)a+=Un(t[g],t[g-1]),n.push(a);let s=n.map(g=>Wn(a>0?g/a:0)),u=e.length===1?0:s[1],d=e.length===1?1:s[s.length-2],m=Zo(s.map((g,S)=>[g,o[S]])),h=Zo(s.map((g,S)=>[g,i[S]]));return{colorAtParam:g=>{let S=Fn(g),p=u+S*(d-u),f=0;for(let M=0;M<s.length-1;M++)if(p<=s[M+1]){f=M;break}let b=s[f],k=s[f+1],_=(p-b)/(k-b||1),w=r[f]+_*(r[f+1]-r[f]),O=m(p),D=h(p);return jn([w,O,D])},parameters:s.slice(1,-1).map(g=>(g-u)/(d-u))}}function Qo(e,t){let r=Array.isArray(e)?e:[e];if(r.length===0)throw new Error("generateRamp requires at least one anchor color");if(t<=0)return[];if(t===1)return[r[0]];let{colorAtParam:o,parameters:i}=Kn(r.map(at)),n=[],a=[0,...i,1],s=a.map(d=>Math.round(d*(t-1))),u=0;for(let d=0;d<t;d++){for(;u<s.length-2&&d>s[u+1];)u++;let m=s[u],h=s[u+1],g=a[u],S=a[u+1],p;if(h<=m)p=g;else{let f=(d-m)/(h-m);p=g+f*(S-g)}n.push(Nn(o(p)))}return n.reverse()}var qn={direction:"darken",colors:{primary:["#ffffff","#e3ecff","#c6daff","#aac8ff","#8fb6ff","#76a3ff","#5f91fc","#4a7ff4","#386ee7","#2a5ed7","#1e4ec2","#1440aa","#0c3290","#072674","#041a57","#020f38","#010419","#000000"],secondary:["#ffffff","#fce6ea","#faced6","#f7b5c2","#f29db0","#ec859e","#e36e8d","#d8597d","#ca456e","#b93460","#a42351","#8e1643","#770b36","#5f0529","#46031d","#2d0210","#130104","#000000"],info:["#ffffff","#dcf0f9","#b7e1f6","#90d2f1","#6ac3eb","#42b4e2","#16a4d5","#0094c4","#0084b2","#00739e","#00638a","#005476","#004461","#00354d","#002638","#001623","#00070d","#000000"],success:["#ffffff","#e3f3dc","#c6e8b8","#a9dd94","#8ed171","#75c450","#61b635","#51a51f","#429304","#358100","#2a7000","#215f00","#194d00","#123c00","#0b2b00","#051a00","#010900","#000000"],warning:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],attention:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],error:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],danger:["#ffffff","#ffe5e5","#ffcaca","#ffaeae","#ff9191","#ff7474","#ff5757","#f93a3a","#e82222","#d40f0f","#b80000","#9c0000","#800000","#640000","#480000","#2c0000","#140000","#000000"],highlight:["#ffffff","#f9f5cd","#f4eb95","#efe05a","#e6d427","#d3c100","#bfad00","#ab9b00","#988900","#857700","#736600","#615600","#4f4600","#3e3600","#2c2700","#1b1700","#090700","#000000"],neutral:["#ffffff","#ededed","#dbdbdb","#cacaca","#bababa","#ababab","#9b9b9b","#8d8d8d","#7e7e7e","#707070","#636363","#565656","#484848","#383838","#282828","#181818","#080808","#000000"]},baseTones:{highlight:5,warning:6,attention:6,error:8,danger:8,secondary:8,primary:9,info:8,success:8,neutral:8},fontSizes:["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],densities:[.75,1,1.5,2,2.5],darkBias:1,custom:{}},Ye=qn,Xt=e=>JSON.parse(JSON.stringify(e)),tr=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),$e={light:Xt(Ye),dark:Xn(Ye)},lt=null,Kt=new Map;function Jt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Yn(e){for(let t in e)if(!Object.keys(Ye).includes(t))throw new Error(`Invalid key: ${t}`);if(e.fontSizes&&!Array.isArray(e.fontSizes))throw new Error("fontSize must be array of string");if(e.densities&&(!Array.isArray(e.densities)||e.densities.some(t=>typeof t!="number")))throw new Error("densities must be array of number");if("custom"in e){let t=e.custom;if(typeof t!="object"||t===null)throw new Error("Invalid custom property: must be an object")}if("colors"in e){let t=e.colors;if(!(typeof t=="object"&&t!==null&&Object.values(t).every(r=>Array.isArray(r)&&r.every(o=>typeof o=="string"))))throw new Error("colors must be an object of string[]")}if("baseTones"in e){let t=e.baseTones;if(!(typeof t=="object"&&t!==null&&Object.values(t).every(r=>typeof r=="number")))throw new Error("baseTones must be an object of number")}if("direction"in e&&e.direction!=="lighten"&&e.direction!=="darken")throw new Error('direction must be "lighten" or "darken"')}function or(e,t){var r;for(let o of Object.keys(t))o==="__proto__"||o==="constructor"||o==="prototype"||(t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?((r=e[o])!=null||(e[o]={}),or(e[o],t[o])):e[o]=t[o])}function Gn(e,t){let r={},o=Jt(t);for(let n in t){let a=t[n];if(n==="colors")for(let s in t.colors)[...Array(o).keys()].forEach(u=>r[`--${s}-${u}`]=t.colors[s][u]);else if(n==="fontSizes")[...Array(8).keys()].forEach(s=>r[`--fontSize-${s}`]=t.fontSizes[s]);else if(n==="custom"&&a&&typeof a=="object")for(let s in a)r[`--custom-${tr(s)}`]=a[s]}let i="";for(let n in r)i+=` ${n}: ${r[n]};
1
+ "use strict";var Domphy=(()=>{var at=Object.defineProperty,mr=Object.defineProperties,ur=Object.getOwnPropertyDescriptor,hr=Object.getOwnPropertyDescriptors,dr=Object.getOwnPropertyNames,Do=Object.getOwnPropertySymbols;var Oo=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable;var Mo=(e,t,n)=>t in e?at(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N=(e,t)=>{for(var n in t||(t={}))Oo.call(t,n)&&Mo(e,n,t[n]);if(Do)for(var n of Do(t))fr.call(t,n)&&Mo(e,n,t[n]);return e},J=(e,t)=>mr(e,hr(t));var lt=(e,t)=>{for(var n in t)at(e,n,{get:t[n],enumerable:!0})},pr=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of dr(t))!Oo.call(e,i)&&i!==n&&at(e,i,{get:()=>t[i],enumerable:!(o=ur(t,i))||o.enumerable});return e};var gr=e=>pr(at({},"__esModule",{value:!0}),e);var ms={};lt(ms,{core:()=>ut,theme:()=>gt,ui:()=>Ot});var ut={};lt(ut,{AttributeList:()=>Xo,BooleanAttributes:()=>Wt,CamelAttributes:()=>zo,ElementList:()=>en,ElementNode:()=>U,HtmlAttributeNames:()=>It,HtmlTags:()=>Ut,Notifier:()=>Ye,PrefixCSS:()=>xe,RawHTML:()=>Qo,RecordState:()=>qr,State:()=>Nt,SvgTags:()=>Ao,VoidTags:()=>st,_microtask:()=>Kt,_resetKeylessWarnings:()=>zr,batch:()=>jr,behavior:()=>Ze,computed:()=>Hr,configure:()=>Sr,effect:()=>nn,effectScope:()=>Vr,flushPendingNotifiers:()=>Uo,flushSync:()=>Ar,getConfig:()=>Bo,hasPendingNotifiers:()=>Wo,hashString:()=>$e,isRawHTML:()=>Ge,isState:()=>kr,merge:()=>B,nextTick:()=>Ur,peek:()=>Er,rawHtml:()=>ke,readonly:()=>Cr,runBatched:()=>Fo,sanitizeHTMLString:()=>mt,toState:()=>y,untrack:()=>Fr,watch:()=>Wr});var yr=Object.defineProperty,Lo=Object.getOwnPropertySymbols,br=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable,Po=(e,t,n)=>t in e?yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$t=(e,t)=>{for(var n in t||(t={}))br.call(t,n)&&Po(e,n,t[n]);if(Lo)for(var n of Lo(t))vr.call(t,n)&&Po(e,n,t[n]);return e},Wt=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","controls","declare","default","defer","disabled","formNoValidate","hidden","isMap","itemScope","loop","multiple","muted","noHref","noShade","noValidate","open","playsInline","readonly","required","reversed","scoped","selected","sortable","trueSpeed","typeMustMatch","wmode","inert","download","noModule","paused","autoPictureInPicture"],zo=["viewBox","preserveAspectRatio","gradientTransform","gradientUnits","spreadMethod","markerStart","markerMid","markerEnd","markerHeight","markerWidth","markerUnits","refX","refY","patternContentUnits","patternTransform","patternUnits","filterUnits","primitiveUnits","kernelUnitLength","clipPathUnits","maskContentUnits","maskUnits","baseFrequency","numOctaves","xChannelSelector","yChannelSelector","stdDeviation","colorInterpolationFilters","pathLength"],It={htmlFor:"for",allowFullScreen:"allowfullscreen",autoFocus:"autofocus",autoPlay:"autoplay",formNoValidate:"formnovalidate",isMap:"ismap",itemScope:"itemscope",noHref:"nohref",noShade:"noshade",noValidate:"novalidate",playsInline:"playsinline",trueSpeed:"truespeed",typeMustMatch:"typemustmatch",noModule:"nomodule",autoPictureInPicture:"autopictureinpicture",autoCapitalize:"autocapitalize",contentEditable:"contenteditable",spellCheck:"spellcheck",accessKey:"accesskey",enterKeyHint:"enterkeyhint",inputMode:"inputmode",itemId:"itemid",itemProp:"itemprop",itemRef:"itemref",itemType:"itemtype",tabIndex:"tabindex",writingSuggestions:"writingsuggestions",charSet:"charset",hrefLang:"hreflang",crossOrigin:"crossorigin",aLink:"alink",bgColor:"bgcolor",vLink:"vlink",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formTarget:"formtarget",popoverTarget:"popovertarget",popoverTargetAction:"popovertargetaction",allowPaymentRequest:"allowpaymentrequest",allowUserMedia:"allowusermedia",frameBorder:"frameborder",longDesc:"longdesc",marginHeight:"marginheight",marginWidth:"marginwidth",referrerPolicy:"referrerpolicy",srcDoc:"srcdoc",hSpace:"hspace",fetchPriority:"fetchpriority",srcSet:"srcset",srcLang:"srclang",useMap:"usemap",vSpace:"vspace",dirName:"dirname",imageSizes:"imagesizes",imageSrcSet:"imagesrcset",classId:"classid",codeBase:"codebase",codeType:"codetype",valueType:"valuetype",shadowRootClonable:"shadowrootclonable",shadowRootDelegatesFocus:"shadowrootdelegatesfocus",shadowRootMode:"shadowrootmode",colSpan:"colspan",rowSpan:"rowspan",noWrap:"nowrap",vAlign:"valign",charOff:"charoff",maxLength:"maxlength",minLength:"minlength",autoComplete:"autocomplete",encType:"enctype",dateTime:"datetime"},Ut=["a","abbr","address","article","aside","audio","b","base","blockquote","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","slot","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","bdi","bdo","math","menu","search","area","embed","hr","animate","animateMotion","animateTransform","circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","tbreak","text","textPath","tspan","use","view"],xe={transform:["webkit","ms"],transition:["webkit","ms"],animation:["webkit"],userSelect:["webkit","ms"],flexDirection:["webkit","ms"],flexWrap:["webkit","ms"],justifyContent:["webkit","ms"],alignItems:["webkit","ms"],alignSelf:["webkit","ms"],order:["webkit","ms"],flexGrow:["webkit","ms"],flexShrink:["webkit","ms"],flexBasis:["webkit","ms"],columns:["webkit"],columnCount:["webkit"],columnGap:["webkit"],columnRule:["webkit"],columnWidth:["webkit"],boxSizing:["webkit"],appearance:["webkit","moz"],filter:["webkit"],backdropFilter:["webkit"],clipPath:["webkit"],mask:["webkit"],maskImage:["webkit"],textSizeAdjust:["webkit","ms"],hyphens:["webkit","ms"],writingMode:["webkit","ms"],gridTemplateColumns:["ms"],gridTemplateRows:["ms"],gridAutoColumns:["ms"],gridAutoRows:["ms"],gridColumn:["ms"],gridRow:["ms"],marginInlineStart:["webkit"],marginInlineEnd:["webkit"],paddingInlineStart:["webkit"],paddingInlineEnd:["webkit"],minInlineSize:["webkit"],maxInlineSize:["webkit"],minBlockSize:["webkit"],maxBlockSize:["webkit"],inlineSize:["webkit"],blockSize:["webkit"],tabSize:["moz"],overscrollBehavior:["webkit","ms"],touchAction:["ms"],resize:["webkit"],printColorAdjust:["webkit"],backgroundClip:["webkit"],boxDecorationBreak:["webkit"],overflowScrolling:["webkit"]},Ao=["svg","circle","path","rect","ellipse","line","polyline","polygon","g","defs","use","symbol","linearGradient","radialGradient","stop","clipPath","mask","filter","text","tspan","textPath","image","pattern","marker","animate","animateTransform","animateMotion","feGaussianBlur","feComposite","feColorMatrix","feMerge","feMergeNode","feOffset","feFlood","feBlend","feTurbulence","feDisplacementMap","feComponentTransfer","feFuncR","feFuncG","feFuncB","feFuncA","foreignObject"],st=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],No={};function Sr(e){Object.assign(No,e)}function Bo(){return $t({},No)}var xr=["onAbort","onAuxClick","onBeforeMatch","onBeforeToggle","onBlur","onCancel","onCanPlay","onCanPlayThrough","onChange","onClick","onClose","onContextLost","onContextMenu","onContextRestored","onCopy","onCueChange","onCut","onDblClick","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onDurationChange","onEmptied","onEnded","onError","onFocus","onFormData","onInput","onInvalid","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadedData","onLoadedMetadata","onLoadStart","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","onPause","onPlay","onPlaying","onProgress","onRateChange","onReset","onResize","onScroll","onScrollEnd","onSecurityPolicyViolation","onSeeked","onSeeking","onSelect","onSlotChange","onStalled","onSubmit","onSuspend","onTimeUpdate","onToggle","onVolumeChange","onWaiting","onWheel","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onCompositionStart","onCompositionUpdate","onCompositionEnd","onTransitionEnd","onTransitionStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onFullscreenChange","onFullscreenError","onFocusIn","onFocusOut"],wr=xr.reduce((e,t)=>{let n=t.slice(2).toLowerCase();return e[n]=t,e},{}),Vo=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=n=>{this._releases.add(n)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},qe=[],zt=0;function qt(){return zt>0?null:qe.length?qe[qe.length-1]:null}function Ho(e,t){qe.push(e);try{return t()}finally{qe.pop()}}function jo(e){zt++;try{return e()}finally{zt--}}var Y=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",ae=[],Kt=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},Ro=100,ct=0,At=new Set,Re=new Set;function Fo(e){ct++;try{return e()}finally{if(ct--,ct===0){let t=At;At=new Set;for(let n of t)n._scheduleFlush()}}}var Ye=class{constructor(){this._listeners=Object.create(null),this._pending=new Map,this._scheduled=!1,this._flushing=new Map,this._selfDepth=0}_dispose(){if(this._listeners)for(let e in this._listeners)this._listeners[e].clear();this._listeners=null}addListener(e,t){if(!this._listeners)return()=>{};if(typeof e!="string"||typeof t!="function")throw new Error("Event name must be a string, listener must be a function");this._listeners[e]||(this._listeners[e]=new Set);let n=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(n)),n}removeListener(e,t){var n;if(!this._listeners)return;let o=this._listeners[e];o&&o.has(t)&&(o.delete(t),o.size===0&&(delete this._listeners[e],(n=this._onEmpty)==null||n.call(this,e)))}listenerCount(e){var t,n,o;return(o=(n=(t=this._listeners)==null?void 0:t[e])==null?void 0:n.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let n=ae.length?ae[ae.length-1]:null;if(n&&n[0]===this&&n[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=Ro){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${Ro} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...ae]})}ct>0?At.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,Re.add(this),Kt(()=>this._flushAll()))}_isCircular(e){let t=ae.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let n=[...ae.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
2
+ ${n.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,Re.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:n,chain:o}]of e)ae=o,this._flush(t,n);ae=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let n=this._listeners[e];if(n){ae.push([this,e]),this._flushing.set(e,t);for(let o of[...n])if(n.has(o))try{o(...t)}catch(i){console.error(i)}this._flushing.delete(e),ae.pop()}}};function Wo(){return Re.size>0}function Uo(){let e=0;for(;Re.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...Re];Re.clear();for(let n of t)n._flushAll()}}var Nt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new Ye,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=qt();t&&this.addListener(t.handler)}return this._value}set(e){if(!this._notifier){Y&&console.warn(`[Domphy] State.set() called on a disposed state ("${this.name}") \u2014 the write is ignored. The state outlived its owner; keep a live reference or re-create it.`);return}this._value=e,this._notifier.notify(this.name,e)}reset(){this.set(this.initialValue)}addListener(e){return this._notifier?this._notifier.addListener(this.name,e):()=>{}}removeListener(e){this._notifier&&this._notifier.removeListener(this.name,e)}_dispose(){this._notifier&&(this._notifier._dispose(),this._notifier=null)}};function B(e={},t={}){let n=["animation","transition","boxShadow","textShadow","background","fontFamily"],o=["class","rel","transform","acceptCharset","sandbox"],i=["content"];Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t)===Object.prototype&&(t=ye(t));for(let r in t){let a=t[r];if(a!=null)if(typeof a=="object"&&!Array.isArray(a))typeof e[r]=="object"?e[r]=B(e[r],a):e[r]=a;else if(n.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let l=e[r];e[r]=u=>{let d=typeof l=="function"?l(u):l,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(", ")}}else e[r]=[e[r],a].filter(l=>l).join(", ");else if(i.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let l=e[r];e[r]=u=>{let d=typeof l=="function"?l(u):l,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join("")}}else e[r]=[e[r],a].filter(l=>l).join("");else if(o.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let l=e[r];e[r]=u=>{let d=typeof l=="function"?l(u):l,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(" ")}}else e[r]=[e[r],a].filter(l=>l).join(" ");else if(r.startsWith("on")){let l=r.replace("on","").toLowerCase();Tr(e,l,a)}else if(r.startsWith("_on")){let l=r.replace("_on","");_r(e,l,a)}else e[r]=a}return e}function $e(e=""){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return String.fromCharCode(97+t%26)+t.toString(16)}function y(e,t){return e instanceof Nt||e!=null&&e._isState?e:new Nt(e,t)}function kr(e){return typeof e=="object"&&e!==null&&e._isState===!0}function Cr(e){return{_isState:!0,get(t){return e.get(t)}}}function Er(e){return jo(()=>e(void 0))}function Ze(e,t,n){return{_behaviors:{[e]:{attach:t,props:n}}}}function _r(e,t,n){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...r)=>{i(...r),n(...r)}:e[o]=n}function Tr(e,t,n){let o=wr[t];if(!o)throw Error(`invalid event name "${t}"`);let i=e[o];typeof i=="function"?e[o]=(r,a)=>{i(r,a),n(r,a)}:e[o]=n}function ye(e,t=new WeakMap){if(e===null||typeof e!="object"||typeof e=="function")return e;if(t.has(e))return t.get(e);let n;if(Array.isArray(e)){n=[],t.set(e,n);for(let i of e)n.push(ye(i,t));return n}if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Map){n=new Map,t.set(e,n);for(let[i,r]of e)n.set(ye(i,t),ye(r,t));return n}if(e instanceof Set){n=new Set,t.set(e,n);for(let i of e)n.add(ye(i,t));return n}if(ArrayBuffer.isView(e))return new e.constructor(e);if(e instanceof ArrayBuffer)return e.slice(0);let o=Object.getPrototypeOf(e);if(o!==Object.prototype)return e;n=Object.create(o),t.set(e,n);for(let i of Reflect.ownKeys(e))n[i]=ye(e[i],t);return n}function qo(e,t=!1){if(Object.prototype.toString.call(e)!=="[object Object]")throw Error(`typeof ${e} is invalid DomphyElement`);let n=Object.keys(e);if(n.length===0&&!t)throw Error("element object has no tag key");for(let o=0;o<n.length;o++){let i=n[o],r=e[i];if(o===0&&!Ut.includes(i)&&!t)throw Error(`key ${i} is not valid HTML tag name`);if(i==="style"&&r&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"style" must be a object');if(i==="$"){if(!Array.isArray(r))throw Error(`"$" must be an array of patch objects, received ${r===null?"null":typeof r} on element { ${n.join(", ")} } \u2014 wrap patches in an array, e.g. $: [patch()]`);r.forEach(a=>qo(a,!0))}else{if(i.startsWith("_on")&&typeof r!="function")throw Error(`hook ${i} value "${r}" must be a function `);if(i.startsWith("on")&&typeof r!="function")throw Error(`event ${i} value "${r}" must be a function `);if(i==="_portal"&&typeof r!="function")throw Error('"_portal" must be a function return HTMLElement');if(i==="_context"&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"_context" must be a object');if(i==="_metadata"&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"_metadata" must be a object');if(i==="_key"&&typeof r!="string"&&typeof r!="number")throw Error('"_key" must be a string or number')}}return!0}function Dr(e){return e.replace(/&#(x?[0-9a-fA-F]+);/gi,(t,n)=>{let o=n[0]==="x"||n[0]==="X"?Number.parseInt(n.slice(1),16):Number.parseInt(n,10);return o>=0&&o<=1114111?String.fromCodePoint(o):""}).replace(/&Tab;/gi," ").replace(/&NewLine;/gi,`
3
+ `)}function Mr(e){let t=Dr(e).replace(/[\x00-\x20]+/g,"").toLowerCase();return t.startsWith("javascript:")||t.startsWith("vbscript:")||t.startsWith("data:text/html")||t.startsWith("data:application/xhtml+xml")}function Or(e){let t=e.toLowerCase(),n="",o=0;for(;o<e.length;){let i=t.indexOf("<",o);if(i===-1){n+=e.slice(o);break}n+=e.slice(o,i);let r=null,a=-1;for(let u=i+1;u<e.length;u++){let d=e[u];if(r)d===r&&(r=null);else if(d==='"'||d==="'")r=d;else if(d===">"){a=u;break}}if(a===-1){n+=e.slice(i);break}let l=e.slice(i,a+1);if(/^<script[\s/>]/i.test(l)){if(/\/\s*>$/.test(l)){o=a+1;continue}let u=t.indexOf("</script",a+1);if(u===-1){o=e.length;break}let d=e.indexOf(">",u);o=d===-1?e.length:d+1;continue}n+=l,o=a+1}return n}function mt(e){let t=Or(e);return t=t.replace(/\s+on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,""),t=t.replace(/\/on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,"/"),t=t.replace(/\s+srcdoc\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,""),t=t.replace(/\/srcdoc\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,"/"),t=t.replace(/((?:href|src|action|formaction|data)\s*=\s*)("([^"]*)"|'([^']*)'|([^\s>]*))/gi,(n,o,i,r,a,l)=>{var u,d;let m=(d=(u=r!=null?r:a)!=null?u:l)!=null?d:"";if(!Mr(m))return n;let h=r!==void 0?'"':a!==void 0?"'":"";return`${o}${h}#${h}`}),t}function Ko(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Go(e){return Object.keys(e).find(t=>Ut.includes(t))}function Yo(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Lr(e){if(e.indexOf("@")===0)return[e];for(var t=[],n=0,o=0,i="",r=0,a=e.length;r<a;r++){var l=e[r];if(l==="(")n+=1;else if(l===")")n-=1;else if(l==="[")o+=1;else if(l==="]")o-=1;else if(l===","&&!n&&!o){t.push(i.trim()),i="";continue}i+=l}return t.push(i.trim()),t}function Bt(e){let t=e.trim();return t.startsWith("@")?t.replace(/\s+/g,""):t.replace(/\s*([>+~,])\s*/g,"$1").replace(/\s+/g," ").replace(/\(\s*odd\s*\)/g,"(2n+1)").replace(/\(\s*even\s*\)/g,"(2n)").trim()}function Pr(e,t){for(let n=0;n<e.length;n++){let o=e[n],i=null;typeof o.selectorText=="string"?i=Bt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Bt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Zo(e,t){var n;let o=e.querySelector("#domphy-style");if(!o){o=document.createElement("style"),o.id="domphy-style";let i=t!=null?t:Bo().cspNonce;i&&(o.nonce=i),e.appendChild(o)}return o.dataset.domphyBase!=="true"&&((n=o.sheet)==null||n.insertRule("[hidden] { display: none !important; }",0),o.dataset.domphyBase="true"),o}var Vt=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(n=>B(t,Vt(n))),delete e.$,B(t,e),t}else return e},Rr={translate:["yes","no"],autoCapitalize:["on","off"],contentEditable:["true","false"],spellCheck:["true","false"]},$r=class{constructor(e,t,n){this.declaredValue=void 0,this._notifier=new Ye,this._releases=[],this._removeHooked=!1,this._listenerReleases=[],this._listenerRemoveHooked=!1,this.parent=n,this.isBoolean=Wt.includes(e),this.enumeratedBoolean=Rr[e],zo.includes(e)?this.name=e:Object.hasOwn(It,e)?this.name=It[e]:this.name=Yo(e),this.value=void 0,this.set(t)}normalize(e){return this.enumeratedBoolean&&typeof e=="boolean"?e?this.enumeratedBoolean[0]:this.enumeratedBoolean[1]:e}render(){if(!this.parent||!this.parent.domElement)return;let e=this.parent.domElement,t=["value"];this.isBoolean?this.value===!1||this.value==null?e.removeAttribute(this.name):e.setAttribute(this.name,this.value===!0?"":this.value):this.value==null?e.removeAttribute(this.name):t.includes(this.name)?e[this.name]=this.value:e.setAttribute(this.name,this.value)}set(e){var t,n;let o=this.value;if(this.declaredValue=e,this._releases.length){for(let i of this._releases)i();this._releases=[]}if(e==null)this.value=null;else if(typeof e=="function"){let i=()=>{if(!this.parent||this.parent._disposed)return;let r=this.value;this.value=this.isBoolean?!!e(i):this.normalize(e(i)),this.render(),r!==this.value&&this._notifier.notify(this.name,this.value)};i.elementNode=this.parent,i.debug=`class:${(t=this.parent)==null?void 0:t.tagName}_${(n=this.parent)==null?void 0:n.nodeId} attribute:${this.name}`,i.onSubscribe=r=>{this._releases.push(r),this.parent&&!this._removeHooked&&(this._removeHooked=!0,this.parent.addHook("BeforeRemove",()=>{for(let a of this._releases)a();this._releases=[],i=null}))},this.value=this.isBoolean?!!e(i):this.normalize(e(i))}else this.value=this.isBoolean?!!e:this.normalize(e);this.render(),o!==this.value&&this._notifier.notify(this.name,this.value)}addListener(e){let t=e;t.onSubscribe=n=>{this._listenerReleases.push(n),this.parent&&!this._listenerRemoveHooked&&(this._listenerRemoveHooked=!0,this.parent.addHook("BeforeRemove",()=>{for(let o of this._listenerReleases)o();this._listenerReleases=[]}))},this._notifier.addListener(this.name,t)}remove(){this.parent&&this.parent.attributes&&this.parent.attributes.remove(this.name),this._dispose()}_dispose(){for(let e of this._releases)e();this._releases=[];for(let e of this._listenerReleases)e();this._listenerReleases=[],this._notifier._dispose(),this.value=null,this.parent=null}generateHTML(){let{name:e,value:t}=this;if(this.isBoolean)return t?`${e}`:"";if(t==null)return"";let n=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${Ko(String(n))}"`}},Xo=class{constructor(e){this.items={},this.parent=e}generateHTML(){if(!this.items)return"";let e=Object.values(this.items).map(t=>t.generateHTML()).filter(Boolean).join(" ");return e?` ${e}`:""}get(e){var t;if(this.items)return(t=this.items[e])==null?void 0:t.value}set(e,t){!this.items||!this.parent||(this.items[e]?this.items[e].set(t):this.items[e]=new $r(e,t,this.parent))}addListener(e,t){this.has(e)&&this.items[e].addListener(t)}has(e){return this.items?Object.hasOwn(this.items,e):!1}remove(e){var t,n;if(!this.items)return;let o=(n=(t=this.items[e])==null?void 0:t.name)!=null?n:e;this.items[e]&&(this.items[e]._dispose(),delete this.items[e]),this.parent&&this.parent.domElement&&this.parent.domElement instanceof Element&&this.parent.domElement.removeAttribute(o)}_dispose(){if(this.items)for(let e in this.items)this.items[e]._dispose();this.items=null,this.parent=null}toggle(e,t){if(!Wt.includes(e))throw Error(`${e} is not a boolean attribute`);t===!0?this.set(e,!0):t===!1?this.remove(e):this.has(e)?this.remove(e):this.set(e,!0)}addClass(e){var t,n;if(!e||typeof e!="string"&&typeof e!="function")return;let o=(u,d)=>{let m=(u||"").split(" ").filter(h=>h);return!m.includes(d)&&m.push(d),m.join(" ")},i=(n=(t=this.items)==null?void 0:t.class)==null?void 0:n.declaredValue,r=typeof i=="function",a=r?i:this.get("class"),l=typeof e=="function";if(!r&&!l){this.set("class",o(a,e));return}this.set("class",u=>o(r?a(u):a,l?e(u):e))}hasClass(e){return!e||typeof e!="string"?!1:(this.get("class")||"").split(" ").filter(t=>t).includes(e)}toggleClass(e){!e||typeof e!="string"||(this.hasClass(e)?this.removeClass(e):this.addClass(e))}removeClass(e){if(!e||typeof e!="string")return;let t=(this.get("class")||"").split(" ").filter(n=>n).filter(n=>n!==e);t.length>0?this.set("class",t.join(" ")):this.remove("class")}replaceClass(e,t){!e||!t||typeof e!="string"||typeof t!="string"||this.hasClass(e)&&(this.removeClass(e),this.addClass(t))}},Ir=class{constructor(e,t,n){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Yo(e),this.parentRule=n,this.set(t)}_domUpdate(){if(!this.parentRule)return;let e=this.parentRule.domRule;if(e&&e.style){let t=e.style;t.setProperty(this.cssName,String(this.value)),xe[this.name]&&xe[this.name].forEach(n=>{t.setProperty(`-${n}-${this.cssName}`,String(this.value))})}}_dispose(){if(this._releases.length){for(let e of this._releases)e();this._releases=[]}this.value="",this.parentRule=null}set(e){var t,n,o,i;if(this._releases.length){for(let r of this._releases)r();this._releases=[]}if(typeof e=="function"){let r=(()=>{var a;!this.parentRule||(a=this.parentRule.parentNode)!=null&&a._disposed||(this.value=e(r),this._domUpdate())});r.onSubscribe=a=>{this._releases.push(a)},r.elementNode=this.parentRule.root,r.debug=`class:${(n=(t=this.parentRule)==null?void 0:t.root)==null?void 0:n.tagName}_${(i=(o=this.parentRule)==null?void 0:o.root)==null?void 0:i.nodeId} style:${this.name}`,this.value=e(r)}else this.value=e;this._domUpdate()}remove(){if(this.parentRule){if(this.parentRule.domRule instanceof CSSStyleRule){let e=this.parentRule.domRule.style;e.removeProperty(this.cssName),xe[this.name]&&xe[this.name].forEach(t=>{e.removeProperty(`-${t}-${this.cssName}`)})}delete this.parentRule.styleBlock[this.name],this._dispose()}}cssText(){let e=`${this.cssName}: ${this.value}`;return xe[this.name]&&xe[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},ge=class Ht{constructor(t,n){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Jo(this),this.parent=n}_dispose(){if(this.styleBlock)for(let t of Object.values(this.styleBlock))t._dispose();this.styleList&&this.styleList._dispose(),this.styleBlock=null,this.styleList=null,this.domRule=null,this.parent=null}get root(){let t=this.parent;for(;t instanceof Ht;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Ht;)t=t.parent;return t}insertStyle(t,n){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(n):this.styleBlock[t]=new Ir(t,n,this))}removeStyle(t){this.styleBlock&&this.styleBlock[t]&&this.styleBlock[t].remove()}cssText(){if(!this.styleBlock||!this.styleList)return"";let t=Object.values(this.styleBlock).map(o=>o.cssText()).join(";"),n=this.styleList.cssText();return`${this.selectorText} { ${t} ${n} } `}mount(t){!t||!this.styleList||(this.domRule=t,"cssRules"in t&&this.styleList.mount(t.cssRules))}remove(){if(this.domRule&&this.domRule.parentStyleSheet){let t=this.domRule.parentStyleSheet,n=t.cssRules;for(let o=0;o<n.length;o++)if(n[o]===this.domRule){t.deleteRule(o);break}}this._dispose()}render(t){if(!this.styleBlock||!this.styleList)return;let n=Object.values(this.styleBlock).map(o=>o.cssText()).join(";");try{if(this.selectorText.startsWith("@")){if(/^@(media|supports|container|layer)\b/.test(this.selectorText)){let o=t.insertRule(`${this.selectorText} {}`,t.cssRules.length),i=t.cssRules[o];"cssRules"in i&&(this.mount(i),this.styleList.render(i))}else if(this.selectorText.startsWith("@keyframes")||this.selectorText.startsWith("@font-face")){let o=this.cssText(),i=t.insertRule(o,t.cssRules.length),r=t.cssRules[i];this.mount(r)}}else{let o=`${this.selectorText} { ${n} }`,i=t.insertRule(o,t.cssRules.length),r=t.cssRules[i];r&&"selectorText"in r&&this.mount(r)}}catch(o){console.warn("Failed to insert rule:",this.selectorText,o)}}},Jo=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof ge;)e=e.parent;return e}addCSS(e,t=""){if(!this.items||!this.parent)return;let n={},o=[];function i(r,a){return r.startsWith("&")?`${a}${r.slice(1)}`:`${a} ${r}`}for(let r in e){let a=e[r],l=Lr(r);for(let u of l){let d=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new ge(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new ge(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new ge(u,this.parent);for(let h in a)m.insertStyle(h,a[h]);this.items.push(m)}else if(typeof a=="object"&&a!=null){let m=new ge(d,this.parent);this.items.push(m);for(let[h,f]of Object.entries(a))if(typeof f=="object"&&f!=null){let S=i(h,d);this.addCSS(f,S)}else m.insertStyle(h,f)}else n[u]=a}}if(Object.keys(n).length){let r=new ge(t,this.parent);for(let a in n)r.insertStyle(a,n[a]);this.items.push(r)}for(let r of o)this.items.push(r)}cssText(){return this.items?this.items.map(e=>e.cssText()).join(""):""}patchCSS(e,t=""){var n;if(!this.items||!this.parent)return;let o={};for(let l in e){let u=e[l];typeof u=="object"&&u!=null||(o[l]=u)}let i=this.items.find(l=>l.selectorText===t);i||(i=new ge(t,this.parent),this.items.push(i));let r=new Set(Object.keys(o));for(let l in o)i.insertStyle(l,o[l]);if(i.styleBlock)for(let l of Object.keys(i.styleBlock))r.has(l)||i.removeStyle(l);let a=(n=this.domStyle)==null?void 0:n.sheet;!i.domRule&&a&&i.render(a)}insertRule(e){if(!this.items||!this.parent)return null;let t=this.items.find(n=>n.selectorText===e);return t||(t=new ge(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let n=e.get(Bt(t.selectorText));n&&t.mount(n)}}mount(e){if(!this.items)return;if(!e)throw Error("Require domRuleList argument");let t=0,n=o=>o.replace("(odd)","(2n+1)").replace("(even)","(2n)");this.items.forEach((o,i)=>{let r=i-t,a=e[r];a&&(o.selectorText.startsWith("@")&&a instanceof CSSKeyframesRule||"keyText"in a?o.mount(a):"selectorText"in a?a.selectorText!==n(o.selectorText)?t+=1:o.mount(a):"cssRules"in a&&o.mount(a))})}render(e){e instanceof HTMLStyleElement?(this.domStyle=e,this.items.forEach(t=>t.render(e.sheet))):e instanceof CSSGroupingRule&&this.items.forEach(t=>t.render(e))}_dispose(){if(this.items)for(let e=0;e<this.items.length;e++)this.items[e]._dispose();this.items=[],this.parent=null,this.domStyle=null}};function $o(e){console.warn(`[Domphy] <${e}> is a void element and cannot have children \u2014 SSR output omits the declared content while the client renders it, so hydration drifts. Remove the content or use a non-void tag.`)}var U=class Pe{constructor(t,n=null,o=0){this._disposed=!1,this._beforeRemoveFired=!1,this._imperative=!1,this.type="ElementNode",this.parent=null,this._childrenReleaseHooked=!1,this._behaviorInstances=new Map,this._pendingBehaviors=new Map,this._behaviorMountHooked=!1,this._behaviorTeardownHooked=!1,this.children=new en(this),this.styles=new Jo(this),this.attributes=new Xo(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,r;t=ye(t),qo(t),t.style=t.style||{},this.parent=n,this.tagName=Go(t),t=Vt(t),this.key=(i=t._key)!=null?i:null,this._context=t._context||{},this._metadata=t._metadata||{};let a=`${(r=this.parent)==null?void 0:r.nodeId}.${o}`,l=JSON.stringify(t.style||{},(d,m)=>typeof m=="function"?a:m);this.nodeId=$e(a+l),this.attributes.addClass(`${this.tagName}_${this.nodeId}`),t._onSchedule&&t._onSchedule(this,t),this.merge(t);let u=t[this.tagName];Y&&u!=null&&u!==""&&st.includes(this.tagName)&&$o(this.tagName),u!=null&&(typeof u=="function"?this._setupFunctionChildren(u):this.children.update(Array.isArray(u)?u:[u])),this._hooks.Init&&this._hooks.Init(this)}_setupFunctionChildren(t){let n=()=>{if(!this._disposed)try{let i=t(n);this.children.update(Array.isArray(i)?i:[i])}catch(i){this._handleError(i)}};n.elementNode=this,n.debug=`class:${this.tagName}_${this.nodeId} children`;let o=[];n.onSubscribe=i=>{o.push(i),this._childrenRelease=()=>{for(let r of o)r();o.length=0,n=null},this._childrenReleaseHooked||(this._childrenReleaseHooked=!0,this.addHook("BeforeRemove",()=>{var r;(r=this._childrenRelease)==null||r.call(this),this._childrenRelease=void 0}))},n()}_createDOMNode(){let t=Ao.includes(this.tagName)?document.createElementNS("http://www.w3.org/2000/svg",this.tagName):document.createElement(this.tagName);if(this.domElement=t,this._events)for(let n in this._events)this._bindEvent(n);return this.attributes&&Object.values(this.attributes.items).forEach(n=>n.render()),t}_bindEvent(t){if(!this.domElement||this._boundEvents.has(t))return;this._boundEvents.add(t);let n=o=>{var i,r;return(r=(i=this._events)==null?void 0:i[t])==null?void 0:r.call(i,o,this)};this.domElement.addEventListener(t,n),this.addHook("BeforeRemove",o=>{var i;(i=o.domElement)==null||i.removeEventListener(t,n),n=null})}_dispose(){var t,n,o,i;this._disposed||(this._disposed=!0,this._beforeRemoveFired||(this._beforeRemoveFired=!0,(n=(t=this._hooks).BeforeRemove)==null||n.call(t,this,()=>{})),this.children&&this.children._dispose(),this.styles&&(this.styles.items.forEach(r=>r.remove()),this.styles._dispose()),this.attributes&&this.attributes._dispose(),(i=(o=this._hooks).Remove)==null||i.call(o,this),this.domElement=null,this._hooks={},this._events=null,this._context={},this._metadata={},this.parent=null)}merge(t){B(this._context,t._context),B(this._metadata,t._metadata),this._processBehaviors(t._behaviors);let n=Object.keys(t);for(let o=0;o<n.length;o++){let i=n[o],r=t[i];["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName].includes(i)||(["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"].includes(i)?this.addHook(i.substring(3),r):i.startsWith("on")?this.addEvent(i.substring(2).toLowerCase(),r):i==="_portal"?this._portal=r:i==="class"?(typeof r=="string"||typeof r=="function")&&this.attributes.addClass(r):this.attributes.set(i,r))}t.style&&this.styles.addCSS(t.style||{},`.${`${this.tagName}_${this.nodeId}`}`)}patch(t){var n;let o=ye(t);o.style=o.style||{},o=Vt(o);let i=o[this.tagName];if(Y&&i!=null&&i!==""&&st.includes(this.tagName)&&$o(this.tagName),typeof i=="function")(n=this._childrenRelease)==null||n.call(this),this._childrenRelease=void 0,this._setupFunctionChildren(i);else if(i!=null){let m=Array.isArray(i)?i:[i];this.children.update(m,!!this.domElement,!0)}o._context&&B(this._context,o._context),o._metadata&&B(this._metadata,o._metadata),this._processBehaviors(o._behaviors),this.styles.patchCSS(o.style||{},`.${this.tagName}_${this.nodeId}`);let r=`${this.tagName}_${this.nodeId}`,a=["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName],l=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),d=null;this._events={};for(let m of Object.keys(o)){if(a.includes(m)||l.includes(m)||m==="_portal")continue;let h=o[m];m.startsWith("on")&&typeof h=="function"?this.addEvent(m.substring(2).toLowerCase(),h):m==="class"&&(typeof h=="string"||typeof h=="function")?d=h:(this.attributes.set(m,h),u.add(m))}if(typeof d=="function"){let m=d;this.attributes.set("class",h=>`${r} ${m(h)}`)}else this.attributes.set("class",d?`${r} ${d}`:r);if(this.attributes.items)for(let m of Object.keys(this.attributes.items))u.has(m)||this.attributes.remove(m);if(this._events)for(let m in this._events)this._bindEvent(m)}_handleError(t){let n=this;for(;n;){if(n._hooks.Error){let o=n;n._hooks.Error(o,t,()=>{o.children.update([])});return}n=n.parent}console.error("[Domphy] Unhandled error in reactive child:",t)}addEvent(t,n){this._events=this._events||{};let o=this._events[t];typeof o=="function"?this._events[t]=(i,r)=>{o(i,r),n(i,r)}:this._events[t]=n}addHook(t,n){let o=this._hooks[t];if(typeof o=="function"){let i=((...r)=>{o(...r),n(...r)});try{Object.defineProperty(i,"length",{value:Math.max(o.length,n.length),configurable:!0})}catch(r){}this._hooks[t]=i}else this._hooks[t]=n}getRoot(){let t=this;for(;t&&t instanceof Pe&&t.parent;)t=t.parent;return t}_processBehaviors(t){var n;if(t)for(let o of Object.keys(t)){let i=t[o],r=this._behaviorInstances.get(o);r?(n=r.update)==null||n.call(r,i.props):this.domElement?this._attachBehaviorNow(o,i):(this._pendingBehaviors.set(o,i),this._ensureBehaviorMountHook())}}_attachBehaviorNow(t,n){try{let o=n.attach(this,n.props)||{};this._behaviorInstances.set(t,o),this._ensureBehaviorTeardownHook()}catch(o){this._handleError(o)}}_ensureBehaviorMountHook(){this._behaviorMountHooked||(this._behaviorMountHooked=!0,this.addHook("Mount",()=>{if(this._pendingBehaviors.size===0)return;let t=this._pendingBehaviors;this._pendingBehaviors=new Map,t.forEach((n,o)=>this._attachBehaviorNow(o,n))}))}_ensureBehaviorTeardownHook(){this._behaviorTeardownHooked||(this._behaviorTeardownHooked=!0,this.addHook("BeforeRemove",()=>{this._behaviorInstances.forEach(t=>{var n;return(n=t.destroy)==null?void 0:n.call(t)}),this._behaviorInstances.clear()}))}getBehavior(t){let n=this;for(;n;){let o=n._behaviorInstances.get(t);if(o)return o;n=n.parent}}getContext(t){let n=this;for(;n&&(!n._context||!Object.hasOwn(n._context,t));)n=n.parent;return n&&n._context?n._context[t]:void 0}setContext(t,n){this._context=this._context||{},this._context[t]=n}getMetadata(t){return this._metadata?this._metadata[t]:void 0}setMetadata(t,n){this._metadata=this._metadata||{},this._metadata[t]=n}generateCSS(){if(!this.styles||!this.children)return"";let t=this.styles.cssText();return t+=this.children.items.map(n=>n instanceof Pe?n.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(st.includes(this.tagName))return`<${this.tagName}${t}>`;let n=this.children.generateHTML();return`<${this.tagName}${t}>${n}</${this.tagName}>`}mount(t,n){if(!t)throw new Error("Missing dom node on bind");if(Y&&this.parent===null&&t.tagName&&t.tagName.toLowerCase()!==this.tagName&&console.warn(`[Domphy] Hydration mismatch at mount root: expected <${this.tagName}> but found <${t.tagName.toLowerCase()}>. The server-rendered DOM does not match the client tree \u2014 check that mount() receives the element generated for THIS component.`),Y&&!n&&this.parent===null&&t.childNodes.length>0&&console.warn("[Domphy] mount() was called without a style element on already-rendered DOM. Reactive style updates after hydration will be dropped \u2014 pass the server-rendered <style> element as the second argument to mount()."),this.domElement=t,this._events)for(let o in this._events)this._bindEvent(o);if(this.children){let o=0;this.children.items.forEach((i,r)=>{let a=t.childNodes[o];if(i instanceof Pe){if(o++,!a)return;Y&&this._devCheckHydrationMatch(i,a,r),i.mount(a)}else if(i.html){let l=i._domSpan();if(a){i.domText=a,i._domExtras=[];for(let u=1;u<l;u++){let d=t.childNodes[o+u];d&&i._domExtras.push(d)}}o+=l}else a?(Y&&a.nodeType!==3&&console.warn(`[Domphy] Hydration mismatch at <${this.tagName}> child ${r}: expected a text node ("${i.text.slice(0,40)}") but found ${a.nodeType===1?`<${a.tagName.toLowerCase()}>`:`node type ${a.nodeType}`}. The server-rendered DOM does not match the client tree \u2014 check the component producing this subtree.`),i.domText=a,o++):this.tagName==="textarea"?i.render(t):o++})}if(n){let o=n.sheet;o&&this._hydrateStyles(Pr(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_devCheckHydrationMatch(t,n,o){var i,r,a,l;let u=`<${this.tagName}> child ${o}`,d="The server-rendered DOM does not match the client tree \u2014 check the component producing this subtree.";if(n.nodeType!==1){console.warn(`[Domphy] Hydration mismatch at ${u}: expected <${t.tagName}> but found ${n.nodeType===3?`a text node ("${((i=n.textContent)!=null?i:"").slice(0,40)}")`:`node type ${n.nodeType}`}. ${d}`);return}let m=n,h=m.tagName.toLowerCase();if(h!==t.tagName){console.warn(`[Domphy] Hydration mismatch at ${u}: expected <${t.tagName}> but found <${h}>. ${d}`);return}for(let f of["id","class"]){let S=(a=(r=t.attributes)==null?void 0:r.items)==null?void 0:a[f];if(!S||S.value==null)continue;let g=String(S.value),p=(l=m.getAttribute(f))!=null?l:"";g!==p&&console.warn(`[Domphy] Hydration mismatch at ${u} <${t.tagName}>: expected ${f}="${g}" but found ${f}="${p}". ${d}`)}}_hydrateStyles(t){var n;if((n=this.styles)==null||n.hydrate(t),this.children)for(let o of this.children.items)o instanceof Pe&&o._hydrateStyles(t)}render(t){let n=this._createDOMNode();t.appendChild(n),this._hooks.Mount&&this._hooks.Mount(this);let o=this.getRoot().styles.domStyle,i=t.getRootNode(),r=i instanceof ShadowRoot?i:document.head;return o||(o=Zo(r)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Pe&&a._portal){let l=a._portal(this.getRoot());l&&a.render(l)}else a.render(n)}),n}remove(){if(this.parent)this.parent.children.remove(this);else{let t=()=>{var n;(n=this.domElement)==null||n.remove(),this._dispose()};if(this._hooks.BeforeRemove&&this.domElement){let n=!1,o=()=>{n||(n=!0,t())},i=this._hooks.BeforeRemove;this._beforeRemoveFired=!0,i(this,o),i.length<2&&!n?o():Y&&!n&&setTimeout(()=>{n||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else t()}}},Qo=class{constructor(e){this.__domphyRawHTML=!0,this.html=e}};function ke(e){return new Qo(e)}function Ge(e){return typeof e=="object"&&e!==null&&e.__domphyRawHTML===!0}var Io="\u200B",Rt=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this._domExtras=[],this.parent=t,this.html=Ge(e);let n=this.html?e.html:e;this.text=n===""?this.emptyText():String(n)}emptyText(){var e;return((e=this.parent)==null?void 0:e.tagName)==="textarea"?"":Io}_createDOMNode(){let e;if(this._domExtras=[],this.html){let t=document.createElement("template");t.innerHTML=mt(this.text.trim());let n=Array.from(t.content.childNodes);n.length===0?e=document.createTextNode(""):(e=n[0],this._domExtras=n.slice(1))}else e=document.createTextNode(this.text);return this.domText=e,e}_allDomNodes(){let e=[];this.domText&&e.push(this.domText);for(let t of this._domExtras)e.push(t);return e}_domSpan(){if(!this.html)return 1;let e=document.createElement("template");return e.innerHTML=mt(this.text.trim()),Math.max(e.content.childNodes.length,1)}setText(e){let t=Ge(e),n=t?e.html:e,o=n===""?this.emptyText():String(n);if(o===this.text&&t===this.html&&this.domText)return;let i=this.html;if(this.text=o,this.html=t,!this.domText)return;if(!i&&!t&&this.domText.nodeType===3){this.domText.nodeValue=o;return}let r=this.domText,a=this._domExtras,l=this._createDOMNode(),u=r.parentNode;if(u){u.insertBefore(l,r);for(let d of this._domExtras)u.insertBefore(d,r);u.removeChild(r);for(let d of a)d.remove()}}_dispose(){this.domText=void 0,this._domExtras=[],this.text=""}generateHTML(){return this.text===Io?"&#8203;":this.html?mt(this.text.trim()):Ko(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t);for(let n of this._domExtras)e.appendChild(n)}},jt=new Set;function zr(){jt.clear()}var en=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return Ge(e)?new Rt(e,this.owner):typeof e=="object"&&e!==null?new U(e,this.owner,this._nextKey++):new Rt(e==null?"":String(e),this.owner)}_domReferenceAfter(e){let t=this.owner.domElement;if(!t)return null;for(let n=e;n<this.items.length;n++){let o=this.items[n],i=o instanceof U?o.domElement:o.domText;if(i&&i.parentNode===t)return i}return null}_moveDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let n=this.owner.domElement,o=e instanceof U?e.domElement?[e.domElement]:[]:e._allDomNodes();if(o.length===0)return;let i=this._domReferenceAfter(t+1);for(let r of o)r!==i&&n.insertBefore(r,i)}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let n=this.owner.domElement,o=e instanceof U?e.domElement?[e.domElement]:[]:e._allDomNodes(),i=t instanceof U?t.domElement?[t.domElement]:[]:t._allDomNodes();if(o.length===0||i.length===0)return;let r=document.createComment("");n.insertBefore(r,o[0]);let a=i[i.length-1].nextSibling;for(let l of o)n.insertBefore(l,a);for(let l of i)n.insertBefore(l,r);r.remove()}update(e,t=!0,n=!1){var o,i,r,a;if(this.items.some(g=>g._imperative)){let g=this.items.filter(b=>!b._imperative),p=this.items.filter(b=>b._imperative);this.items=g.concat(p)}let l=this.items.slice(),u=new Map;for(let g of l)g instanceof U&&g.key!==null&&g.key!==void 0&&!g._imperative&&!g._beforeRemoveFired&&u.set(g.key,g);!n&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let d=new Set(l),m=new Set,h=0,f=Y&&l.length>0?e.length!==l.length:!1;for(let g=0;g<e.length;g++){let p=e[g],b=typeof p=="object"&&p!==null&&!Ge(p),k=b?p._key:void 0,_=b?Go(p):void 0;if(Y&&b&&k===void 0&&h++,k!==void 0){let w=u.get(k);if(w instanceof U&&w.tagName===_){u.delete(k);let T=this.items.indexOf(w);if(T!==g&&T>=0){let M=!!w._portal;this.move(T,g,M?!1:t,!0)}w.parent=this.owner,w.patch(p),m.add(w);continue}}else if(b){let w=this.items[g];if(w instanceof U&&w.key==null&&w.tagName===_&&d.has(w)&&!m.has(w)&&!w._imperative&&!w._beforeRemoveFired){w.parent=this.owner,w.patch(p),m.add(w);continue}}else{let w=this.items[g];if(w instanceof Rt&&d.has(w)&&!m.has(w)&&!w._imperative){w.setText(p==null?"":p),m.add(w);continue}}m.add(this.insert(p,g,t,!0,!0))}let S=this.items.slice(e.length);for(let g of S)g._imperative||this.remove(g,t,!0);if(u.forEach(g=>this.remove(g,t,!0)),Y&&l.length>0&&h>0&&f){let g=this.owner.nodeId;if(!jt.has(g)){jt.add(g);let p=`[domphy] unkeyed list length changed \u2014 DOM nodes reused by position may not match their data slot (focus/scroll/input-value drift). Add _key to each item. (parent <${this.owner.tagName}>, ${h} unkeyed item${h===1?"":"s"})`;console.warn(p)}}n||(a=(r=this.owner._hooks)==null?void 0:r.Update)==null||a.call(r,this.owner)}insert(e,t,n=!0,o=!1,i=!1){let r=this.items.length,a=typeof t!="number"||Number.isNaN(t)||t<0||t>r?r:t,l=this._createNode(e);if(l._imperative=!i,this.items.splice(a,0,l),l instanceof U){l._hooks.Insert&&l._hooks.Insert(l);let u=this.owner.domElement;if(n&&u)if(l._portal){let d=l._portal(this.owner.getRoot());d&&l.render(d)}else{let d=l._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m);let h=u.getRootNode(),f=h instanceof ShadowRoot?h:document.head,S=Zo(f);l.styles.render(S),l._hooks.Mount&&l._hooks.Mount(l),l.children.items.forEach(g=>{if(g instanceof U&&g._portal){let p=g._portal(g.getRoot());p&&g.render(p)}else g.render(d)})}}else{let u=this.owner.domElement;if(n&&u){let d=l._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m);for(let h of l._domExtras)u.insertBefore(h,m)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),l}remove(e,t=!0,n=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof U){if(e._beforeRemoveFired)return;let i=()=>{let r=e.domElement,a=this.items.indexOf(e);a>=0&&this.items.splice(a,1),t&&r&&r.remove(),e._dispose()};if(e._hooks.BeforeRemove&&e.domElement){let r=!1,a=()=>{r||(r=!0,i())},l=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,l(e,a),l.length<2&&!r?a():Y&&!r&&setTimeout(()=>{r||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter (e.g. an exit animation) but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else i()}else{if(this.items.splice(o,1),t)for(let i of e._allDomNodes())i.remove();e._dispose()}!n&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}}clear(e=!0,t=!1){if(this.items.length===0)return;let n=this.items.slice();for(let o of n)this.remove(o,e,!0);!t&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}_dispose(){this.items.forEach(e=>e._dispose()),this.items=[]}swap(e,t,n=!0,o=!1){if(e<0||t<0||e>=this.items.length||t>=this.items.length||e===t)return;let i=this.items[e],r=this.items[t];this.items[e]=r,this.items[t]=i,n&&this._swapDomElement(i,r),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}move(e,t,n=!0,o=!1){if(e<0||e>=this.items.length||t<0||t>=this.items.length||e===t)return;let i=this.items[e];this.items.splice(e,1),this.items.splice(t,0,i),n&&this._moveDomElement(i,t),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}generateHTML(){let e="";for(let t of this.items)e+=t.generateHTML();return e}},we=new Set,Ft=!1;function tn(e){we.add(e),!Ft&&(Ft=!0,Kt(on))}function on(){for(Ft=!1;we.size>0;){let e=[...we];we.clear();for(let t of e)try{t()}catch(n){console.error("[Domphy] Uncaught error in effect:",n)}}}function Ar(){let e=0;for(;Wo()||we.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}Uo(),on()}}var Ke=[];function Nr(){return Ke.length?Ke[Ke.length-1]:null}function Gt(e){let t=Nr();t&&t._add(e)}var Br=class{constructor(){this._disposers=new Set,this._stopped=!1}_add(e){if(this._stopped){e();return}this._disposers.add(e)}run(e){if(this._stopped)return Y&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();Ke.push(this);try{return e()}finally{Ke.pop()}}stop(){if(this._stopped)return;this._stopped=!0;let e,t=!1;for(let n of this._disposers)try{n()}catch(o){t?console.error("[Domphy] Additional error during effectScope.stop():",o):(e=o,t=!0)}if(this._disposers.clear(),t)throw e}};function Vr(){let e=new Br;return Gt(()=>e.stop()),e}function nn(e){let t=!1,n=!1,o=()=>{t||r()},i=new Vo(()=>{t||tn(o)}),r=()=>{if(!(t||n)){n=!0,i.reset();try{Ho(i,e)}finally{n=!1}}},a=()=>{t||(t=!0,i.reset(),we.delete(o))};return Gt(a),r(),a}function Hr(e){let t="computed",n=new Ye,o,i=!0,r=!1,a=()=>{i&&n.listenerCount(t)>0&&d()},l=new Vo(()=>{i||(i=!0,tn(a))});n._onEmpty=()=>{l.reset(),i=!0};let u=()=>{l.reset(),o=Ho(l,e),i=!1,r=!0},d=()=>{let h=o,f=r;u(),!(f&&o===h)&&n.notify(t,o)},m=h=>{if(h)n.addListener(t,h);else{let f=qt();f&&n.addListener(t,f.handler)}return i&&(r&&n.listenerCount(t)>0?d():u()),o};return Gt(()=>{l.reset(),we.delete(a),n._dispose()}),{_isState:!0,_notifier:n,get:m}}function jr(e){return Fo(e)}function Fr(e){return jo(e)}function Wr(e,t,n){let o,i=!0;return nn(()=>{let r=typeof e=="function"?e():e.get();(!i||n!=null&&n.immediate)&&t(r,o),o=r,i=!1})}function Ur(e){return e?Promise.resolve().then(e):Promise.resolve()}var qr=class{constructor(e){this._notifier=new Ye,this.initialRecord=$t({},e),this._record=$t({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let n=qt();n&&this._notifier.addListener(e,n.handler)}return this._record[e]}set(e,t){this._record[e]=t,this._notifier.notify(e,t)}addListener(e,t){return this._notifier.addListener(e,t)}removeListener(e,t){this._notifier.removeListener(e,t)}reset(e){this.set(e,this.initialRecord[e])}_dispose(){this._notifier._dispose()}};var gt={};lt(gt,{COLOR_ROLES:()=>mi,ElementTones:()=>Je,TONE_STEPS:()=>q,ToneAliases:()=>ft,applySystemTheme:()=>ci,generateTheme:()=>gi,getTheme:()=>te,resolveThemeColor:()=>vi,setTheme:()=>ii,themeApply:()=>li,themeCSS:()=>eo,themeColor:()=>s,themeColorToken:()=>ao,themeDensity:()=>v,themeFluidSpacing:()=>si,themeName:()=>pt,themeSize:()=>x,themeSpacing:()=>c,themeTokens:()=>io,themeVars:()=>dt});var Kr=e=>{let t=n=>{let o=Math.max(0,Math.min(1,n)),i=o<=.0031308?12.92*o:1.055*Math.pow(o,1/2.4)-.055;return Math.max(0,Math.min(255,Math.round(i*255)))};return e.map(t)},Gr=e=>{let t=n=>n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;return e.map(t)},rn=e=>{let[t,n,o]=Kr(e);return t=t.toString(16).padStart(2,"0"),n=n.toString(16).padStart(2,"0"),o=o.toString(16).padStart(2,"0"),`#${t}${n}${o}`},Yr=e=>typeof e=="string"&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e),Zt=e=>{if(!Yr(e))throw new Error(`Invalid hex color "${e}": expected "#rgb", "#rgba", "#rrggbb", or "#rrggbbaa" (hex digits 0-9, a-f, case-insensitive).`);let t=e.slice(1).toLowerCase();return t.length<=4&&(t=t.split("").map(n=>n+n).join("")),`#${t}`},Xe=e=>{let t=Zt(e),n=parseInt(t.slice(1,3),16)/255,o=parseInt(t.slice(3,5),16)/255,i=parseInt(t.slice(5,7),16)/255;return Gr([n,o,i])},Zr=e=>{let t=.4122214708*e[0]+.5363325363*e[1]+.0514459929*e[2],n=.2119034982*e[0]+.6806995451*e[1]+.1073969566*e[2],o=.0883024619*e[0]+.2817188376*e[1]+.6299787005*e[2],i=Math.cbrt(t),r=Math.cbrt(n),a=Math.cbrt(o);return[.2104542553*i+.793617785*r-.0040720468*a,1.9779984951*i-2.428592205*r+.4505937099*a,.0259040371*i+.7827717662*r-.808675766*a]},Xr=e=>{let[t,n,o]=e,i=t+.3963377774*n+.2158037573*o,r=t-.1055613458*n-.0638541728*o,a=t-.0894841775*n-1.291485548*o,l=i*i*i,u=r*r*r,d=a*a*a;return[4.0767416621*l-3.3077115913*u+.2309699292*d,-1.2684380046*l+2.6097574011*u-.3413193965*d,-.0041960863*l-.7034186147*u+1.707614701*d]};var Xt=e=>{let[t,n,o]=e,i=.4124564*t+.3575761*n+.1804375*o,r=.2126729*t+.7151522*n+.072175*o,a=.0193339*t+.119192*n+.9503041*o,l=.95047,u=1,d=1.08883,m=g=>g>.008856?Math.cbrt(g):7.787*g+16/116,h=m(i/l),f=m(r/u),S=m(a/d);return[116*f-16,500*(h-f),200*(f-S)]};var ln=(e,t)=>{let[n,o,i]=e,[r,a,l]=t,u=(n+r)/2,d=Math.sqrt(o*o+i*i),m=Math.sqrt(a*a+l*l),h=(d+m)/2,f=.5*(1-Math.sqrt(Math.pow(h,7)/(Math.pow(h,7)+Math.pow(25,7)))),S=o*(1+f),g=a*(1+f),p=Math.sqrt(S*S+i*i),b=Math.sqrt(g*g+l*l),k=(p+b)/2,_=Math.atan2(i,S)*180/Math.PI+(Math.atan2(i,S)<0?360:0),w=Math.atan2(l,g)*180/Math.PI+(Math.atan2(l,g)<0?360:0),T=w-_;Math.abs(T)>180&&(T+=w<=_?360:-360);let M=Math.abs(_-w)>180?(_+w+360)/2:(_+w)/2,L=1-.17*Math.cos((M-30)*Math.PI/180)+.24*Math.cos(2*M*Math.PI/180)+.32*Math.cos((3*M+6)*Math.PI/180)-.2*Math.cos((4*M-63)*Math.PI/180),R=r-n,P=b-p,z=2*Math.sqrt(p*b)*Math.sin(T/2*Math.PI/180),V=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),ie=1+.045*k,ue=1+.015*k*L,pe=30*Math.exp(-Math.pow((M-275)/25,2)),W=-(2*Math.sqrt(Math.pow(k,7)/(Math.pow(k,7)+Math.pow(25,7))))*Math.sin(2*pe*Math.PI/180);return Math.sqrt(Math.pow(R/V,2)+Math.pow(P/ie,2)+Math.pow(z/ue,2)+W*(P/ie)*(z/ue))};var an=e=>{if(e.length<1)return d=>0;let t=[...e].sort((d,m)=>d[0]-m[0]),n=[];for(let d=0;d<t.length;d++)(d===0||t[d][0]!==t[d-1][0])&&n.push(t[d]);let o=n.length;if(o===1)return d=>n[0][1];let i=n.map(d=>d[0]),r=n.map(d=>d[1]),a=[],l=[];for(let d=0;d<o-1;d++)a[d]=i[d+1]-i[d],l[d]=(r[d+1]-r[d])/a[d];let u=new Array(o);u[0]=l[0],u[o-1]=l[o-2];for(let d=1;d<o-1;d++){let m=l[d-1],h=l[d];if(m*h<=0)u[d]=0;else{let f=(1+a[d]/(a[d-1]+a[d]))/3;u[d]=m*h/((1-f)*m+f*h)}}return d=>{if(d<=i[0])return r[0];if(d>=i[o-1])return r[o-1];let m=0,h=o-2,f=0;for(;m<=h;){let w=Math.floor((m+h)/2);if(d>=i[w]&&d<=i[w+1]){f=w;break}d<i[w]?h=w-1:m=w+1}let S=a[f],g=(d-i[f])/S,p=g*g,b=p*g,k=u[f]*S,_=u[f+1]*S;return(2*b-3*p+1)*r[f]+(b-2*p+g)*k+(-2*b+3*p)*r[f+1]+(b-p)*_}};var sn=.605,Yt=.685;function Jr(e){let t=Math.pow(e,sn);return t/(1+Yt*(1-t))}function Qr(e){let t=e*(1+Yt)/(1+e*Yt);return Math.pow(t,1/sn)}function ei(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function ti(e){let t=[[0,0,0],...e,[1,1,1]].map(f=>Zr(f)).sort((f,S)=>f[0]-S[0]),n=t.map(f=>f[0]),o=t.map(f=>f[1]),i=t.map(f=>f[2]),r=[0],a=0;for(let f=1;f<t.length;f++)a+=ei(t[f],t[f-1]),r.push(a);let l=r.map(f=>Qr(a>0?f/a:0)),u=e.length===1?0:l[1],d=e.length===1?1:l[l.length-2],m=an(l.map((f,S)=>[f,o[S]])),h=an(l.map((f,S)=>[f,i[S]]));return{colorAtParam:f=>{let S=Jr(f),g=u+S*(d-u),p=0;for(let L=0;L<l.length-1;L++)if(g<=l[L+1]){p=L;break}let b=l[p],k=l[p+1],_=(g-b)/(k-b||1),w=n[p]+_*(n[p+1]-n[p]),T=m(g),M=h(g);return Xr([w,T,M])},parameters:l.slice(1,-1).map(f=>(f-u)/(d-u))}}function cn(e,t){let n=Array.isArray(e)?e:[e];if(n.length===0)throw new Error("generateRamp requires at least one anchor color");if(t<=0)return[];if(t===1)return[rn(Xe(n[0]))];let{colorAtParam:o,parameters:i}=ti(n.map(Xe)),r=[],a=[0,...i,1],l=a.map(d=>Math.round(d*(t-1))),u=0;for(let d=0;d<t;d++){for(;u<l.length-2&&d>l[u+1];)u++;let m=l[u],h=l[u+1],f=a[u],S=a[u+1],g;if(h<=m)g=f;else{let p=(d-m)/(h-m);g=f+p*(S-f)}r.push(rn(o(g)))}return r.reverse()}var oi={direction:"darken",colors:{primary:["#ffffff","#e3ecff","#c6daff","#aac8ff","#8fb6ff","#76a3ff","#5f91fc","#4a7ff4","#386ee7","#2a5ed7","#1e4ec2","#1440aa","#0c3290","#072674","#041a57","#020f38","#010419","#000000"],secondary:["#ffffff","#fce6ea","#faced6","#f7b5c2","#f29db0","#ec859e","#e36e8d","#d8597d","#ca456e","#b93460","#a42351","#8e1643","#770b36","#5f0529","#46031d","#2d0210","#130104","#000000"],info:["#ffffff","#dcf0f9","#b7e1f6","#90d2f1","#6ac3eb","#42b4e2","#16a4d5","#0094c4","#0084b2","#00739e","#00638a","#005476","#004461","#00354d","#002638","#001623","#00070d","#000000"],success:["#ffffff","#e3f3dc","#c6e8b8","#a9dd94","#8ed171","#75c450","#61b635","#51a51f","#429304","#358100","#2a7000","#215f00","#194d00","#123c00","#0b2b00","#051a00","#010900","#000000"],warning:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],attention:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],error:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],danger:["#ffffff","#ffe5e5","#ffcaca","#ffaeae","#ff9191","#ff7474","#ff5757","#f93a3a","#e82222","#d40f0f","#b80000","#9c0000","#800000","#640000","#480000","#2c0000","#140000","#000000"],highlight:["#ffffff","#f9f5cd","#f4eb95","#efe05a","#e6d427","#d3c100","#bfad00","#ab9b00","#988900","#857700","#736600","#615600","#4f4600","#3e3600","#2c2700","#1b1700","#090700","#000000"],neutral:["#ffffff","#ededed","#dbdbdb","#cacaca","#bababa","#ababab","#9b9b9b","#8d8d8d","#7e7e7e","#707070","#636363","#565656","#484848","#383838","#282828","#181818","#080808","#000000"]},baseTones:{highlight:5,warning:6,attention:6,error:8,danger:8,secondary:8,primary:9,info:8,success:8,neutral:8},fontSizes:["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],densities:[.75,1,1.5,2,2.5],darkBias:1,custom:{}},Qe=oi,no=e=>JSON.parse(JSON.stringify(e)),un=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),ze={light:no(Qe),dark:ai(Qe)},q=Qe.colors.neutral.length,Ie=8,ht=null,Qt=new Map;function ro(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Jt(e,t){if(/}/.test(e)||/<\/style/i.test(e))throw new Error(`${t} contains unsafe CSS characters ("}" or "</style>") \u2014 theme values are interpolated into a <style> block`)}function ni(e){for(let t in e)if(!Object.keys(Qe).includes(t))throw new Error(`Invalid key: ${t}`);if(e.fontSizes!==void 0){if(!(Array.isArray(e.fontSizes)&&e.fontSizes.length===Ie&&e.fontSizes.every(t=>typeof t=="string"&&t.length>0)))throw new Error(`fontSize must be array of ${Ie} non-empty string (the size scale has ${Ie} steps: 0\u2013${Ie-1})`);e.fontSizes.forEach((t,n)=>Jt(t,`fontSizes[${n}]`))}if(e.densities&&(!Array.isArray(e.densities)||e.densities.some(t=>typeof t!="number")))throw new Error("densities must be array of number");if("custom"in e){let t=e.custom;if(typeof t!="object"||t===null)throw new Error("Invalid custom property: must be an object");for(let n in t){let o=t[n];typeof o=="string"&&Jt(o,`custom.${n}`)}}if("colors"in e){let t=e.colors;if(!(typeof t=="object"&&t!==null&&Object.values(t).every(n=>Array.isArray(n)&&n.every(o=>typeof o=="string"))))throw new Error("colors must be an object of string[]");for(let n in t){let o=t[n];if(o.length!==q)throw new Error(`colors.${n} must have exactly ${q} tone steps (got ${o.length}) \u2014 the tone model is fixed at shift-0\u2026shift-${q-1}`);if(o.some(i=>i.length===0))throw new Error(`colors.${n} must contain only non-empty strings`);o.forEach((i,r)=>Jt(i,`colors.${n}[${r}]`))}}if("baseTones"in e){let t=e.baseTones;if(!(typeof t=="object"&&t!==null&&Object.values(t).every(n=>typeof n=="number")))throw new Error("baseTones must be an object of number");for(let n in t){let o=t[n];if(!Number.isInteger(o)||o<0||o>q-1)throw new Error(`baseTones.${n} must be an integer between 0 and ${q-1} (the tone ramp has ${q} steps)`)}}if("direction"in e&&e.direction!=="lighten"&&e.direction!=="darken")throw new Error('direction must be "lighten" or "darken"')}function hn(e,t){var n;for(let o of Object.keys(t))o==="__proto__"||o==="constructor"||o==="prototype"||(t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?((n=e[o])!=null||(e[o]={}),hn(e[o],t[o])):e[o]=t[o])}function ri(e,t){let n={},o=ro(t);for(let r in t){let a=t[r];if(r==="colors")for(let l in t.colors)[...Array(o).keys()].forEach(u=>n[`--${l}-${u}`]=t.colors[l][u]);else if(r==="fontSizes")[...Array(Ie).keys()].forEach(l=>n[`--fontSize-${l}`]=t.fontSizes[l]);else if(r==="custom"&&a&&typeof a=="object")for(let l in a)n[`--custom-${un(l)}`]=a[l]}let i="";for(let r in n)i+=` ${r}: ${n[r]};
3
4
  `;return`[data-theme="${e}"] {
4
- ${i}}`}function re(e){if(!$e[e])throw Error(`Theme "${e}" not found`);return $e[e]}function Zn(e,t){Yn(t),$e[e]||($e[e]=Xt(Ye)),or($e[e],t),lt=null,Kt.clear()}function Xn(e){let t=Xt(e);t.direction="lighten";for(let r in t.colors)t.colors[r].reverse(),t.baseTones[r]=t.colors[r].length-1-t.baseTones[r];return t}function rr(e){let t=Kt.get(e);if(t)return t;let r=re(e),o=Jt(r),i={};for(let n in r){let a=r[n];if(n==="colors")for(let s in r.colors){let u={};[...Array(o).keys()].forEach(d=>u[d]=r.colors[s][d]),i[s]=u}else if(n==="fontSizes")i.fontSizes=r.fontSizes;else if(n==="densities")i.densities=r.densities;else if(n==="custom"&&(i.custom={},a&&typeof a=="object"))for(let s in a)i.custom[s]=a[s]}return Kt.set(e,i),i}function st(){if(lt)return lt;let e=re("light"),t=Jt(e),r={};for(let o in e){let i=e[o];if(o==="colors")for(let n in e.colors){let a={};[...Array(t).keys()].forEach(s=>a[s]=`var(--${n}-${s})`),r[n]=a}else if(o==="fontSizes")r.fontSizes=[...Array(8).keys()].map(n=>`var(--fontSize-${n})`);else if(o==="custom"&&(r.custom={},i&&typeof i=="object"))for(let n in i)r.custom[n]=`var(--custom-${tr(n)})`}return lt=r,r}function qt(){return Object.entries($e).map(([e,t])=>Gn(e,t)).join(`
5
- `)}function Jn(e){var t;if(typeof document!="undefined")if(e){e.textContent=qt();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=qt(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function Qn(e,t,r=320,o=1280){let i=e/4,n=t/4,a=(n-i)/(o-r)*100,s=i-a*r/100,u=parseFloat(s.toFixed(4))===0?`${a.toFixed(4)}vw`:`${s.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${n}em)`}function ei(e=document.documentElement,t={}){let{persist:r=!0,storageKey:o="dp-theme"}=t,i=()=>{if(r){let s=localStorage.getItem(o);if(s==="light"||s==="dark")return s}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};e.setAttribute("data-theme",i());let n=window.matchMedia("(prefers-color-scheme: dark)"),a=s=>{(!r||!localStorage.getItem(o))&&e.setAttribute("data-theme",s.matches?"dark":"light")};return n.addEventListener("change",a),()=>n.removeEventListener("change",a)}function ct(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let r="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(r=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),r}var ti=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],Yt=["inherit"];[...Array(5).keys()].forEach(e=>{Yt.push(`decrease-${e}`),Yt.push(`increase-${e}`)});function oi(e,t="inherit"){if(!Yt.includes(t))throw Error(`density name "${t}" invalid`);let r;if(t==="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(4,r))}function ri(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataDensity"));)t=t.parent;let r=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(r=oi(r,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),r}function v(e){let t=ri(e);return re(e?ct(e):"light").densities[t]}var ni=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],ii=[.75,1,1.5,2,2.5];function ai(e,t){let r=Ut(at(t)),o=0,i=1/0;for(let n=0;n<e.length;n++){let a=Xo(r,Ut(at(e[n])));a<i&&(i=a,o=n)}return o}function li(e,t={}){var r,o,i,n,a,s;let u=(r=t.steps)!=null?r:18,d={},m={};for(let[h,g]of Object.entries(e)){let S=Qo(g,u);d[h]=S,m[h]=ai(S,g)}return{direction:(o=t.direction)!=null?o:"darken",colors:d,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:ni,densities:(n=t.densities)!=null?n:ii,darkBias:(a=t.darkBias)!=null?a:1,custom:(s=t.custom)!=null?s:{}}}var Gt=["inherit"];[...Array(8).keys()].forEach(e=>{Gt.push(`decrease-${e}`),Gt.push(`increase-${e}`)});function nr(e,t="inherit"){if(!Gt.includes(t))throw Error(`size name "${t}" invalid`);let r;if(t==="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(7,r))}function si(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataSize"));)t=t.parent;let r=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(r=nr(r,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),r}function x(e,t="inherit"){let r=nr(si(e),t);return st().fontSizes[r]}var fe=Ye.colors.neutral.length,Zt={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},qe=["inherit","base",...Object.keys(Zt)];[...Array(fe).keys()].forEach(e=>{qe.push(`decrease-${e}`),qe.push(`increase-${e}`),qe.push(`shift-${e}`)});function er(e,t){if(e<0||e>fe-1)return e;let r=e+t;return r=Math.max(0,Math.min(fe-1,r)),r}function ci(e,t){if(e<0||e>fe-1)return e;let r=Math.floor((fe-1)/2),o=e<=r?e+t:e-t;return o=Math.max(0,Math.min(fe-1,o)),o}function Ge(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!qe.includes(t))throw Error(`tone name "${t}" invalid`);if(t in Zt&&(t=Zt[t]),t.startsWith("increase-")){let r=parseInt(t.replace("increase-",""),10);return er(e,r)}else if(t.startsWith("decrease-")){let r=parseInt(t.replace("decrease-",""),10);return er(e,-r)}else if(t.startsWith("shift-")){let r=parseInt(t.replace("shift-",""),10);return ci(e,r)}else return e}function ir(e){if(!e)return 0;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTone"));)t=t.parent;let r=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(r=Ge(r,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),r}function ar(e,t,r){return r<=0?e:t==="lighten"&&e===0?r:t==="darken"&&e===fe-1?fe-1-r:e}function l(e,t="inherit",r="inherit"){let o=r==="inherit"?"neutral":r;if(!e){let s=st()[o];if(!s)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?s[re("light").baseTones[o]]:s[Ge(0,t)]}let i=ct(e),n;if(t==="base")n=re(i).baseTones[o];else{let s=re(i),u=ar(ir(e),s.direction,s.darkBias);n=Ge(u,t)}let a=st()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[n]}function Qt(e,t="inherit",r="inherit"){let o=r==="inherit"?"neutral":r,i=e?ct(e):"light",n=rr(i)[o];if(!n)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?n[re("light").baseTones[o]]:n[Ge(0,t)];let a;if(t==="base")a=re(i).baseTones[o];else{let s=re(i),u=ar(ir(e),s.direction,s.darkBias);a=Ge(u,t)}return n[a]}var Ct={};rt(Ct,{abbreviation:()=>mi,accordion:()=>ui,alert:()=>hi,avatar:()=>di,badge:()=>fi,blockquote:()=>pi,breadcrumb:()=>gi,breadcrumbEllipsis:()=>yi,button:()=>Si,buttonGhost:()=>eo,buttonSwitch:()=>xi,card:()=>ki,code:()=>Ci,combobox:()=>da,command:()=>fa,commandItem:()=>ga,commandSearch:()=>pa,datePicker:()=>ba,descriptionList:()=>xa,details:()=>wa,dialog:()=>ka,divider:()=>Ca,drawer:()=>Ea,emphasis:()=>_a,empty:()=>Ta,errorBoundary:()=>Ma,fab:()=>Da,figure:()=>La,formGroup:()=>Pa,heading:()=>Ia,horizontalRule:()=>$a,icon:()=>za,image:()=>Aa,inputCheckbox:()=>Va,inputColor:()=>Ba,inputDateTime:()=>Na,inputFile:()=>Ha,inputNumber:()=>ja,inputOTP:()=>Fa,inputPassword:()=>Ka,inputRadio:()=>qa,inputRange:()=>Ya,inputSearch:()=>Ga,inputSwitch:()=>Za,inputText:()=>Xa,keyboard:()=>Ja,label:()=>Qa,link:()=>el,linkButton:()=>rl,list:()=>nl,listItem:()=>il,listItemButton:()=>al,mark:()=>ll,menu:()=>sl,motion:()=>cl,orderedList:()=>ml,pagination:()=>hl,panelSection:()=>dl,paragraph:()=>fl,popover:()=>pl,popoverArrow:()=>fo,preformated:()=>gl,progress:()=>yl,rating:()=>Sl,ringProgress:()=>xl,row:()=>po,scrollArea:()=>wl,segmented:()=>kl,select:()=>Cl,selectBox:()=>El,selectItem:()=>_l,selectList:()=>Tl,skeleton:()=>Ml,small:()=>Ol,spinner:()=>Dl,splitter:()=>Ll,splitterHandle:()=>Rl,splitterPanel:()=>Pl,stack:()=>Il,steps:()=>$l,strong:()=>zl,subscript:()=>Al,superscript:()=>Vl,table:()=>Bl,tabs:()=>Nl,tag:()=>Je,textarea:()=>Hl,timeline:()=>jl,timelineItem:()=>Fl,toast:()=>Wl,toggleGroup:()=>Ul,toolbar:()=>Kl,toolbarSpacer:()=>ql,tooltip:()=>Yl,transitionGroup:()=>Gl,unorderedList:()=>Zl});function mi(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:n=>x(n),backgroundColor:n=>l(n),color:n=>l(n,"shift-10",t.get(n)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:n=>l(n,"shift-7",t.get(n)),textUnderlineOffset:c(.72),cursor:"help","&:hover":{color:n=>l(n,"shift-11",r.get(n)),textDecorationColor:n=>l(n,"shift-9",r.get(n))}}}}function E(e,t="primary"){let r=l(e,"surface"),o=l(e,"shift-9",t);return`0 0 0 2px ${r}, 0 0 0 4px ${o}`}function ui(e={}){var i,n;let{type:t="single"}=e,r=y((i=e.color)!=null?i:"neutral","color"),o=y((n=e.accentColor)!=null?n:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let s=a.domElement;if(!s)return;let u=d=>{let m=d.target.closest("summary");if(!m)return;let h=m.closest("details");!h||h.parentElement!==s||h.open||Array.from(s.querySelectorAll(":scope > details")).forEach(g=>{g!==h&&(g.open=!1)})};s.addEventListener("click",u),a.addHook("Remove",()=>s.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(v(a)*1.5),outline:a=>`1px solid ${l(a,"border-strong",r.get(a))}`,outlineOffset:"-1px",color:a=>l(a,"text",r.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"border-strong",r.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>E(a,o.get(a))}}}}function hi(e={}){var r;let t=y((r=e.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:c(3),paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),borderRadius:o=>c(v(o)*1.5),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-8",t.get(o))}`,backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),fontSize:o=>x(o,"inherit")}}}function di(e={}){var r;let t=y((r=e.color)!=null?r:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:c(9),height:c(9),fontSize:o=>x(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-11",t.get(o)),boxShadow:o=>`0 0 0 1px ${l(o,"border",t.get(o))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function fi(e={}){var i;let{label:t=999}=e,r=y(t),o=y((i=e.color)!=null?i:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:n=>`"${r.get(n)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:c(1.5),minWidth:c(5),height:c(5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:n=>x(n,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:c(999),backgroundColor:n=>l(n,"shift-9",o.get(n)),color:n=>l(n,"shift-0",o.get(n)),boxShadow:n=>`0 0 0 1px ${l(n,"shift-0",o.get(n))}`}}}}function pi(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),margin:0}}}function gi(e={}){var o;let{separator:t="/"}=e,r=y((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>x(i,"inherit"),gap:c(1),color:i=>l(i,"text",r.get(i)),backgroundColor:i=>l(i,"inherit",r.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"muted",r.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",r.get(i)),paddingInlineStart:c(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",r.get(i)),pointerEvents:"none"}}}}function yi(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>x(o,"inherit"),paddingInline:c(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"muted",t.get(o)),borderRadius:c(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{boxShadow:o=>E(o,t.get(o))}}}}var ze={small:"decrease-1",medium:"inherit",large:"increase-1"};var bi={small:.5,medium:1,large:1.5};function eo(e={}){var i,n,a;let t=y((i=e.color)!=null?i:"neutral","color"),r=bi[(n=e.size)!=null?n:"medium"],o=ze[(a=e.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>x(s,o),paddingBlock:s=>c(v(s)*r),paddingInline:s=>c(v(s)*r),borderRadius:s=>c(v(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>c(v(s)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:s=>l(s,"shift-6",t.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"hover",t.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"increase-2",t.get(s))},"&:focus-visible":{boxShadow:s=>E(s,t.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>l(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var vi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Si(e={}){var a,s,u,d;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return eo({color:e.color,size:e.size});let r=y((s=e.color)!=null?s:"primary","color"),o=t==="solid",i=vi[(u=e.size)!=null?u:"medium"],n=ze[(d=e.size)!=null?d:"medium"];return te(A({_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},o?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:m=>x(m,n),paddingBlock:m=>c(v(m)*i.block),paddingInline:m=>c(v(m)*i.inline),borderRadius:m=>c(v(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(v(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o?"none":m=>`1px solid ${l(m,"border-strong",r.get(m))}`,color:m=>o?l(m,"shift-0","neutral"):l(m,"shift-13",r.get(m)),backgroundColor:m=>o?l(m,"shift-13",r.get(m)):l(m,"inherit",r.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:m=>o?l(m,"shift-0","neutral"):l(m,"shift-14",r.get(m)),backgroundColor:m=>o?l(m,"shift-14",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:m=>o?l(m,"shift-15",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>E(m,r.get(m))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}function xi(e={}){var n,a;let{checked:t=!1}=e,r=y(t),o=y((n=e.color)!=null?n:"neutral","color"),i=y((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>r.get(s),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>x(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${l(s,"border",o.get(s))}`,minWidth:c(12),minHeight:c(6),borderRadius:c(999),paddingLeft:c(7),paddingRight:c(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:s=>l(s,"inherit",o.get(s)),color:s=>l(s,"text",o.get(s)),"&:focus-visible":{boxShadow:s=>E(s,i.get(s))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:c(5),height:c(5),borderRadius:c(999),color:s=>l(s,"text"),backgroundColor:s=>l(s,"decrease-2",o.get(s))},"&[aria-checked=true]":{backgroundColor:s=>l(s,"increase-3",i.get(s)),outline:"none",color:s=>l(s,"decrease-2"),paddingLeft:c(2),paddingRight:c(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${c(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var wi={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function $(e){return wi[e]}function ki(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>c(v(o)*2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,outlineOffset:"-1px",boxShadow:$("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),fontWeight:"600",color:o=>l(o,"shift-11",t.get(o)),margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(v(o)*4),paddingBottom:o=>c(v(o)*2),color:o=>l(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(v(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(v(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),borderTop:o=>`1px solid ${l(o,"border",t.get(o))}`}}}}function Ci(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),paddingInline:c(1.5),borderRadius:c(1)}}}var Ei=Object.defineProperty,_i=Object.defineProperties,Ti=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,lr=(e,t,r)=>t in e?Ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J=(e,t)=>{for(var r in t||(t={}))yr.call(t,r)&&lr(e,r,t[r]);if(ht)for(var r of ht(t))br.call(t,r)&&lr(e,r,t[r]);return e},Ee=(e,t)=>_i(e,Ti(t)),vr=(e,t)=>{var r={};for(var o in e)yr.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&ht)for(var o of ht(e))t.indexOf(o)<0&&br.call(e,o)&&(r[o]=e[o]);return r},Me=(e,t,r)=>new Promise((o,i)=>{var n=u=>{try{s(r.next(u))}catch(d){i(d)}},a=u=>{try{s(r.throw(u))}catch(d){i(d)}},s=u=>u.done?o(u.value):Promise.resolve(u.value).then(n,a);s((r=r.apply(e,t)).next())}),Mi=["top","right","bottom","left"],sr=["start","end"],hc=Mi.reduce((e,t)=>e.concat(t,`${t}-${sr[0]}`,`${t}-${sr[1]}`),[]),dt=Math.min,Ce=Math.max,ft=Math.round,ut=Math.floor,ne=e=>({x:e,y:e}),Oi={left:"right",right:"left",bottom:"top",top:"bottom"};function cr(e,t,r){return Ce(e,dt(t,r))}function yt(e,t){return typeof e=="function"?e(t):e}function _e(e){return e.split("-")[0]}function bt(e){return e.split("-")[1]}function Sr(e){return e==="x"?"y":"x"}function xr(e){return e==="y"?"height":"width"}function pe(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function wr(e){return Sr(pe(e))}function Di(e,t,r=!1){let o=bt(e),i=wr(e),n=xr(i),a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=pt(a)),[a,pt(a)]}function Li(e){let t=pt(e);return[ro(e),t,ro(t)]}function ro(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var mr=["left","right"],ur=["right","left"],Pi=["top","bottom"],Ri=["bottom","top"];function Ii(e,t,r){switch(e){case"top":case"bottom":return r?t?ur:mr:t?mr:ur;case"left":case"right":return t?Pi:Ri;default:return[]}}function $i(e,t,r,o){let i=bt(e),n=Ii(_e(e),r==="start",o);return i&&(n=n.map(a=>`${a}-${i}`),t&&(n=n.concat(n.map(ro)))),n}function pt(e){let t=_e(e);return Oi[t]+e.slice(t.length)}function zi(e){return J({top:0,right:0,bottom:0,left:0},e)}function Ai(e){return typeof e!="number"?zi(e):{top:e,right:e,bottom:e,left:e}}function gt(e){let{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}function hr({reference:e,floating:t},r,o){let i=pe(r),n=wr(r),a=xr(n),s=_e(r),u=i==="y",d=e.x+e.width/2-t.width/2,m=e.y+e.height/2-t.height/2,h=e[a]/2-t[a]/2,g;switch(s){case"top":g={x:d,y:e.y-t.height};break;case"bottom":g={x:d,y:e.y+e.height};break;case"right":g={x:e.x+e.width,y:m};break;case"left":g={x:e.x-t.width,y:m};break;default:g={x:e.x,y:e.y}}switch(bt(r)){case"start":g[n]-=h*(o&&u?-1:1);break;case"end":g[n]+=h*(o&&u?-1:1);break;default:}return g}function Vi(e){return Me(this,arguments,function*(t,r={}){var o,i,n,a,s,u;let{x:d,y:m,platform:h,rects:g,elements:S,strategy:p}=t,{boundary:f="clippingAncestors",rootBoundary:b="viewport",elementContext:k="floating",altBoundary:_=!1,padding:w=0}=yt(r,t),O=Ai(w),D=S[_?k==="floating"?"reference":"floating":k],M=gt(yield h.getClippingRect({element:(i=yield(o=h.isElement)==null?void 0:o.call(h,D))==null||i?D:D.contextElement||(yield(n=h.getDocumentElement)==null?void 0:n.call(h,S.floating)),boundary:f,rootBoundary:b,strategy:p})),P=k==="floating"?{x:d,y:m,width:g.floating.width,height:g.floating.height}:g.reference,V=yield(a=h.getOffsetParent)==null?void 0:a.call(h,S.floating),H=(yield(s=h.isElement)==null?void 0:s.call(h,V))?(yield(u=h.getScale)==null?void 0:u.call(h,V))||{x:1,y:1}:{x:1,y:1},j=gt(h.convertOffsetParentRelativeRectToViewportRelativeRect?yield h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:S,rect:P,offsetParent:V,strategy:p}):P);return{top:(M.top-j.top+O.top)/H.y,bottom:(j.bottom-M.bottom+O.bottom)/H.y,left:(M.left-j.left+O.left)/H.x,right:(j.right-M.right+O.right)/H.x}})}var Bi=50,Ni=(e,t,r)=>Me(null,null,function*(){var o;let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,u=s.detectOverflow?s:Ee(J({},s),{detectOverflow:Vi}),d=yield(o=s.isRTL)==null?void 0:o.call(s,t),m=yield s.getElementRects({reference:e,floating:t,strategy:n}),{x:h,y:g}=hr(m,i,d),S=i,p=0,f={};for(let b=0;b<a.length;b++){let k=a[b];if(!k)continue;let{name:_,fn:w}=k,{x:O,y:D,data:M,reset:P}=yield w({x:h,y:g,initialPlacement:i,placement:S,strategy:n,middlewareData:f,rects:m,platform:u,elements:{reference:e,floating:t}});h=O!=null?O:h,g=D!=null?D:g,f[_]=J(J({},f[_]),M),P&&p<Bi&&(p++,typeof P=="object"&&(P.placement&&(S=P.placement),P.rects&&(m=P.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:n}):P.rects),{x:h,y:g}=hr(m,S,d)),b=-1)}return{x:h,y:g,placement:S,strategy:n,middlewareData:f}});var Hi=(e={})=>({name:"flip",options:e,fn(t){return Me(this,null,function*(){var r,o,i,n,a,s;let{placement:u,middlewareData:d,rects:m,initialPlacement:h,platform:g,elements:S}=t,p=yt(e,t),{mainAxis:f=!0,crossAxis:b=!0,fallbackPlacements:k,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0}=p,D=vr(p,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=d.arrow)!=null&&r.alignmentOffset)return{};let M=_e(u),P=pe(h),V=_e(h)===h,H=yield(o=g.isRTL)==null?void 0:o.call(g,S.floating),j=k||(V||!O?[pt(h)]:Li(h)),ye=w!=="none";!k&&ye&&j.push(...$i(h,O,w,H));let De=[h,...j],ue=yield g.detectOverflow(t,D),W=[],se=((i=d.flip)==null?void 0:i.overflows)||[];if(f&&W.push(ue[M]),b){let ce=Di(u,m,H);W.push(ue[ce[0]],ue[ce[1]])}if(se=[...se,{placement:u,overflows:W}],!W.every(ce=>ce<=0)){let ce=(((n=d.flip)==null?void 0:n.index)||0)+1,He=De[ce];if(He&&(!(b==="alignment"&&P!==pe(He))||se.every(K=>pe(K.placement)===P?K.overflows[0]>0:!0)))return{data:{index:ce,overflows:se},reset:{placement:He}};let be=(a=se.filter(K=>K.overflows[0]<=0).sort((K,Z)=>K.overflows[1]-Z.overflows[1])[0])==null?void 0:a.placement;if(!be)switch(_){case"bestFit":{let K=(s=se.filter(Z=>{if(ye){let X=pe(Z.placement);return X===P||X==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(X=>X>0).reduce((X,je)=>X+je,0)]).sort((Z,X)=>Z[1]-X[1])[0])==null?void 0:s[0];K&&(be=K);break}case"initialPlacement":be=h;break;default:}if(u!==be)return{reset:{placement:be}}}return{}})}});var ji=new Set(["left","top"]);function Fi(e,t){return Me(this,null,function*(){var r;let{placement:o,platform:i,elements:n}=e,a=yield(r=i.isRTL)==null?void 0:r.call(i,n.floating),s=_e(o),u=bt(o),d=pe(o)==="y",m=ji.has(s)?-1:1,h=a&&d?-1:1,g=yt(t,e),{mainAxis:S,crossAxis:p,alignmentAxis:f}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof f=="number"&&(p=u==="end"?f*-1:f),d?{x:p*h,y:S*m}:{x:S*m,y:p*h}})}var Wi=(e=0)=>({name:"offset",options:e,fn(t){return Me(this,null,function*(){var r,o;let{x:i,y:n,placement:a,middlewareData:s}=t,u=yield Fi(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:n+u.y,data:Ee(J({},u),{placement:a})}})}}),Ui=(e={})=>({name:"shift",options:e,fn(t){return Me(this,null,function*(){let{x:r,y:o,placement:i,platform:n}=t,a=yt(e,t),{mainAxis:s=!0,crossAxis:u=!1,limiter:d={fn:({x:_,y:w})=>({x:_,y:w})}}=a,m=vr(a,["mainAxis","crossAxis","limiter"]),h={x:r,y:o},g=yield n.detectOverflow(t,m),S=pe(_e(i)),p=Sr(S),f=h[p],b=h[S];if(s){let _=p==="y"?"top":"left",w=p==="y"?"bottom":"right",O=f+g[_],D=f-g[w];f=cr(O,f,D)}if(u){let _=S==="y"?"top":"left",w=S==="y"?"bottom":"right",O=b+g[_],D=b-g[w];b=cr(O,b,D)}let k=d.fn(Ee(J({},t),{[p]:f,[S]:b}));return Ee(J({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[p]:s,[S]:u}}})})}});function vt(){return typeof window!="undefined"}function Be(e){return kr(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function ie(e){var t;return(t=(kr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kr(e){return vt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return vt()?e instanceof Element||e instanceof Y(e).Element:!1}function me(e){return vt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function dr(e){return!vt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Xe(e){let{overflow:t,overflowX:r,overflowY:o,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&i!=="inline"&&i!=="contents"}function Ki(e){return/^(table|td|th)$/.test(Be(e))}function St(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var qi=/transform|translate|scale|rotate|perspective|filter/,Yi=/paint|layout|strict|content/,ke=e=>!!e&&e!=="none",to;function io(e){let t=Q(e)?ee(e):e;return ke(t.transform)||ke(t.translate)||ke(t.scale)||ke(t.rotate)||ke(t.perspective)||!ao()&&(ke(t.backdropFilter)||ke(t.filter))||qi.test(t.willChange||"")||Yi.test(t.contain||"")}function Gi(e){let t=ge(e);for(;me(t)&&!Ve(t);){if(io(t))return t;if(St(t))return null;t=ge(t)}return null}function ao(){return to==null&&(to=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),to}function Ve(e){return/^(html|body|#document)$/.test(Be(e))}function ee(e){return Y(e).getComputedStyle(e)}function xt(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if(Be(e)==="html")return e;let t=e.assignedSlot||e.parentNode||dr(e)&&e.host||ie(e);return dr(t)?t.host:t}function Cr(e){let t=ge(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:me(t)&&Xe(t)?t:Cr(t)}function Ze(e,t=[],r=!0){var o;let i=Cr(e),n=i===((o=e.ownerDocument)==null?void 0:o.body),a=Y(i);if(n){let s=no(a);return t.concat(a,a.visualViewport||[],Xe(i)?i:[],s&&r?Ze(s):[])}else return t.concat(i,Ze(i,[],r))}function no(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Er(e){let t=ee(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=me(e),n=i?e.offsetWidth:r,a=i?e.offsetHeight:o,s=ft(r)!==n||ft(o)!==a;return s&&(r=n,o=a),{width:r,height:o,$:s}}function lo(e){return Q(e)?e:e.contextElement}function Ae(e){let t=lo(e);if(!me(t))return ne(1);let r=t.getBoundingClientRect(),{width:o,height:i,$:n}=Er(t),a=(n?ft(r.width):r.width)/o,s=(n?ft(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var Zi=ne(0);function _r(e){let t=Y(e);return!ao()||!t.visualViewport?Zi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xi(e,t=!1,r){return!r||t&&r!==Y(e)?!1:t}function Te(e,t=!1,r=!1,o){let i=e.getBoundingClientRect(),n=lo(e),a=ne(1);t&&(o?Q(o)&&(a=Ae(o)):a=Ae(e));let s=Xi(n,r,o)?_r(n):ne(0),u=(i.left+s.x)/a.x,d=(i.top+s.y)/a.y,m=i.width/a.x,h=i.height/a.y;if(n){let g=Y(n),S=o&&Q(o)?Y(o):o,p=g,f=no(p);for(;f&&o&&S!==p;){let b=Ae(f),k=f.getBoundingClientRect(),_=ee(f),w=k.left+(f.clientLeft+parseFloat(_.paddingLeft))*b.x,O=k.top+(f.clientTop+parseFloat(_.paddingTop))*b.y;u*=b.x,d*=b.y,m*=b.x,h*=b.y,u+=w,d+=O,p=Y(f),f=no(p)}}return gt({width:m,height:h,x:u,y:d})}function wt(e,t){let r=xt(e).scrollLeft;return t?t.left+r:Te(ie(e)).left+r}function Tr(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-wt(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Ji({elements:e,rect:t,offsetParent:r,strategy:o}){let i=o==="fixed",n=ie(r),a=e?St(e.floating):!1;if(r===n||a&&i)return t;let s={scrollLeft:0,scrollTop:0},u=ne(1),d=ne(0),m=me(r);if((m||!m&&!i)&&((Be(r)!=="body"||Xe(n))&&(s=xt(r)),m)){let g=Te(r);u=Ae(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}let h=n&&!m&&!i?Tr(n,s):ne(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-s.scrollLeft*u.x+d.x+h.x,y:t.y*u.y-s.scrollTop*u.y+d.y+h.y}}function Qi(e){return Array.from(e.getClientRects())}function ea(e){let t=ie(e),r=xt(e),o=e.ownerDocument.body,i=Ce(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=Ce(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-r.scrollLeft+wt(e),s=-r.scrollTop;return ee(o).direction==="rtl"&&(a+=Ce(t.clientWidth,o.clientWidth)-i),{width:i,height:n,x:a,y:s}}var fr=25;function ta(e,t){let r=Y(e),o=ie(e),i=r.visualViewport,n=o.clientWidth,a=o.clientHeight,s=0,u=0;if(i){n=i.width,a=i.height;let m=ao();(!m||m&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}let d=wt(o);if(d<=0){let m=o.ownerDocument,h=m.body,g=getComputedStyle(h),S=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,p=Math.abs(o.clientWidth-h.clientWidth-S);p<=fr&&(n-=p)}else d<=fr&&(n+=d);return{width:n,height:a,x:s,y:u}}function oa(e,t){let r=Te(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,n=me(e)?Ae(e):ne(1),a=e.clientWidth*n.x,s=e.clientHeight*n.y,u=i*n.x,d=o*n.y;return{width:a,height:s,x:u,y:d}}function pr(e,t,r){let o;if(t==="viewport")o=ta(e,r);else if(t==="document")o=ea(ie(e));else if(Q(t))o=oa(t,r);else{let i=_r(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return gt(o)}function Mr(e,t){let r=ge(e);return r===t||!Q(r)||Ve(r)?!1:ee(r).position==="fixed"||Mr(r,t)}function ra(e,t){let r=t.get(e);if(r)return r;let o=Ze(e,[],!1).filter(s=>Q(s)&&Be(s)!=="body"),i=null,n=ee(e).position==="fixed",a=n?ge(e):e;for(;Q(a)&&!Ve(a);){let s=ee(a),u=io(a);!u&&s.position==="fixed"&&(i=null),(n?!u&&!i:!u&&s.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Xe(a)&&!u&&Mr(e,a))?o=o.filter(d=>d!==a):i=s,a=ge(a)}return t.set(e,o),o}function na({element:e,boundary:t,rootBoundary:r,strategy:o}){let i=[...t==="clippingAncestors"?St(e)?[]:ra(e,this._c):[].concat(t),r],n=pr(e,i[0],o),a=n.top,s=n.right,u=n.bottom,d=n.left;for(let m=1;m<i.length;m++){let h=pr(e,i[m],o);a=Ce(h.top,a),s=dt(h.right,s),u=dt(h.bottom,u),d=Ce(h.left,d)}return{width:s-d,height:u-a,x:d,y:a}}function ia(e){let{width:t,height:r}=Er(e);return{width:t,height:r}}function aa(e,t,r){let o=me(t),i=ie(t),n=r==="fixed",a=Te(e,!0,n,t),s={scrollLeft:0,scrollTop:0},u=ne(0);function d(){u.x=wt(i)}if(o||!o&&!n)if((Be(t)!=="body"||Xe(i))&&(s=xt(t)),o){let S=Te(t,!0,n,t);u.x=S.x+t.clientLeft,u.y=S.y+t.clientTop}else i&&d();n&&!o&&i&&d();let m=i&&!o&&!n?Tr(i,s):ne(0),h=a.left+s.scrollLeft-u.x-m.x,g=a.top+s.scrollTop-u.y-m.y;return{x:h,y:g,width:a.width,height:a.height}}function oo(e){return ee(e).position==="static"}function gr(e,t){if(!me(e)||ee(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ie(e)===r&&(r=r.ownerDocument.body),r}function Or(e,t){let r=Y(e);if(St(e))return r;if(!me(e)){let i=ge(e);for(;i&&!Ve(i);){if(Q(i)&&!oo(i))return i;i=ge(i)}return r}let o=gr(e,t);for(;o&&Ki(o)&&oo(o);)o=gr(o,t);return o&&Ve(o)&&oo(o)&&!io(o)?r:o||Gi(e)||r}var la=function(e){return Me(this,null,function*(){let t=this.getOffsetParent||Or,r=this.getDimensions,o=yield r(e.floating);return{reference:aa(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function sa(e){return ee(e).direction==="rtl"}var ca={convertOffsetParentRelativeRectToViewportRelativeRect:Ji,getDocumentElement:ie,getClippingRect:na,getOffsetParent:Or,getElementRects:la,getClientRects:Qi,getDimensions:ia,getScale:Ae,isElement:Q,isRTL:sa};function Dr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ma(e,t){let r=null,o,i=ie(e);function n(){clearTimeout(o),r==null||r.disconnect(),r=null}function a(s=!1,u=1){n();let d=e.getBoundingClientRect(),{left:m,top:h,width:g,height:S}=d;if(s||t(),!g||!S)return;let p=ut(h),f=ut(i.clientWidth-(m+g)),b=ut(i.clientHeight-(h+S)),k=ut(m),_={rootMargin:`${-p}px ${-f}px ${-b}px ${-k}px`,threshold:Ce(0,dt(1,u))||1},w=!0;function O(D){let M=D[0].intersectionRatio;if(M!==u){if(!w)return a();M?a(!1,M):o=setTimeout(()=>{a(!1,1e-7)},1e3)}M===1&&!Dr(d,e.getBoundingClientRect())&&a(),w=!1}try{r=new IntersectionObserver(O,Ee(J({},_),{root:i.ownerDocument}))}catch(D){r=new IntersectionObserver(O,_)}r.observe(e)}return a(!0),n}function Lr(e,t,r,o={}){let{ancestorScroll:i=!0,ancestorResize:n=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=lo(e),m=i||n?[...d?Ze(d):[],...t?Ze(t):[]]:[];m.forEach(k=>{i&&k.addEventListener("scroll",r,{passive:!0}),n&&k.addEventListener("resize",r)});let h=d&&s?ma(d,r):null,g=-1,S=null;a&&(S=new ResizeObserver(([k])=>{k&&k.target===d&&S&&t&&(S.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{S==null||S.observe(t)})),r()}),d&&!u&&S.observe(d),t&&S.observe(t));let p,f=u?Te(e):null;u&&b();function b(){let k=Te(e);f&&!Dr(f,k)&&r(),f=k,p=requestAnimationFrame(b)}return r(),()=>{m.forEach(k=>{i&&k.removeEventListener("scroll",r),n&&k.removeEventListener("resize",r)}),h==null||h(),S==null||S.disconnect(),S=null,u&&cancelAnimationFrame(p)}}var Pr=Wi;var Rr=Ui,Ir=Hi;var $r=(e,t,r)=>{let o=new Map,i=J({platform:ca},r),n=Ee(J({},i.platform),{_c:o});return Ni(e,t,Ee(J({},i),{platform:n}))};function ua(e,t){var D;let{openState:r,placement:o,content:i,keepOpenOnContentHover:n}=t,a=null,s=null,u=null,d=null,m=!1,h=e.domElement,g=e.getRoot(),S={style:{position:"fixed",pointerEvents:"auto",visibility:M=>r.get(M)?"visible":"hidden"},onKeyDown:M=>{M.key==="Escape"&&w()},onMouseEnter:()=>n&&_(),onMouseLeave:()=>n&&w(),_onMount:M=>{var P;if(u=M.domElement,h&&u&&!u.hasAttribute("data-theme")){let V=(P=h.closest("[data-theme]"))==null?void 0:P.getAttribute("data-theme");V&&u.setAttribute("data-theme",V)}},_portal:M=>{let P=M.domElement.querySelector("#domphy-floating");if(!P){let V={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};P=M.children.insert(V).domElement}return P}},p=M=>z(M,S);p(i);let f=()=>{m||(m=!0,d=g.children.insert(i))},b=()=>{f(),h&&u&&(s==null||s(),s=Lr(h,u,()=>{$r(h,u,{placement:o.get(),middleware:[Pr(12),Ir(),Rr()],strategy:"fixed"}).then(({x:M,y:P,placement:V})=>{u&&(Object.assign(u.style,{left:`${M}px`,top:`${P}px`}),o.set(V))})}),r.set(!0))},k=()=>{s==null||s(),s=null,d&&(d.remove(),d=null),u=null,m=!1,r.set(!1)},_=()=>{a&&clearTimeout(a),a=setTimeout(b,100)},w=()=>{a&&clearTimeout(a),a=setTimeout(k,100)},O=M=>{if(!r.get()||!h||!u)return;let P=M.target;!h.contains(P)&&!u.contains(P)&&w()};return(D=g.domElement)==null||D.addEventListener("click",O),{show:_,hide:w,update(M){r=M.openState,o=M.placement,i=M.content,n=M.keepOpenOnContentHover,p(i),d&&d.patch(i)},destroy(){var M;a&&clearTimeout(a),s==null||s(),d==null||d.remove(),(M=g.domElement)==null||M.removeEventListener("click",O)}}}function ae(e){let{kind:t,open:r=!1,placement:o}=e,i=y(r),n=`floating:${t}`,a=d=>{var m;return(m=d==null?void 0:d.getBehavior(n))==null?void 0:m.show()},s=d=>{var m;return(m=d==null?void 0:d.getBehavior(n))==null?void 0:m.hide()},u=A({onKeyDown:(d,m)=>d.key==="Escape"&&s(m)},jt(n,ua,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:u}}var ha='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function Je(e={}){var o;let{removable:t=!1}=e,r=y((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let n={span:we(ha),onClick:a=>{a.stopPropagation(),i.remove()},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:c(1),width:c(4),height:c(4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:a=>l(a,"shift-4",r.get(a))},"&:focus-visible":{boxShadow:a=>E(a,r.get(a))}}};t&&i.children.insert(n)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:c(6),paddingBlock:0,borderRadius:c(999),paddingInlineStart:c(2.5),paddingInlineEnd:t?c(1):c(2.5),gap:c(1.5),fontSize:i=>x(i,"decrease-1"),backgroundColor:i=>l(i,"inherit",r.get(i)),color:i=>l(i,"text",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"border-strong",r.get(i))}`}}}function da(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=y(e.value),s=y(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"combobox",open:s,placement:y(r),content:e.content}),h={onClick:(b,k)=>!n&&d(k),dataTone:"shift-14",style:{backgroundColor:b=>l(b,"inherit"),borderRadius:b=>c(v(b)*2),outline:b=>`1px solid ${l(b,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let g={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:b=>x(b,"inherit"),color:b=>l(b,"text",o),backgroundColor:b=>l(b,"inherit",o)},S;if(e.input){let b={onFocus:(k,_)=>u(_),style:g,_key:"combobox-input"};z(e.input,b),S=e.input}else S={input:null,ariaLabel:"Filter options",onFocus:(b,k)=>u(k),value:b=>(a.get(b),""),style:g,_key:"combobox-input"};let p={div:b=>{let k=a.get(b),_=Array.isArray(k)?k:[k],O=t.filter(D=>_.includes(D.value)).map(D=>({span:D.label,$:[Je({color:o,removable:!0})],_key:D.value,_onRemove:M=>{let P=a.get(),H=(Array.isArray(P)?P:[P]).filter(j=>j!==D.value);n?a.set(H):a.set(H[0])}}));return O.push(S),O},style:{display:"flex",flexWrap:"wrap",gap:c(1)}},f={_onInsert:b=>{b.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:b=>b.children.insert(p),style:{minWidth:c(32),outlineOffset:"-1px",outline:b=>`1px solid ${l(b,"border-strong","neutral")}`,paddingBlock:b=>c(v(b)*1),paddingInline:b=>c(v(b)*1),borderRadius:b=>c(v(b)*1.5),fontSize:b=>x(b,"inherit"),color:b=>l(b,"text",o),backgroundColor:b=>l(b,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:b=>E(b,o)}}};return z(m,f),m}function fa(){return{role:"group",ariaLabel:"Commands",_onSchedule:(e,t)=>{z(t,{_context:{command:{query:y("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function pa(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{_onInsert:o=>{o.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:o=>{let i=o.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let n=o.domElement,a=()=>i.query.set(n.value);n.addEventListener("input",a),o.addHook("Remove",()=>n.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>x(o,"inherit"),paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"border",t)}`,outline:"none",color:o=>l(o,"shift-10",t),backgroundColor:o=>l(o,"inherit",t),"&::placeholder":{color:o=>l(o,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:o=>l(o,"shift-6",r),boxShadow:o=>E(o,r)}}}}function ga(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{_onMount:o=>{var d,m;let i=o.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let n=o.domElement,a=(m=(d=n.textContent)==null?void 0:d.toLowerCase())!=null?m:"",s=h=>{n.hidden=h.length>0&&!a.includes(h.toLowerCase())};s(i.query.get());let u=i.query.addListener(s);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>x(o,"inherit"),height:o=>c(6+v(o)*2),paddingInline:o=>c(v(o)*3),border:"none",outline:"none",color:o=>l(o,"shift-13",t),backgroundColor:o=>l(o,"inherit",t),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:o=>l(o,"shift-13",t),backgroundColor:o=>l(o,"hover",t)},"&:focus-visible":{boxShadow:o=>E(o,r)}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),Oe=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),so=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Qe=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),co=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,mo=(e,t)=>Oe(e,-((e.getDay()-t+7)%7));function ya(e){var t,r;try{let o=new Intl.Locale(e),i=(r=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?r:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function ba(e={}){var go,yo,bo,vo;let{mode:t="single",time:r=!1,min:o,max:i,disabledDate:n,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:u}=e,d=(go=e.weekStartsOn)!=null?go:ya(a),m=y((yo=e.accentColor)!=null?yo:"primary","accentColor"),h=y((bo=e.placement)!=null?bo:"bottom-start"),g=y((vo=e.value)!=null?vo:t==="range"?[null,null]:null),S=u?g.addListener(C=>u(C)):null,p=(()=>{let C=g.get(),T=t==="range"?C==null?void 0:C[0]:C;return T instanceof Date?T:new Date})(),f=y(p.getFullYear(),"viewYear"),b=y(p.getMonth(),"viewMonth"),k=y(F(p),"focused"),_=y(null,"hovered"),w=y(p.getHours(),"hour"),O=y(p.getMinutes(),"minute"),D=null,M=new Intl.DateTimeFormat(a,A({dateStyle:"medium"},r?{timeStyle:"short"}:{})),P=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),V=new Intl.DateTimeFormat(a,{weekday:"short"}),H=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=C=>C?M.format(C):"",ye=C=>{if(s)return s(C);if(t==="range"){let[T,L]=C!=null?C:[null,null];return T?`${j(T)} \u2013 ${j(L)}`:""}return j(C)},De=Array.from({length:7},(C,T)=>V.format(new Date(2023,0,1+(T+d)%7))),ue=C=>!!o&&F(C)<F(o)||!!i&&F(C)>F(i)||!!n&&n(C),W=C=>{if(!r)return F(C);let T=F(C);return T.setHours(w.get(),O.get(),0,0),T},se=C=>{var R;if(ue(C))return;if(t==="single"){g.set(W(C)),r||_t();return}let[T,L]=(R=g.get())!=null?R:[null,null];!T||T&&L?g.set([W(C),null]):F(C)<F(T)?(g.set([W(C),W(T)]),r||_t()):(g.set([T,W(C)]),r||_t())},ce=()=>{var C;if(r)if(t==="single"){let T=g.get();T&&g.set(W(T))}else{let[T,L]=(C=g.get())!=null?C:[null,null];g.set([T&&W(T),L&&W(L)])}},He=(C,T)=>{var Le;if(t!=="range")return!1;let[L,R]=(Le=g.get(T))!=null?Le:[null,null],B=R!=null?R:_.get(T);if(!L||!B)return!1;let I=F(L)<=F(B)?L:B,G=F(L)<=F(B)?B:L,q=F(C);return q>=F(I)&&q<=F(G)},be=(C,T)=>{let L=g.get(T);if(t==="range"){let[R,B]=L!=null?L:[null,null];return Qe(C,R)||Qe(C,B)}return Qe(C,L)},K=C=>{f.set(C.getFullYear()),b.set(C.getMonth())},Z=C=>{let T=so(new Date(f.get(),b.get(),1),C);K(T)},X=C=>f.set(f.get()+C),je=()=>{setTimeout(()=>{var C;(C=D==null?void 0:D.querySelector(`[data-date="${co(k.get())}"]`))==null||C.focus()},0)},Wr=Gr(),{show:Ur,hide:Kr,anchorPartial:Et}=ae({kind:"datePicker",open:!1,placement:h,content:Wr});function _t(){Kr()}Et.onClick=()=>{};let qr={type:"text",readonly:!0,value:C=>ye(g.get(C)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(C,T)=>{Tt(T)},onFocus:(C,T)=>{Tt(T)},onKeyDown:(C,T)=>{let L=C.key;(L==="ArrowDown"||L==="Enter")&&(C.preventDefault(),Tt(T))},_onMount:C=>S&&C.addHook("Remove",()=>{S()})};function Tt(C){var L;let T=(L=Yr())!=null?L:new Date;k.set(F(T)),K(T),Ur(C),je()}function Yr(){var T;let C=g.get();return t==="range"?(T=C==null?void 0:C[0])!=null?T:null:C!=null?C:null}return z(Et,qr),Et;function Gr(){let C=(I,G,q)=>({button:I,type:"button",ariaLabel:G,onClick:q,style:va()}),T={div:[C("\xAB","Previous year",()=>X(-1)),C("\u2039","Previous month",()=>Z(-1)),{div:I=>P.format(new Date(f.get(I),b.get(I),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:I=>x(I)}},C("\u203A","Next month",()=>Z(1)),C("\xBB","Next year",()=>X(1))],style:{display:"flex",alignItems:"center",gap:c(1),marginBottom:c(2)}},L={div:De.map((I,G)=>({div:I,style:{textAlign:"center",fontSize:q=>x(q,"decrease-1"),fontWeight:"bold",color:q=>l(q,"shift-7"),paddingBlock:c(1)},_key:G})),role:"row",style:zr()},R={div:I=>Zr(I),role:"grid",ariaLabel:"Calendar",onKeyDown:en,onMouseLeave:()=>t==="range"&&_.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},B=[T,L,R];return r&&B.push(Jr()),B.push(Qr()),{div:B,role:"dialog",ariaModal:"false",_onMount:I=>{D=I.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:I=>c(v(I)*2),backgroundColor:I=>l(I,"base"),color:I=>l(I,"shift-10"),border:I=>`1px solid ${l(I,"border-strong")}`,boxShadow:$("medium")}}}function Zr(C){let T=new Date(f.get(C),b.get(C),1),L=b.get(C),R=mo(T,d),B=[];for(let I=0;I<6;I++){let G=[];for(let q=0;q<7;q++){let Le=Oe(R,I*7+q);G.push(Xr(Le,L,C))}B.push({div:G,role:"row",style:zr(),_key:I})}return B}function Xr(C,T,L){let R=ue(C),B=be(C,L),I=He(C,L),G=C.getMonth()!==T,q=Qe(C,k.get(L)),Le=Qe(C,new Date);return{button:String(C.getDate()),type:"button",role:"gridcell",tabIndex:q?0:-1,ariaSelected:B,ariaDisabled:R,disabled:R,ariaLabel:H.format(C),dataDate:co(C),onClick:()=>se(C),onMouseEnter:()=>t==="range"&&_.set(C),style:{appearance:"none",border:"none",cursor:R?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:N=>x(N),fontFamily:"inherit",opacity:R?.35:G?.5:1,backgroundColor:N=>B?l(N,"shift-7",m.get(N)):I?l(N,"hover",m.get(N)):"transparent",color:N=>B?l(N,"shift-0",m.get(N)):l(N,"text"),outline:Le?N=>`1px solid ${l(N,"shift-6",m.get(N))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:N=>B?l(N,"shift-7",m.get(N)):l(N,"shift-3",m.get(N))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:N=>E(N,m.get(N))}},_key:co(C)}}function Jr(){let C=(T,L,R)=>({select:Array.from({length:T},(B,I)=>({option:String(I).padStart(2,"0"),value:String(I),selected:G=>L.get(G)===I,_key:I})),ariaLabel:R,onChange:B=>{L.set(Number(B.target.value)),ce()},style:Sa()});return{div:[C(24,w,"Hour"),{span:":",style:{fontWeight:"bold"}},C(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:c(1),marginTop:c(3)}}}function Qr(){let C=(T,L)=>({button:T,type:"button",onClick:L,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:R=>x(R,"decrease-1"),color:R=>l(R,"muted",m.get(R)),padding:c(1)}});return{div:[C("Today",()=>{let T=new Date;k.set(F(T)),K(T),je()}),C("Clear",()=>{g.set(t==="range"?[null,null]:null),_.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:T=>`1px solid ${l(T,"border")}`}}}function en(C){let T=C,L=k.get(),R=null;switch(T.key){case"ArrowLeft":R=Oe(L,-1);break;case"ArrowRight":R=Oe(L,1);break;case"ArrowUp":R=Oe(L,-7);break;case"ArrowDown":R=Oe(L,7);break;case"Home":R=mo(L,d);break;case"End":R=Oe(mo(L,d),6);break;case"PageUp":R=so(L,T.shiftKey?-12:-1);break;case"PageDown":R=so(L,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),se(L);return;default:return}T.preventDefault(),k.set(R),K(R),je()}}function zr(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function va(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>x(e),color:e=>l(e,"muted"),width:c(7),height:c(7),borderRadius:c(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function Sa(){return{fontFamily:"inherit",fontSize:e=>x(e),padding:c(1),borderRadius:c(1),border:e=>`1px solid ${l(e,"border-strong")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"text")}}function xa(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${c(24)}, max-content) 1fr`,columnGap:c(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o))}}}}function wa(e={}){var i,n;let{duration:t=240}=e,r=y((i=e.color)!=null?i:"neutral","color"),o=y((n=e.accentColor)!=null?n:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>l(a,"shift-2",r.get(a)),color:a=>l(a,"shift-10",r.get(a)),fontSize:a=>x(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:c(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>c(v(a)*4),height:c(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:c(2),height:c(2),flexShrink:0,marginTop:c(-.5),borderInlineEnd:a=>`${c(.5)} solid ${l(a,"shift-9",r.get(a))}`,borderBottom:a=>`${c(.5)} solid ${l(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>l(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>c(v(a)*2),boxShadow:a=>E(a,o.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(v(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:c(250),opacity:1,paddingTop:a=>c(v(a)*1),paddingBottom:a=>c(v(a)*3)}}}}var et=0;function kt(){et++,et===1&&(document.body.style.overflow="hidden")}function Ne(){et=Math.max(0,et-1),et===0&&(document.body.style.overflow="")}var Ar='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ka(e={}){let{color:t="neutral",open:r=!1}=e,o=y(r),i=null,n=!1,a=!1,s=u=>{n=!1,typeof u.close=="function"&&u.close(),u.style.visibility="hidden",u.style.pointerEvents="none",a&&(Ne(),a=!1),i==null||i.focus(),i=null};return{_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(u,d)=>{if(u.target!==d.domElement)return;let m=d.domElement.getBoundingClientRect();u.clientX>=m.left&&u.clientX<=m.right&&u.clientY>=m.top&&u.clientY<=m.bottom||o.set(!1)},onTransitionEnd:(u,d)=>{n&&u.target===d.domElement&&u.propertyName==="opacity"&&s(d.domElement)},_onMount:u=>{let d=u.domElement;d.setAttribute("aria-modal","true");let m=null,h=f=>{if(f.key!=="Tab")return;let b=Array.from(d.querySelectorAll(Ar)).filter(w=>!w.closest("[aria-hidden='true']")&&w.offsetParent!==null);if(!b.length){f.preventDefault();return}let k=b[0],_=b[b.length-1];f.shiftKey?(document.activeElement===k||document.activeElement===d)&&(f.preventDefault(),_.focus()):document.activeElement===_&&(f.preventDefault(),k.focus())},g=f=>{f.preventDefault(),o.set(!1)};d.addEventListener("cancel",g);let S=f=>{f?(i=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(kt(),a=!0),d.addEventListener("keydown",h),requestAnimationFrame(()=>{d.style.opacity="1";let b=d.querySelector(Ar);b==null||b.focus()})):(n=!0,d.style.opacity="0",d.removeEventListener("keydown",h),m=setTimeout(()=>{m=null,n&&s(d)},350))};S(o.get());let p=o.addListener(S);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),p(),d.removeEventListener("cancel",g),a&&(Ne(),a=!1),d.removeEventListener("keydown",h),i==null||i.focus(),i=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:u=>x(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",borderRadius:u=>c(v(u)*2),padding:u=>c(v(u)*3),boxShadow:$("high"),"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function Ca(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:c(2),fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var uo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Vr={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},tt=e=>e==="left"||e==="right";function Br(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Ea(e={}){let{color:t="neutral",open:r=!1,placement:o="end",size:i}=e,n=y(r),a=o==="start"||o==="end",s=Br(o,!1),u=tt(s)?c(80):c(64),d=i!=null?i:u;return{_onInsert:m=>{m.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(m,h)=>{m.target===h.domElement&&n.set(!1)},_onMount:m=>{let h=m.domElement;h.setAttribute("aria-modal","true");let g=M=>{M.preventDefault(),n.set(!1)};h.addEventListener("cancel",g);let S=a&&(h.ownerDocument.documentElement.dir==="rtl"||h.ownerDocument.dir==="rtl"),p=Br(o,S);a&&(h.style.transform=uo[p],h.style.margin=Vr[p],h.style.width=tt(p)?d:"100dvw",h.style.height=tt(p)?"100dvh":d);let f=!1,b=!1,k=null,_=()=>{k=null,f&&(f=!1,typeof h.close=="function"&&h.close(),h.style.visibility="hidden",h.style.pointerEvents="none",b&&(Ne(),b=!1))},w=M=>{M.target===h&&M.propertyName==="transform"&&_()};h.addEventListener("transitionend",w);let O=M=>{M?(f=!1,h.style.visibility="visible",h.style.pointerEvents="auto",typeof h.showModal=="function"&&h.showModal(),b||(kt(),b=!0),requestAnimationFrame(()=>{h.style.transform="translate(0, 0)"})):(f=!0,h.style.transform=uo[p],k=setTimeout(_,350))};O(n.get());let D=n.addListener(O);m.addHook("Remove",()=>{k&&(clearTimeout(k),k=null),D(),h.removeEventListener("cancel",g),h.removeEventListener("transitionend",w),b&&(Ne(),b=!1)})},style:{transform:uo[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:m=>x(m,"inherit"),color:m=>l(m,"shift-10",t),backgroundColor:m=>l(m,"inherit",t),border:"none",padding:m=>c(v(m)*3),margin:Vr[s],width:tt(s)?d:"100dvw",height:tt(s)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:$("high"),"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function _a(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>x(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function Ta(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:c(3),paddingBlock:c(12),paddingInline:c(6),textAlign:"center",color:o=>l(o,"muted",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o)),opacity:.9},"& > :nth-child(2)":{color:o=>l(o,"text",t.get(o))}}}}function Ma(e={}){return{_onError:(t,r,o)=>{var n,a;(n=e.onError)==null||n.call(e,r);let i=typeof e.fallback=="function"?e.fallback(r,o):(a=e.fallback)!=null?a:{div:"An error occurred."};t.children.update([i])}}}var Oa={small:8,medium:10,large:14};function Da(e={}){var o,i;let t=y((o=e.color)!=null?o:"primary","color"),r=c(Oa[(i=e.size)!=null?i:"medium"]);return{_onInsert:n=>{n.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n,"shift-13",t.get(n)),color:n=>l(n,"shift-0","neutral"),boxShadow:$("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:n=>l(n,"shift-14",t.get(n)),boxShadow:$("medium")},"&:active:not([disabled])":{backgroundColor:n=>l(n,"shift-15",t.get(n)),boxShadow:$("low")},"&:focus-visible":{boxShadow:n=>`${$("medium")}, ${E(n,t.get(n))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function La(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:c(2),marginInline:0,marginTop:c(3),marginBottom:c(3),color:o=>l(o,"text",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:c(2)},"& figcaption":{fontSize:o=>x(o,"decrease-1"),color:o=>l(o,"muted",t.get(o)),lineHeight:1.45}}}}function Pa(e={}){var i;let{layout:t="horizontal"}=e,r=y((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:n=>{n.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:n=>c(v(n)*3),paddingBlock:n=>c(v(n)*3),border:"none",borderRadius:n=>c(v(n)*2),fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n,"inherit",r.get(n)),color:n=>l(n,"text",r.get(n)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:c(4),rowGap:c(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:n=>x(n,"inherit"),fontWeight:600,paddingBlock:n=>c(v(n)*1),borderRadius:n=>c(v(n)*2),color:n=>l(n,"text",r.get(n)),backgroundColor:n=>l(n,"inherit",r.get(n))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:n=>o?0:c(v(n)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${c(2)} * -1)`,fontSize:n=>x(n,"decrease-1"),color:n=>l(n,"text",r.get(n))}}}}var Ra={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ia(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>l(o,"shift-11",t.get(o)),marginTop:0,marginBottom:c(2),fontSize:o=>{let i=Ra[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function $a(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:c(3),marginBottom:c(3),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o))}}}function za(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:c(4),height:c(4),flexShrink:"0",fontSize:o=>x(o),backgroundColor:"transparent",color:o=>l(o,"text",t.get(o))}}}function Aa(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:c(2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o))}}}function Va(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:c(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:n=>l(n,"hover",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:n=>`${c(.5)} solid ${l(n,"inherit",r.get(n))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-3",r.get(n))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:c(1.5),boxShadow:n=>E(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Ba(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{type:"color",_onSchedule:(o,i)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),i.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),paddingBlock:o=>c(v(o)*1),paddingInline:o=>c(v(o)*1),blockSize:o=>c(6+v(o)*2),inlineSize:o=>c(6+v(o)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:o=>c(v(o)*1.5),"&:focus-visible":{boxShadow:o=>E(o,t.get(o))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>c(v(o)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`}}}}function Na(e={}){var i,n;let{mode:t="datetime-local"}=e,r=y((i=e.color)!=null?i:"neutral","color"),o=y((n=e.accentColor)!=null?n:"primary","accentColor");return{type:t,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=t},style:{fontFamily:"inherit",fontSize:a=>x(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"text",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",r.get(a))}`,borderRadius:a=>c(v(a)*1.5),paddingInline:a=>c(v(a)*3),height:a=>c(6+v(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>E(a,o.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-6","error")}`}}}}function Ha(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:n=>x(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,borderRadius:n=>c(v(n)*1.5),height:n=>c(6+v(n)*2),paddingInline:n=>c(v(n)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:n=>c(v(n)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:c(1),height:c(6),paddingInline:c(2),cursor:"pointer",color:n=>l(n,"shift-11",t.get(n)),backgroundColor:n=>l(n,"surface",t.get(n))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>E(n,r.get(n))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:n=>l(n,"muted","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,backgroundColor:n=>l(n,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:n=>l(n,"muted","neutral"),backgroundColor:n=>l(n,"shift-3","neutral")}}}}function ja(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInlineStart:n=>c(v(n)*3),paddingInlineEnd:n=>c(v(n)*1.5),paddingBlock:n=>c(v(n)*1),borderRadius:n=>c(v(n)*1.5),fontSize:n=>x(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>E(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,color:n=>l(n,"muted","neutral")}}}}function Fa(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:c(2),"& > *":{minWidth:`${c(9)}!important`}},_onMount:e=>{let t=e.domElement,r=()=>Array.from(t.querySelectorAll("input")),o=a=>{let s=r(),u=a.target,d=s.indexOf(u);u.value&&d<s.length-1&&s[d+1].focus()},i=a=>{let s=r(),u=a.target,d=s.indexOf(u);a.key==="Backspace"&&!u.value&&d>0&&s[d-1].focus(),a.key==="ArrowLeft"&&d>0&&s[d-1].focus(),a.key==="ArrowRight"&&d<s.length-1&&s[d+1].focus()},n=a=>{var g,S,p;a.preventDefault();let s=(S=(g=a.clipboardData)==null?void 0:g.getData("text"))!=null?S:"",u=r(),d=u.indexOf(a.target),m=d===-1?0:d;[...s].forEach((f,b)=>{u[m+b]&&(u[m+b].value=f)});let h=Math.min(m+s.length-1,u.length-1);(p=u[h])==null||p.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",n),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",n)})}}}var Wa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ua='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function Ka(e={}){var i,n;let t=y((i=e.color)!=null?i:"neutral","color"),r=y((n=e.accentColor)!=null?n:"primary","accentColor"),o=y(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type:d=>o.get(d)?"text":"password",ariaLabel:"Password",autocomplete:"current-password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:d=>we(o.get(d)?Ua:Wa),type:"button",ariaLabel:d=>o.get(d)?"Hide password":"Show password",onClick:()=>o.set(!o.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(s),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>c(v(a)*1),paddingBlock:a=>c(v(a)*1),paddingInline:a=>c(v(a)*3),borderRadius:a=>c(v(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,color:a=>l(a,"text",t.get(a)),backgroundColor:a=>l(a,"inherit",t.get(a)),fontSize:a=>x(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${l(a,"shift-5",r.get(a))}`},"&:focus-within":{boxShadow:a=>E(a,r.get(a))}}}}function qa(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:n=>{if(n.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),appearance:"none",display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:n=>l(n,"hover",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:"50%",boxShadow:n=>E(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Ya(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:c(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:c(1.5),borderRadius:c(999),backgroundColor:n=>l(n,"shift-3",t.get(n))},"&::-webkit-slider-thumb":{appearance:"none",width:c(4),height:c(4),borderRadius:c(999),border:"none",marginTop:`calc((${c(1.5)} - ${c(4)}) / 2)`,backgroundColor:n=>l(n,"shift-9",r.get(n))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:n=>l(n,"shift-10",r.get(n))},borderRadius:c(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>E(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Ga(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:n=>x(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,borderRadius:n=>c(v(n)*1.5),minWidth:c(32),paddingInline:n=>c(v(n)*3),paddingBlock:n=>c(v(n)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:n=>l(n,"shift-7",t.get(n))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>E(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral"),backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`}}}}function Za(e={}){var r;let t=y((r=e.accentColor)!=null?r:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit"),color:o=>l(o,"text"),appearance:"none",position:"relative",display:"inline-flex",width:c(9),height:c(6),cursor:"pointer",margin:"0",paddingBlock:c(1),transition:"box-shadow 140ms ease",borderRadius:c(999),"&:focus-visible":{boxShadow:o=>E(o,t.get(o))},"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${c(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:c(3),height:c(3),borderRadius:c(999),left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:c(999),display:"inline-block",fontSize:o=>x(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Xa(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInline:n=>c(v(n)*3),paddingBlock:n=>c(v(n)*1),borderRadius:n=>c(v(n)*1.5),fontSize:n=>x(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:n=>l(n,"shift-7")},"&:not(:placeholder-shown)":{color:n=>l(n,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>E(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,color:n=>l(n,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=error]":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=warning]":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","warning")}`}}}}function Ja(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:c(.5),paddingInline:c(1.5),borderRadius:c(1),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`}}}function Qa(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:c(2),fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),cursor:"pointer","&:focus-within":{color:n=>l(n,"shift-10",r.get(n))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral")}}}}function el(e={}){var o,i;let t=y((o=e.color)!=null?o:"primary","color"),r=y((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:n=>{n.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n),color:n=>l(n,"shift-13",t.get(n)),textDecoration:"none","&:visited":{color:n=>l(n,"shift-13",r.get(n))},"&:hover:not([disabled])":{color:n=>l(n,"shift-14",t.get(n)),textDecoration:"underline"},borderRadius:c(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>E(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral")}}}}var tl={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},ol={small:.5,medium:1,large:1.5};function rl(e={}){var s,u,d;let t=(s=e.variant)!=null?s:"outline",r=y((u=e.color)!=null?u:t==="ghost"?"neutral":"primary","color"),o=(d=e.size)!=null?d:"medium",i=ze[o];if(t==="ghost"){let m=ol[o];return{_onInsert:h=>{h.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:h=>x(h,i),textDecoration:"none",paddingBlock:h=>c(v(h)*m),paddingInline:h=>c(v(h)*m),borderRadius:h=>c(v(h)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:h=>c(v(h)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:h=>l(h,"shift-6",r.get(h)),"&:hover:not([aria-disabled=true])":{color:h=>l(h,"text",r.get(h)),backgroundColor:h=>l(h,"hover",r.get(h)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:h=>l(h,"text",r.get(h)),backgroundColor:h=>l(h,"increase-2",r.get(h))},"&:focus-visible":{boxShadow:h=>E(h,r.get(h))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:h=>l(h,"border-strong","neutral")}}}}let n=t==="solid",a=tl[o];return te(A({_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},n?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:m=>x(m,i),textDecoration:"none",paddingBlock:m=>c(v(m)*a.block),paddingInline:m=>c(v(m)*a.inline),borderRadius:m=>c(v(m)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>c(v(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:n?"none":m=>`1px solid ${l(m,"border-strong",r.get(m))}`,color:m=>n?l(m,"shift-0","neutral"):l(m,"shift-13",r.get(m)),backgroundColor:m=>n?l(m,"shift-13",r.get(m)):l(m,"inherit",r.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:m=>n?l(m,"shift-0","neutral"):l(m,"shift-14",r.get(m)),backgroundColor:m=>n?l(m,"shift-14",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([aria-disabled=true])":{backgroundColor:m=>n?l(m,"shift-15",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>E(m,r.get(m))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")}}})}function nl(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function il(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:r=>c(v(r)*2),paddingBlock:r=>c(t?1:v(r)*2),paddingInline:r=>c(v(r)*3),fontSize:r=>x(r,"inherit"),color:r=>l(r,"text")}}}function al(e={}){var i,n;let t=y((i=e.color)!=null?i:"neutral","color"),r=(n=e.accentColor)!=null?n:"primary",{dense:o=!1}=e;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>c(v(a)*2),paddingBlock:a=>c(o?1:v(a)*2),paddingInline:a=>c(v(a)*3),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),borderRadius:a=>c(v(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"hover",t.get(a))},"&:active:not([disabled])":{backgroundColor:a=>l(a,"increase-2",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>l(a,"shift-3",r),color:a=>l(a,"shift-12",r)},"&:focus-visible":{boxShadow:a=>E(a,r)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function ll(e={}){var r;let t=y((r=e.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),borderRadius:c(1),paddingInline:c(1.5)}}}function sl(e={items:[]}){var a;let{items:t=[],selectable:r=!0,color:o="neutral",accentColor:i="primary"}=e,n=y((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-0",_onSchedule:(s,u)=>{if(t.length===0)return;let d=s.nodeId,m=t.map((h,g)=>{var p;let S=(p=h.key)!=null?p:g;return te(A({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:S,type:"button",id:`menuitem${d}${S}`,role:"menuitem"},r?{ariaCurrent:f=>n.get(f)===S||void 0}:{}),{onClick:()=>{var f;r&&n.set(S),(f=h.onClick)==null||f.call(h)},onKeyDown:f=>{var O;let b=f.key;if(b==="Enter"||b===" "){f.preventDefault(),f.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(b))return;f.preventDefault();let k=t.map((D,M)=>{var P;return(P=D.key)!=null?P:M}),_=k.indexOf(S),w=_;b==="ArrowDown"?w=(_+1)%k.length:b==="ArrowUp"?w=(_-1+k.length)%k.length:b==="Home"?w=0:b==="End"&&(w=k.length-1),(O=document.getElementById(`menuitem${d}${k[w]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:c(2),width:"100%",fontSize:f=>x(f,"inherit"),height:f=>c(6+v(f)*2),paddingInline:f=>c(v(f)*3),border:"none",outline:"none",color:f=>l(f,"text",o),backgroundColor:f=>l(f,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:f=>l(f,"hover",o)},"&[aria-current=true]":{backgroundColor:f=>l(f,"shift-3",i),color:f=>l(f,"shift-13",i)},"&:focus-visible":{boxShadow:f=>E(f,i)}}})});u[s.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(v(s)*2),paddingInline:s=>c(v(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),color:s=>l(s,"text",o),borderRadius:s=>c(v(s)*2),outline:s=>`1px solid ${l(s,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:$("medium")}}}var ho=e=>!!e&&typeof e.get=="function"&&e._isState===!0,le=e=>{let t={},r=[];for(let o in e){let i=e[o];o==="x"?r.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?r.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?r.push(`scale(${i})`):o==="rotate"?r.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return r.length&&(t.transform=r.join(" ")),t};function Nr(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}function cl(e={}){var a,s,u,d;let{initial:t,animate:r,exit:o,transition:i={}}=e,n={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(u=i.easing)!=null?u:"ease",iterations:(d=i.iterations)!=null?d:1,fill:"both"};return{_onMount:m=>{let h=m.domElement;if(!h||typeof h.animate!="function")return;let g=ho(r)?r.get():r;if(Nr()){if(g?Object.assign(h.style,le(g)):t&&Object.assign(h.style,le(t)),ho(r)){let S=r.addListener(p=>{Object.assign(h.style,le(p))});m.setMetadata("motionRelease",S)}return}if(g?h.animate(t?[le(t),le(g)]:[le(g)],n):t&&Object.assign(h.style,le(t)),ho(r)){let S=r.addListener(p=>{h.animate([le(p)],n)});m.setMetadata("motionRelease",S)}},_onBeforeRemove:(m,h)=>{let g=m.domElement;if(!g||!o||typeof g.animate!="function")return h();if(Nr())return Object.assign(g.style,le(o)),h();g.animate([le(o)],n).finished.then(h,h)},_onRemove:m=>{let h=m.getMetadata("motionRelease");h==null||h()}}}function ml(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"decimal",listStylePosition:"outside"}}}function ul(e,t){if(t<=7)return Array.from({length:t},(n,a)=>a+1);let r=[1];e>3&&r.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let n=o;n<=i;n++)r.push(n);return e<t-2&&r.push("..."),r.push(t),r}function hl(e){var s;let{total:t,color:r="neutral",accentColor:o="primary"}=e,i=y((s=e.value)!=null?s:1),n={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+v(u)*2),height:u=>c(6+v(u)*2),paddingInline:u=>c(v(u)*2),borderRadius:u=>c(v(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"shift-13",r),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:u=>l(u,"shift-13",r),backgroundColor:u=>l(u,"hover",r)},"&:focus-visible":{boxShadow:u=>E(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=te(A({},n),{backgroundColor:u=>l(u,"shift-13",o),color:u=>l(u,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-13",o)}});return{role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:u=>{u.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:u=>{let d={div:m=>{let h=i.get(m),g=[];g.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:h<=1,onClick:()=>h>1&&i.set(h-1),style:n});let S=0;for(let p of ul(h,t))if(p==="...")g.push({span:"\u2026",_key:`ellipsis-${S++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:f=>c(v(f)*2),color:f=>l(f,"shift-7",r)}});else{let f=p===h;g.push({button:String(p),_key:`page-${p}`,type:"button",ariaLabel:`Page ${p}`,ariaCurrent:f?"page":void 0,disabled:f,onClick:()=>i.set(p),style:f?a:n})}return g.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:h>=t,onClick:()=>h<t&&i.set(h+1),style:n}),g},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(d)},style:{display:"inline-flex"}}}function dl(e={}){var i;let{padding:t=4,divider:r=!1}=e,o=y((i=e.color)!=null?i:"neutral","color");return{style:A({padding:n=>c(v(n)*t)},r?{borderBottom:n=>`1px solid ${l(n,"border",o.get(n))}`}:{})}}function fl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function pl(e){var g;let{open:t=!1,placement:r="bottom",openOn:o="click"}=e,i=null,n=y(t),a=y(r),{show:s,hide:u,anchorPartial:d}=ae({kind:"popover",open:n,placement:a,content:e.content,keepOpenOnContentHover:o==="hover"}),m={role:"dialog",dataTone:"shift-14",style:{backgroundColor:S=>l(S,"inherit"),borderRadius:S=>c(v(S)*2),outline:S=>`1px solid ${l(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")},_onInsert:S=>{let p=S.attributes.get("id");i=p||S.nodeId,!p&&S.attributes.set("id",i)}};return(g=e.content).$||(g.$=[]),e.content.$.push(m),z(d,{ariaHaspopup:"dialog",ariaExpanded:S=>n.get(S),onMouseEnter:(S,p)=>o==="hover"&&s(p),onMouseLeave:(S,p)=>o==="hover"&&u(p),onClick:(S,p)=>{o==="click"&&(n.get()?u(p):s(p))},onKeyDown:(S,p)=>{S.key==="Escape"&&n.get()&&u(p)},onFocus:(S,p)=>o==="hover"&&s(p),onBlur:(S,p)=>{let f=S.relatedTarget,b=p.getRoot().domElement,k=i?b.querySelector(`#${CSS.escape(i)}`):null;f&&(k!=null&&k.contains(f))||u(p)},_onMount:S=>i&&S.attributes.set("ariaControls",i)}),d}function fo(e={}){let{placement:t="bottom-end",color:r="neutral",sideOffset:o=c(6),bordered:i=!0}=e,n=y(t),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},s=m=>{var h;return(h=a[n.get(m)])!=null?h:a["bottom-end"]},u=m=>m.includes("start")?o:m.includes("end")?"auto":"50%",d=m=>m.includes("end")?o:m.includes("start")?"auto":"50%";return{style:{fontSize:m=>x(m),backgroundColor:m=>l(m),color:m=>l(m,"text",r),position:"relative","&::after":{content:'""',position:"absolute",width:c(1.5),height:c(1.5),backgroundColor:m=>l(m,"inherit",r),borderWidth:i?"1px":0,borderColor:m=>l(m,"border-strong",r),borderTopStyle:m=>{let h=s(m);return h.includes("top")||h.includes("right")?"solid":"none"},borderBottomStyle:m=>{let h=s(m);return h.includes("bottom")||h.includes("left")?"solid":"none"},borderLeftStyle:m=>{let h=s(m);return h.includes("top")||h.includes("left")?"solid":"none"},borderRightStyle:m=>{let h=s(m);return h.includes("bottom")||h.includes("right")?"solid":"none"},top:m=>{let h=s(m);return h.includes("top")?0:h.includes("bottom")?"auto":u(h)},right:m=>{let h=s(m);return h.includes("right")?0:h.includes("left")?"auto":d(h)},bottom:m=>{let h=s(m);return h.includes("bottom")?0:h.includes("top")?"auto":d(h)},left:m=>{let h=s(m);return h.includes("left")?0:h.includes("right")?"auto":u(h)},transform:m=>{let h=s(m),g=h.includes("right")||h.includes("end")&&!h.includes("left")?"50%":"-50%",S=h.includes("bottom")||h.includes("end")&&!h.includes("top")?"50%":"-50%";return`translate(${g},${S}) rotate(45deg)`}}}}}function gl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*3),borderRadius:o=>c(v(o)*2)}}}function yl(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),r=y((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:c(2),border:0,borderRadius:c(999),overflow:"hidden",backgroundColor:n=>l(n,"inherit",t.get(n)),color:n=>l(n,"text",t.get(n)),"&::-webkit-progress-bar":{backgroundColor:n=>l(n,"inherit",t.get(n)),borderRadius:c(999)},"&::-webkit-progress-value":{backgroundColor:n=>l(n,"shift-9",r.get(n)),borderRadius:c(999),transition:"width 220ms ease"}}}}var bl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',vl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function Sl(e={}){var u,d;let{max:t=5,readOnly:r=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",n=y((d=e.value)!=null?d:0),a=y(0),s=m=>{let h=a.get(m);return h>0?h:n.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:c(.5),fontSize:m=>x(m,"increase-1"),cursor:r?"default":"pointer",color:m=>l(m,"muted",i)},_onInit:m=>{for(let h=1;h<=t;h++){let g=h,S=r?{}:{onClick:()=>{let f=g===n.get()?0:g;n.set(f),o==null||o(f),a.set(0)},onMouseEnter:()=>a.set(g),onMouseLeave:()=>a.set(0),onKeyDown:f=>{var w,O;let b=n.get(),k=b;if(f.key==="ArrowRight"||f.key==="ArrowUp")k=Math.min(t,b+1),f.preventDefault();else if(f.key==="ArrowLeft"||f.key==="ArrowDown")k=Math.max(0,b-1),f.preventDefault();else return;n.set(k),o==null||o(k);let _=k>0?k-1:0;(O=(w=m.domElement)==null?void 0:w.children[_])==null||O.focus()}},p=te(A({button:f=>we(g<=s(f)?bl:vl),_key:g,type:"button",ariaLabel:`${g} star${g>1?"s":""}`},S),{style:{background:"none",border:"none",outline:"none",borderRadius:c(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>E(f,i)}}});m.children.insert(p)}}}}function xl(e={}){var u,d,m;let{size:t=16,thickness:r=.25}=e,o=y((u=e.value)!=null?u:0,"value"),i=y((d=e.color)!=null?d:"primary","color"),n=y((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-r)*100),s=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:h=>String(Math.round(o.get(h))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:h=>{h.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:c(t),height:c(t),borderRadius:"50%",color:h=>l(h,"shift-9",i.get(h)),background:h=>`conic-gradient(from -90deg, ${l(h,"shift-9",i.get(h))} ${o.get(h)}%, ${l(h,"shift-3",n.get(h))} 0%)`,WebkitMask:s,mask:s}}}function po(e={}){let{gap:t=4,align:r="center",justify:o,wrap:i=!1}=e;return{style:A(A({display:"flex",alignItems:r,gap:n=>c(v(n)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function wl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{style:{overflow:"auto",color:o=>l(o,"text",t.get(o)),"&::-webkit-scrollbar":{width:c(2),height:c(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>l(o,"shift-5",t.get(o)),borderRadius:c(999),border:`${c(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:o=>l(o,"shift-7",t.get(o))},scrollbarWidth:"thin",scrollbarColor:o=>`${l(o,"shift-5",t.get(o))} transparent`}}}function kl(e={items:[]}){var n,a,s;let{items:t=[],color:r="neutral",accentColor:o="primary"}=e,i=y((s=(a=e.value)!=null?a:(n=t[0])==null?void 0:n.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,d)=>{let m=t.map((h,g)=>{var f;let S=(f=h.key)!=null?f:String(g);return{button:[typeof h.label=="string"?{span:h.label}:h.label],_key:S,type:"button",role:"radio",ariaChecked:b=>i.get(b)===S,onClick:()=>i.set(S),style:{cursor:"pointer",fontSize:b=>x(b,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:b=>l(b,"text",r),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:b=>l(b,"shift-3",r)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:b=>l(b,"increase-2",r)},"&[aria-checked=true]":{backgroundColor:b=>l(b,"shift-0",o),color:b=>l(b,"shift-10",o),boxShadow:$("low")},"&:focus-visible":{boxShadow:b=>E(b,o)},"&[aria-checked=true]:focus-visible":{boxShadow:b=>`${$("low")}, ${E(b,o)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[u.tagName]=m},dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:c(1),paddingInline:c(1),gap:c(.5),borderRadius:c(10),backgroundColor:u=>l(u,"inherit",r),color:u=>l(u,"text",r)}}}function Cl(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>x(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"border-strong",t)}`,borderRadius:o=>c(v(o)*1.5),paddingBlock:o=>c(v(o)*1),paddingLeft:o=>c(v(o)*3),paddingRight:o=>c(v(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Qt(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${c(2)} center`,backgroundSize:`${c(2.5)} ${c(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:o=>c(6+v(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${l(o,"shift-5",r)}`},"&:focus-visible":{boxShadow:o=>E(o,r)},"& optgroup":{color:o=>l(o,"shift-11",t)},"& option[disabled]":{color:o=>l(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"muted","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function El(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=y(e.value),s=y(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"selectBox",open:s,placement:y(r),content:e.content}),h={onClick:(f,b)=>!n&&d(b),dataTone:"shift-14",style:{backgroundColor:f=>l(f,"inherit"),borderRadius:f=>c(v(f)*2),outline:f=>`1px solid ${l(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let g={div:f=>{let b=a.get(f),k=Array.isArray(b)?b:[b];return t.filter(w=>k.includes(w.value)).map(w=>({span:w.label,$:[Je({color:o,removable:n})],_key:w.value,_onRemove:O=>{let D=a.get(),P=(Array.isArray(D)?D:[D]).filter(V=>V!==w.value);n?a.set(P):a.set(P[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},S=f=>s.get()?d(f):u(f),p={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(g),onClick:(f,b)=>S(b),tabindex:0,role:"button",ariaExpanded:f=>s.get(f),ariaHaspopup:"listbox",onKeyDown:(f,b)=>{let k=f.key;if(k==="Escape"){d(b);return}if(k==="Enter"||k===" "){f.preventDefault(),S(b);return}k==="ArrowDown"&&!s.get()&&(f.preventDefault(),u(b))},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>c(6+v(f)*2),minWidth:c(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"border-strong","neutral")}`,paddingInline:f=>c(v(f)*2),borderRadius:f=>c(v(f)*1.5),fontSize:f=>x(f,"inherit"),color:f=>l(f,"text",o),backgroundColor:f=>l(f,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>E(f,o)}}};return z(m,p),m}function _l(e={}){let{accentColor:t="primary",color:r="neutral",value:o=null}=e;return{role:"option",_onInit:n=>{n.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=n.getContext("select");if(a){let s=a.value;n.attributes.set("ariaSelected",u=>{let d=s.get(u);return a.multiple?d.includes(o):d===o}),n.addEvent("click",()=>{let u=s.get();a.multiple?u.includes(o)?s.set(u.filter(d=>d!==o)):s.set(u.concat([o])):u!==o&&s.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:n=>x(n,"inherit"),height:n=>c(6+v(n)*2),paddingInline:n=>c(v(n)*3),border:"none",outline:"none",color:n=>l(n,"text",r),backgroundColor:n=>l(n,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:n=>l(n,"hover",r)},"&[aria-selected=true]":{backgroundColor:n=>l(n,"shift-6",t),color:n=>l(n,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>E(n,t)}}}}function Tl(e={}){var a;let{color:t="neutral",multiple:r=!1}=e,o=y((a=e.value)!=null?a:r?[]:null),i={div:s=>{let u=o.get(s);return(Array.isArray(u)?u:[u]).map(m=>({input:null,type:"hidden",name:e.name,value:m==null?"":String(m)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:r?"true":void 0,_context:{select:{value:o,multiple:r}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(v(s)*2),paddingInline:s=>c(v(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",t),color:s=>l(s,"text",t)}}}function Ml(e={}){var i;let t=y((i=e.color)!=null?i:"neutral","color"),r={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},o=Ie(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:n=>x(n),color:n=>l(n,"text",t.get(n)),height:c(6),display:"block",borderRadius:c(1),backgroundColor:n=>l(n,"inherit",t.get(n)),backgroundImage:n=>`linear-gradient(90deg, ${l(n,"inherit",t.get(n))} 0%, ${l(n,"shift-2",t.get(n))} 50%, ${l(n,"inherit",t.get(n))} 100%)`,backgroundSize:"200% 100%",animation:`${o} 1.6s ease-in-out infinite`,[`@keyframes ${o}`]:r}}}function Ol(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))}}}var jr={to:{transform:"rotate(360deg)"}},Hr=Ie(JSON.stringify(jr));function Dl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>x(o),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:c(6),height:c(6),borderRadius:"50%",border:o=>`${c(.5)} solid ${l(o,"border-strong",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${Hr} 0.7s linear infinite`,[`@keyframes ${Hr}`]:jr}}}function Ll(e={}){let{direction:t="horizontal",defaultSize:r=50,min:o=10,max:i=90}=e;return{_onSchedule:(n,a)=>{z(a,{_context:{splitter:{direction:t,size:y(r),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function Pl(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=e.domElement,o=t.direction==="horizontal"?"width":"height",i=t.panelCount++===0,n=s=>{r.style[o]=`${i?s:100-s}%`};n(t.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let a=t.size.addListener(n);e.addHook("Remove",a)}}}function Rl(){return{role:"separator",tabindex:0,_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=e.domElement,o=t.direction==="horizontal";r.style.cursor=o?"col-resize":"row-resize",r.setAttribute("aria-orientation",o?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(t.min)),r.setAttribute("aria-valuemax",String(t.max)),r.setAttribute("aria-valuenow",String(Math.round(t.size.get())));let i=t.size.addListener(u=>{r.setAttribute("aria-valuenow",String(Math.round(u)))}),n=u=>{let d=u.shiftKey?10:1,m=null;o?u.key==="ArrowRight"?m=Math.min(t.size.get()+d,t.max):u.key==="ArrowLeft"&&(m=Math.max(t.size.get()-d,t.min)):u.key==="ArrowDown"?m=Math.min(t.size.get()+d,t.max):u.key==="ArrowUp"&&(m=Math.max(t.size.get()-d,t.min)),u.key==="Home"?m=t.min:u.key==="End"&&(m=t.max),m!==null&&(u.preventDefault(),t.size.set(m))},a=null,s=u=>{u.preventDefault();let d=r.parentElement,m=g=>{let S=d.getBoundingClientRect(),p=o?(g.clientX-S.left)/S.width*100:(g.clientY-S.top)/S.height*100;t.size.set(Math.min(Math.max(p,t.min),t.max))},h=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h),a=null};a=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h),a=null},document.addEventListener("mousemove",m),document.addEventListener("mouseup",h)};r.addEventListener("keydown",n),r.addEventListener("mousedown",s),e.addHook("Remove",()=>{a==null||a(),i(),r.removeEventListener("keydown",n),r.removeEventListener("mousedown",s)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>l(e,"inherit"),color:e=>l(e,"text"),"&:hover":{backgroundColor:e=>l(e,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:e=>E(e,"primary")},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>l(e,"shift-4")}}}}function Il(e={}){let{gap:t=3,align:r}=e;return{style:A({display:"flex",flexDirection:"column",gap:o=>c(v(o)*t)},r?{alignItems:r}:{})}}function $l(e={items:[]}){var a;let{items:t=[],direction:r="horizontal",color:o="neutral",accentColor:i="primary"}=e,n=y((a=e.current)!=null?a:0);return{_doctorDisable:"inline-typography",_context:{steps:{current:n,direction:r,color:o,accentColor:i}},_onSchedule:(s,u)=>{let d=t.map((m,h)=>{var S;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(S=m.key)!=null?S:h,dataStep:String(h+1),dataStatus:p=>{let f=n.get(p);return h<f?"done":h===f?"active":"pending"},ariaCurrent:p=>n.get(p)===h?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:p=>x(p,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:c(6),height:c(6),borderRadius:c(999),fontSize:p=>x(p,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:p=>`2px solid ${l(p,"border-strong",o)}`,backgroundColor:p=>l(p,"inherit"),color:p=>l(p,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:c(3),right:`calc(50% + ${c(3)})`,left:`calc(-50% + ${c(3)})`,height:"2px",backgroundColor:p=>l(p,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:p=>l(p,"shift-9",i),borderColor:p=>l(p,"shift-9",i),color:p=>l(p,"shift-0",i),boxShadow:p=>`0 0 0 3px ${l(p,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:p=>l(p,"shift-9",i),borderColor:p=>l(p,"shift-9",i),color:p=>l(p,"shift-0",i)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:p=>l(p,"shift-9",i)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:p=>l(p,"shift-9",i)},"&[data-status=pending]":{color:p=>l(p,"muted")},"&[data-status=active]":{color:p=>l(p,"shift-11",i),fontWeight:"bold"},"&[data-status=done]":{color:p=>l(p,"text",o)}}}});u[s.tagName]=d},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:c(2),listStyle:"none",margin:"0",padding:"0"}}}function zl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>x(o,"inherit"),fontWeight:"bold",color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function Al(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Vl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Bl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*1),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>x(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${l(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>l(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>l(o,"hover")}}}}function Nl(e={items:[]}){var n,a,s;let{items:t=[],accentColor:r="primary",color:o="neutral"}=e,i=y((s=(a=e.activeKey)!=null?a:(n=t[0])==null?void 0:n.key)!=null?s:0);return{_onSchedule:(u,d)=>{let m=u.nodeId,g={div:t.map((p,f)=>{var _;let b=(_=p.key)!=null?_:f;return{button:[typeof p.label=="string"?{span:p.label}:p.label],_key:b,type:"button",role:"tab",id:`tab${m}${b}`,ariaControls:`panel${m}${b}`,ariaSelected:w=>i.get(w)===b,onClick:()=>i.set(b),onKeyDown:w=>{let O=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;w.preventDefault();let D=t.map((V,H)=>{var j;return(j=V.key)!=null?j:H}),M=D.indexOf(b),P=M;O==="ArrowRight"?P=(M+1)%D.length:O==="ArrowLeft"?P=(M-1+D.length)%D.length:O==="Home"?P=0:O==="End"&&(P=D.length-1),i.set(D[P])},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+v(w)*2),paddingInline:w=>c(v(w)*4),border:"none",outline:"none",color:w=>l(w,"shift-13"),backgroundColor:w=>l(w,"inherit"),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${l(w,"shift-1",o)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:w=>l(w,"shift-13"),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${l(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{color:w=>l(w,"shift-13",r),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${l(w,"shift-8",r)}`},"&:focus-visible":{boxShadow:w=>E(w,r)},"&[aria-selected=true]:focus-visible":{boxShadow:w=>`${E(w,r)}, inset 0 ${c(-.5)} 0 0 ${l(w,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},S=t.map((p,f)=>{var k;let b=(k=p.key)!=null?k:f;return{div:[p.content],_key:b,role:"tabpanel",id:`panel${m}${b}`,ariaLabelledby:`tab${m}${b}`,hidden:_=>i.get(_)!==b,style:{paddingBlock:_=>c(v(_)*2),paddingInline:_=>c(v(_)*2)}}});d[u.tagName]=[g,...S]}}}function Hl(e={}){var i,n;let t=y((i=e.color)!=null?i:"neutral","color"),r=y((n=e.accentColor)!=null?n:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let s=a.domElement;s.style.overflow="hidden";let u=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",u),u(),a.addHook("Remove",()=>s.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>c(v(a)*2),paddingBlock:a=>c(v(a)*1.5),border:"none",borderRadius:a=>c(v(a)*1.5),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",r.get(a))}`},"&:focus-visible":{boxShadow:a=>E(a,r.get(a))},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function jl(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Fl(e={}){var n,a,s;let{last:t=!1}=e,r=(n=e.color)!=null?n:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=y((s=e.active)!=null?s:!1);return{style:A({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(v(u)*2),paddingBottom:u=>t?"0":c(v(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:c(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>l(u,"shift-8",i.get(u)?o:r),opacity:u=>i.get(u)?"1":"0.4"}},t?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:u=>c(v(u)*-4),width:"2px",backgroundColor:u=>l(u,"shift-3",r)}})}}function Wl(e={}){let{position:t="top-center",color:r="neutral"}=e,o=y(!1),i=t.startsWith("top"),n=t.endsWith("center"),a=t.endsWith("right"),s={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:n?"center":a?"end":"start",inset:0,gap:c(4),zIndex:30,padding:c(6),pointerEvents:"none"}};return{_portal:u=>{let d=u.domElement.querySelector(`#domphy-toast-${t}`);return d||(d=u.children.insert(s).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:c(32),pointerEvents:"auto",paddingBlock:u=>c(v(u)*2),paddingInline:u=>c(v(u)*4),borderRadius:u=>c(v(u)*2),fontSize:u=>x(u,"inherit"),color:u=>l(u,"text",r),backgroundColor:u=>l(u,"inherit",r),boxShadow:$("medium"),opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,d)=>{let m=!1,h=null,g=()=>{m||(m=!0,h&&(clearTimeout(h),h=null),u.domElement.removeEventListener("transitionend",S),d())},S=p=>{p.propertyName==="transform"&&g()};u.domElement.addEventListener("transitionend",S),h=setTimeout(g,350),u.addHook("Remove",()=>{var p;h&&(clearTimeout(h),h=null),(p=u.domElement)==null||p.removeEventListener("transitionend",S)}),o.set(!1)}}}function Ul(e={items:[]}){var a;let{items:t=[],multiple:r=!1,color:o="neutral",accentColor:i="primary"}=e,n=y((a=e.value)!=null?a:r?[]:"");return{role:"group",_context:{toggleGroup:{value:n,multiple:r}},_onSchedule:(s,u)=>{let d=t.map((m,h)=>{var p;let g=(p=m.key)!=null?p:String(h);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,type:"button",role:"button",ariaPressed:f=>{let b=n.get(f);return Array.isArray(b)?b.includes(g):b===g},onClick:()=>{let f=n.get();if(r){let b=Array.isArray(f)?[...f]:[];n.set(b.includes(g)?b.filter(k=>k!==g):[...b,g])}else n.set(f===g?"":g)},style:{cursor:"pointer",fontSize:f=>x(f,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:f=>l(f,"shift-13",o),backgroundColor:f=>l(f,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:f=>l(f,"shift-13",o),backgroundColor:f=>l(f,"hover",o)},"&:active:not([disabled])":{backgroundColor:f=>l(f,"increase-2",o)},"&[aria-pressed=true]":{backgroundColor:f=>l(f,"shift-3",i),color:f=>l(f,"shift-13",i)},"&:focus-visible":{boxShadow:f=>E(f,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[s.tagName]=d},style:{display:"flex",paddingBlock:c(1),paddingInline:c(1),gap:c(1),borderRadius:c(2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),color:s=>l(s,"text",o),outline:s=>`1px solid ${l(s,"border",o)}`,outlineOffset:"-1px"}}}function Kl(e={}){return po({gap:e.gap})}function ql(){return{div:null,style:{flex:"1 1 0"}}}function Yl(e={}){let{open:t=!1,placement:r="top",content:o="Tooltip Content"}=e,i=y(r),n=y(o),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:S=>n.get(S),id:a},{show:u,hide:d,anchorPartial:m}=ae({kind:"tooltip",open:t,placement:i,content:s}),h={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:S=>c(v(S)*1),paddingInline:S=>c(v(S)*3),borderRadius:S=>c(v(S)*1.5),color:S=>l(S,"text"),backgroundColor:S=>l(S),fontSize:S=>x(S,"inherit"),boxShadow:$("low")},$:[fo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(h),z(m,{ariaDescribedby:a,onMouseEnter:(S,p)=>u(p),onMouseLeave:(S,p)=>d(p),onFocus:(S,p)=>u(p),onBlur:(S,p)=>d(p),onKeyDown:(S,p)=>S.key==="Escape"&&d(p)}),m}function Fr(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function Gl(e={}){let{duration:t=300,delay:r=0}=e,o=new Map,i=new Map,n=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let u of Array.from(i.values()))u();i.clear();for(let u of n)clearTimeout(u);n.clear();for(let u of a)cancelAnimationFrame(u);a.clear()})},_onBeforeUpdate:s=>{o=new Map,s.children.items.forEach((u,d)=>{if(!(u instanceof U))return;let m=u.domElement;m&&o.set(Fr(u,d),m.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((u,d)=>{var D;if(!(u instanceof U))return;let m=u.domElement;if(!m)return;let h=Fr(u,d),g=o.get(h);if(!g)return;let S=m.getBoundingClientRect(),p=g.left-S.left,f=g.top-S.top;if(Math.abs(p)<.5&&Math.abs(f)<.5)return;(D=i.get(m))==null||D(),m.style.transition="none",m.style.transform=`translate(${p}px, ${f}px)`,m.getBoundingClientRect();let b=requestAnimationFrame(()=>{a.delete(b),m.style.transition=`transform ${t}ms ease ${r}ms`,m.style.transform="translate(0px, 0px)"});a.add(b);let k=!1,_=null,w=()=>{k||(k=!0,_&&(n.delete(_),_=null),i.delete(m),m.removeEventListener("transitionend",O),m.style.transition="",m.style.transform="")},O=M=>{M.propertyName==="transform"&&w()};i.set(m,()=>{k=!0,_&&(clearTimeout(_),n.delete(_),_=null),i.delete(m),m.removeEventListener("transitionend",O)}),m.addEventListener("transitionend",O),_=setTimeout(w,t+r+34),n.add(_)}),o.clear()}}}function Zl(e={}){var r;let t=y((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"disc",listStylePosition:"outside"}}}return sn(Xl);})();
5
+ ${i}}`}function te(e){if(!ze[e])throw Error(`Theme "${e}" not found`);return ze[e]}function ii(e,t){ni(t),ze[e]||(ze[e]=no(Qe)),hn(ze[e],t),ht=null,Qt.clear()}function ai(e){let t=no(e);t.direction="lighten";for(let n in t.colors)t.colors[n].reverse(),t.baseTones[n]=t.colors[n].length-1-t.baseTones[n];return t}function io(e){let t=Qt.get(e);if(t)return t;let n=te(e),o=ro(n),i={};for(let r in n){let a=n[r];if(r==="colors")for(let l in n.colors){let u={};[...Array(o).keys()].forEach(d=>u[d]=n.colors[l][d]),i[l]=u}else if(r==="fontSizes")i.fontSizes=n.fontSizes;else if(r==="densities")i.densities=n.densities;else if(r==="custom"&&(i.custom={},a&&typeof a=="object"))for(let l in a)i.custom[l]=a[l]}return Qt.set(e,i),i}function dt(){if(ht)return ht;let e=te("light"),t=ro(e),n={};for(let o in e){let i=e[o];if(o==="colors")for(let r in e.colors){let a={};[...Array(t).keys()].forEach(l=>a[l]=`var(--${r}-${l})`),n[r]=a}else if(o==="fontSizes")n.fontSizes=[...Array(Ie).keys()].map(r=>`var(--fontSize-${r})`);else if(o==="custom"&&(n.custom={},i&&typeof i=="object"))for(let r in i)n.custom[r]=`var(--custom-${un(r)})`}return ht=n,n}function eo(){return Object.entries(ze).map(([e,t])=>ri(e,t)).join(`
6
+ `)}function li(e){var t;if(typeof document!="undefined")if(e){e.textContent=eo();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=eo(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function si(e,t,n=320,o=1280){let i=e/4,r=t/4,a=(r-i)/(o-n)*100,l=i-a*n/100,u=parseFloat(l.toFixed(4))===0?`${a.toFixed(4)}vw`:`${l.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${r}em)`}function ci(e,t={}){if(typeof document=="undefined")throw new Error('applySystemTheme() requires a browser DOM \u2014 "document" is not defined. For SSR, call it only on the client (e.g. inside an _onMount lifecycle hook, or behind a typeof window !== "undefined" guard).');let n=e!=null?e:document.documentElement,{persist:o=!0,storageKey:i="dp-theme"}=t,r=()=>{if(o){let u=localStorage.getItem(i);if(u==="light"||u==="dark")return u}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};n.setAttribute("data-theme",r());let a=window.matchMedia("(prefers-color-scheme: dark)"),l=u=>{(!o||!localStorage.getItem(i))&&n.setAttribute("data-theme",u.matches?"dark":"light")};return a.addEventListener("change",l),()=>a.removeEventListener("change",l)}function pt(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let n="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(n=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),n}var mi=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],to=["inherit"];[...Array(5).keys()].forEach(e=>{to.push(`decrease-${e}`),to.push(`increase-${e}`)});function ui(e,t="inherit"){if(!to.includes(t))throw Error(`density name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(4,n))}function hi(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataDensity"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(n=ui(n,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),n}function v(e){let t=hi(e);return te(e?pt(e):"light").densities[t]}var di=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],fi=[.75,1,1.5,2,2.5];function pi(e,t){let n=Xt(Xe(t)),o=0,i=1/0;for(let r=0;r<e.length;r++){let a=ln(n,Xt(Xe(e[r])));a<i&&(i=a,o=r)}return o}function gi(e,t={}){var n,o,i,r,a,l;let u=(n=t.steps)!=null?n:18,d={},m={};for(let[h,f]of Object.entries(e)){let S;try{S=Zt(f)}catch(p){throw new Error(`baseColors.${h}: ${p instanceof Error?p.message:String(p)}`)}let g=cn(S,u);d[h]=g,m[h]=pi(g,S)}return{direction:(o=t.direction)!=null?o:"darken",colors:d,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:di,densities:(r=t.densities)!=null?r:fi,darkBias:(a=t.darkBias)!=null?a:1,custom:(l=t.custom)!=null?l:{}}}var oo=["inherit"];[...Array(8).keys()].forEach(e=>{oo.push(`decrease-${e}`),oo.push(`increase-${e}`)});function dn(e,t="inherit"){if(!oo.includes(t))throw Error(`size name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(7,n))}function yi(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataSize"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(n=dn(n,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),n}function x(e,t="inherit"){let n=dn(yi(e),t);return dt().fontSizes[n]}var ft={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},Je=["inherit","base",...Object.keys(ft)];[...Array(q).keys()].forEach(e=>{Je.push(`decrease-${e}`),Je.push(`increase-${e}`),Je.push(`shift-${e}`)});function mn(e,t){if(e<0||e>q-1)return e;let n=e+t;return n=Math.max(0,Math.min(q-1,n)),n}function bi(e,t){if(e<0||e>q-1)return e;let n=Math.floor((q-1)/2),o=e<=n?e+t:e-t;return o=Math.max(0,Math.min(q-1,o)),o}function Ae(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!Je.includes(t))throw Error(`tone name "${t}" invalid`);if(t in ft&&(t=ft[t]),t.startsWith("increase-")){let n=parseInt(t.replace("increase-",""),10);return mn(e,n)}else if(t.startsWith("decrease-")){let n=parseInt(t.replace("decrease-",""),10);return mn(e,-n)}else if(t.startsWith("shift-")){let n=parseInt(t.replace("shift-",""),10);return bi(e,n)}else return e}function fn(e){if(!e)return 0;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTone"));)t=t.parent;let n=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(n=Ae(n,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),n}function pn(e,t,n){return n<=0?e:t==="lighten"&&e===0?n:t==="darken"&&e===q-1?q-1-n:e}function s(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n;if(!e){let l=dt()[o];if(!l)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?l[te("light").baseTones[o]]:l[Ae(0,t)]}let i=pt(e),r;if(t==="base")r=te(i).baseTones[o];else{let l=te(i),u=pn(fn(e),l.direction,l.darkBias);r=Ae(u,t)}let a=dt()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[r]}function ao(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n,i=e?pt(e):"light",r=io(i)[o];if(!r)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?r[te("light").baseTones[o]]:r[Ae(0,t)];let a;if(t==="base")a=te(i).baseTones[o];else{let l=te(i),u=pn(fn(e),l.direction,l.darkBias);a=Ae(u,t)}return r[a]}function vi(e={}){let{theme:t="light",tone:n="inherit",color:o="inherit"}=e,i=o==="inherit"?"neutral":o,r=io(t)[i];if(!r)throw Error(`color "${i}" not found on theme "${t}"`);return n==="base"?r[te(t).baseTones[i]]:r[Ae(0,n)]}var Ot={};lt(Ot,{abbreviation:()=>Si,accordion:()=>xi,alert:()=>wi,avatar:()=>ki,badge:()=>Ci,blockquote:()=>Ei,breadcrumb:()=>_i,breadcrumbEllipsis:()=>Ti,button:()=>Oi,buttonGhost:()=>lo,buttonSwitch:()=>Li,card:()=>Ri,code:()=>$i,combobox:()=>ka,command:()=>Ca,commandItem:()=>_a,commandSearch:()=>Ea,datePicker:()=>Da,descriptionList:()=>La,details:()=>Pa,dialog:()=>$a,divider:()=>Ia,drawer:()=>za,elevation:()=>A,emphasis:()=>Aa,empty:()=>Na,errorBoundary:()=>Ba,fab:()=>Ha,figure:()=>ja,focusRing:()=>E,formGroup:()=>Fa,grid:()=>Wa,heading:()=>qa,horizontalRule:()=>Ka,icon:()=>Ga,image:()=>Ya,inputCheckbox:()=>Za,inputColor:()=>Xa,inputDateTime:()=>Ja,inputFile:()=>Qa,inputNumber:()=>el,inputOTP:()=>tl,inputPassword:()=>rl,inputRadio:()=>il,inputRange:()=>al,inputSearch:()=>ll,inputSwitch:()=>sl,inputText:()=>cl,keyboard:()=>ml,label:()=>ul,link:()=>hl,linkButton:()=>pl,list:()=>gl,listItem:()=>yl,listItemButton:()=>bl,mark:()=>vl,menu:()=>Sl,motion:()=>xl,orderedList:()=>wl,pagination:()=>Cl,panelSection:()=>El,paragraph:()=>_l,popover:()=>Tl,popoverArrow:()=>xo,preformated:()=>Dl,progress:()=>Ml,rating:()=>Pl,ringProgress:()=>Rl,row:()=>wo,scrollArea:()=>$l,segmented:()=>Il,select:()=>zl,selectBox:()=>Al,selectItem:()=>Nl,selectList:()=>Bl,skeleton:()=>Vl,small:()=>Hl,spinner:()=>jl,splitter:()=>Fl,splitterHandle:()=>Ul,splitterPanel:()=>Wl,stack:()=>ql,steps:()=>Kl,strong:()=>Gl,subscript:()=>Yl,superscript:()=>Zl,table:()=>Xl,tabs:()=>Jl,tag:()=>ot,textarea:()=>Ql,timeline:()=>es,timelineItem:()=>ts,toast:()=>os,toggleGroup:()=>ns,toolbar:()=>rs,toolbarSpacer:()=>is,tooltip:()=>as,transitionGroup:()=>ls,unorderedList:()=>ss,visuallyHidden:()=>cs});function Si(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:r=>x(r),backgroundColor:r=>s(r),color:r=>s(r,"shift-10",t.get(r)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:r=>s(r,"shift-7",t.get(r)),textUnderlineOffset:c(.72),cursor:"help","&:hover":{color:r=>s(r,"shift-11",n.get(r)),textDecorationColor:r=>s(r,"shift-9",n.get(r))}}}}function E(e,t="primary"){let n=s(e,"surface"),o=s(e,"shift-9",t);return`0 0 0 2px ${n}, 0 0 0 4px ${o}`}function xi(e={}){var i,r;let{type:t="single"}=e,n=y((i=e.color)!=null?i:"neutral","color"),o=y((r=e.accentColor)!=null?r:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let l=a.domElement;if(!l)return;let u=d=>{let m=d.target.closest("summary");if(!m)return;let h=m.closest("details");!h||h.parentElement!==l||h.open||Array.from(l.querySelectorAll(":scope > details")).forEach(f=>{f!==h&&(f.open=!1)})};l.addEventListener("click",u),a.addHook("Remove",()=>l.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(v(a)*1.5),outline:a=>`1px solid ${s(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>s(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${s(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>E(a,o.get(a))}}}}function wi(e={}){var n;let t=y((n=e.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:c(3),paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),borderRadius:o=>c(v(o)*1.5),boxShadow:o=>`inset ${c(1)} 0 0 0 ${s(o,"shift-8",t.get(o))}`,backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"shift-10",t.get(o)),fontSize:o=>x(o,"inherit")}}}function ki(e={}){var n;let t=y((n=e.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:c(9),height:c(9),fontSize:o=>x(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"shift-11",t.get(o)),boxShadow:o=>`0 0 0 1px ${s(o,"border",t.get(o))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function Ci(e={}){var i;let{label:t=999}=e,n=y(t),o=y((i=e.color)!=null?i:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:r=>`"${n.get(r)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:c(1.5),minWidth:c(5),height:c(5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r=>x(r,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:c(999),backgroundColor:r=>s(r,"shift-9",o.get(r)),color:r=>s(r,"shift-0",o.get(r)),boxShadow:r=>`0 0 0 1px ${s(r,"shift-0",o.get(r))}`}}}}function Ei(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"text",t.get(o)),boxShadow:o=>`inset ${c(1)} 0 0 0 ${s(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),margin:0}}}function _i(e={}){var o;let{separator:t="/"}=e,n=y((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>x(i,"inherit"),gap:c(1),color:i=>s(i,"text",n.get(i)),backgroundColor:i=>s(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>s(i,"muted",n.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>s(i,"shift-4",n.get(i)),paddingInlineStart:c(1)},"& > [aria-current=page]":{color:i=>s(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}function Ti(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>x(o,"inherit"),paddingInline:c(1),border:"none",background:"none",cursor:"pointer",color:o=>s(o,"muted",t.get(o)),borderRadius:c(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:o=>s(o,"shift-10",t.get(o)),backgroundColor:o=>s(o,"hover",t.get(o))},"&:focus-visible":{boxShadow:o=>E(o,t.get(o))}}}}var Ne={small:"decrease-1",medium:"inherit",large:"increase-1"};var Di={small:.5,medium:1,large:1.5};function lo(e={}){var i,r,a;let t=y((i=e.color)!=null?i:"neutral","color"),n=Di[(r=e.size)!=null?r:"medium"],o=Ne[(a=e.size)!=null?a:"medium"];return{_onInsert:l=>{l.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:l=>x(l,o),paddingBlock:l=>c(v(l)*n),paddingInline:l=>c(v(l)*n),borderRadius:l=>c(v(l)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>c(v(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:l=>s(l,"shift-6",t.get(l)),"&:hover:not([disabled]):not([aria-busy=true])":{color:l=>s(l,"text",t.get(l)),backgroundColor:l=>s(l,"hover",t.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{color:l=>s(l,"text",t.get(l)),backgroundColor:l=>s(l,"increase-2",t.get(l))},"&:focus-visible":{boxShadow:l=>E(l,t.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:l=>s(l,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Mi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Oi(e={}){var a,l,u,d;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return lo({color:e.color,size:e.size});let n=y((l=e.color)!=null?l:"primary","color"),o=t==="solid",i=Mi[(u=e.size)!=null?u:"medium"],r=Ne[(d=e.size)!=null?d:"medium"];return J(N({_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},o?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:m=>x(m,r),paddingBlock:m=>c(v(m)*i.block),paddingInline:m=>c(v(m)*i.inline),borderRadius:m=>c(v(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(v(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o?"none":m=>`1px solid ${s(m,"border-strong",n.get(m))}`,color:m=>o?s(m,"shift-0","neutral"):s(m,"shift-13",n.get(m)),backgroundColor:m=>o?s(m,"shift-13",n.get(m)):s(m,"inherit",n.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:m=>o?s(m,"shift-0","neutral"):s(m,"shift-14",n.get(m)),backgroundColor:m=>o?s(m,"shift-14",n.get(m)):s(m,"hover",n.get(m))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:m=>o?s(m,"shift-15",n.get(m)):s(m,"increase-2",n.get(m))},"&:focus-visible":{boxShadow:m=>E(m,n.get(m))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:m=>s(m,"shift-2","neutral"),outline:m=>`1px solid ${s(m,"border-strong","neutral")}`,color:m=>s(m,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}function Li(e={}){var r,a;let{checked:t=!1}=e,n=y(t),o=y((r=e.color)!=null?r:"neutral","color"),i=y((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:l=>{l.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:l=>n.get(l),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>x(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${s(l,"border",o.get(l))}`,minWidth:c(12),minHeight:c(6),borderRadius:c(999),paddingLeft:c(7),paddingRight:c(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:l=>s(l,"inherit",o.get(l)),color:l=>s(l,"text",o.get(l)),"&:focus-visible":{boxShadow:l=>E(l,i.get(l))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:c(5),height:c(5),borderRadius:c(999),color:l=>s(l,"text"),backgroundColor:l=>s(l,"decrease-2",o.get(l))},"&[aria-checked=true]":{backgroundColor:l=>s(l,"increase-3",i.get(l)),outline:"none",color:l=>s(l,"decrease-2"),paddingLeft:c(2),paddingRight:c(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${c(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Pi={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function A(e){return Pi[e]}function Ri(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>c(v(o)*2),backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"shift-10",t.get(o)),outline:o=>`1px solid ${s(o,"border-strong",t.get(o))}`,outlineOffset:"-1px",boxShadow:A("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),fontWeight:"600",color:o=>s(o,"shift-11",t.get(o)),margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(v(o)*4),paddingBottom:o=>c(v(o)*2),color:o=>s(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(v(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(v(o)*4),color:o=>s(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*4),borderTop:o=>`1px solid ${s(o,"border",t.get(o))}`}}}}function $i(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),height:c(6),paddingInline:c(1.5),borderRadius:c(1)}}}var Ii=Object.defineProperty,zi=Object.defineProperties,Ai=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,_n=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,gn=(e,t,n)=>t in e?Ii(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))_n.call(t,n)&&gn(e,n,t[n]);if(bt)for(var n of bt(t))Tn.call(t,n)&&gn(e,n,t[n]);return e},_e=(e,t)=>zi(e,Ai(t)),Dn=(e,t)=>{var n={};for(var o in e)_n.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&bt)for(var o of bt(e))t.indexOf(o)<0&&Tn.call(e,o)&&(n[o]=e[o]);return n},Me=(e,t,n)=>new Promise((o,i)=>{var r=u=>{try{l(n.next(u))}catch(d){i(d)}},a=u=>{try{l(n.throw(u))}catch(d){i(d)}},l=u=>u.done?o(u.value):Promise.resolve(u.value).then(r,a);l((n=n.apply(e,t)).next())}),Ni=["top","right","bottom","left"],yn=["start","end"],Ec=Ni.reduce((e,t)=>e.concat(t,`${t}-${yn[0]}`,`${t}-${yn[1]}`),[]),vt=Math.min,Ee=Math.max,St=Math.round,yt=Math.floor,le=e=>({x:e,y:e}),Bi={left:"right",right:"left",bottom:"top",top:"bottom"};function bn(e,t,n){return Ee(e,vt(t,n))}function kt(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function Mn(e){return e==="x"?"y":"x"}function On(e){return e==="y"?"height":"width"}function be(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ln(e){return Mn(be(e))}function Vi(e,t,n=!1){let o=Ct(e),i=Ln(e),r=On(i),a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=xt(a)),[a,xt(a)]}function Hi(e){let t=xt(e);return[mo(e),t,mo(t)]}function mo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var vn=["left","right"],Sn=["right","left"],ji=["top","bottom"],Fi=["bottom","top"];function Wi(e,t,n){switch(e){case"top":case"bottom":return n?t?Sn:vn:t?vn:Sn;case"left":case"right":return t?ji:Fi;default:return[]}}function Ui(e,t,n,o){let i=Ct(e),r=Wi(Te(e),n==="start",o);return i&&(r=r.map(a=>`${a}-${i}`),t&&(r=r.concat(r.map(mo)))),r}function xt(e){let t=Te(e);return Bi[t]+e.slice(t.length)}function qi(e){return oe({top:0,right:0,bottom:0,left:0},e)}function Ki(e){return typeof e!="number"?qi(e):{top:e,right:e,bottom:e,left:e}}function wt(e){let{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function xn({reference:e,floating:t},n,o){let i=be(n),r=Ln(n),a=On(r),l=Te(n),u=i==="y",d=e.x+e.width/2-t.width/2,m=e.y+e.height/2-t.height/2,h=e[a]/2-t[a]/2,f;switch(l){case"top":f={x:d,y:e.y-t.height};break;case"bottom":f={x:d,y:e.y+e.height};break;case"right":f={x:e.x+e.width,y:m};break;case"left":f={x:e.x-t.width,y:m};break;default:f={x:e.x,y:e.y}}switch(Ct(n)){case"start":f[r]-=h*(o&&u?-1:1);break;case"end":f[r]+=h*(o&&u?-1:1);break;default:}return f}function Gi(e){return Me(this,arguments,function*(t,n={}){var o,i,r,a,l,u;let{x:d,y:m,platform:h,rects:f,elements:S,strategy:g}=t,{boundary:p="clippingAncestors",rootBoundary:b="viewport",elementContext:k="floating",altBoundary:_=!1,padding:w=0}=kt(n,t),T=Ki(w),M=S[_?k==="floating"?"reference":"floating":k],L=wt(yield h.getClippingRect({element:(i=yield(o=h.isElement)==null?void 0:o.call(h,M))==null||i?M:M.contextElement||(yield(r=h.getDocumentElement)==null?void 0:r.call(h,S.floating)),boundary:p,rootBoundary:b,strategy:g})),R=k==="floating"?{x:d,y:m,width:f.floating.width,height:f.floating.height}:f.reference,P=yield(a=h.getOffsetParent)==null?void 0:a.call(h,S.floating),z=(yield(l=h.isElement)==null?void 0:l.call(h,P))?(yield(u=h.getScale)==null?void 0:u.call(h,P))||{x:1,y:1}:{x:1,y:1},V=wt(h.convertOffsetParentRelativeRectToViewportRelativeRect?yield h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:S,rect:R,offsetParent:P,strategy:g}):R);return{top:(L.top-V.top+T.top)/z.y,bottom:(V.bottom-L.bottom+T.bottom)/z.y,left:(L.left-V.left+T.left)/z.x,right:(V.right-L.right+T.right)/z.x}})}var Yi=50,Zi=(e,t,n)=>Me(null,null,function*(){var o;let{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:l}=n,u=l.detectOverflow?l:_e(oe({},l),{detectOverflow:Gi}),d=yield(o=l.isRTL)==null?void 0:o.call(l,t),m=yield l.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:f}=xn(m,i,d),S=i,g=0,p={};for(let b=0;b<a.length;b++){let k=a[b];if(!k)continue;let{name:_,fn:w}=k,{x:T,y:M,data:L,reset:R}=yield w({x:h,y:f,initialPlacement:i,placement:S,strategy:r,middlewareData:p,rects:m,platform:u,elements:{reference:e,floating:t}});h=T!=null?T:h,f=M!=null?M:f,p[_]=oe(oe({},p[_]),L),R&&g<Yi&&(g++,typeof R=="object"&&(R.placement&&(S=R.placement),R.rects&&(m=R.rects===!0?yield l.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:h,y:f}=xn(m,S,d)),b=-1)}return{x:h,y:f,placement:S,strategy:r,middlewareData:p}});var Xi=(e={})=>({name:"flip",options:e,fn(t){return Me(this,null,function*(){var n,o,i,r,a,l;let{placement:u,middlewareData:d,rects:m,initialPlacement:h,platform:f,elements:S}=t,g=kt(e,t),{mainAxis:p=!0,crossAxis:b=!0,fallbackPlacements:k,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:T=!0}=g,M=Dn(g,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=d.arrow)!=null&&n.alignmentOffset)return{};let L=Te(u),R=be(h),P=Te(h)===h,z=yield(o=f.isRTL)==null?void 0:o.call(f,S.floating),V=k||(P||!T?[xt(h)]:Hi(h)),ie=w!=="none";!k&&ie&&V.push(...Ui(h,T,w,z));let ue=[h,...V],pe=yield f.detectOverflow(t,M),W=[],he=((i=d.flip)==null?void 0:i.overflows)||[];if(p&&W.push(pe[L]),b){let de=Vi(u,m,z);W.push(pe[de[0]],pe[de[1]])}if(he=[...he,{placement:u,overflows:W}],!W.every(de=>de<=0)){let de=(((r=d.flip)==null?void 0:r.index)||0)+1,We=ue[de];if(We&&(!(b==="alignment"&&R!==be(We))||he.every(K=>be(K.placement)===R?K.overflows[0]>0:!0)))return{data:{index:de,overflows:he},reset:{placement:We}};let Se=(a=he.filter(K=>K.overflows[0]<=0).sort((K,Q)=>K.overflows[1]-Q.overflows[1])[0])==null?void 0:a.placement;if(!Se)switch(_){case"bestFit":{let K=(l=he.filter(Q=>{if(ie){let ee=be(Q.placement);return ee===R||ee==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(ee=>ee>0).reduce((ee,Ue)=>ee+Ue,0)]).sort((Q,ee)=>Q[1]-ee[1])[0])==null?void 0:l[0];K&&(Se=K);break}case"initialPlacement":Se=h;break;default:}if(u!==Se)return{reset:{placement:Se}}}return{}})}});var Ji=new Set(["left","top"]);function Qi(e,t){return Me(this,null,function*(){var n;let{placement:o,platform:i,elements:r}=e,a=yield(n=i.isRTL)==null?void 0:n.call(i,r.floating),l=Te(o),u=Ct(o),d=be(o)==="y",m=Ji.has(l)?-1:1,h=a&&d?-1:1,f=kt(t,e),{mainAxis:S,crossAxis:g,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&typeof p=="number"&&(g=u==="end"?p*-1:p),d?{x:g*h,y:S*m}:{x:S*m,y:g*h}})}var ea=(e=0)=>({name:"offset",options:e,fn(t){return Me(this,null,function*(){var n,o;let{x:i,y:r,placement:a,middlewareData:l}=t,u=yield Qi(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:_e(oe({},u),{placement:a})}})}}),ta=(e={})=>({name:"shift",options:e,fn(t){return Me(this,null,function*(){let{x:n,y:o,placement:i,platform:r}=t,a=kt(e,t),{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:({x:_,y:w})=>({x:_,y:w})}}=a,m=Dn(a,["mainAxis","crossAxis","limiter"]),h={x:n,y:o},f=yield r.detectOverflow(t,m),S=be(Te(i)),g=Mn(S),p=h[g],b=h[S];if(l){let _=g==="y"?"top":"left",w=g==="y"?"bottom":"right",T=p+f[_],M=p-f[w];p=bn(T,p,M)}if(u){let _=S==="y"?"top":"left",w=S==="y"?"bottom":"right",T=b+f[_],M=b-f[w];b=bn(T,b,M)}let k=d.fn(_e(oe({},t),{[g]:p,[S]:b}));return _e(oe({},k),{data:{x:k.x-n,y:k.y-o,enabled:{[g]:l,[S]:u}}})})}});function Et(){return typeof window!="undefined"}function He(e){return Pn(e)?(e.nodeName||"").toLowerCase():"#document"}function Z(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function se(e){var t;return(t=(Pn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pn(e){return Et()?e instanceof Node||e instanceof Z(e).Node:!1}function ne(e){return Et()?e instanceof Element||e instanceof Z(e).Element:!1}function fe(e){return Et()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function wn(e){return!Et()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}function tt(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=re(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function oa(e){return/^(table|td|th)$/.test(He(e))}function _t(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var na=/transform|translate|scale|rotate|perspective|filter/,ra=/paint|layout|strict|content/,Ce=e=>!!e&&e!=="none",so;function ho(e){let t=ne(e)?re(e):e;return Ce(t.transform)||Ce(t.translate)||Ce(t.scale)||Ce(t.rotate)||Ce(t.perspective)||!fo()&&(Ce(t.backdropFilter)||Ce(t.filter))||na.test(t.willChange||"")||ra.test(t.contain||"")}function ia(e){let t=ve(e);for(;fe(t)&&!Ve(t);){if(ho(t))return t;if(_t(t))return null;t=ve(t)}return null}function fo(){return so==null&&(so=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),so}function Ve(e){return/^(html|body|#document)$/.test(He(e))}function re(e){return Z(e).getComputedStyle(e)}function Tt(e){return ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(He(e)==="html")return e;let t=e.assignedSlot||e.parentNode||wn(e)&&e.host||se(e);return wn(t)?t.host:t}function Rn(e){let t=ve(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:fe(t)&&tt(t)?t:Rn(t)}function et(e,t=[],n=!0){var o;let i=Rn(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=Z(i);if(r){let l=uo(a);return t.concat(a,a.visualViewport||[],tt(i)?i:[],l&&n?et(l):[])}else return t.concat(i,et(i,[],n))}function uo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $n(e){let t=re(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=fe(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,l=St(n)!==r||St(o)!==a;return l&&(n=r,o=a),{width:n,height:o,$:l}}function po(e){return ne(e)?e:e.contextElement}function Be(e){let t=po(e);if(!fe(t))return le(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=$n(t),a=(r?St(n.width):n.width)/o,l=(r?St(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}var aa=le(0);function In(e){let t=Z(e);return!fo()||!t.visualViewport?aa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function la(e,t=!1,n){return!n||t&&n!==Z(e)?!1:t}function De(e,t=!1,n=!1,o){let i=e.getBoundingClientRect(),r=po(e),a=le(1);t&&(o?ne(o)&&(a=Be(o)):a=Be(e));let l=la(r,n,o)?In(r):le(0),u=(i.left+l.x)/a.x,d=(i.top+l.y)/a.y,m=i.width/a.x,h=i.height/a.y;if(r){let f=Z(r),S=o&&ne(o)?Z(o):o,g=f,p=uo(g);for(;p&&o&&S!==g;){let b=Be(p),k=p.getBoundingClientRect(),_=re(p),w=k.left+(p.clientLeft+parseFloat(_.paddingLeft))*b.x,T=k.top+(p.clientTop+parseFloat(_.paddingTop))*b.y;u*=b.x,d*=b.y,m*=b.x,h*=b.y,u+=w,d+=T,g=Z(p),p=uo(g)}}return wt({width:m,height:h,x:u,y:d})}function Dt(e,t){let n=Tt(e).scrollLeft;return t?t.left+n:De(se(e)).left+n}function zn(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Dt(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function sa({elements:e,rect:t,offsetParent:n,strategy:o}){let i=o==="fixed",r=se(n),a=e?_t(e.floating):!1;if(n===r||a&&i)return t;let l={scrollLeft:0,scrollTop:0},u=le(1),d=le(0),m=fe(n);if((m||!m&&!i)&&((He(n)!=="body"||tt(r))&&(l=Tt(n)),m)){let f=De(n);u=Be(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}let h=r&&!m&&!i?zn(r,l):le(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:t.y*u.y-l.scrollTop*u.y+d.y+h.y}}function ca(e){return Array.from(e.getClientRects())}function ma(e){let t=se(e),n=Tt(e),o=e.ownerDocument.body,i=Ee(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=Ee(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-n.scrollLeft+Dt(e),l=-n.scrollTop;return re(o).direction==="rtl"&&(a+=Ee(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:l}}var kn=25;function ua(e,t){let n=Z(e),o=se(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,l=0,u=0;if(i){r=i.width,a=i.height;let m=fo();(!m||m&&t==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}let d=Dt(o);if(d<=0){let m=o.ownerDocument,h=m.body,f=getComputedStyle(h),S=m.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(o.clientWidth-h.clientWidth-S);g<=kn&&(r-=g)}else d<=kn&&(r+=d);return{width:r,height:a,x:l,y:u}}function ha(e,t){let n=De(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=fe(e)?Be(e):le(1),a=e.clientWidth*r.x,l=e.clientHeight*r.y,u=i*r.x,d=o*r.y;return{width:a,height:l,x:u,y:d}}function Cn(e,t,n){let o;if(t==="viewport")o=ua(e,n);else if(t==="document")o=ma(se(e));else if(ne(t))o=ha(t,n);else{let i=In(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return wt(o)}function An(e,t){let n=ve(e);return n===t||!ne(n)||Ve(n)?!1:re(n).position==="fixed"||An(n,t)}function da(e,t){let n=t.get(e);if(n)return n;let o=et(e,[],!1).filter(l=>ne(l)&&He(l)!=="body"),i=null,r=re(e).position==="fixed",a=r?ve(e):e;for(;ne(a)&&!Ve(a);){let l=re(a),u=ho(a);!u&&l.position==="fixed"&&(i=null),(r?!u&&!i:!u&&l.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||tt(a)&&!u&&An(e,a))?o=o.filter(d=>d!==a):i=l,a=ve(a)}return t.set(e,o),o}function fa({element:e,boundary:t,rootBoundary:n,strategy:o}){let i=[...t==="clippingAncestors"?_t(e)?[]:da(e,this._c):[].concat(t),n],r=Cn(e,i[0],o),a=r.top,l=r.right,u=r.bottom,d=r.left;for(let m=1;m<i.length;m++){let h=Cn(e,i[m],o);a=Ee(h.top,a),l=vt(h.right,l),u=vt(h.bottom,u),d=Ee(h.left,d)}return{width:l-d,height:u-a,x:d,y:a}}function pa(e){let{width:t,height:n}=$n(e);return{width:t,height:n}}function ga(e,t,n){let o=fe(t),i=se(t),r=n==="fixed",a=De(e,!0,r,t),l={scrollLeft:0,scrollTop:0},u=le(0);function d(){u.x=Dt(i)}if(o||!o&&!r)if((He(t)!=="body"||tt(i))&&(l=Tt(t)),o){let S=De(t,!0,r,t);u.x=S.x+t.clientLeft,u.y=S.y+t.clientTop}else i&&d();r&&!o&&i&&d();let m=i&&!o&&!r?zn(i,l):le(0),h=a.left+l.scrollLeft-u.x-m.x,f=a.top+l.scrollTop-u.y-m.y;return{x:h,y:f,width:a.width,height:a.height}}function co(e){return re(e).position==="static"}function En(e,t){if(!fe(e)||re(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return se(e)===n&&(n=n.ownerDocument.body),n}function Nn(e,t){let n=Z(e);if(_t(e))return n;if(!fe(e)){let i=ve(e);for(;i&&!Ve(i);){if(ne(i)&&!co(i))return i;i=ve(i)}return n}let o=En(e,t);for(;o&&oa(o)&&co(o);)o=En(o,t);return o&&Ve(o)&&co(o)&&!ho(o)?n:o||ia(e)||n}var ya=function(e){return Me(this,null,function*(){let t=this.getOffsetParent||Nn,n=this.getDimensions,o=yield n(e.floating);return{reference:ga(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function ba(e){return re(e).direction==="rtl"}var va={convertOffsetParentRelativeRectToViewportRelativeRect:sa,getDocumentElement:se,getClippingRect:fa,getOffsetParent:Nn,getElementRects:ya,getClientRects:ca,getDimensions:pa,getScale:Be,isElement:ne,isRTL:ba};function Bn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sa(e,t){let n=null,o,i=se(e);function r(){clearTimeout(o),n==null||n.disconnect(),n=null}function a(l=!1,u=1){r();let d=e.getBoundingClientRect(),{left:m,top:h,width:f,height:S}=d;if(l||t(),!f||!S)return;let g=yt(h),p=yt(i.clientWidth-(m+f)),b=yt(i.clientHeight-(h+S)),k=yt(m),_={rootMargin:`${-g}px ${-p}px ${-b}px ${-k}px`,threshold:Ee(0,vt(1,u))||1},w=!0;function T(M){let L=M[0].intersectionRatio;if(L!==u){if(!w)return a();L?a(!1,L):o=setTimeout(()=>{a(!1,1e-7)},1e3)}L===1&&!Bn(d,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver(T,_e(oe({},_),{root:i.ownerDocument}))}catch(M){n=new IntersectionObserver(T,_)}n.observe(e)}return a(!0),r}function Vn(e,t,n,o={}){let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=po(e),m=i||r?[...d?et(d):[],...t?et(t):[]]:[];m.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),r&&k.addEventListener("resize",n)});let h=d&&l?Sa(d,n):null,f=-1,S=null;a&&(S=new ResizeObserver(([k])=>{k&&k.target===d&&S&&t&&(S.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{S==null||S.observe(t)})),n()}),d&&!u&&S.observe(d),t&&S.observe(t));let g,p=u?De(e):null;u&&b();function b(){let k=De(e);p&&!Bn(p,k)&&n(),p=k,g=requestAnimationFrame(b)}return n(),()=>{m.forEach(k=>{i&&k.removeEventListener("scroll",n),r&&k.removeEventListener("resize",n)}),h==null||h(),S==null||S.disconnect(),S=null,u&&cancelAnimationFrame(g)}}var Hn=ea;var jn=ta,Fn=Xi;var Wn=(e,t,n)=>{let o=new Map,i=oe({platform:va},n),r=_e(oe({},i.platform),{_c:o});return Zi(e,t,_e(oe({},i),{platform:r}))};function je(e,t){return`domphy-${e}-${t.nodeId}`}function xa(e,t){var R;let{openState:n,placement:o,content:i,keepOpenOnContentHover:r}=t,{kind:a}=t,l=null,u=null,d=null,m=null,h=!1,f=e.domElement,S=e.getRoot(),g=je(a,e),p={style:{position:"fixed",pointerEvents:"auto",visibility:P=>n.get(P)?"visible":"hidden"},onKeyDown:P=>{P.key==="Escape"&&M()},onMouseEnter:()=>r&&T(),onMouseLeave:()=>r&&M(),_onMount:P=>{var z;if(d=P.domElement,d.id||(d.id=g),f&&d&&!d.hasAttribute("data-theme")){let V=(z=f.closest("[data-theme]"))==null?void 0:z.getAttribute("data-theme");V&&d.setAttribute("data-theme",V)}},_portal:P=>{let z=P.domElement.querySelector("#domphy-floating");if(!z){let V={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};z=P.children.insert(V).domElement}return z}},b=P=>B(P,p);b(i);let k=()=>{h||(h=!0,m=S.children.insert(i))},_=()=>{k(),f&&d&&(u==null||u(),u=Vn(f,d,()=>{Wn(f,d,{placement:o.get(),middleware:[Hn(12),Fn(),jn()],strategy:"fixed"}).then(({x:P,y:z,placement:V})=>{d&&(Object.assign(d.style,{left:`${P}px`,top:`${z}px`}),o.set(V))})}),n.set(!0))},w=()=>{u==null||u(),u=null,m&&(m.remove(),m=null),d=null,h=!1,n.set(!1)},T=()=>{l&&clearTimeout(l),l=setTimeout(_,100)},M=()=>{l&&clearTimeout(l),l=setTimeout(w,100)},L=P=>{if(!n.get()||!f||!d)return;let z=P.target;!f.contains(z)&&!d.contains(z)&&M()};return(R=S.domElement)==null||R.addEventListener("click",L),{show:T,hide:M,update(P){n=P.openState,o=P.placement,i=P.content,r=P.keepOpenOnContentHover,b(i),m&&m.patch(i)},destroy(){var P;l&&clearTimeout(l),u==null||u(),m==null||m.remove(),(P=S.domElement)==null||P.removeEventListener("click",L)}}}function ce(e){let{kind:t,open:n=!1,placement:o}=e,i=y(n),r=`floating:${t}`,a=d=>{var m;return(m=d==null?void 0:d.getBehavior(r))==null?void 0:m.show()},l=d=>{var m;return(m=d==null?void 0:d.getBehavior(r))==null?void 0:m.hide()},u=N({onKeyDown:(d,m)=>d.key==="Escape"&&l(m)},Ze(r,xa,{kind:t,openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:l,anchorPartial:u}}var wa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function ot(e={}){var o;let{removable:t=!1}=e,n=y((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let r={span:ke(wa),onClick:a=>{a.stopPropagation(),i.remove()},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:c(1),width:c(4),height:c(4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:a=>s(a,"shift-4",n.get(a))},"&:focus-visible":{boxShadow:a=>E(a,n.get(a))}}};t&&i.children.insert(r)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:c(6),paddingBlock:0,borderRadius:c(999),paddingInlineStart:c(2.5),paddingInlineEnd:t?c(1):c(2.5),gap:c(1.5),fontSize:i=>x(i,"decrease-1"),backgroundColor:i=>s(i,"inherit",n.get(i)),color:i=>s(i,"text",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${s(i,"border-strong",n.get(i))}`}}}function ka(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=y(e.value),l=y(i),{show:u,hide:d,anchorPartial:m}=ce({kind:"combobox",open:l,placement:y(n),content:e.content}),h={onClick:(b,k)=>!r&&d(k),dataTone:"shift-14",style:{backgroundColor:b=>s(b,"inherit"),borderRadius:b=>c(v(b)*2),outline:b=>`1px solid ${s(b,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};B(e.content,h);let f={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:b=>x(b,"inherit"),color:b=>s(b,"text",o),backgroundColor:b=>s(b,"inherit",o)},S;if(e.input){let b={onFocus:(k,_)=>u(_),style:f,_key:"combobox-input"};B(e.input,b),S=e.input}else S={input:null,ariaLabel:"Filter options",onFocus:(b,k)=>u(k),value:b=>(a.get(b),""),style:f,_key:"combobox-input"};let g={div:b=>{let k=a.get(b),_=Array.isArray(k)?k:[k],T=t.filter(M=>_.includes(M.value)).map(M=>({span:M.label,$:[ot({color:o,removable:!0})],_key:M.value,_onRemove:L=>{let R=a.get(),z=(Array.isArray(R)?R:[R]).filter(V=>V!==M.value);r?a.set(z):a.set(z[0])}}));return T.push(S),T},style:{display:"flex",flexWrap:"wrap",gap:c(1)}},p={_onInsert:b=>{b.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:b=>b.children.insert(g),style:{minWidth:c(32),outlineOffset:"-1px",outline:b=>`1px solid ${s(b,"border-strong","neutral")}`,paddingBlock:b=>c(v(b)*1),paddingInline:b=>c(v(b)*1),borderRadius:b=>c(v(b)*1.5),fontSize:b=>x(b,"inherit"),color:b=>s(b,"text",o),backgroundColor:b=>s(b,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:b=>E(b,o)}}};return B(m,p),m}function Ca(){return{role:"group",ariaLabel:"Commands",_onSchedule:(e,t)=>{B(t,{_context:{command:{query:y("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Ea(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:o=>{let i=o.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let r=o.domElement,a=()=>i.query.set(r.value);r.addEventListener("input",a),o.addHook("Remove",()=>r.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>x(o,"inherit"),paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*2),border:"none",borderBottom:o=>`1px solid ${s(o,"border",t)}`,outline:"none",color:o=>s(o,"shift-10",t),backgroundColor:o=>s(o,"inherit",t),"&::placeholder":{color:o=>s(o,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:o=>s(o,"shift-6",n),boxShadow:o=>E(o,n)}}}}function _a(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onMount:o=>{var d,m;let i=o.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let r=o.domElement,a=(m=(d=r.textContent)==null?void 0:d.toLowerCase())!=null?m:"",l=h=>{r.hidden=h.length>0&&!a.includes(h.toLowerCase())};l(i.query.get());let u=i.query.addListener(l);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>x(o,"inherit"),height:o=>c(6+v(o)*2),paddingInline:o=>c(v(o)*3),border:"none",outline:"none",color:o=>s(o,"shift-13",t),backgroundColor:o=>s(o,"inherit",t),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:o=>s(o,"shift-13",t),backgroundColor:o=>s(o,"hover",t)},"&:focus-visible":{boxShadow:o=>E(o,n)}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),Oe=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),go=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),nt=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),yo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,bo=(e,t)=>Oe(e,-((e.getDay()-t+7)%7));function Ta(e){var t,n;try{let o=new Intl.Locale(e),i=(n=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?n:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function Da(e={}){var Co,Eo,_o,To;let{mode:t="single",time:n=!1,min:o,max:i,disabledDate:r,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:l,onChange:u}=e,d=(Co=e.weekStartsOn)!=null?Co:Ta(a),m=y((Eo=e.accentColor)!=null?Eo:"primary","accentColor"),h=y((_o=e.placement)!=null?_o:"bottom-start"),f=y((To=e.value)!=null?To:t==="range"?[null,null]:null),S=u?f.addListener(C=>u(C)):null,g=(()=>{let C=f.get(),D=t==="range"?C==null?void 0:C[0]:C;return D instanceof Date?D:new Date})(),p=y(g.getFullYear(),"viewYear"),b=y(g.getMonth(),"viewMonth"),k=y(F(g),"focused"),_=y(null,"hovered"),w=y(g.getHours(),"hour"),T=y(g.getMinutes(),"minute"),M=null,L=new Intl.DateTimeFormat(a,N({dateStyle:"medium"},n?{timeStyle:"short"}:{})),R=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),P=new Intl.DateTimeFormat(a,{weekday:"short"}),z=new Intl.DateTimeFormat(a,{dateStyle:"full"}),V=C=>C?L.format(C):"",ie=C=>{if(l)return l(C);if(t==="range"){let[D,O]=C!=null?C:[null,null];return D?`${V(D)} \u2013 ${V(O)}`:""}return V(C)},ue=Array.from({length:7},(C,D)=>P.format(new Date(2023,0,1+(D+d)%7))),pe=C=>!!o&&F(C)<F(o)||!!i&&F(C)>F(i)||!!r&&r(C),W=C=>{if(!n)return F(C);let D=F(C);return D.setHours(w.get(),T.get(),0,0),D},he=C=>{var $;if(pe(C))return;if(t==="single"){f.set(W(C)),n||Lt();return}let[D,O]=($=f.get())!=null?$:[null,null];!D||D&&O?f.set([W(C),null]):F(C)<F(D)?(f.set([W(C),W(D)]),n||Lt()):(f.set([D,W(C)]),n||Lt())},de=()=>{var C;if(n)if(t==="single"){let D=f.get();D&&f.set(W(D))}else{let[D,O]=(C=f.get())!=null?C:[null,null];f.set([D&&W(D),O&&W(O)])}},We=(C,D)=>{var Le;if(t!=="range")return!1;let[O,$]=(Le=f.get(D))!=null?Le:[null,null],H=$!=null?$:_.get(D);if(!O||!H)return!1;let I=F(O)<=F(H)?O:H,X=F(O)<=F(H)?H:O,G=F(C);return G>=F(I)&&G<=F(X)},Se=(C,D)=>{let O=f.get(D);if(t==="range"){let[$,H]=O!=null?O:[null,null];return nt(C,$)||nt(C,H)}return nt(C,O)},K=C=>{p.set(C.getFullYear()),b.set(C.getMonth())},Q=C=>{let D=go(new Date(p.get(),b.get(),1),C);K(D)},ee=C=>p.set(p.get()+C),Ue=()=>{setTimeout(()=>{var C;(C=M==null?void 0:M.querySelector(`[data-date="${yo(k.get())}"]`))==null||C.focus()},0)},Qn=rr(),{show:er,hide:tr,anchorPartial:ko}=ce({kind:"datePicker",open:!1,placement:h,content:Qn});function Lt(){tr()}let or={type:"text",readonly:!0,value:C=>ie(f.get(C)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(C,D)=>{Pt(D)},onFocus:(C,D)=>{Pt(D)},onKeyDown:(C,D)=>{let O=C.key;(O==="ArrowDown"||O==="Enter")&&(C.preventDefault(),Pt(D))},_onMount:C=>S&&C.addHook("Remove",()=>{S()})};function Pt(C){var O;let D=(O=nr())!=null?O:new Date;k.set(F(D)),K(D),er(C),Ue()}function nr(){var D;let C=f.get();return t==="range"?(D=C==null?void 0:C[0])!=null?D:null:C!=null?C:null}return B(ko,or),ko;function rr(){let C=(I,X,G)=>({button:I,type:"button",ariaLabel:X,onClick:G,style:Ma()}),D={div:[C("\xAB","Previous year",()=>ee(-1)),C("\u2039","Previous month",()=>Q(-1)),{div:I=>R.format(new Date(p.get(I),b.get(I),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:I=>x(I)}},C("\u203A","Next month",()=>Q(1)),C("\xBB","Next year",()=>ee(1))],style:{display:"flex",alignItems:"center",gap:c(1),marginBottom:c(2)}},O={div:ue.map((I,X)=>({div:I,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:G=>x(G,"decrease-1"),fontWeight:"bold",color:G=>s(G,"shift-7"),paddingBlock:c(1)},_key:X})),role:"row",style:Un()},$={div:I=>ir(I),role:"grid",ariaLabel:"Calendar",onKeyDown:cr,onMouseLeave:()=>t==="range"&&_.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},H=[D,O,$];return n&&H.push(lr()),H.push(sr()),{div:H,role:"dialog",ariaModal:"false",_onMount:I=>{M=I.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:I=>c(v(I)*2),backgroundColor:I=>s(I,"base"),color:I=>s(I,"shift-10"),border:I=>`1px solid ${s(I,"border-strong")}`,boxShadow:A("medium")}}}function ir(C){let D=new Date(p.get(C),b.get(C),1),O=b.get(C),$=bo(D,d),H=[];for(let I=0;I<6;I++){let X=[];for(let G=0;G<7;G++){let Le=Oe($,I*7+G);X.push(ar(Le,O,C))}H.push({div:X,role:"row",style:Un(),_key:I})}return H}function ar(C,D,O){let $=pe(C),H=Se(C,O),I=We(C,O),X=C.getMonth()!==D,G=nt(C,k.get(O)),Le=nt(C,new Date);return{button:String(C.getDate()),type:"button",role:"gridcell",tabIndex:G?0:-1,ariaSelected:H,ariaDisabled:$,disabled:$,ariaLabel:z.format(C),dataDate:yo(C),onClick:()=>he(C),onMouseEnter:()=>t==="range"&&_.set(C),style:{appearance:"none",border:"none",cursor:$?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:j=>x(j),fontFamily:"inherit",opacity:$?.35:X?.5:1,backgroundColor:j=>H?s(j,"shift-7",m.get(j)):I?s(j,"hover",m.get(j)):"transparent",color:j=>H?s(j,"shift-0",m.get(j)):s(j,"text"),outline:Le?j=>`1px solid ${s(j,"shift-6",m.get(j))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:j=>H?s(j,"shift-7",m.get(j)):s(j,"shift-3",m.get(j))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:j=>E(j,m.get(j))}},_key:yo(C)}}function lr(){let C=(D,O,$)=>({select:Array.from({length:D},(H,I)=>({option:String(I).padStart(2,"0"),value:String(I),selected:X=>O.get(X)===I,_key:I})),ariaLabel:$,onChange:H=>{O.set(Number(H.target.value)),de()},style:Oa()});return{div:[C(24,w,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},C(60,T,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:c(1),marginTop:c(3)}}}function sr(){let C=(D,O)=>({button:D,type:"button",onClick:O,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:$=>x($,"decrease-1"),color:$=>s($,"muted",m.get($)),padding:c(1)}});return{div:[C("Today",()=>{let D=new Date;k.set(F(D)),K(D),Ue()}),C("Clear",()=>{f.set(t==="range"?[null,null]:null),_.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:D=>`1px solid ${s(D,"border")}`}}}function cr(C){let D=C,O=k.get(),$=null;switch(D.key){case"ArrowLeft":$=Oe(O,-1);break;case"ArrowRight":$=Oe(O,1);break;case"ArrowUp":$=Oe(O,-7);break;case"ArrowDown":$=Oe(O,7);break;case"Home":$=bo(O,d);break;case"End":$=Oe(bo(O,d),6);break;case"PageUp":$=go(O,D.shiftKey?-12:-1);break;case"PageDown":$=go(O,D.shiftKey?12:1);break;case"Enter":case" ":D.preventDefault(),he(O);return;default:return}D.preventDefault(),k.set($),K($),Ue()}}function Un(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function Ma(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>x(e),color:e=>s(e,"muted"),width:c(7),height:c(7),borderRadius:c(1),"&:hover":{backgroundColor:e=>s(e,"shift-3")}}}function Oa(){return{fontFamily:"inherit",fontSize:e=>x(e),padding:c(1),borderRadius:c(1),border:e=>`1px solid ${s(e,"border-strong")}`,backgroundColor:e=>s(e,"base"),color:e=>s(e,"text")}}function La(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${c(24)}, max-content) 1fr`,columnGap:c(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>x(o,"inherit"),color:o=>s(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o))}}}}function Pa(e={}){var i,r;let{duration:t=240}=e,n=y((i=e.color)!=null?i:"neutral","color"),o=y((r=e.accentColor)!=null?r:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>x(a,"inherit"),color:a=>s(a,"text",n.get(a)),backgroundColor:a=>s(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>s(a,"shift-2",n.get(a)),color:a=>s(a,"shift-10",n.get(a)),fontSize:a=>x(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:c(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>c(v(a)*4),height:c(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:c(2),height:c(2),flexShrink:0,marginTop:c(-.5),borderInlineEnd:a=>`${c(.5)} solid ${s(a,"shift-9",n.get(a))}`,borderBottom:a=>`${c(.5)} solid ${s(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>s(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>c(v(a)*2),boxShadow:a=>E(a,o.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(v(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>c(v(a)*1),paddingBottom:a=>c(v(a)*3)}}}}var rt=0;function Mt(){rt++,rt===1&&(document.body.style.overflow="hidden")}function Fe(){rt=Math.max(0,rt-1),rt===0&&(document.body.style.overflow="")}var qn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function Ra(e,t){let{state:n}=t,o=null,i=!1,r=!1,a=null,l=e.domElement;l.setAttribute("aria-modal","true");let u=()=>{i=!1,typeof l.close=="function"&&l.close(),l.style.visibility="hidden",l.style.pointerEvents="none",r&&(Fe(),r=!1),o==null||o.focus(),o=null},d=S=>{if(S.key!=="Tab")return;let g=Array.from(l.querySelectorAll(qn)).filter(k=>!k.closest("[aria-hidden='true']")&&k.offsetParent!==null);if(!g.length){S.preventDefault();return}let p=g[0],b=g[g.length-1];S.shiftKey?(document.activeElement===p||document.activeElement===l)&&(S.preventDefault(),b.focus()):document.activeElement===b&&(S.preventDefault(),p.focus())},m=S=>{S.preventDefault(),n.set(!1)};l.addEventListener("cancel",m);let h=S=>{S?(i=!1,a&&(clearTimeout(a),a=null),o=document.activeElement,l.style.visibility="visible",l.style.pointerEvents="auto",typeof l.showModal=="function"&&!l.open&&l.showModal(),r||(Mt(),r=!0),l.addEventListener("keydown",d),requestAnimationFrame(()=>{l.style.opacity="1";let g=l.querySelector(qn);g==null||g.focus()})):(i=!0,l.style.opacity="0",l.removeEventListener("keydown",d),a=setTimeout(()=>{a=null,i&&u()},350))};h(n.get());let f=n.addListener(h);return{requestClose:()=>n.set(!1),onTransitionEnd:S=>{i&&S.target===l&&S.propertyName==="opacity"&&u()},update(S){S.state!==n&&(f(),n=S.state,f=n.addListener(h))},destroy(){a&&(clearTimeout(a),a=null),f(),l.removeEventListener("cancel",m),r&&(Fe(),r=!1),l.removeEventListener("keydown",d),o==null||o.focus(),o=null}}}function $a(e={}){let{color:t="neutral",open:n=!1}=e,o=y(n);return J(N({_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},Ze("dialog",Ra,{state:o})),{onClick:(i,r)=>{var u;if(i.target!==r.domElement)return;let a=r.domElement.getBoundingClientRect();i.clientX>=a.left&&i.clientX<=a.right&&i.clientY>=a.top&&i.clientY<=a.bottom||(u=r.getBehavior("dialog"))==null||u.requestClose()},onTransitionEnd:(i,r)=>{var a;return(a=r.getBehavior("dialog"))==null?void 0:a.onTransitionEnd(i)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:i=>x(i,"inherit"),color:i=>s(i,"shift-10",t),backgroundColor:i=>s(i,"inherit",t),border:"none",borderRadius:i=>c(v(i)*2),padding:i=>c(v(i)*3),boxShadow:A("high"),"&::backdrop":{backgroundColor:i=>s(i,"shift-2","neutral"),opacity:.75}}})}function Ia(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:c(2),fontSize:o=>x(o,"inherit"),backgroundColor:o=>s(o),color:o=>s(o,"text",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>s(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>s(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var vo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Kn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},it=e=>e==="left"||e==="right";function Gn(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function za(e={}){let{color:t="neutral",open:n=!1,placement:o="end",size:i}=e,r=y(n),a=o==="start"||o==="end",l=Gn(o,!1),u=it(l)?c(80):c(64),d=i!=null?i:u;return{_onInsert:m=>{m.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(m,h)=>{m.target===h.domElement&&r.set(!1)},_onMount:m=>{let h=m.domElement;h.setAttribute("aria-modal","true");let f=L=>{L.preventDefault(),r.set(!1)};h.addEventListener("cancel",f);let S=a&&(h.ownerDocument.documentElement.dir==="rtl"||h.ownerDocument.dir==="rtl"),g=Gn(o,S);a&&(h.style.transform=vo[g],h.style.margin=Kn[g],h.style.width=it(g)?d:"100dvw",h.style.height=it(g)?"100dvh":d);let p=!1,b=!1,k=null,_=()=>{k=null,p&&(p=!1,typeof h.close=="function"&&h.close(),h.style.visibility="hidden",h.style.pointerEvents="none",b&&(Fe(),b=!1))},w=L=>{L.target===h&&L.propertyName==="transform"&&_()};h.addEventListener("transitionend",w);let T=L=>{L?(p=!1,h.style.visibility="visible",h.style.pointerEvents="auto",typeof h.showModal=="function"&&h.showModal(),b||(Mt(),b=!0),requestAnimationFrame(()=>{h.style.transform="translate(0, 0)"})):(p=!0,h.style.transform=vo[g],k=setTimeout(_,350))};T(r.get());let M=r.addListener(T);m.addHook("Remove",()=>{k&&(clearTimeout(k),k=null),M(),h.removeEventListener("cancel",f),h.removeEventListener("transitionend",w),b&&(Fe(),b=!1)})},style:{transform:vo[l],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:m=>x(m,"inherit"),color:m=>s(m,"shift-10",t),backgroundColor:m=>s(m,"inherit",t),border:"none",padding:m=>c(v(m)*3),margin:Kn[l],width:it(l)?d:"100dvw",height:it(l)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:A("high"),"&::backdrop":{backgroundColor:m=>s(m,"shift-2","neutral"),opacity:.75}}}}function Aa(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>x(o,"inherit"),fontStyle:"italic",color:o=>s(o,"shift-10",t.get(o))}}}function Na(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:c(3),paddingBlock:c(12),paddingInline:c(6),textAlign:"center",color:o=>s(o,"muted",t.get(o)),"& > :first-child":{color:o=>s(o,"shift-5",t.get(o)),opacity:.9},"& > :nth-child(2)":{color:o=>s(o,"text",t.get(o))}}}}function Ba(e={}){return{_onError:(t,n,o)=>{var r,a;(r=e.onError)==null||r.call(e,n);let i=typeof e.fallback=="function"?e.fallback(n,o):(a=e.fallback)!=null?a:{div:"An error occurred."};t.children.update([i])}}}var Va={small:8,medium:10,large:14};function Ha(e={}){var o,i;let t=y((o=e.color)!=null?o:"primary","color"),n=c(Va[(i=e.size)!=null?i:"medium"]);return{_onInsert:r=>{r.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:r=>x(r,"inherit"),backgroundColor:r=>s(r,"shift-13",t.get(r)),color:r=>s(r,"shift-0","neutral"),boxShadow:A("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:r=>s(r,"shift-14",t.get(r)),boxShadow:A("medium")},"&:active:not([disabled])":{backgroundColor:r=>s(r,"shift-15",t.get(r)),boxShadow:A("low")},"&:focus-visible":{boxShadow:r=>`${A("medium")}, ${E(r,t.get(r))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function ja(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:c(2),marginInline:0,marginTop:c(3),marginBottom:c(3),color:o=>s(o,"text",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:c(2)},"& figcaption":{fontSize:o=>x(o,"decrease-1"),color:o=>s(o,"muted",t.get(o)),lineHeight:1.45}}}}function Fa(e={}){var i;let{layout:t="horizontal"}=e,n=y((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:r=>{r.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:r=>c(v(r)*3),paddingBlock:r=>c(v(r)*3),border:"none",borderRadius:r=>c(v(r)*2),fontSize:r=>x(r,"inherit"),backgroundColor:r=>s(r,"inherit",n.get(r)),color:r=>s(r,"text",n.get(r)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:c(4),rowGap:c(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:r=>x(r,"inherit"),fontWeight:600,paddingBlock:r=>c(v(r)*1),borderRadius:r=>c(v(r)*2),color:r=>s(r,"text",n.get(r)),backgroundColor:r=>s(r,"inherit",n.get(r))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:r=>o?0:c(v(r)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${c(2)} * -1)`,fontSize:r=>x(r,"decrease-1"),color:r=>s(r,"text",n.get(r))}}}}function Wa(e={}){let{columns:t=1,gap:n=4,align:o}=e;return{style:N({display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, minmax(0, 1fr))`:t,gap:i=>c(v(i)*n)},o?{alignItems:o}:{})}}var Ua={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function qa(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>s(o,"shift-11",t.get(o)),marginTop:0,marginBottom:c(2),fontSize:o=>{let i=Ua[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function Ka(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:c(3),marginBottom:c(3),backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"text",t.get(o))}}}function Ga(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:c(4),height:c(4),flexShrink:"0",fontSize:o=>x(o),backgroundColor:"transparent",color:o=>s(o,"text",t.get(o))}}}function Ya(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:c(2),backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"text",t.get(o))}}}function Za(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:r=>x(r,"inherit"),color:r=>s(r,"text",t.get(r)),display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:c(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"border-strong",t.get(r))}`,color:r=>s(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>s(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${s(r,"shift-6",n.get(r))}`,backgroundColor:r=>s(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>s(r,"shift-7",n.get(r))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:r=>`${c(.5)} solid ${s(r,"inherit",n.get(r))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:r=>`1px solid ${s(r,"shift-6",n.get(r))}`,backgroundColor:r=>s(r,"shift-3",n.get(r))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:r=>s(r,"shift-8",n.get(r))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:r=>s(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:c(1.5),boxShadow:r=>E(r,n.get(r))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>s(r,"shift-4","neutral"),pointerEvents:"none"}}}}function Xa(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{type:"color",_onSchedule:(o,i)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),i.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o)),paddingBlock:o=>c(v(o)*1),paddingInline:o=>c(v(o)*1),blockSize:o=>c(6+v(o)*2),inlineSize:o=>c(6+v(o)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:o=>c(v(o)*1.5),"&:focus-visible":{boxShadow:o=>E(o,t.get(o))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>c(v(o)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>s(o,"shift-2","neutral"),outline:o=>`1px solid ${s(o,"border-strong","neutral")}`}}}}function Ja(e={}){var i,r;let{mode:t="datetime-local"}=e,n=y((i=e.color)!=null?i:"neutral","color"),o=y((r=e.accentColor)!=null?r:"primary","accentColor");return{type:t,_onSchedule:(a,l)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=t},style:{fontFamily:"inherit",fontSize:a=>x(a,"inherit"),lineHeight:"inherit",color:a=>s(a,"text",n.get(a)),backgroundColor:a=>s(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${s(a,"border-strong",n.get(a))}`,borderRadius:a=>c(v(a)*1.5),paddingInline:a=>c(v(a)*3),height:a=>c(6+v(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${s(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>E(a,o.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>s(a,"muted","neutral"),backgroundColor:a=>s(a,"shift-2","neutral"),outline:a=>`1px solid ${s(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${c(.5)} solid ${s(a,"shift-6","error")}`}}}}function Qa(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:r=>x(r,"inherit"),lineHeight:"inherit",color:r=>s(r,"text",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"border-strong",t.get(r))}`,borderRadius:r=>c(v(r)*1.5),height:r=>c(6+v(r)*2),paddingInline:r=>c(v(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:r=>c(v(r)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:c(1),height:c(6),paddingInline:c(2),cursor:"pointer",color:r=>s(r,"shift-11",t.get(r)),backgroundColor:r=>s(r,"surface",t.get(r))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${s(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>E(r,n.get(r))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:r=>s(r,"muted","neutral"),outline:r=>`1px solid ${s(r,"border-strong","neutral")}`,backgroundColor:r=>s(r,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:r=>s(r,"muted","neutral"),backgroundColor:r=>s(r,"shift-3","neutral")}}}}function el(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInlineStart:r=>c(v(r)*3),paddingInlineEnd:r=>c(v(r)*1.5),paddingBlock:r=>c(v(r)*1),borderRadius:r=>c(v(r)*1.5),fontSize:r=>x(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"border-strong",t.get(r))}`,color:r=>s(r,"text",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${s(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>E(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>s(r,"shift-2","neutral"),outline:r=>`1px solid ${s(r,"border-strong","neutral")}`,color:r=>s(r,"muted","neutral")}}}}function tl(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:c(2),"& > *":{minWidth:`${c(9)}!important`}},_onMount:e=>{let t=e.domElement,n=()=>Array.from(t.querySelectorAll("input")),o=a=>{let l=n(),u=a.target,d=l.indexOf(u);u.value&&d<l.length-1&&l[d+1].focus()},i=a=>{let l=n(),u=a.target,d=l.indexOf(u);a.key==="Backspace"&&!u.value&&d>0&&l[d-1].focus(),a.key==="ArrowLeft"&&d>0&&l[d-1].focus(),a.key==="ArrowRight"&&d<l.length-1&&l[d+1].focus()},r=a=>{var f,S,g;a.preventDefault();let l=(S=(f=a.clipboardData)==null?void 0:f.getData("text"))!=null?S:"",u=n(),d=u.indexOf(a.target),m=d===-1?0:d;[...l].forEach((p,b)=>{u[m+b]&&(u[m+b].value=p)});let h=Math.min(m+l.length-1,u.length-1);(g=u[h])==null||g.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",r),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",r)})}}}var ol='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',nl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function rl(e={}){var i,r;let t=y((i=e.color)!=null?i:"neutral","color"),n=y((r=e.accentColor)!=null?r:"primary","accentColor"),o=y(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let l={input:null,type:d=>o.get(d)?"text":"password",ariaLabel:"Password",autocomplete:"current-password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:d=>ke(o.get(d)?nl:ol),type:"button",ariaLabel:d=>o.get(d)?"Hide password":"Show password",onClick:()=>o.set(!o.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(l),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>c(v(a)*1),paddingBlock:a=>c(v(a)*1),paddingInline:a=>c(v(a)*3),borderRadius:a=>c(v(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${s(a,"border-strong",t.get(a))}`,color:a=>s(a,"text",t.get(a)),backgroundColor:a=>s(a,"inherit",t.get(a)),fontSize:a=>x(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${s(a,"shift-5",n.get(a))}`},"&:focus-within":{boxShadow:a=>E(a,n.get(a))}}}}function il(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:r=>{if(r.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:r=>x(r,"inherit"),color:r=>s(r,"text",t.get(r)),appearance:"none",display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"border-strong",t.get(r))}`,color:r=>s(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>s(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${s(r,"shift-6",n.get(r))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:r=>s(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>s(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:"50%",boxShadow:r=>E(r,n.get(r))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>s(r,"shift-4","neutral"),pointerEvents:"none"}}}}function al(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:c(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:c(1.5),borderRadius:c(999),backgroundColor:r=>s(r,"shift-3",t.get(r))},"&::-webkit-slider-thumb":{appearance:"none",width:c(4),height:c(4),borderRadius:c(999),border:"none",marginTop:`calc((${c(1.5)} - ${c(4)}) / 2)`,backgroundColor:r=>s(r,"shift-9",n.get(r))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:r=>s(r,"shift-10",n.get(r))},borderRadius:c(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>E(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function ll(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:r=>x(r,"inherit"),lineHeight:"inherit",color:r=>s(r,"text",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"border-strong",t.get(r))}`,borderRadius:r=>c(v(r)*1.5),minWidth:c(32),paddingInline:r=>c(v(r)*3),paddingBlock:r=>c(v(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:r=>s(r,"shift-7",t.get(r))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${s(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>E(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>s(r,"muted","neutral"),backgroundColor:r=>s(r,"shift-2","neutral"),outline:r=>`1px solid ${s(r,"border-strong","neutral")}`}}}}function sl(e={}){var n;let t=y((n=e.accentColor)!=null?n:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>s(o,"inherit"),color:o=>s(o,"text"),appearance:"none",position:"relative",display:"inline-flex",width:c(9),height:c(6),cursor:"pointer",margin:"0",paddingBlock:c(1),transition:"box-shadow 140ms ease",borderRadius:c(999),"&:focus-visible":{boxShadow:o=>E(o,t.get(o))},"&:checked":{"&::before":{backgroundColor:o=>s(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${c(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:c(3),height:c(3),borderRadius:c(999),left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>s(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:c(999),display:"inline-block",fontSize:o=>x(o,"inherit"),lineHeight:1,backgroundColor:o=>s(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function cl(e={}){var i,r;let{type:t="text"}=e,n=y((i=e.color)!=null?i:"neutral","color"),o=y((r=e.accentColor)!=null?r:"primary","accentColor");return{type:t,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInline:a=>c(v(a)*3),paddingBlock:a=>c(v(a)*1),borderRadius:a=>c(v(a)*1.5),fontSize:a=>x(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${s(a,"border-strong",n.get(a))}`,color:a=>s(a,"text",n.get(a)),backgroundColor:a=>s(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>s(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>s(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${s(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>E(a,o.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>s(a,"shift-2","neutral"),outline:a=>`1px solid ${s(a,"border-strong","neutral")}`,color:a=>s(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${c(.5)} solid ${s(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${c(.5)} solid ${s(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${c(.5)} solid ${s(a,"shift-6","warning")}`}}}}function ml(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),paddingBlock:c(.5),paddingInline:c(1.5),borderRadius:c(1),outline:o=>`1px solid ${s(o,"border-strong",t.get(o))}`}}}function ul(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:c(2),fontSize:r=>x(r,"inherit"),color:r=>s(r,"text",t.get(r)),cursor:"pointer","&:focus-within":{color:r=>s(r,"shift-10",n.get(r))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:r=>s(r,"muted","neutral")}}}}function hl(e={}){var o,i;let t=y((o=e.color)!=null?o:"primary","color"),n=y((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:r=>{r.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:r=>x(r,"inherit"),backgroundColor:r=>s(r),color:r=>s(r,"shift-13",t.get(r)),textDecoration:"none","&:visited":{color:r=>s(r,"shift-13",n.get(r))},"&:hover:not([disabled])":{color:r=>s(r,"shift-14",t.get(r)),textDecoration:"underline"},borderRadius:c(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>E(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>s(r,"muted","neutral")}}}}var dl={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},fl={small:.5,medium:1,large:1.5};function pl(e={}){var l,u,d;let t=(l=e.variant)!=null?l:"outline",n=y((u=e.color)!=null?u:t==="ghost"?"neutral":"primary","color"),o=(d=e.size)!=null?d:"medium",i=Ne[o];if(t==="ghost"){let m=fl[o];return{_onInsert:h=>{h.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:h=>x(h,i),textDecoration:"none",paddingBlock:h=>c(v(h)*m),paddingInline:h=>c(v(h)*m),borderRadius:h=>c(v(h)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:h=>c(v(h)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:h=>s(h,"shift-6",n.get(h)),"&:hover:not([aria-disabled=true])":{color:h=>s(h,"text",n.get(h)),backgroundColor:h=>s(h,"hover",n.get(h)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:h=>s(h,"text",n.get(h)),backgroundColor:h=>s(h,"increase-2",n.get(h))},"&:focus-visible":{boxShadow:h=>E(h,n.get(h))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:h=>s(h,"border-strong","neutral")}}}}let r=t==="solid",a=dl[o];return J(N({_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},r?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:m=>x(m,i),textDecoration:"none",paddingBlock:m=>c(v(m)*a.block),paddingInline:m=>c(v(m)*a.inline),borderRadius:m=>c(v(m)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>c(v(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:r?"none":m=>`1px solid ${s(m,"border-strong",n.get(m))}`,color:m=>r?s(m,"shift-0","neutral"):s(m,"shift-13",n.get(m)),backgroundColor:m=>r?s(m,"shift-13",n.get(m)):s(m,"inherit",n.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:m=>r?s(m,"shift-0","neutral"):s(m,"shift-14",n.get(m)),backgroundColor:m=>r?s(m,"shift-14",n.get(m)):s(m,"hover",n.get(m))},"&:active:not([aria-disabled=true])":{backgroundColor:m=>r?s(m,"shift-15",n.get(m)):s(m,"increase-2",n.get(m))},"&:focus-visible":{boxShadow:m=>E(m,n.get(m))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:m=>s(m,"shift-2","neutral"),outline:m=>`1px solid ${s(m,"border-strong","neutral")}`,color:m=>s(m,"muted","neutral")}}})}function gl(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function yl(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:n=>c(v(n)*2),paddingBlock:n=>c(t?1:v(n)*2),paddingInline:n=>c(v(n)*3),fontSize:n=>x(n,"inherit"),color:n=>s(n,"text")}}}function bl(e={}){var i,r;let t=y((i=e.color)!=null?i:"neutral","color"),n=(r=e.accentColor)!=null?r:"primary",{dense:o=!1}=e;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>c(v(a)*2),paddingBlock:a=>c(o?1:v(a)*2),paddingInline:a=>c(v(a)*3),fontSize:a=>x(a,"inherit"),color:a=>s(a,"text",t.get(a)),borderRadius:a=>c(v(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>s(a,"hover",t.get(a))},"&:active:not([disabled])":{backgroundColor:a=>s(a,"increase-2",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>s(a,"shift-3",n),color:a=>s(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>E(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function vl(e={}){var n;let t=y((n=e.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),height:c(6),borderRadius:c(1),paddingInline:c(1.5)}}}function Sl(e={items:[]}){var a;let{items:t=[],selectable:n=!0,color:o="neutral",accentColor:i="primary"}=e,r=y((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-0",_onSchedule:(l,u)=>{if(t.length===0)return;let d=l.nodeId,m=t.map((h,f)=>{var g;let S=(g=h.key)!=null?g:f;return J(N({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:S,type:"button",id:`menuitem${d}${S}`,role:"menuitem"},n?{ariaCurrent:p=>r.get(p)===S||void 0}:{}),{onClick:()=>{var p;n&&r.set(S),(p=h.onClick)==null||p.call(h)},onKeyDown:p=>{var T;let b=p.key;if(b==="Enter"||b===" "){p.preventDefault(),p.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(b))return;p.preventDefault();let k=t.map((M,L)=>{var R;return(R=M.key)!=null?R:L}),_=k.indexOf(S),w=_;b==="ArrowDown"?w=(_+1)%k.length:b==="ArrowUp"?w=(_-1+k.length)%k.length:b==="Home"?w=0:b==="End"&&(w=k.length-1),(T=document.getElementById(`menuitem${d}${k[w]}`))==null||T.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:c(2),width:"100%",fontSize:p=>x(p,"inherit"),height:p=>c(6+v(p)*2),paddingInline:p=>c(v(p)*3),border:"none",outline:"none",color:p=>s(p,"text",o),backgroundColor:p=>s(p,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:p=>s(p,"hover",o)},"&[aria-current=true]":{backgroundColor:p=>s(p,"shift-3",i),color:p=>s(p,"shift-13",i)},"&:focus-visible":{boxShadow:p=>E(p,i)}}})});u[l.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:l=>c(v(l)*2),paddingInline:l=>c(v(l)*2),fontSize:l=>x(l,"inherit"),backgroundColor:l=>s(l,"inherit",o),color:l=>s(l,"text",o),borderRadius:l=>c(v(l)*2),outline:l=>`1px solid ${s(l,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:A("medium")}}}var So=e=>!!e&&typeof e.get=="function"&&e._isState===!0,me=e=>{let t={},n=[];for(let o in e){let i=e[o];o==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?n.push(`scale(${i})`):o==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return n.length&&(t.transform=n.join(" ")),t};function Yn(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}function xl(e={}){var a,l,u,d;let{initial:t,animate:n,exit:o,transition:i={}}=e,r={duration:(a=i.duration)!=null?a:300,delay:(l=i.delay)!=null?l:0,easing:(u=i.easing)!=null?u:"ease",iterations:(d=i.iterations)!=null?d:1,fill:"both"};return{_onMount:m=>{let h=m.domElement;if(!h||typeof h.animate!="function")return;let f=So(n)?n.get():n;if(Yn()){if(f?Object.assign(h.style,me(f)):t&&Object.assign(h.style,me(t)),So(n)){let S=n.addListener(g=>{Object.assign(h.style,me(g))});m.setMetadata("motionRelease",S)}return}if(f?h.animate(t?[me(t),me(f)]:[me(f)],r):t&&Object.assign(h.style,me(t)),So(n)){let S=n.addListener(g=>{h.animate([me(g)],r)});m.setMetadata("motionRelease",S)}},_onBeforeRemove:(m,h)=>{let f=m.domElement;if(!f||!o||typeof f.animate!="function")return h();if(Yn())return Object.assign(f.style,me(o)),h();f.animate([me(o)],r).finished.then(h,h)},_onRemove:m=>{let h=m.getMetadata("motionRelease");h==null||h()}}}function wl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>s(o),color:o=>s(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"decimal",listStylePosition:"outside"}}}function kl(e,t){if(t<=7)return Array.from({length:t},(r,a)=>a+1);let n=[1];e>3&&n.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let r=o;r<=i;r++)n.push(r);return e<t-2&&n.push("..."),n.push(t),n}function Cl(e){var l;let{total:t,color:n="neutral",accentColor:o="primary"}=e,i=y((l=e.value)!=null?l:1),r={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+v(u)*2),height:u=>c(6+v(u)*2),paddingInline:u=>c(v(u)*2),borderRadius:u=>c(v(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>s(u,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:u=>s(u,"shift-13",n),backgroundColor:u=>s(u,"hover",n)},"&:focus-visible":{boxShadow:u=>E(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=J(N({},r),{backgroundColor:u=>s(u,"shift-13",o),color:u=>s(u,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>s(u,"shift-13",o)}});return{role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:u=>{u.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:u=>{let d={div:m=>{let h=i.get(m),f=[];f.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:h<=1,onClick:()=>h>1&&i.set(h-1),style:r});let S=0;for(let g of kl(h,t))if(g==="...")f.push({span:"\u2026",_key:`ellipsis-${S++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:p=>c(v(p)*2),color:p=>s(p,"shift-7",n)}});else{let p=g===h;f.push({button:String(g),_key:`page-${g}`,type:"button",ariaLabel:`Page ${g}`,ariaCurrent:p?"page":void 0,disabled:p,onClick:()=>i.set(g),style:p?a:r})}return f.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:h>=t,onClick:()=>h<t&&i.set(h+1),style:r}),f},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(d)},style:{display:"inline-flex"}}}function El(e={}){var i;let{padding:t=4,divider:n=!1}=e,o=y((i=e.color)!=null?i:"neutral","color");return{style:N({padding:r=>c(v(r)*t)},n?{borderBottom:r=>`1px solid ${s(r,"border",o.get(r))}`}:{})}}function _l(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function Tl(e){var h;let{open:t=!1,placement:n="bottom",openOn:o="click"}=e,i=y(t),r=y(n),{show:a,hide:l,anchorPartial:u}=ce({kind:"popover",open:i,placement:r,content:e.content,keepOpenOnContentHover:o==="hover"}),d={role:"dialog",dataTone:"shift-14",style:{backgroundColor:f=>s(f,"inherit"),borderRadius:f=>c(v(f)*2),outline:f=>`1px solid ${s(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};return(h=e.content).$||(h.$=[]),e.content.$.push(d),B(u,{ariaHaspopup:"dialog",ariaExpanded:f=>i.get(f),ariaControls:f=>f!=null&&f.elementNode?je("popover",f.elementNode):void 0,onMouseEnter:(f,S)=>o==="hover"&&a(S),onMouseLeave:(f,S)=>o==="hover"&&l(S),onClick:(f,S)=>{o==="click"&&(i.get()?l(S):a(S))},onKeyDown:(f,S)=>{f.key==="Escape"&&i.get()&&l(S)},onFocus:(f,S)=>o==="hover"&&a(S),onBlur:(f,S)=>{let g=f.relatedTarget,b=S.getRoot().domElement.querySelector(`#${je("popover",S)}`);g&&(b!=null&&b.contains(g))||l(S)}}),u}function xo(e={}){let{placement:t="bottom-end",color:n="neutral",sideOffset:o=c(6),bordered:i=!0}=e,r=y(t),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},l=m=>{var h;return(h=a[r.get(m)])!=null?h:a["bottom-end"]},u=m=>m.includes("start")?o:m.includes("end")?"auto":"50%",d=m=>m.includes("end")?o:m.includes("start")?"auto":"50%";return{style:{fontSize:m=>x(m),backgroundColor:m=>s(m),color:m=>s(m,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:c(1.5),height:c(1.5),backgroundColor:m=>s(m,"inherit",n),borderWidth:i?"1px":0,borderColor:m=>s(m,"border-strong",n),borderTopStyle:m=>{let h=l(m);return h.includes("top")||h.includes("right")?"solid":"none"},borderBottomStyle:m=>{let h=l(m);return h.includes("bottom")||h.includes("left")?"solid":"none"},borderLeftStyle:m=>{let h=l(m);return h.includes("top")||h.includes("left")?"solid":"none"},borderRightStyle:m=>{let h=l(m);return h.includes("bottom")||h.includes("right")?"solid":"none"},top:m=>{let h=l(m);return h.includes("top")?0:h.includes("bottom")?"auto":u(h)},right:m=>{let h=l(m);return h.includes("right")?0:h.includes("left")?"auto":d(h)},bottom:m=>{let h=l(m);return h.includes("bottom")?0:h.includes("top")?"auto":d(h)},left:m=>{let h=l(m);return h.includes("left")?0:h.includes("right")?"auto":u(h)},transform:m=>{let h=l(m),f=h.includes("right")||h.includes("end")&&!h.includes("left")?"50%":"-50%",S=h.includes("bottom")||h.includes("end")&&!h.includes("top")?"50%":"-50%";return`translate(${f},${S}) rotate(45deg)`}}}}}function Dl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>c(v(o)*2),paddingInline:o=>c(v(o)*3),borderRadius:o=>c(v(o)*2)}}}function Ml(e={}){var o,i;let t=y((o=e.color)!=null?o:"neutral","color"),n=y((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:c(2),border:0,borderRadius:c(999),overflow:"hidden",backgroundColor:r=>s(r,"inherit",t.get(r)),color:r=>s(r,"text",t.get(r)),"&::-webkit-progress-bar":{backgroundColor:r=>s(r,"inherit",t.get(r)),borderRadius:c(999)},"&::-webkit-progress-value":{backgroundColor:r=>s(r,"shift-9",n.get(r)),borderRadius:c(999),transition:"width 220ms ease"}}}}var Ol='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',Ll='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function Pl(e={}){var u,d;let{max:t=5,readOnly:n=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",r=y((d=e.value)!=null?d:0),a=y(0),l=m=>{let h=a.get(m);return h>0?h:r.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:c(.5),fontSize:m=>x(m,"increase-1"),cursor:n?"default":"pointer",color:m=>s(m,"muted",i)},_onInit:m=>{for(let h=1;h<=t;h++){let f=h,S=n?{}:{onClick:()=>{let p=f===r.get()?0:f;r.set(p),o==null||o(p),a.set(0)},onMouseEnter:()=>a.set(f),onMouseLeave:()=>a.set(0),onKeyDown:p=>{var w,T;let b=r.get(),k=b;if(p.key==="ArrowRight"||p.key==="ArrowUp")k=Math.min(t,b+1),p.preventDefault();else if(p.key==="ArrowLeft"||p.key==="ArrowDown")k=Math.max(0,b-1),p.preventDefault();else return;r.set(k),o==null||o(k);let _=k>0?k-1:0;(T=(w=m.domElement)==null?void 0:w.children[_])==null||T.focus()}},g=J(N({button:p=>ke(f<=l(p)?Ol:Ll),_key:f,type:"button",ariaLabel:`${f} star${f>1?"s":""}`},S),{style:{background:"none",border:"none",outline:"none",borderRadius:c(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>E(p,i)}}});m.children.insert(g)}}}}function Rl(e={}){var u,d,m;let{size:t=16,thickness:n=.25}=e,o=y((u=e.value)!=null?u:0,"value"),i=y((d=e.color)!=null?d:"primary","color"),r=y((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-n)*100),l=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:h=>String(Math.round(o.get(h))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:h=>{h.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:c(t),height:c(t),borderRadius:"50%",color:h=>s(h,"shift-9",i.get(h)),background:h=>`conic-gradient(from -90deg, ${s(h,"shift-9",i.get(h))} ${o.get(h)}%, ${s(h,"shift-3",r.get(h))} 0%)`,WebkitMask:l,mask:l}}}function wo(e={}){let{gap:t=4,align:n="center",justify:o,wrap:i=!1}=e;return{style:N(N({display:"flex",alignItems:n,gap:r=>c(v(r)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function $l(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:o=>s(o,"text",t.get(o)),"&::-webkit-scrollbar":{width:c(2),height:c(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>s(o,"shift-5",t.get(o)),borderRadius:c(999),border:`${c(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:o=>s(o,"shift-7",t.get(o))},scrollbarWidth:"thin",scrollbarColor:o=>`${s(o,"shift-5",t.get(o))} transparent`}}}function Il(e={items:[]}){var r,a,l;let{items:t=[],color:n="neutral",accentColor:o="primary"}=e,i=y((l=(a=e.value)!=null?a:(r=t[0])==null?void 0:r.key)!=null?l:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,d)=>{let m=t.map((h,f)=>{var p;let S=(p=h.key)!=null?p:String(f);return{button:[typeof h.label=="string"?{span:h.label}:h.label],_key:S,type:"button",role:"radio",ariaChecked:b=>i.get(b)===S,onClick:()=>i.set(S),style:{cursor:"pointer",fontSize:b=>x(b,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:b=>s(b,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:b=>s(b,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:b=>s(b,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:b=>s(b,"shift-0",o),color:b=>s(b,"shift-10",o),boxShadow:A("low")},"&:focus-visible":{boxShadow:b=>E(b,o)},"&[aria-checked=true]:focus-visible":{boxShadow:b=>`${A("low")}, ${E(b,o)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[u.tagName]=m},dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:c(1),paddingInline:c(1),gap:c(.5),borderRadius:c(10),backgroundColor:u=>s(u,"inherit",n),color:u=>s(u,"text",n)}}}function zl(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>x(o,"inherit"),lineHeight:"inherit",color:o=>s(o,"text",t),backgroundColor:o=>s(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${s(o,"border-strong",t)}`,borderRadius:o=>c(v(o)*1.5),paddingBlock:o=>c(v(o)*1),paddingLeft:o=>c(v(o)*3),paddingRight:o=>c(v(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${ao(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${c(2)} center`,backgroundSize:`${c(2.5)} ${c(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:o=>c(6+v(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${s(o,"shift-5",n)}`},"&:focus-visible":{boxShadow:o=>E(o,n)},"& optgroup":{color:o=>s(o,"shift-11",t)},"& option[disabled]":{color:o=>s(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>s(o,"muted","neutral"),outline:o=>`1px solid ${s(o,"border-strong","neutral")}`,backgroundColor:o=>s(o,"shift-2","neutral")}}}}function Al(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=y(e.value),l=y(i),{show:u,hide:d,anchorPartial:m}=ce({kind:"selectBox",open:l,placement:y(n),content:e.content}),h={onClick:(p,b)=>!r&&d(b),dataTone:"shift-14",style:{backgroundColor:p=>s(p,"inherit"),borderRadius:p=>c(v(p)*2),outline:p=>`1px solid ${s(p,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};B(e.content,h);let f={div:p=>{let b=a.get(p),k=Array.isArray(b)?b:[b];return t.filter(w=>k.includes(w.value)).map(w=>({span:w.label,$:[ot({color:o,removable:r})],_key:w.value,_onRemove:T=>{let M=a.get(),R=(Array.isArray(M)?M:[M]).filter(P=>P!==w.value);r?a.set(R):a.set(R[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},S=p=>l.get()?d(p):u(p),g={_onInsert:p=>{p.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:p=>p.children.insert(f),onClick:(p,b)=>S(b),tabindex:0,role:"button",ariaExpanded:p=>l.get(p),ariaHaspopup:"listbox",onKeyDown:(p,b)=>{let k=p.key;if(k==="Escape"){d(b);return}if(k==="Enter"||k===" "){p.preventDefault(),S(b);return}k==="ArrowDown"&&!l.get()&&(p.preventDefault(),u(b))},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:p=>c(6+v(p)*2),minWidth:c(32),outlineOffset:"-1px",outline:p=>`1px solid ${s(p,"border-strong","neutral")}`,paddingInline:p=>c(v(p)*2),borderRadius:p=>c(v(p)*1.5),fontSize:p=>x(p,"inherit"),color:p=>s(p,"text",o),backgroundColor:p=>s(p,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>E(p,o)}}};return B(m,g),m}function Nl(e={}){let{accentColor:t="primary",color:n="neutral",value:o=null}=e;return{role:"option",ariaSelected:r=>{var u;let a=(u=r==null?void 0:r.elementNode)==null?void 0:u.getContext("select");if(!a)return;let l=a.value.get(r);return a.multiple?l.includes(o):l===o},onClick:(r,a)=>{let l=a.getContext("select");if(!l)return;let u=l.value,d=u.get();l.multiple?d.includes(o)?u.set(d.filter(m=>m!==o)):u.set(d.concat([o])):d!==o&&u.set(o)},_onInit:r=>{r.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:r=>x(r,"inherit"),height:r=>c(6+v(r)*2),paddingInline:r=>c(v(r)*3),border:"none",outline:"none",color:r=>s(r,"text",n),backgroundColor:r=>s(r,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:r=>s(r,"hover",n)},"&[aria-selected=true]":{backgroundColor:r=>s(r,"shift-6",t),color:r=>s(r,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>E(r,t)}}}}function Bl(e={}){var a;let{color:t="neutral",multiple:n=!1}=e,o=y((a=e.value)!=null?a:n?[]:null),i={div:l=>{let u=o.get(l);return(Array.isArray(u)?u:[u]).map(m=>({input:null,type:"hidden",name:e.name,value:m==null?"":String(m)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:n?"true":void 0,_context:{select:{value:o,multiple:n}},_onInit:l=>{l.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>c(v(l)*2),paddingInline:l=>c(v(l)*2),fontSize:l=>x(l,"inherit"),backgroundColor:l=>s(l,"inherit",t),color:l=>s(l,"text",t)}}}function Vl(e={}){var i;let t=y((i=e.color)!=null?i:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},o=$e(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:r=>x(r),color:r=>s(r,"text",t.get(r)),height:c(6),display:"block",borderRadius:c(1),backgroundColor:r=>s(r,"inherit",t.get(r)),backgroundImage:r=>`linear-gradient(90deg, ${s(r,"inherit",t.get(r))} 0%, ${s(r,"shift-2",t.get(r))} 50%, ${s(r,"inherit",t.get(r))} 100%)`,backgroundSize:"200% 100%",animation:`${o} 1.6s ease-in-out infinite`,[`@keyframes ${o}`]:n}}}function Hl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:o=>x(o,"inherit"),color:o=>s(o,"shift-10",t.get(o))}}}var Xn={to:{transform:"rotate(360deg)"}},Zn=$e(JSON.stringify(Xn));function jl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>x(o),backgroundColor:o=>s(o),color:o=>s(o,"text",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:c(6),height:c(6),borderRadius:"50%",border:o=>`${c(.5)} solid ${s(o,"border-strong",t.get(o))}`,borderTopColor:o=>s(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${Zn} 0.7s linear infinite`,[`@keyframes ${Zn}`]:Xn}}}function Fl(e={}){let{direction:t="horizontal",defaultSize:n=50,min:o=10,max:i=90}=e;return{_onSchedule:(r,a)=>{B(a,{_context:{splitter:{direction:t,size:y(n),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function Wl(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal"?"width":"height",i=t.panelCount++===0,r=l=>{n.style[o]=`${i?l:100-l}%`};r(t.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=t.size.addListener(r);e.addHook("Remove",a)}}}function Ul(){return{role:"separator",tabindex:0,_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal";n.style.cursor=o?"col-resize":"row-resize",n.setAttribute("aria-orientation",o?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(t.min)),n.setAttribute("aria-valuemax",String(t.max)),n.setAttribute("aria-valuenow",String(Math.round(t.size.get())));let i=t.size.addListener(u=>{n.setAttribute("aria-valuenow",String(Math.round(u)))}),r=u=>{let d=u.shiftKey?10:1,m=null;o?u.key==="ArrowRight"?m=Math.min(t.size.get()+d,t.max):u.key==="ArrowLeft"&&(m=Math.max(t.size.get()-d,t.min)):u.key==="ArrowDown"?m=Math.min(t.size.get()+d,t.max):u.key==="ArrowUp"&&(m=Math.max(t.size.get()-d,t.min)),u.key==="Home"?m=t.min:u.key==="End"&&(m=t.max),m!==null&&(u.preventDefault(),t.size.set(m))},a=null,l=u=>{u.preventDefault();let d=n.parentElement,m=f=>{let S=d.getBoundingClientRect(),g=o?(f.clientX-S.left)/S.width*100:(f.clientY-S.top)/S.height*100;t.size.set(Math.min(Math.max(g,t.min),t.max))},h=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h),a=null};a=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h),a=null},document.addEventListener("mousemove",m),document.addEventListener("mouseup",h)};n.addEventListener("keydown",r),n.addEventListener("mousedown",l),e.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",r),n.removeEventListener("mousedown",l)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>s(e,"inherit"),color:e=>s(e,"text"),"&:hover":{backgroundColor:e=>s(e,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:e=>E(e,"primary")},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>s(e,"shift-4")}}}}function ql(e={}){let{gap:t=3,align:n}=e;return{style:N({display:"flex",flexDirection:"column",gap:o=>c(v(o)*t)},n?{alignItems:n}:{})}}function Kl(e={items:[]}){var a;let{items:t=[],direction:n="horizontal",color:o="neutral",accentColor:i="primary"}=e,r=y((a=e.current)!=null?a:0);return{_doctorDisable:"inline-typography",_context:{steps:{current:r,direction:n,color:o,accentColor:i}},_onSchedule:(l,u)=>{let d=t.map((m,h)=>{var S;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(S=m.key)!=null?S:h,dataStep:String(h+1),dataStatus:g=>{let p=r.get(g);return h<p?"done":h===p?"active":"pending"},ariaCurrent:g=>r.get(g)===h?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:g=>x(g,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:c(6),height:c(6),borderRadius:c(999),fontSize:g=>x(g,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:g=>`2px solid ${s(g,"border-strong",o)}`,backgroundColor:g=>s(g,"inherit"),color:g=>s(g,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:c(3),right:`calc(50% + ${c(3)})`,left:`calc(-50% + ${c(3)})`,height:"2px",backgroundColor:g=>s(g,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:g=>s(g,"shift-9",i),borderColor:g=>s(g,"shift-9",i),color:g=>s(g,"shift-0",i),boxShadow:g=>`0 0 0 3px ${s(g,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:g=>s(g,"shift-9",i),borderColor:g=>s(g,"shift-9",i),color:g=>s(g,"shift-0",i)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:g=>s(g,"shift-9",i)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:g=>s(g,"shift-9",i)},"&[data-status=pending]":{color:g=>s(g,"muted")},"&[data-status=active]":{color:g=>s(g,"shift-11",i),fontWeight:"bold"},"&[data-status=done]":{color:g=>s(g,"text",o)}}}});u[l.tagName]=d},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:c(2),listStyle:"none",margin:"0",padding:"0"}}}function Gl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>x(o,"inherit"),fontWeight:"bold",color:o=>s(o,"shift-11",t.get(o)),backgroundColor:o=>s(o)}}}function Yl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>s(o,"text",t.get(o))}}}function Zl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>s(o,"text",t.get(o))}}}function Xl(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:o=>x(o,"inherit"),color:o=>s(o,"text",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*1),color:o=>s(o,"shift-10",t.get(o)),backgroundColor:o=>s(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*1),color:o=>s(o,"text",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${s(o,"shift-3",t.get(o))}`,fontSize:o=>x(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(v(o)*3),paddingBlock:o=>c(v(o)*1),color:o=>s(o,"shift-10",t.get(o)),backgroundColor:o=>s(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${s(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>s(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>s(o,"hover")}}}}function Jl(e={items:[]}){var r,a,l;let{items:t=[],accentColor:n="primary",color:o="neutral"}=e,i=y((l=(a=e.activeKey)!=null?a:(r=t[0])==null?void 0:r.key)!=null?l:0);return{_onSchedule:(u,d)=>{let m=u.nodeId,f={div:t.map((g,p)=>{var _;let b=(_=g.key)!=null?_:p;return{button:[typeof g.label=="string"?{span:g.label}:g.label],_key:b,type:"button",role:"tab",id:`tab${m}${b}`,ariaControls:`panel${m}${b}`,ariaSelected:w=>i.get(w)===b,tabIndex:w=>i.get(w)===b?0:-1,onClick:()=>i.set(b),onKeyDown:w=>{var z;let T=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(T))return;w.preventDefault();let M=t.map((V,ie)=>{var ue;return(ue=V.key)!=null?ue:ie}),L=M.indexOf(b),R=L;T==="ArrowRight"?R=(L+1)%M.length:T==="ArrowLeft"?R=(L-1+M.length)%M.length:T==="Home"?R=0:T==="End"&&(R=M.length-1),i.set(M[R]);let P=w.target.closest("[role=tablist]");(z=P==null?void 0:P.querySelectorAll("[role=tab]")[R])==null||z.focus()},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+v(w)*2),paddingInline:w=>c(v(w)*4),border:"none",outline:"none",color:w=>s(w,"shift-13"),backgroundColor:w=>s(w,"inherit"),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${s(w,"shift-1",o)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:w=>s(w,"shift-13"),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${s(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{color:w=>s(w,"shift-13",n),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${s(w,"shift-8",n)}`},"&:focus-visible":{boxShadow:w=>E(w,n)},"&[aria-selected=true]:focus-visible":{boxShadow:w=>`${E(w,n)}, inset 0 ${c(-.5)} 0 0 ${s(w,"shift-6",n)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},S=t.map((g,p)=>{var k;let b=(k=g.key)!=null?k:p;return{div:[g.content],_key:b,role:"tabpanel",id:`panel${m}${b}`,ariaLabelledby:`tab${m}${b}`,hidden:_=>i.get(_)!==b,style:{paddingBlock:_=>c(v(_)*2),paddingInline:_=>c(v(_)*2)}}});d[u.tagName]=[f,...S]}}}function Ql(e={}){var i,r;let t=y((i=e.color)!=null?i:"neutral","color"),n=y((r=e.accentColor)!=null?r:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let l=a.domElement;l.style.overflow="hidden";let u=()=>{l.style.height="auto",l.style.height=`${l.scrollHeight}px`};l.addEventListener("input",u),u(),a.addHook("Remove",()=>l.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>c(v(a)*2),paddingBlock:a=>c(v(a)*1.5),border:"none",borderRadius:a=>c(v(a)*1.5),fontSize:a=>x(a,"inherit"),color:a=>s(a,"text",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${s(a,"border-strong",t.get(a))}`,backgroundColor:a=>s(a,"inherit",t.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>s(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${s(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>E(a,n.get(a))},"&:invalid":{outline:a=>`${c(.5)} solid ${s(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>s(a,"muted","neutral"),outline:a=>`1px solid ${s(a,"border-strong","neutral")}`,backgroundColor:a=>s(a,"shift-2","neutral")}}}}function es(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ts(e={}){var r,a,l;let{last:t=!1}=e,n=(r=e.color)!=null?r:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=y((l=e.active)!=null?l:!1);return{style:N({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(v(u)*2),paddingBottom:u=>t?"0":c(v(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:c(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>s(u,"shift-8",i.get(u)?o:n),opacity:u=>i.get(u)?"1":"0.4"}},t?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:u=>c(v(u)*-4),width:"2px",backgroundColor:u=>s(u,"shift-3",n)}})}}function os(e={}){let{position:t="top-center",color:n="neutral"}=e,o=y(!1),i=t.startsWith("top"),r=t.endsWith("center"),a=t.endsWith("right"),l={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:r?"center":a?"end":"start",inset:0,gap:c(4),zIndex:30,padding:c(6),pointerEvents:"none"}};return{_portal:u=>{let d=u.domElement.querySelector(`#domphy-toast-${t}`);return d||(d=u.children.insert(l).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:c(32),pointerEvents:"auto",paddingBlock:u=>c(v(u)*2),paddingInline:u=>c(v(u)*4),borderRadius:u=>c(v(u)*2),fontSize:u=>x(u,"inherit"),color:u=>s(u,"text",n),backgroundColor:u=>s(u,"inherit",n),boxShadow:A("medium"),opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,d)=>{var _,w;let m=!1,h=null,f=!1,S=u.getRoot(),g=(w=(_=u.domElement)==null?void 0:_.parentElement)!=null?w:null,p=()=>{var M;if(f||!g||g.id!==`domphy-toast-${t}`||g.childElementCount>0)return;f=!0;let T=(M=S.children)==null?void 0:M.items.find(L=>L.domElement===g);T?S.children.remove(T):g.remove()},b=()=>{m||(m=!0,h&&(clearTimeout(h),h=null),u.domElement.removeEventListener("transitionend",k),d(),p())},k=T=>{T.propertyName==="transform"&&b()};u.domElement.addEventListener("transitionend",k),h=setTimeout(b,350),u.addHook("Remove",()=>{var T;h&&(clearTimeout(h),h=null),(T=u.domElement)==null||T.removeEventListener("transitionend",k),p()}),o.set(!1)}}}function ns(e={items:[]}){var a;let{items:t=[],multiple:n=!1,color:o="neutral",accentColor:i="primary"}=e,r=y((a=e.value)!=null?a:n?[]:"");return{role:"group",_context:{toggleGroup:{value:r,multiple:n}},_onSchedule:(l,u)=>{let d=t.map((m,h)=>{var g;let f=(g=m.key)!=null?g:String(h);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:f,type:"button",role:"button",ariaPressed:p=>{let b=r.get(p);return Array.isArray(b)?b.includes(f):b===f},onClick:()=>{let p=r.get();if(n){let b=Array.isArray(p)?[...p]:[];r.set(b.includes(f)?b.filter(k=>k!==f):[...b,f])}else r.set(p===f?"":f)},style:{cursor:"pointer",fontSize:p=>x(p,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:p=>s(p,"shift-13",o),backgroundColor:p=>s(p,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:p=>s(p,"shift-13",o),backgroundColor:p=>s(p,"hover",o)},"&:active:not([disabled])":{backgroundColor:p=>s(p,"increase-2",o)},"&[aria-pressed=true]":{backgroundColor:p=>s(p,"shift-3",i),color:p=>s(p,"shift-13",i)},"&:focus-visible":{boxShadow:p=>E(p,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[l.tagName]=d},style:{display:"flex",paddingBlock:c(1),paddingInline:c(1),gap:c(1),borderRadius:c(2),fontSize:l=>x(l,"inherit"),backgroundColor:l=>s(l,"inherit",o),color:l=>s(l,"text",o),outline:l=>`1px solid ${s(l,"border",o)}`,outlineOffset:"-1px"}}}function rs(e={}){return wo({gap:e.gap})}function is(){return{div:null,style:{flex:"1 1 0"}}}function as(e={}){let{open:t=!1,placement:n="top",content:o="Tooltip Content"}=e,i=y(n),r=y(o),a={span:f=>r.get(f)},{show:l,hide:u,anchorPartial:d}=ce({kind:"tooltip",open:t,placement:i,content:a}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:f=>c(v(f)*1),paddingInline:f=>c(v(f)*3),borderRadius:f=>c(v(f)*1.5),color:f=>s(f,"text"),backgroundColor:f=>s(f),fontSize:f=>x(f,"inherit"),boxShadow:A("low")},$:[xo({placement:i,bordered:!1})]};return a.$||(a.$=[]),a.$.push(m),B(d,{ariaDescribedby:f=>f!=null&&f.elementNode?je("tooltip",f.elementNode):void 0,onMouseEnter:(f,S)=>l(S),onMouseLeave:(f,S)=>u(S),onFocus:(f,S)=>l(S),onBlur:(f,S)=>u(S),onKeyDown:(f,S)=>f.key==="Escape"&&u(S)}),d}function Jn(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function ls(e={}){let{duration:t=300,delay:n=0}=e,o=new Map,i=new Map,r=new Set,a=new Set;return{_onMount:l=>{l.addHook("Remove",()=>{for(let u of Array.from(i.values()))u();i.clear();for(let u of r)clearTimeout(u);r.clear();for(let u of a)cancelAnimationFrame(u);a.clear()})},_onBeforeUpdate:l=>{o=new Map,l.children.items.forEach((u,d)=>{if(!(u instanceof U))return;let m=u.domElement;m&&o.set(Jn(u,d),m.getBoundingClientRect())})},_onUpdate:l=>{l.children.items.forEach((u,d)=>{var M;if(!(u instanceof U))return;let m=u.domElement;if(!m)return;let h=Jn(u,d),f=o.get(h);if(!f)return;let S=m.getBoundingClientRect(),g=f.left-S.left,p=f.top-S.top;if(Math.abs(g)<.5&&Math.abs(p)<.5)return;(M=i.get(m))==null||M(),m.style.transition="none",m.style.transform=`translate(${g}px, ${p}px)`,m.getBoundingClientRect();let b=requestAnimationFrame(()=>{a.delete(b),m.style.transition=`transform ${t}ms ease ${n}ms`,m.style.transform="translate(0px, 0px)"});a.add(b);let k=!1,_=null,w=()=>{k||(k=!0,_&&(r.delete(_),_=null),i.delete(m),m.removeEventListener("transitionend",T),m.style.transition="",m.style.transform="")},T=L=>{L.propertyName==="transform"&&w()};i.set(m,()=>{k=!0,_&&(clearTimeout(_),r.delete(_),_=null),i.delete(m),m.removeEventListener("transitionend",T)}),m.addEventListener("transitionend",T),_=setTimeout(w,t+n+34),r.add(_)}),o.clear()}}}function ss(e={}){var n;let t=y((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>s(o),color:o=>s(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"disc",listStylePosition:"outside"}}}function cs(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}return gr(ms);})();
6
7
  //# sourceMappingURL=core-theme-ui.global.js.map