@domphy/ui 0.20.2 → 0.20.6

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,6 @@
1
- "use strict";var Domphy=(()=>{var Qe=Object.defineProperty,Zn=Object.defineProperties,Jn=Object.getOwnPropertyDescriptor,Qn=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertyNames,yo=Object.getOwnPropertySymbols;var vo=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable;var bo=(e,t,n)=>t in e?Qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N=(e,t)=>{for(var n in t||(t={}))vo.call(t,n)&&bo(e,n,t[n]);if(yo)for(var n of yo(t))tr.call(t,n)&&bo(e,n,t[n]);return e},Me=(e,t)=>Zn(e,Qn(t));var et=(e,t)=>{for(var n in t)Qe(e,n,{get:t[n],enumerable:!0})},or=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of er(t))!vo.call(e,i)&&i!==n&&Qe(e,i,{get:()=>t[i],enumerable:!(o=Jn(t,i))||o.enumerable});return e};var nr=e=>or(Qe({},"__esModule",{value:!0}),e);var Wl={};et(Wl,{core:()=>nt,theme:()=>st,ui:()=>Ct});var nt={};et(nt,{AttributeList:()=>Bo,BooleanAttributes:()=>zt,CamelAttributes:()=>Eo,ElementList:()=>Ho,ElementNode:()=>U,HtmlAttributeNames:()=>Tt,HtmlTags:()=>At,Notifier:()=>Fe,PrefixCSS:()=>ye,RecordState:()=>Lr,State:()=>Pt,SvgTags:()=>_o,VoidTags:()=>To,_microtask:()=>Bt,_resetKeylessWarnings:()=>wr,batch:()=>Or,behavior:()=>Nt,computed:()=>Tr,configure:()=>lr,effect:()=>Wo,effectScope:()=>_r,flushPendingNotifiers:()=>Ro,flushSync:()=>Cr,hasPendingNotifiers:()=>Lo,hashString:()=>Le,isState:()=>hr,merge:()=>I,nextTick:()=>Dr,readonly:()=>dr,runBatched:()=>Do,toState:()=>g,untrack:()=>Mr,watch:()=>Pr});var rr=Object.defineProperty,So=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,xo=(e,t,n)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wo=(e,t)=>{for(var n in t||(t={}))ir.call(t,n)&&xo(e,n,t[n]);if(So)for(var n of So(t))ar.call(t,n)&&xo(e,n,t[n]);return e},zt=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","contentEditable","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","spellCheck","inert","download","noModule","paused","autoPictureInPicture"],Eo=["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"],Tt={htmlFor:"for",allowFullScreen:"allowfullscreen",autoFocus:"autofocus",autoPlay:"autoplay",contentEditable:"contenteditable",formNoValidate:"formnovalidate",isMap:"ismap",itemScope:"itemscope",noHref:"nohref",noShade:"noshade",noValidate:"novalidate",playsInline:"playsinline",trueSpeed:"truespeed",typeMustMatch:"typemustmatch",spellCheck:"spellcheck",noModule:"nomodule",autoPictureInPicture:"autopictureinpicture",autoCapitalize:"autocapitalize",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"},At=["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"],ye={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"]},_o=["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"],To=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],Oo={};function lr(e){Object.assign(Oo,e)}function sr(){return Oo}var cr=["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"],ur=cr.reduce((e,t)=>{let n=t.slice(2).toLowerCase();return e[n]=t,e},{}),Mo=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}},He=[],Ot=0;function Vt(){return Ot>0?null:He.length?He[He.length-1]:null}function Po(e,t){He.push(e);try{return t()}finally{He.pop()}}function mr(e){Ot++;try{return e()}finally{Ot--}}var te=[],Bt=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},Co=100,ot=0,Mt=new Set,De=new Set;function Do(e){ot++;try{return e()}finally{if(ot--,ot===0){let t=Mt;Mt=new Set;for(let n of t)n._scheduleFlush()}}}var Fe=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){if(!this._listeners)return;let n=this._listeners[e];n&&n.has(t)&&(n.delete(t),n.size===0&&delete this._listeners[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=te.length?te[te.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>=Co){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${Co} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...te]})}ot>0?Mt.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,De.add(this),Bt(()=>this._flushAll()))}_isCircular(e){let t=te.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let n=[...te.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
2
- ${n.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,De.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:n,chain:o}]of e)te=o,this._flush(t,n);te=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let n=this._listeners[e];if(n){te.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),te.pop()}}};function Lo(){return De.size>0}function Ro(){let e=0;for(;De.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...De];De.clear();for(let n of t)n._flushAll()}}var Pt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new Fe,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Vt();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 I(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=me(t));for(let r in t){let a=t[r];if(!(a==null||a===""))if(typeof a=="object"&&!Array.isArray(a))typeof e[r]=="object"?e[r]=I(e[r],a):e[r]=a;else if(n.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let s=e[r];e[r]=u=>{let h=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join(", ")}}else e[r]=[e[r],a].filter(s=>s).join(", ");else if(i.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let s=e[r];e[r]=u=>{let h=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join("")}}else e[r]=[e[r],a].filter(s=>s).join("");else if(o.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let s=e[r];e[r]=u=>{let h=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join(" ")}}else e[r]=[e[r],a].filter(s=>s).join(" ");else if(r.startsWith("on")){let s=r.replace("on","").toLowerCase();pr(e,s,a)}else if(r.startsWith("_on")){let s=r.replace("_on","");fr(e,s,a)}else e[r]=a}return e}function Le(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 g(e,t){return e instanceof Pt||e!=null&&e._isState?e:new Pt(e,t)}function hr(e){return typeof e=="object"&&e!==null&&e._isState===!0}function dr(e){return{_isState:!0,get(t){return e.get(t)}}}function Nt(e,t,n){return{_behaviors:{[e]:{attach:t,props:n}}}}function fr(e,t,n){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...r)=>{i(...r),n(...r)}:e[o]=n}function pr(e,t,n){let o=ur[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 me(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(me(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(me(i,t),me(r,t));return n}if(e instanceof Set){n=new Set,t.set(e,n);for(let i of e)n.add(me(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]=me(e[i],t);return n}function $o(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&&!At.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==="$")e.$.forEach(a=>$o(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 tt(e){return new RegExp("<([a-z][\\w-]*)(\\s[^>]*)?>.*<\\/\\1>|<([a-z][\\w-]*)(\\s[^>]*)?\\/>","is").test(e.trim())}function gr(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 Io(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function zo(e){return Object.keys(e).find(t=>At.includes(t))}function Ao(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function yr(e){if(e.indexOf("@")===0)return[e];for(var t=[],n=0,o=0,i="",r=0,a=e.length;r<a;r++){var s=e[r];if(s==="(")n+=1;else if(s===")")n-=1;else if(s==="[")o+=1;else if(s==="]")o-=1;else if(s===","&&!n&&!o){t.push(i.trim()),i="";continue}i+=s}return t.push(i.trim()),t}function Dt(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 br(e,t){for(let n=0;n<e.length;n++){let o=e[n],i=null;typeof o.selectorText=="string"?i=Dt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Dt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Vo(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:sr().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 Lt=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(n=>I(t,Lt(n))),delete e.$,I(t,e),t}else return e},vr={translate:["yes","no"],autoCapitalize:["on","off"]},Sr=class{constructor(e,t,n){this.declaredValue=void 0,this._notifier=new Fe,this._releases=[],this._removeHooked=!1,this.parent=n,this.isBoolean=zt.includes(e),this.enumeratedBoolean=vr[e],Eo.includes(e)?this.name=e:Object.hasOwn(Tt,e)?this.name=Tt[e]:this.name=Ao(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=>{var o;return(o=this.parent)==null?void 0:o.addHook("BeforeRemove",n)},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 n=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${Io(String(n))}"`}},Bo=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 Sr(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(!zt.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,h)=>{let m=(u||"").split(" ").filter(d=>d);return!m.includes(h)&&m.push(h),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"),s=typeof e=="function";if(!r&&!s){this.set("class",o(a,e));return}this.set("class",u=>o(r?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(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))}},be=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",xr=class{constructor(e,t,n){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Ao(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)),ye[this.name]&&ye[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),ye[this.name]&&ye[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 ye[this.name]&&ye[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},ue=class Rt{constructor(t,n){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new No(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 Rt;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Rt;)t=t.parent;return t}insertStyle(t,n){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(n):this.styleBlock[t]=new xr(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)}}},No=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof ue;)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],s=yr(r);for(let u of s){let h=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new ue(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new ue(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new ue(u,this.parent);for(let d in a)m.insertStyle(d,a[d]);this.items.push(m)}else if(typeof a=="object"&&a!=null){let m=new ue(h,this.parent);this.items.push(m);for(let[d,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let v=i(d,h);this.addCSS(p,v)}else m.insertStyle(d,p)}else n[u]=a}}if(Object.keys(n).length){let r=new ue(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 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 ue(t,this.parent),this.items.push(i));let r=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))r.has(s)||i.removeStyle(s);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 ue(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let n=e.get(Dt(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}},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 Ho(this),this.styles=new No(this),this.attributes=new Bo(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,r;t=me(t),$o(t),t.style=t.style||{},this.parent=n,this.tagName=zo(t),t=Lt(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}`,s=JSON.stringify(t.style||{},(h,m)=>typeof m=="function"?a:m);this.nodeId=Le(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 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=_o.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){I(this._context,t._context),I(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=me(t);o.style=o.style||{},o=Lt(o);let i=o[this.tagName];if(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&&I(this._context,o._context),o._metadata&&I(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],s=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),h=null;this._events={};for(let m of Object.keys(o)){if(a.includes(m)||s.includes(m)||m==="_portal")continue;let d=o[m];m.startsWith("on")&&typeof d=="function"?this.addEvent(m.substring(2).toLowerCase(),d):m==="class"&&(typeof d=="string"||typeof d=="function")?h=d:(this.attributes.set(m,d),u.add(m))}if(typeof h=="function"){let m=h;this.attributes.set("class",d=>`${r} ${m(d)}`)}else this.attributes.set("class",h?`${r} ${h}`: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){let o=n.attach(this,n.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((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(To.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(be&&!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&&this.children.items.forEach((o,i)=>{let r=t.childNodes[i];r&&(o instanceof Pe?o.mount(r):o.domText=r)}),n){let o=n.sheet;o&&this._hydrateStyles(br(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_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=Vo(r)),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(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():be&&!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()}}},ko=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(tt(this.text)){let t=document.createElement("template");t.innerHTML=this.text.trim(),t.content.querySelectorAll("*").forEach(n=>{for(let o of Array.from(n.attributes))/^on/i.test(o.name)?n.removeAttribute(o.name):/^(?:href|src|action|formaction)$/i.test(o.name)&&/^\s*javascript:/i.test(o.value)&&n.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 n=e===""?"\u200B":String(e);if(n===this.text&&this.domText)return;let o=tt(this.text);if(this.text=n,!this.domText)return;if(!o&&!tt(n)&&this.domText.nodeType===3){this.domText.nodeValue=n;return}let i=this.domText,r=this._createDOMNode();(t=i.parentNode)==null||t.replaceChild(r,i)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text==="\u200B"?"&#8203;":tt(this.text)?gr(this.text):Io(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},$t=new Set;function wr(){$t.clear()}var Ho=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new U(e,this.owner,this._nextKey++):new ko(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.domText;if(!o)return;let i=this._domReferenceAfter(t+1);o!==i&&n.insertBefore(o,i)}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let n=this.owner.domElement,o=e instanceof U?e.domElement:e.domText,i=t instanceof U?t.domElement:t.domText;if(!o||!i)return;let r=o.nextSibling,a=i.nextSibling;n.insertBefore(o,a),n.insertBefore(i,r)}update(e,t=!0,n=!1){var o,i,r,a;if(this.items.some(f=>f._imperative)){let f=this.items.filter(S=>!S._imperative),y=this.items.filter(S=>S._imperative);this.items=f.concat(y)}let s=this.items.slice(),u=new Map;for(let f of s)f instanceof U&&f.key!==null&&f.key!==void 0&&!f._imperative&&!f._beforeRemoveFired&&u.set(f.key,f);!n&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let h=new Set(s),m=new Set,d=0,p=be&&s.length>0?e.length!==s.length:!1;for(let f=0;f<e.length;f++){let y=e[f],S=typeof y=="object"&&y!==null,C=S?y._key:void 0,E=S?zo(y):void 0;if(be&&S&&C===void 0&&d++,C!==void 0){let w=u.get(C);if(w instanceof U&&w.tagName===E){u.delete(C);let O=this.items.indexOf(w);if(O!==f&&O>=0){let M=!!w._portal;this.move(O,f,M?!1:t,!0)}w.parent=this.owner,w.patch(y),m.add(w);continue}}else if(S){let w=this.items[f];if(w instanceof U&&w.key==null&&w.tagName===E&&h.has(w)&&!m.has(w)&&!w._imperative&&!w._beforeRemoveFired){w.parent=this.owner,w.patch(y),m.add(w);continue}}else{let w=this.items[f];if(w instanceof ko&&h.has(w)&&!m.has(w)&&!w._imperative){w.setText(y==null?"":y),m.add(w);continue}}m.add(this.insert(y,f,t,!0,!0))}let v=this.items.slice(e.length);for(let f of v)f._imperative||this.remove(f,t,!0);if(u.forEach(f=>this.remove(f,t,!0)),be&&s.length>0&&d>0&&p){let f=this.owner.nodeId;if(!$t.has(f)){$t.add(f);let y=`[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}>, ${d} unkeyed item${d===1?"":"s"})`;console.warn(y)}}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,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(n&&u)if(s._portal){let h=s._portal(this.owner.getRoot());h&&s.render(h)}else{let h=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(h,m);let d=u.getRootNode(),p=d instanceof ShadowRoot?d:document.head,v=Vo(p);s.styles.render(v),s._hooks.Mount&&s._hooks.Mount(s),s.children.items.forEach(f=>{if(f instanceof U&&f._portal){let y=f._portal(f.getRoot());y&&f.render(y)}else f.render(h)})}}else{let u=this.owner.domElement;if(n&&u){let h=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(h,m)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),s}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())},s=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,s(e,a),s.length<2&&!r?a():be&&!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{let i=e.domText;this.items.splice(o,1),t&&i&&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}},ve=new Set,It=!1;function jo(e){ve.add(e),!It&&(It=!0,Bt(Fo))}function Fo(){for(It=!1;ve.size>0;){let e=[...ve];ve.clear();for(let t of e)try{t()}catch(n){console.error("[Domphy] Uncaught error in effect:",n)}}}function Cr(){let e=0;for(;Lo()||ve.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}Ro(),Fo()}}var je=[];function kr(){return je.length?je[je.length-1]:null}function Ht(e){let t=kr();t&&t._add(e)}var Er=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 be&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();je.push(this);try{return e()}finally{je.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function _r(){let e=new Er;return Ht(()=>e.stop()),e}function Wo(e){let t=!1,n=!1,o=()=>{t||r()},i=new Mo(()=>{t||jo(o)}),r=()=>{if(!(t||n)){n=!0,i.reset();try{Po(i,e)}finally{n=!1}}},a=()=>{t||(t=!0,i.reset(),ve.delete(o))};return Ht(a),r(),a}function Tr(e){let t="computed",n=new Fe,o,i=!0,r=!1,a=()=>{i&&n.listenerCount(t)>0&&h()},s=new Mo(()=>{i||(i=!0,jo(a))}),u=()=>{s.reset(),o=Po(s,e),i=!1,r=!0},h=()=>{let d=o,p=r;u(),!(p&&o===d)&&n.notify(t,o)},m=d=>{if(d)n.addListener(t,d);else{let p=Vt();p&&n.addListener(t,p.handler)}return i&&(r&&n.listenerCount(t)>0?h():u()),o};return Ht(()=>{s.reset(),ve.delete(a),n._dispose()}),{_isState:!0,_notifier:n,get:m}}function Or(e){return Do(e)}function Mr(e){return mr(e)}function Pr(e,t,n){let o,i=!0;return Wo(()=>{let r=typeof e=="function"?e():e.get();(!i||n!=null&&n.immediate)&&t(r,o),o=r,i=!1})}function Dr(e){return e?Promise.resolve().then(e):Promise.resolve()}var Lr=class{constructor(e){this._notifier=new Fe,this.initialRecord=wo({},e),this._record=wo({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let n=Vt();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 st={};et(st,{COLOR_ROLES:()=>Xr,ElementTones:()=>We,applySystemTheme:()=>Gr,generateTheme:()=>oi,getTheme:()=>oe,setTheme:()=>Ur,themeApply:()=>Kr,themeCSS:()=>Ut,themeColor:()=>l,themeColorToken:()=>Zt,themeDensity:()=>b,themeFluidSpacing:()=>Yr,themeName:()=>lt,themeSize:()=>x,themeSpacing:()=>c,themeTokens:()=>Jo,themeVars:()=>at});var Rr=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)},$r=e=>{let t=n=>n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;return e.map(t)},Ir=e=>{let[t,n,o]=Rr(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}`},rt=e=>{let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255;return $r([t,n,o])},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]},Ar=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,s=i*i*i,u=r*r*r,h=a*a*a;return[4.0767416621*s-3.3077115913*u+.2309699292*h,-1.2684380046*s+2.6097574011*u-.3413193965*h,-.0041960863*s-.7034186147*u+1.707614701*h]};var Ft=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,s=.95047,u=1,h=1.08883,m=f=>f>.008856?Math.cbrt(f):7.787*f+16/116,d=m(i/s),p=m(r/u),v=m(a/h);return[116*p-16,500*(d-p),200*(p-v)]};var qo=(e,t)=>{let[n,o,i]=e,[r,a,s]=t,u=(n+r)/2,h=Math.sqrt(o*o+i*i),m=Math.sqrt(a*a+s*s),d=(h+m)/2,p=.5*(1-Math.sqrt(Math.pow(d,7)/(Math.pow(d,7)+Math.pow(25,7)))),v=o*(1+p),f=a*(1+p),y=Math.sqrt(v*v+i*i),S=Math.sqrt(f*f+s*s),C=(y+S)/2,E=Math.atan2(i,v)*180/Math.PI+(Math.atan2(i,v)<0?360:0),w=Math.atan2(s,f)*180/Math.PI+(Math.atan2(s,f)<0?360:0),O=w-E;Math.abs(O)>180&&(O+=w<=E?360:-360);let M=Math.abs(E-w)>180?(E+w+360)/2:(E+w)/2,_=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),D=r-n,B=S-y,H=2*Math.sqrt(y*S)*Math.sin(O/2*Math.PI/180),j=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),pe=1+.045*C,Te=1+.015*C*_,ce=30*Math.exp(-Math.pow((M-275)/25,2)),W=-(2*Math.sqrt(Math.pow(C,7)/(Math.pow(C,7)+Math.pow(25,7))))*Math.sin(2*ce*Math.PI/180);return Math.sqrt(Math.pow(D/j,2)+Math.pow(B/pe,2)+Math.pow(H/Te,2)+W*(B/pe)*(H/Te))};var Uo=e=>{if(e.length<1)return h=>0;let t=[...e].sort((h,m)=>h[0]-m[0]),n=[];for(let h=0;h<t.length;h++)(h===0||t[h][0]!==t[h-1][0])&&n.push(t[h]);let o=n.length;if(o===1)return h=>n[0][1];let i=n.map(h=>h[0]),r=n.map(h=>h[1]),a=[],s=[];for(let h=0;h<o-1;h++)a[h]=i[h+1]-i[h],s[h]=(r[h+1]-r[h])/a[h];let u=new Array(o);u[0]=s[0],u[o-1]=s[o-2];for(let h=1;h<o-1;h++){let m=s[h-1],d=s[h];if(m*d<=0)u[h]=0;else{let p=(1+a[h]/(a[h-1]+a[h]))/3;u[h]=m*d/((1-p)*m+p*d)}}return h=>{if(h<=i[0])return r[0];if(h>=i[o-1])return r[o-1];let m=0,d=o-2,p=0;for(;m<=d;){let w=Math.floor((m+d)/2);if(h>=i[w]&&h<=i[w+1]){p=w;break}h<i[w]?d=w-1:m=w+1}let v=a[p],f=(h-i[p])/v,y=f*f,S=y*f,C=u[p]*v,E=u[p+1]*v;return(2*S-3*y+1)*r[p]+(S-2*y+f)*C+(-2*S+3*y)*r[p+1]+(S-y)*E}};var Ko=.605,jt=.685;function Vr(e){let t=Math.pow(e,Ko);return t/(1+jt*(1-t))}function Br(e){let t=e*(1+jt)/(1+e*jt);return Math.pow(t,1/Ko)}function Nr(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 Hr(e){let t=[[0,0,0],...e,[1,1,1]].map(p=>zr(p)).sort((p,v)=>p[0]-v[0]),n=t.map(p=>p[0]),o=t.map(p=>p[1]),i=t.map(p=>p[2]),r=[0],a=0;for(let p=1;p<t.length;p++)a+=Nr(t[p],t[p-1]),r.push(a);let s=r.map(p=>Br(a>0?p/a:0)),u=e.length===1?0:s[1],h=e.length===1?1:s[s.length-2],m=Uo(s.map((p,v)=>[p,o[v]])),d=Uo(s.map((p,v)=>[p,i[v]]));return{colorAtParam:p=>{let v=Vr(p),f=u+v*(h-u),y=0;for(let _=0;_<s.length-1;_++)if(f<=s[_+1]){y=_;break}let S=s[y],C=s[y+1],E=(f-S)/(C-S||1),w=n[y]+E*(n[y+1]-n[y]),O=m(f),M=d(f);return Ar([w,O,M])},parameters:s.slice(1,-1).map(p=>(p-u)/(h-u))}}function Yo(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[n[0]];let{colorAtParam:o,parameters:i}=Hr(n.map(rt)),r=[],a=[0,...i,1],s=a.map(h=>Math.round(h*(t-1))),u=0;for(let h=0;h<t;h++){for(;u<s.length-2&&h>s[u+1];)u++;let m=s[u],d=s[u+1],p=a[u],v=a[u+1],f;if(d<=m)f=p;else{let y=(h-m)/(d-m);f=p+y*(v-p)}r.push(Ir(o(f)))}return r.reverse()}var jr={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","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#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:{}},Ue=jr,Gt=e=>JSON.parse(JSON.stringify(e)),Xo=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),Re={light:Gt(Ue),dark:qr(Ue)},it=null,Wt=new Map;function Xt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Fr(e){for(let t in e)if(!Object.keys(Ue).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(n=>Array.isArray(n)&&n.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(n=>typeof n=="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 Zo(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]={}),Zo(e[o],t[o])):e[o]=t[o])}function Wr(e,t){let n={},o=Xt(t);for(let r in t){let a=t[r];if(r==="colors")for(let s in t.colors)[...Array(o).keys()].forEach(u=>n[`--${s}-${u}`]=t.colors[s][u]);else if(r==="fontSizes")[...Array(8).keys()].forEach(s=>n[`--fontSize-${s}`]=t.fontSizes[s]);else if(r==="custom"&&a&&typeof a=="object")for(let s in a)n[`--custom-${Xo(s)}`]=a[s]}let i="";for(let r in n)i+=` ${r}: ${n[r]};
1
+ "use strict";var Domphy=(()=>{var et=Object.defineProperty,Xr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptor,Qr=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertyNames,bo=Object.getOwnPropertySymbols;var So=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable;var vo=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))So.call(t,r)&&vo(e,r,t[r]);if(bo)for(var r of bo(t))tn.call(t,r)&&vo(e,r,t[r]);return e},te=(e,t)=>Xr(e,Qr(t));var tt=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0})},on=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of en(t))!So.call(e,i)&&i!==r&&et(e,i,{get:()=>t[i],enumerable:!(o=Jr(t,i))||o.enumerable});return e};var rn=e=>on(et({},"__esModule",{value:!0}),e);var Kl={};tt(Kl,{core:()=>nt,theme:()=>ct,ui:()=>kt});var nt={};tt(nt,{AttributeList:()=>No,BooleanAttributes:()=>zt,CamelAttributes:()=>_o,ElementList:()=>jo,ElementNode:()=>U,HtmlAttributeNames:()=>Tt,HtmlTags:()=>At,Notifier:()=>We,PrefixCSS:()=>ve,RecordState:()=>Rn,State:()=>Dt,SvgTags:()=>To,VoidTags:()=>Mo,_microtask:()=>Bt,_resetKeylessWarnings:()=>kn,batch:()=>On,behavior:()=>Nt,computed:()=>Mn,configure:()=>sn,effect:()=>Uo,effectScope:()=>Tn,flushPendingNotifiers:()=>Io,flushSync:()=>Cn,hasPendingNotifiers:()=>Ro,hashString:()=>Re,isState:()=>dn,merge:()=>z,nextTick:()=>Ln,readonly:()=>fn,runBatched:()=>Lo,toState:()=>g,untrack:()=>Dn,watch:()=>Pn});var nn=Object.defineProperty,xo=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,wo=(e,t,r)=>t in e?nn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ko=(e,t)=>{for(var r in t||(t={}))an.call(t,r)&&wo(e,r,t[r]);if(xo)for(var r of xo(t))ln.call(t,r)&&wo(e,r,t[r]);return e},zt=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","contentEditable","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","spellCheck","inert","download","noModule","paused","autoPictureInPicture"],_o=["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"],Tt={htmlFor:"for",allowFullScreen:"allowfullscreen",autoFocus:"autofocus",autoPlay:"autoplay",contentEditable:"contenteditable",formNoValidate:"formnovalidate",isMap:"ismap",itemScope:"itemscope",noHref:"nohref",noShade:"noshade",noValidate:"novalidate",playsInline:"playsinline",trueSpeed:"truespeed",typeMustMatch:"typemustmatch",spellCheck:"spellcheck",noModule:"nomodule",autoPictureInPicture:"autopictureinpicture",autoCapitalize:"autocapitalize",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"},At=["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"]},To=["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"],Mo=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],Oo={};function sn(e){Object.assign(Oo,e)}function cn(){return Oo}var mn=["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"],un=mn.reduce((e,t)=>{let r=t.slice(2).toLowerCase();return e[r]=t,e},{}),Do=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}},je=[],Mt=0;function Vt(){return Mt>0?null:je.length?je[je.length-1]:null}function Po(e,t){je.push(e);try{return t()}finally{je.pop()}}function hn(e){Mt++;try{return e()}finally{Mt--}}var oe=[],Bt=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},Co=100,rt=0,Ot=new Set,Le=new Set;function Lo(e){rt++;try{return e()}finally{if(rt--,rt===0){let t=Ot;Ot=new Set;for(let r of t)r._scheduleFlush()}}}var We=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>=Co){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${Co} 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]})}rt>0?Ot.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,Le.add(this),Bt(()=>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,Le.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 Ro(){return Le.size>0}function Io(){let e=0;for(;Le.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...Le];Le.clear();for(let r of t)r._flushAll()}}var Dt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new We,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Vt();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();gn(e,s,a)}else if(n.startsWith("_on")){let s=n.replace("_on","");pn(e,s,a)}else e[n]=a}return e}function Re(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 g(e,t){return e instanceof Dt||e!=null&&e._isState?e:new Dt(e,t)}function dn(e){return typeof e=="object"&&e!==null&&e._isState===!0}function fn(e){return{_isState:!0,get(t){return e.get(t)}}}function Nt(e,t,r){return{_behaviors:{[e]:{attach:t,props:r}}}}function pn(e,t,r){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...n)=>{i(...n),r(...n)}:e[o]=r}function gn(e,t,r){let o=un[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 $o(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&&!At.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=>$o(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 ot(e){return new RegExp("<([a-z][\\w-]*)(\\s[^>]*)?>.*<\\/\\1>|<([a-z][\\w-]*)(\\s[^>]*)?\\/>","is").test(e.trim())}function yn(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 zo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Ao(e){return Object.keys(e).find(t=>At.includes(t))}function Vo(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function bn(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 Pt(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 vn(e,t){for(let r=0;r<e.length;r++){let o=e[r],i=null;typeof o.selectorText=="string"?i=Pt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Pt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Bo(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:cn().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 Lt=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(r=>z(t,Lt(r))),delete e.$,z(t,e),t}else return e},Sn={translate:["yes","no"],autoCapitalize:["on","off"]},xn=class{constructor(e,t,r){this.declaredValue=void 0,this._notifier=new We,this._releases=[],this._removeHooked=!1,this.parent=r,this.isBoolean=zt.includes(e),this.enumeratedBoolean=Sn[e],_o.includes(e)?this.name=e:Object.hasOwn(Tt,e)?this.name=Tt[e]:this.name=Vo(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}="${zo(String(r))}"`}},No=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 xn(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(!zt.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",wn=class{constructor(e,t,r){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Vo(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 Rt{constructor(t,r){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Ho(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 Rt;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Rt;)t=t.parent;return t}insertStyle(t,r){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(r):this.styleBlock[t]=new wn(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)}}},Ho=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=bn(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,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let S=i(h,d);this.addCSS(p,S)}else m.insertStyle(h,p)}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(Pt(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 jo(this),this.styles=new Ho(this),this.attributes=new No(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),$o(t),t.style=t.style||{},this.parent=r,this.tagName=Ao(t),t=Lt(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=Re(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=To.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=Lt(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(Mo.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];n&&(o instanceof Pe?o.mount(n):o.domText=n)}),r){let o=r.sheet;o&&this._hydrateStyles(vn(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=Bo(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()}}},Eo=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(ot(this.text)){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=e===""?"\u200B":String(e);if(r===this.text&&this.domText)return;let o=ot(this.text);if(this.text=r,!this.domText)return;if(!o&&!ot(r)&&this.domText.nodeType===3){this.domText.nodeValue=r;return}let i=this.domText,n=this._createDOMNode();(t=i.parentNode)==null||t.replaceChild(n,i)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text==="\u200B"?"&#8203;":ot(this.text)?yn(this.text):zo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},It=new Set;function kn(){It.clear()}var jo=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new U(e,this.owner,this._nextKey++):new Eo(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(f=>f._imperative)){let f=this.items.filter(v=>!v._imperative),y=this.items.filter(v=>v._imperative);this.items=f.concat(y)}let s=this.items.slice(),u=new Map;for(let f of s)f instanceof U&&f.key!==null&&f.key!==void 0&&!f._imperative&&!f._beforeRemoveFired&&u.set(f.key,f);!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,p=Se&&s.length>0?e.length!==s.length:!1;for(let f=0;f<e.length;f++){let y=e[f],v=typeof y=="object"&&y!==null,k=v?y._key:void 0,E=v?Ao(y):void 0;if(Se&&v&&k===void 0&&h++,k!==void 0){let w=u.get(k);if(w instanceof U&&w.tagName===E){u.delete(k);let O=this.items.indexOf(w);if(O!==f&&O>=0){let D=!!w._portal;this.move(O,f,D?!1:t,!0)}w.parent=this.owner,w.patch(y),m.add(w);continue}}else if(v){let w=this.items[f];if(w instanceof U&&w.key==null&&w.tagName===E&&d.has(w)&&!m.has(w)&&!w._imperative&&!w._beforeRemoveFired){w.parent=this.owner,w.patch(y),m.add(w);continue}}else{let w=this.items[f];if(w instanceof Eo&&d.has(w)&&!m.has(w)&&!w._imperative){w.setText(y==null?"":y),m.add(w);continue}}m.add(this.insert(y,f,t,!0,!0))}let S=this.items.slice(e.length);for(let f of S)f._imperative||this.remove(f,t,!0);if(u.forEach(f=>this.remove(f,t,!0)),Se&&s.length>0&&h>0&&p){let f=this.owner.nodeId;if(!It.has(f)){It.add(f);let y=`[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(y)}}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(),p=h instanceof ShadowRoot?h:document.head,S=Bo(p);s.styles.render(S),s._hooks.Mount&&s._hooks.Mount(s),s.children.items.forEach(f=>{if(f instanceof U&&f._portal){let y=f._portal(f.getRoot());y&&f.render(y)}else f.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,$t=!1;function Fo(e){xe.add(e),!$t&&($t=!0,Bt(Wo))}function Wo(){for($t=!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 Cn(){let e=0;for(;Ro()||xe.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}Io(),Wo()}}var Fe=[];function En(){return Fe.length?Fe[Fe.length-1]:null}function Ht(e){let t=En();t&&t._add(e)}var _n=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();Fe.push(this);try{return e()}finally{Fe.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function Tn(){let e=new _n;return Ht(()=>e.stop()),e}function Uo(e){let t=!1,r=!1,o=()=>{t||n()},i=new Do(()=>{t||Fo(o)}),n=()=>{if(!(t||r)){r=!0,i.reset();try{Po(i,e)}finally{r=!1}}},a=()=>{t||(t=!0,i.reset(),xe.delete(o))};return Ht(a),n(),a}function Mn(e){let t="computed",r=new We,o,i=!0,n=!1,a=()=>{i&&r.listenerCount(t)>0&&d()},s=new Do(()=>{i||(i=!0,Fo(a))}),u=()=>{s.reset(),o=Po(s,e),i=!1,n=!0},d=()=>{let h=o,p=n;u(),!(p&&o===h)&&r.notify(t,o)},m=h=>{if(h)r.addListener(t,h);else{let p=Vt();p&&r.addListener(t,p.handler)}return i&&(n&&r.listenerCount(t)>0?d():u()),o};return Ht(()=>{s.reset(),xe.delete(a),r._dispose()}),{_isState:!0,_notifier:r,get:m}}function On(e){return Lo(e)}function Dn(e){return hn(e)}function Pn(e,t,r){let o,i=!0;return Uo(()=>{let n=typeof e=="function"?e():e.get();(!i||r!=null&&r.immediate)&&t(n,o),o=n,i=!1})}function Ln(e){return e?Promise.resolve().then(e):Promise.resolve()}var Rn=class{constructor(e){this._notifier=new We,this.initialRecord=ko({},e),this._record=ko({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let r=Vt();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 ct={};tt(ct,{COLOR_ROLES:()=>Xn,ElementTones:()=>Ue,applySystemTheme:()=>Zn,generateTheme:()=>ri,getTheme:()=>re,setTheme:()=>qn,themeApply:()=>Yn,themeCSS:()=>Ut,themeColor:()=>l,themeColorToken:()=>Xt,themeDensity:()=>b,themeFluidSpacing:()=>Gn,themeName:()=>st,themeSize:()=>x,themeSpacing:()=>c,themeTokens:()=>Qo,themeVars:()=>lt});var In=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)},$n=e=>{let t=r=>r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;return e.map(t)},zn=e=>{let[t,r,o]=In(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}`},it=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 $n([t,r,o])},An=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]},Vn=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 Ft=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=f=>f>.008856?Math.cbrt(f):7.787*f+16/116,h=m(i/s),p=m(n/u),S=m(a/d);return[116*p-16,500*(h-p),200*(p-S)]};var Ko=(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,p=.5*(1-Math.sqrt(Math.pow(h,7)/(Math.pow(h,7)+Math.pow(25,7)))),S=o*(1+p),f=a*(1+p),y=Math.sqrt(S*S+i*i),v=Math.sqrt(f*f+s*s),k=(y+v)/2,E=Math.atan2(i,S)*180/Math.PI+(Math.atan2(i,S)<0?360:0),w=Math.atan2(s,f)*180/Math.PI+(Math.atan2(s,f)<0?360:0),O=w-E;Math.abs(O)>180&&(O+=w<=E?360:-360);let D=Math.abs(E-w)>180?(E+w+360)/2:(E+w)/2,T=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),L=n-r,N=v-y,H=2*Math.sqrt(y*v)*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,Oe=1+.015*k*T,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(L/j,2)+Math.pow(N/ye,2)+Math.pow(H/Oe,2)+W*(N/ye)*(H/Oe))};var qo=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 p=(1+a[d]/(a[d-1]+a[d]))/3;u[d]=m*h/((1-p)*m+p*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,p=0;for(;m<=h;){let w=Math.floor((m+h)/2);if(d>=i[w]&&d<=i[w+1]){p=w;break}d<i[w]?h=w-1:m=w+1}let S=a[p],f=(d-i[p])/S,y=f*f,v=y*f,k=u[p]*S,E=u[p+1]*S;return(2*v-3*y+1)*n[p]+(v-2*y+f)*k+(-2*v+3*y)*n[p+1]+(v-y)*E}};var Yo=.605,jt=.685;function Bn(e){let t=Math.pow(e,Yo);return t/(1+jt*(1-t))}function Nn(e){let t=e*(1+jt)/(1+e*jt);return Math.pow(t,1/Yo)}function Hn(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 jn(e){let t=[[0,0,0],...e,[1,1,1]].map(p=>An(p)).sort((p,S)=>p[0]-S[0]),r=t.map(p=>p[0]),o=t.map(p=>p[1]),i=t.map(p=>p[2]),n=[0],a=0;for(let p=1;p<t.length;p++)a+=Hn(t[p],t[p-1]),n.push(a);let s=n.map(p=>Nn(a>0?p/a:0)),u=e.length===1?0:s[1],d=e.length===1?1:s[s.length-2],m=qo(s.map((p,S)=>[p,o[S]])),h=qo(s.map((p,S)=>[p,i[S]]));return{colorAtParam:p=>{let S=Bn(p),f=u+S*(d-u),y=0;for(let T=0;T<s.length-1;T++)if(f<=s[T+1]){y=T;break}let v=s[y],k=s[y+1],E=(f-v)/(k-v||1),w=r[y]+E*(r[y+1]-r[y]),O=m(f),D=h(f);return Vn([w,O,D])},parameters:s.slice(1,-1).map(p=>(p-u)/(d-u))}}function Go(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}=jn(r.map(it)),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],p=a[u],S=a[u+1],f;if(h<=m)f=p;else{let y=(d-m)/(h-m);f=p+y*(S-p)}n.push(zn(o(f)))}return n.reverse()}var Fn={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","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#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=Fn,Gt=e=>JSON.parse(JSON.stringify(e)),Xo=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),Ie={light:Gt(qe),dark:Kn(qe)},at=null,Wt=new Map;function Zt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Wn(e){for(let t in e)if(!Object.keys(qe).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 Jo(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]={}),Jo(e[o],t[o])):e[o]=t[o])}function Un(e,t){let r={},o=Zt(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-${Xo(s)}`]=a[s]}let i="";for(let n in r)i+=` ${n}: ${r[n]};
3
3
  `;return`[data-theme="${e}"] {
4
- ${i}}`}function oe(e){if(!Re[e])throw Error(`Theme "${e}" not found`);return Re[e]}function Ur(e,t){Fr(t),Re[e]||(Re[e]=Gt(Ue)),Zo(Re[e],t),it=null,Wt.clear()}function qr(e){let t=Gt(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 Jo(e){let t=Wt.get(e);if(t)return t;let n=oe(e),o=Xt(n),i={};for(let r in n){let a=n[r];if(r==="colors")for(let s in n.colors){let u={};[...Array(o).keys()].forEach(h=>u[h]=n.colors[s][h]),i[s]=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 s in a)i.custom[s]=a[s]}return Wt.set(e,i),i}function at(){if(it)return it;let e=oe("light"),t=Xt(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(s=>a[s]=`var(--${r}-${s})`),n[r]=a}else if(o==="fontSizes")n.fontSizes=[...Array(8).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-${Xo(r)})`}return it=n,n}function Ut(){return Object.entries(Re).map(([e,t])=>Wr(e,t)).join(`
5
- `)}function Kr(e){var t;if(typeof document!="undefined")if(e){e.textContent=Ut();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=Ut(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function Yr(e,t,n=320,o=1280){let i=e/4,r=t/4,a=(r-i)/(o-n)*100,s=i-a*n/100,u=parseFloat(s.toFixed(4))===0?`${a.toFixed(4)}vw`:`${s.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${r}em)`}function Gr(e=document.documentElement,t={}){let{persist:n=!0,storageKey:o="dp-theme"}=t,i=()=>{if(n){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 r=window.matchMedia("(prefers-color-scheme: dark)"),a=s=>{(!n||!localStorage.getItem(o))&&e.setAttribute("data-theme",s.matches?"dark":"light")};return r.addEventListener("change",a),()=>r.removeEventListener("change",a)}function lt(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 Xr=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],qt=["inherit"];[...Array(5).keys()].forEach(e=>{qt.push(`decrease-${e}`),qt.push(`increase-${e}`)});function Zr(e,t="inherit"){if(!qt.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 Jr(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=Zr(n,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),n}function b(e){let t=Jr(e);return oe(e?lt(e):"light").densities[t]}var Qr=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],ei=[.75,1,1.5,2,2.5];function ti(e,t){let n=Ft(rt(t)),o=0,i=1/0;for(let r=0;r<e.length;r++){let a=qo(n,Ft(rt(e[r])));a<i&&(i=a,o=r)}return o}function oi(e,t={}){var n,o,i,r,a,s;let u=(n=t.steps)!=null?n:18,h={},m={};for(let[d,p]of Object.entries(e)){let v=Yo(p,u);h[d]=v,m[d]=ti(v,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:h,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:Qr,densities:(r=t.densities)!=null?r:ei,darkBias:(a=t.darkBias)!=null?a:1,custom:(s=t.custom)!=null?s:{}}}var Kt=["inherit"];[...Array(8).keys()].forEach(e=>{Kt.push(`decrease-${e}`),Kt.push(`increase-${e}`)});function Qo(e,t="inherit"){if(!Kt.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 ni(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=Qo(n,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),n}function x(e,t="inherit"){let n=Qo(ni(e),t);return at().fontSizes[n]}var he=Ue.colors.neutral.length,Yt={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},We=["inherit","base",...Object.keys(Yt)];[...Array(he).keys()].forEach(e=>{We.push(`decrease-${e}`),We.push(`increase-${e}`),We.push(`shift-${e}`)});function Go(e,t){if(e<0||e>he-1)return e;let n=e+t;return n=Math.max(0,Math.min(he-1,n)),n}function ri(e,t){if(e<0||e>he-1)return e;let n=Math.floor((he-1)/2),o=e<=n?e+t:e-t;return o=Math.max(0,Math.min(he-1,o)),o}function qe(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!We.includes(t))throw Error(`tone name "${t}" invalid`);if(t in Yt&&(t=Yt[t]),t.startsWith("increase-")){let n=parseInt(t.replace("increase-",""),10);return Go(e,n)}else if(t.startsWith("decrease-")){let n=parseInt(t.replace("decrease-",""),10);return Go(e,-n)}else if(t.startsWith("shift-")){let n=parseInt(t.replace("shift-",""),10);return ri(e,n)}else return e}function en(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=qe(n,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),n}function tn(e,t,n){return n<=0?e:t==="lighten"&&e===0?n:t==="darken"&&e===he-1?he-1-n:e}function l(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n;if(!e){let s=at()[o];if(!s)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?s[oe("light").baseTones[o]]:s[qe(0,t)]}let i=lt(e),r;if(t==="base")r=oe(i).baseTones[o];else{let s=oe(i),u=tn(en(e),s.direction,s.darkBias);r=qe(u,t)}let a=at()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[r]}function Zt(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n,i=e?lt(e):"light",r=Jo(i)[o];if(!r)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?r[oe("light").baseTones[o]]:r[qe(0,t)];let a;if(t==="base")a=oe(i).baseTones[o];else{let s=oe(i),u=tn(en(e),s.direction,s.darkBias);a=qe(u,t)}return r[a]}var Ct={};et(Ct,{abbreviation:()=>ii,accordion:()=>ai,alert:()=>li,avatar:()=>si,badge:()=>ci,blockquote:()=>ui,breadcrumb:()=>mi,breadcrumbEllipsis:()=>hi,button:()=>pi,buttonGhost:()=>Jt,buttonSwitch:()=>gi,card:()=>yi,code:()=>bi,combobox:()=>sa,command:()=>ca,commandItem:()=>ma,commandSearch:()=>ua,datePicker:()=>da,descriptionList:()=>ga,details:()=>ya,dialog:()=>ba,divider:()=>va,drawer:()=>Sa,emphasis:()=>xa,empty:()=>wa,errorBoundary:()=>Ca,fab:()=>Ea,figure:()=>_a,formGroup:()=>Ta,heading:()=>Ma,horizontalRule:()=>Pa,icon:()=>Da,image:()=>La,inputCheckbox:()=>Ra,inputColor:()=>$a,inputDateTime:()=>Ia,inputFile:()=>za,inputNumber:()=>Aa,inputOTP:()=>Ha,inputPassword:()=>Na,inputRadio:()=>ja,inputRange:()=>Fa,inputSearch:()=>Wa,inputSwitch:()=>Ua,inputText:()=>qa,keyboard:()=>Ka,label:()=>Ya,link:()=>Ga,linkButton:()=>Xa,list:()=>Za,listItem:()=>Ja,listItemButton:()=>Qa,mark:()=>el,menu:()=>tl,motion:()=>ol,orderedList:()=>nl,pagination:()=>il,panelSection:()=>al,paragraph:()=>ll,popover:()=>sl,popoverArrow:()=>uo,preformated:()=>cl,progress:()=>ul,rating:()=>dl,ringProgress:()=>fl,row:()=>mo,scrollArea:()=>pl,segmented:()=>gl,select:()=>yl,selectBox:()=>bl,selectItem:()=>vl,selectList:()=>Sl,skeleton:()=>xl,small:()=>wl,spinner:()=>Cl,splitter:()=>kl,splitterHandle:()=>_l,splitterPanel:()=>El,stack:()=>Tl,steps:()=>Ol,strong:()=>Ml,subscript:()=>Pl,superscript:()=>Dl,table:()=>Ll,tabs:()=>Rl,tag:()=>Ge,textarea:()=>$l,timeline:()=>Il,timelineItem:()=>zl,toast:()=>Al,toggleGroup:()=>Vl,toolbar:()=>Bl,toolbarSpacer:()=>Nl,tooltip:()=>Hl,transitionGroup:()=>jl,unorderedList:()=>Fl});function ii(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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=>l(r),color:r=>l(r,"shift-10",t.get(r)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:r=>l(r,"shift-7",t.get(r)),textUnderlineOffset:c(.72),cursor:"help","&:hover":{color:r=>l(r,"shift-11",n.get(r)),textDecorationColor:r=>l(r,"shift-9",n.get(r))}}}}function ai(e={}){var i,r;let{type:t="single"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let s=a.domElement;if(!s)return;let u=h=>{let m=h.target.closest("summary");if(!m)return;let d=m.closest("details");!d||d.parentElement!==s||d.open||Array.from(s.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};s.addEventListener("click",u),a.addHook("Remove",()=>s.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(b(a)*1.5),outline:a=>`1px solid ${l(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${c(.5)} solid ${l(a,"shift-6",o.get(a))}`}}}}function li(e={}){var n;let t=g((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(b(o)*2),paddingInline:o=>c(b(o)*4),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 si(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{dataTone:"shift-2",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)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function ci(e={}){var i;let{label:t=999}=e,n=g(t),o=g((i=e.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:r=>`"${n.get(r)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:c(1),minWidth:c(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r=>x(r,"decrease-1"),borderRadius:c(999),backgroundColor:r=>l(r,"shift-9",o.get(r)),color:r=>l(r,"shift-0",o.get(r))}}}}function ui(e={}){var n;let t=g((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=>l(o,"inherit",t.get(o)),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),margin:0}}}function mi(e={}){var o;let{separator:t="/"}=e,n=g((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",n.get(i)),backgroundColor:i=>l(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"muted",n.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",n.get(i)),paddingInlineStart:c(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}function hi(e={}){var n;let t=g((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=>l(o,"muted",t.get(o)),borderRadius:c(1),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{outline:o=>`${c(.5)} solid ${l(o,"shift-6",t.get(o))}`,outlineOffset:c(.5)}}}}var ct={small:"decrease-1",medium:"inherit",large:"increase-1"};function $(e,t="primary"){return`0 0 0 2px ${l(e,"shift-6",t)}`}var di={small:.5,medium:1,large:1.5};function Jt(e={}){var i,r,a;let t=g((i=e.color)!=null?i:"neutral","color"),n=di[(r=e.size)!=null?r:"medium"],o=ct[(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(b(s)*n),paddingInline:s=>c(b(s)*n),borderRadius:s=>c(b(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>c(b(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))},"&:focus-visible":{boxShadow:s=>$(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 fi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function pi(e={}){var a,s,u,h;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return Jt({color:e.color,size:e.size});let n=g((s=e.color)!=null?s:"primary","color"),o=t==="solid",i=fi[(u=e.size)!=null?u:"medium"],r=ct[(h=e.size)!=null?h:"medium"];return{_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:m=>x(m,r),paddingBlock:m=>c(b(m)*i.block),paddingInline:m=>c(b(m)*i.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(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",n.get(m))}`,color:m=>o?l(m,"shift-0",n.get(m)):l(m,"text",n.get(m)),backgroundColor:m=>o?l(m,"shift-9",n.get(m)):l(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?l(m,"shift-0",n.get(m)):l(m,"shift-10",n.get(m)),backgroundColor:m=>o?l(m,"shift-10",n.get(m)):l(m,"hover",n.get(m))},"&:focus-visible":{boxShadow:m=>$(m,n.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 gi(e={}){var r,a;let{checked:t=!1}=e,n=g(t),o=g((r=e.color)!=null?r:"neutral","color"),i=g((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=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.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),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>l(s,"inherit",o.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"}}}}function yi(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>c(b(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",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(b(o)*4),color:o=>l(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(b(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(b(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderTop:o=>`1px solid ${l(o,"border",t.get(o))}`}}}}function bi(e={}){var n;let t=g((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=>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 vi={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 vi[e]}var Si=Object.defineProperty,xi=Object.defineProperties,wi=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,on=(e,t,n)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t)=>{for(var n in t||(t={}))dn.call(t,n)&&on(e,n,t[n]);if(mt)for(var n of mt(t))fn.call(t,n)&&on(e,n,t[n]);return e},we=(e,t)=>xi(e,wi(t)),pn=(e,t)=>{var n={};for(var o in e)dn.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&mt)for(var o of mt(e))t.indexOf(o)<0&&fn.call(e,o)&&(n[o]=e[o]);return n},Ee=(e,t,n)=>new Promise((o,i)=>{var r=u=>{try{s(n.next(u))}catch(h){i(h)}},a=u=>{try{s(n.throw(u))}catch(h){i(h)}},s=u=>u.done?o(u.value):Promise.resolve(u.value).then(r,a);s((n=n.apply(e,t)).next())}),Ci=["top","right","bottom","left"],nn=["start","end"],Qs=Ci.reduce((e,t)=>e.concat(t,`${t}-${nn[0]}`,`${t}-${nn[1]}`),[]),ht=Math.min,xe=Math.max,dt=Math.round,ut=Math.floor,ne=e=>({x:e,y:e}),ki={left:"right",right:"left",bottom:"top",top:"bottom"};function rn(e,t,n){return xe(e,ht(t,n))}function gt(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function gn(e){return e==="x"?"y":"x"}function yn(e){return e==="y"?"height":"width"}function de(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function bn(e){return gn(de(e))}function Ei(e,t,n=!1){let o=yt(e),i=bn(e),r=yn(i),a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ft(a)),[a,ft(a)]}function _i(e){let t=ft(e);return[to(e),t,to(t)]}function to(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var an=["left","right"],ln=["right","left"],Ti=["top","bottom"],Oi=["bottom","top"];function Mi(e,t,n){switch(e){case"top":case"bottom":return n?t?ln:an:t?an:ln;case"left":case"right":return t?Ti:Oi;default:return[]}}function Pi(e,t,n,o){let i=yt(e),r=Mi(Ce(e),n==="start",o);return i&&(r=r.map(a=>`${a}-${i}`),t&&(r=r.concat(r.map(to)))),r}function ft(e){let t=Ce(e);return ki[t]+e.slice(t.length)}function Di(e){return J({top:0,right:0,bottom:0,left:0},e)}function Li(e){return typeof e!="number"?Di(e):{top:e,right:e,bottom:e,left:e}}function pt(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 sn({reference:e,floating:t},n,o){let i=de(n),r=bn(n),a=yn(r),s=Ce(n),u=i==="y",h=e.x+e.width/2-t.width/2,m=e.y+e.height/2-t.height/2,d=e[a]/2-t[a]/2,p;switch(s){case"top":p={x:h,y:e.y-t.height};break;case"bottom":p={x:h,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:m};break;case"left":p={x:e.x-t.width,y:m};break;default:p={x:e.x,y:e.y}}switch(yt(n)){case"start":p[r]-=d*(o&&u?-1:1);break;case"end":p[r]+=d*(o&&u?-1:1);break;default:}return p}function Ri(e){return Ee(this,arguments,function*(t,n={}){var o,i,r,a,s,u;let{x:h,y:m,platform:d,rects:p,elements:v,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:S="viewport",elementContext:C="floating",altBoundary:E=!1,padding:w=0}=gt(n,t),O=Li(w),M=v[E?C==="floating"?"reference":"floating":C],_=pt(yield d.getClippingRect({element:(i=yield(o=d.isElement)==null?void 0:o.call(d,M))==null||i?M:M.contextElement||(yield(r=d.getDocumentElement)==null?void 0:r.call(d,v.floating)),boundary:y,rootBoundary:S,strategy:f})),D=C==="floating"?{x:h,y:m,width:p.floating.width,height:p.floating.height}:p.reference,B=yield(a=d.getOffsetParent)==null?void 0:a.call(d,v.floating),H=(yield(s=d.isElement)==null?void 0:s.call(d,B))?(yield(u=d.getScale)==null?void 0:u.call(d,B))||{x:1,y:1}:{x:1,y:1},j=pt(d.convertOffsetParentRelativeRectToViewportRelativeRect?yield d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:v,rect:D,offsetParent:B,strategy:f}):D);return{top:(_.top-j.top+O.top)/H.y,bottom:(j.bottom-_.bottom+O.bottom)/H.y,left:(_.left-j.left+O.left)/H.x,right:(j.right-_.right+O.right)/H.x}})}var $i=50,Ii=(e,t,n)=>Ee(null,null,function*(){var o;let{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:s}=n,u=s.detectOverflow?s:we(J({},s),{detectOverflow:Ri}),h=yield(o=s.isRTL)==null?void 0:o.call(s,t),m=yield s.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=sn(m,i,h),v=i,f=0,y={};for(let S=0;S<a.length;S++){let C=a[S];if(!C)continue;let{name:E,fn:w}=C,{x:O,y:M,data:_,reset:D}=yield w({x:d,y:p,initialPlacement:i,placement:v,strategy:r,middlewareData:y,rects:m,platform:u,elements:{reference:e,floating:t}});d=O!=null?O:d,p=M!=null?M:p,y[E]=J(J({},y[E]),_),D&&f<$i&&(f++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(m=D.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:r}):D.rects),{x:d,y:p}=sn(m,v,h)),S=-1)}return{x:d,y:p,placement:v,strategy:r,middlewareData:y}});var zi=(e={})=>({name:"flip",options:e,fn(t){return Ee(this,null,function*(){var n,o,i,r,a,s;let{placement:u,middlewareData:h,rects:m,initialPlacement:d,platform:p,elements:v}=t,f=gt(e,t),{mainAxis:y=!0,crossAxis:S=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0}=f,M=pn(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=h.arrow)!=null&&n.alignmentOffset)return{};let _=Ce(u),D=de(d),B=Ce(d)===d,H=yield(o=p.isRTL)==null?void 0:o.call(p,v.floating),j=C||(B||!O?[ft(d)]:_i(d)),pe=w!=="none";!C&&pe&&j.push(...Pi(d,O,w,H));let Te=[d,...j],ce=yield p.detectOverflow(t,M),W=[],ae=((i=h.flip)==null?void 0:i.overflows)||[];if(y&&W.push(ce[_]),S){let le=Ei(u,m,H);W.push(ce[le[0]],ce[le[1]])}if(ae=[...ae,{placement:u,overflows:W}],!W.every(le=>le<=0)){let le=(((r=h.flip)==null?void 0:r.index)||0)+1,Be=Te[le];if(Be&&(!(S==="alignment"&&D!==de(Be))||ae.every(q=>de(q.placement)===D?q.overflows[0]>0:!0)))return{data:{index:le,overflows:ae},reset:{placement:Be}};let ge=(a=ae.filter(q=>q.overflows[0]<=0).sort((q,X)=>q.overflows[1]-X.overflows[1])[0])==null?void 0:a.placement;if(!ge)switch(E){case"bestFit":{let q=(s=ae.filter(X=>{if(pe){let Z=de(X.placement);return Z===D||Z==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(Z=>Z>0).reduce((Z,Ne)=>Z+Ne,0)]).sort((X,Z)=>X[1]-Z[1])[0])==null?void 0:s[0];q&&(ge=q);break}case"initialPlacement":ge=d;break;default:}if(u!==ge)return{reset:{placement:ge}}}return{}})}});var Ai=new Set(["left","top"]);function Vi(e,t){return Ee(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),s=Ce(o),u=yt(o),h=de(o)==="y",m=Ai.has(s)?-1:1,d=a&&h?-1:1,p=gt(t,e),{mainAxis:v,crossAxis:f,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof y=="number"&&(f=u==="end"?y*-1:y),h?{x:f*d,y:v*m}:{x:v*m,y:f*d}})}var Bi=(e=0)=>({name:"offset",options:e,fn(t){return Ee(this,null,function*(){var n,o;let{x:i,y:r,placement:a,middlewareData:s}=t,u=yield Vi(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:we(J({},u),{placement:a})}})}}),Ni=(e={})=>({name:"shift",options:e,fn(t){return Ee(this,null,function*(){let{x:n,y:o,placement:i,platform:r}=t,a=gt(e,t),{mainAxis:s=!0,crossAxis:u=!1,limiter:h={fn:({x:E,y:w})=>({x:E,y:w})}}=a,m=pn(a,["mainAxis","crossAxis","limiter"]),d={x:n,y:o},p=yield r.detectOverflow(t,m),v=de(Ce(i)),f=gn(v),y=d[f],S=d[v];if(s){let E=f==="y"?"top":"left",w=f==="y"?"bottom":"right",O=y+p[E],M=y-p[w];y=rn(O,y,M)}if(u){let E=v==="y"?"top":"left",w=v==="y"?"bottom":"right",O=S+p[E],M=S-p[w];S=rn(O,S,M)}let C=h.fn(we(J({},t),{[f]:y,[v]:S}));return we(J({},C),{data:{x:C.x-n,y:C.y-o,enabled:{[f]:s,[v]:u}}})})}});function bt(){return typeof window!="undefined"}function ze(e){return vn(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 re(e){var t;return(t=(vn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vn(e){return bt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return bt()?e instanceof Element||e instanceof Y(e).Element:!1}function se(e){return bt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function cn(e){return!bt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ye(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function Hi(e){return/^(table|td|th)$/.test(ze(e))}function vt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var ji=/transform|translate|scale|rotate|perspective|filter/,Fi=/paint|layout|strict|content/,Se=e=>!!e&&e!=="none",Qt;function no(e){let t=Q(e)?ee(e):e;return Se(t.transform)||Se(t.translate)||Se(t.scale)||Se(t.rotate)||Se(t.perspective)||!ro()&&(Se(t.backdropFilter)||Se(t.filter))||ji.test(t.willChange||"")||Fi.test(t.contain||"")}function Wi(e){let t=fe(e);for(;se(t)&&!Ie(t);){if(no(t))return t;if(vt(t))return null;t=fe(t)}return null}function ro(){return Qt==null&&(Qt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qt}function Ie(e){return/^(html|body|#document)$/.test(ze(e))}function ee(e){return Y(e).getComputedStyle(e)}function St(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(ze(e)==="html")return e;let t=e.assignedSlot||e.parentNode||cn(e)&&e.host||re(e);return cn(t)?t.host:t}function Sn(e){let t=fe(e);return Ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ye(t)?t:Sn(t)}function Ke(e,t=[],n=!0){var o;let i=Sn(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=Y(i);if(r){let s=oo(a);return t.concat(a,a.visualViewport||[],Ye(i)?i:[],s&&n?Ke(s):[])}else return t.concat(i,Ke(i,[],n))}function oo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){let t=ee(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=se(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,s=dt(n)!==r||dt(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function io(e){return Q(e)?e:e.contextElement}function $e(e){let t=io(e);if(!se(t))return ne(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=xn(t),a=(r?dt(n.width):n.width)/o,s=(r?dt(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var Ui=ne(0);function wn(e){let t=Y(e);return!ro()||!t.visualViewport?Ui:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qi(e,t=!1,n){return!n||t&&n!==Y(e)?!1:t}function ke(e,t=!1,n=!1,o){let i=e.getBoundingClientRect(),r=io(e),a=ne(1);t&&(o?Q(o)&&(a=$e(o)):a=$e(e));let s=qi(r,n,o)?wn(r):ne(0),u=(i.left+s.x)/a.x,h=(i.top+s.y)/a.y,m=i.width/a.x,d=i.height/a.y;if(r){let p=Y(r),v=o&&Q(o)?Y(o):o,f=p,y=oo(f);for(;y&&o&&v!==f;){let S=$e(y),C=y.getBoundingClientRect(),E=ee(y),w=C.left+(y.clientLeft+parseFloat(E.paddingLeft))*S.x,O=C.top+(y.clientTop+parseFloat(E.paddingTop))*S.y;u*=S.x,h*=S.y,m*=S.x,d*=S.y,u+=w,h+=O,f=Y(y),y=oo(f)}}return pt({width:m,height:d,x:u,y:h})}function xt(e,t){let n=St(e).scrollLeft;return t?t.left+n:ke(re(e)).left+n}function Cn(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-xt(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Ki({elements:e,rect:t,offsetParent:n,strategy:o}){let i=o==="fixed",r=re(n),a=e?vt(e.floating):!1;if(n===r||a&&i)return t;let s={scrollLeft:0,scrollTop:0},u=ne(1),h=ne(0),m=se(n);if((m||!m&&!i)&&((ze(n)!=="body"||Ye(r))&&(s=St(n)),m)){let p=ke(n);u=$e(n),h.x=p.x+n.clientLeft,h.y=p.y+n.clientTop}let d=r&&!m&&!i?Cn(r,s):ne(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-s.scrollLeft*u.x+h.x+d.x,y:t.y*u.y-s.scrollTop*u.y+h.y+d.y}}function Yi(e){return Array.from(e.getClientRects())}function Gi(e){let t=re(e),n=St(e),o=e.ownerDocument.body,i=xe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=xe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-n.scrollLeft+xt(e),s=-n.scrollTop;return ee(o).direction==="rtl"&&(a+=xe(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}var un=25;function Xi(e,t){let n=Y(e),o=re(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,s=0,u=0;if(i){r=i.width,a=i.height;let m=ro();(!m||m&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}let h=xt(o);if(h<=0){let m=o.ownerDocument,d=m.body,p=getComputedStyle(d),v=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-d.clientWidth-v);f<=un&&(r-=f)}else h<=un&&(r+=h);return{width:r,height:a,x:s,y:u}}function Zi(e,t){let n=ke(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=se(e)?$e(e):ne(1),a=e.clientWidth*r.x,s=e.clientHeight*r.y,u=i*r.x,h=o*r.y;return{width:a,height:s,x:u,y:h}}function mn(e,t,n){let o;if(t==="viewport")o=Xi(e,n);else if(t==="document")o=Gi(re(e));else if(Q(t))o=Zi(t,n);else{let i=wn(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return pt(o)}function kn(e,t){let n=fe(e);return n===t||!Q(n)||Ie(n)?!1:ee(n).position==="fixed"||kn(n,t)}function Ji(e,t){let n=t.get(e);if(n)return n;let o=Ke(e,[],!1).filter(s=>Q(s)&&ze(s)!=="body"),i=null,r=ee(e).position==="fixed",a=r?fe(e):e;for(;Q(a)&&!Ie(a);){let s=ee(a),u=no(a);!u&&s.position==="fixed"&&(i=null),(r?!u&&!i:!u&&s.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Ye(a)&&!u&&kn(e,a))?o=o.filter(h=>h!==a):i=s,a=fe(a)}return t.set(e,o),o}function Qi({element:e,boundary:t,rootBoundary:n,strategy:o}){let i=[...t==="clippingAncestors"?vt(e)?[]:Ji(e,this._c):[].concat(t),n],r=mn(e,i[0],o),a=r.top,s=r.right,u=r.bottom,h=r.left;for(let m=1;m<i.length;m++){let d=mn(e,i[m],o);a=xe(d.top,a),s=ht(d.right,s),u=ht(d.bottom,u),h=xe(d.left,h)}return{width:s-h,height:u-a,x:h,y:a}}function ea(e){let{width:t,height:n}=xn(e);return{width:t,height:n}}function ta(e,t,n){let o=se(t),i=re(t),r=n==="fixed",a=ke(e,!0,r,t),s={scrollLeft:0,scrollTop:0},u=ne(0);function h(){u.x=xt(i)}if(o||!o&&!r)if((ze(t)!=="body"||Ye(i))&&(s=St(t)),o){let v=ke(t,!0,r,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else i&&h();r&&!o&&i&&h();let m=i&&!o&&!r?Cn(i,s):ne(0),d=a.left+s.scrollLeft-u.x-m.x,p=a.top+s.scrollTop-u.y-m.y;return{x:d,y:p,width:a.width,height:a.height}}function eo(e){return ee(e).position==="static"}function hn(e,t){if(!se(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return re(e)===n&&(n=n.ownerDocument.body),n}function En(e,t){let n=Y(e);if(vt(e))return n;if(!se(e)){let i=fe(e);for(;i&&!Ie(i);){if(Q(i)&&!eo(i))return i;i=fe(i)}return n}let o=hn(e,t);for(;o&&Hi(o)&&eo(o);)o=hn(o,t);return o&&Ie(o)&&eo(o)&&!no(o)?n:o||Wi(e)||n}var oa=function(e){return Ee(this,null,function*(){let t=this.getOffsetParent||En,n=this.getDimensions,o=yield n(e.floating);return{reference:ta(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function na(e){return ee(e).direction==="rtl"}var ra={convertOffsetParentRelativeRectToViewportRelativeRect:Ki,getDocumentElement:re,getClippingRect:Qi,getOffsetParent:En,getElementRects:oa,getClientRects:Yi,getDimensions:ea,getScale:$e,isElement:Q,isRTL:na};function _n(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ia(e,t){let n=null,o,i=re(e);function r(){clearTimeout(o),n==null||n.disconnect(),n=null}function a(s=!1,u=1){r();let h=e.getBoundingClientRect(),{left:m,top:d,width:p,height:v}=h;if(s||t(),!p||!v)return;let f=ut(d),y=ut(i.clientWidth-(m+p)),S=ut(i.clientHeight-(d+v)),C=ut(m),E={rootMargin:`${-f}px ${-y}px ${-S}px ${-C}px`,threshold:xe(0,ht(1,u))||1},w=!0;function O(M){let _=M[0].intersectionRatio;if(_!==u){if(!w)return a();_?a(!1,_):o=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!_n(h,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver(O,we(J({},E),{root:i.ownerDocument}))}catch(M){n=new IntersectionObserver(O,E)}n.observe(e)}return a(!0),r}function Tn(e,t,n,o={}){let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,h=io(e),m=i||r?[...h?Ke(h):[],...t?Ke(t):[]]:[];m.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),r&&C.addEventListener("resize",n)});let d=h&&s?ia(h,n):null,p=-1,v=null;a&&(v=new ResizeObserver(([C])=>{C&&C.target===h&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{v==null||v.observe(t)})),n()}),h&&!u&&v.observe(h),t&&v.observe(t));let f,y=u?ke(e):null;u&&S();function S(){let C=ke(e);y&&!_n(y,C)&&n(),y=C,f=requestAnimationFrame(S)}return n(),()=>{m.forEach(C=>{i&&C.removeEventListener("scroll",n),r&&C.removeEventListener("resize",n)}),d==null||d(),v==null||v.disconnect(),v=null,u&&cancelAnimationFrame(f)}}var On=Bi;var Mn=Ni,Pn=zi;var Dn=(e,t,n)=>{let o=new Map,i=J({platform:ra},n),r=we(J({},i.platform),{_c:o});return Ii(e,t,we(J({},i),{platform:r}))};function aa(e,t){var M;let{openState:n,placement:o,content:i,keepOpenOnContentHover:r}=t,a=null,s=null,u=null,h=null,m=!1,d=e.domElement,p=e.getRoot(),v={style:{position:"fixed",pointerEvents:"auto",visibility:_=>n.get(_)?"visible":"hidden"},onKeyDown:_=>{_.key==="Escape"&&w()},onMouseEnter:()=>r&&E(),onMouseLeave:()=>r&&w(),_onMount:_=>{var D;if(u=_.domElement,d&&u&&!u.hasAttribute("data-theme")){let B=(D=d.closest("[data-theme]"))==null?void 0:D.getAttribute("data-theme");B&&u.setAttribute("data-theme",B)}},_portal:_=>{let D=_.domElement.querySelector("#domphy-floating");if(!D){let B={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};D=_.children.insert(B).domElement}return D}},f=_=>I(_,v);f(i);let y=()=>{m||(m=!0,h=p.children.insert(i))},S=()=>{y(),d&&u&&(s==null||s(),s=Tn(d,u,()=>{Dn(d,u,{placement:o.get(),middleware:[On(12),Pn(),Mn()],strategy:"fixed"}).then(({x:_,y:D,placement:B})=>{u&&(Object.assign(u.style,{left:`${_}px`,top:`${D}px`}),o.set(B))})}),n.set(!0))},C=()=>{s==null||s(),s=null,h&&(h.remove(),h=null),u=null,m=!1,n.set(!1)},E=()=>{a&&clearTimeout(a),a=setTimeout(S,100)},w=()=>{a&&clearTimeout(a),a=setTimeout(C,100)},O=_=>{if(!n.get()||!d||!u)return;let D=_.target;!d.contains(D)&&!u.contains(D)&&w()};return(M=p.domElement)==null||M.addEventListener("click",O),{show:E,hide:w,update(_){n=_.openState,o=_.placement,i=_.content,r=_.keepOpenOnContentHover,f(i),h&&h.patch(i)},destroy(){var _;a&&clearTimeout(a),s==null||s(),h==null||h.remove(),(_=p.domElement)==null||_.removeEventListener("click",O)}}}function ie(e){let{kind:t,open:n=!1,placement:o}=e,i=g(n),r=`floating:${t}`,a=h=>{var m;return(m=h==null?void 0:h.getBehavior(r))==null?void 0:m.show()},s=h=>{var m;return(m=h==null?void 0:h.getBehavior(r))==null?void 0:m.hide()},u=N({onKeyDown:(h,m)=>h.key==="Escape"&&s(m)},Nt(r,aa,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:u}}var la='<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 Ge(e={}){var o;let{removable:t=!1}=e,n=g((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let r={span:la,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:c(1),width:c(4),height:c(4),flexShrink:0,"&:hover":{backgroundColor:a=>l(a,"shift-4",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(1),paddingInlineStart:c(2),paddingInlineEnd:t?c(1):c(2),gap:c(2),fontSize:i=>x(i,"inherit"),backgroundColor:i=>l(i,"inherit",n.get(i)),color:i=>l(i,"text",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"border-strong",n.get(i))}`}}}function sa(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),s=g(i),{show:u,hide:h,anchorPartial:m}=ie({kind:"combobox",open:s,placement:g(n),content:e.content}),d={onClick:(S,C)=>!r&&h(C),dataTone:"shift-14",style:{backgroundColor:S=>l(S,"inherit"),borderRadius:S=>c(b(S)*2),outline:S=>`1px solid ${l(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};I(e.content,d);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:S=>x(S,"inherit"),color:S=>l(S,"text",o),backgroundColor:S=>l(S,"inherit",o)},v;if(e.input){let S={onFocus:(C,E)=>u(E),style:p,_key:"combobox-input"};I(e.input,S),v=e.input}else v={input:null,onFocus:(S,C)=>u(C),value:S=>(a.get(S),""),style:p,_key:"combobox-input"};let f={div:S=>{let C=a.get(S),E=Array.isArray(C)?C:[C],O=t.filter(M=>E.includes(M.value)).map(M=>({span:M.label,$:[Ge({color:o,removable:!0})],_key:M.value,_onRemove:_=>{let D=a.get(),H=(Array.isArray(D)?D:[D]).filter(j=>j!==M.value);r?a.set(H):a.set(H[0])}}));return O.push(v),O},style:{display:"flex",flexWrap:"wrap",gap:c(1)}},y={_onInsert:S=>{S.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:S=>S.children.insert(f),style:{minWidth:c(32),outlineOffset:"-1px",outline:S=>`1px solid ${l(S,"border-strong","neutral")}`,paddingBlock:S=>c(b(S)*1),paddingInline:S=>c(b(S)*1),borderRadius:S=>c(b(S)*1.5),fontSize:S=>x(S,"inherit"),color:S=>l(S,"text",o),backgroundColor:S=>l(S,"inherit",o)}};return I(m,y),m}function ca(){return{_onSchedule:(e,t)=>{I(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function ua(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(b(o)*3),paddingBlock:o=>c(b(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")},"&:focus-visible":{borderBottomColor:o=>l(o,"shift-6",n)}}}}function ma(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{role:"option",_onMount:o=>{var h,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=(h=r.textContent)==null?void 0:h.toLowerCase())!=null?m:"",s=d=>{r.hidden=d.length>0&&!a.includes(d.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+b(o)*2),paddingInline:o=>c(b(o)*3),border:"none",outline:"none",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),"&:hover:not([disabled])":{backgroundColor:o=>l(o,"hover",t)},"&:focus-visible":{outline:o=>`${c(.5)} solid ${l(o,"shift-6",n)}`,outlineOffset:`-${c(.5)}`}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),_e=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),ao=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Xe=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),lo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,so=(e,t)=>_e(e,-((e.getDay()-t+7)%7));function ha(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 ho,fo,po,go;let{mode:t="single",time:n=!1,min:o,max:i,disabledDate:r,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:u}=e,h=(ho=e.weekStartsOn)!=null?ho:ha(a),m=g((fo=e.accentColor)!=null?fo:"primary","accentColor"),d=g((po=e.placement)!=null?po:"bottom-start"),p=g((go=e.value)!=null?go:t==="range"?[null,null]:null),v=u?p.addListener(k=>u(k)):null,f=(()=>{let k=p.get(),T=t==="range"?k==null?void 0:k[0]:k;return T instanceof Date?T:new Date})(),y=g(f.getFullYear(),"viewYear"),S=g(f.getMonth(),"viewMonth"),C=g(F(f),"focused"),E=g(null,"hovered"),w=g(f.getHours(),"hour"),O=g(f.getMinutes(),"minute"),M=null,_=new Intl.DateTimeFormat(a,N({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),B=new Intl.DateTimeFormat(a,{weekday:"short"}),H=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=k=>k?_.format(k):"",pe=k=>{if(s)return s(k);if(t==="range"){let[T,P]=k!=null?k:[null,null];return T?`${j(T)} \u2013 ${j(P)}`:""}return j(k)},Te=Array.from({length:7},(k,T)=>B.format(new Date(2023,0,1+(T+h)%7))),ce=k=>!!o&&F(k)<F(o)||!!i&&F(k)>F(i)||!!r&&r(k),W=k=>{if(!n)return F(k);let T=F(k);return T.setHours(w.get(),O.get(),0,0),T},ae=k=>{var L;if(ce(k))return;if(t==="single"){p.set(W(k)),n||Et();return}let[T,P]=(L=p.get())!=null?L:[null,null];!T||T&&P?p.set([W(k),null]):F(k)<F(T)?(p.set([W(k),W(T)]),n||Et()):(p.set([T,W(k)]),n||Et())},le=()=>{var k;if(n)if(t==="single"){let T=p.get();T&&p.set(W(T))}else{let[T,P]=(k=p.get())!=null?k:[null,null];p.set([T&&W(T),P&&W(P)])}},Be=(k,T)=>{var Oe;if(t!=="range")return!1;let[P,L]=(Oe=p.get(T))!=null?Oe:[null,null],z=L!=null?L:E.get(T);if(!P||!z)return!1;let R=F(P)<=F(z)?P:z,G=F(P)<=F(z)?z:P,K=F(k);return K>=F(R)&&K<=F(G)},ge=(k,T)=>{let P=p.get(T);if(t==="range"){let[L,z]=P!=null?P:[null,null];return Xe(k,L)||Xe(k,z)}return Xe(k,P)},q=k=>{y.set(k.getFullYear()),S.set(k.getMonth())},X=k=>{let T=ao(new Date(y.get(),S.get(),1),k);q(T)},Z=k=>y.set(y.get()+k),Ne=()=>{setTimeout(()=>{var k;(k=M==null?void 0:M.querySelector(`[data-date="${lo(C.get())}"]`))==null||k.focus()},0)},Nn=Un(),{show:Hn,hide:jn,anchorPartial:kt}=ie({kind:"datePicker",open:!1,placement:d,content:Nn});function Et(){jn()}kt.onClick=()=>{};let Fn={type:"text",readonly:!0,value:k=>pe(p.get(k)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(k,T)=>{_t(T)},onFocus:(k,T)=>{_t(T)},onKeyDown:(k,T)=>{let P=k.key;(P==="ArrowDown"||P==="Enter")&&(k.preventDefault(),_t(T))},_onMount:k=>v&&k.addHook("Remove",()=>{v()})};function _t(k){var P;let T=(P=Wn())!=null?P:new Date;C.set(F(T)),q(T),Hn(k),Ne()}function Wn(){var T;let k=p.get();return t==="range"?(T=k==null?void 0:k[0])!=null?T:null:k!=null?k:null}return I(kt,Fn),kt;function Un(){let k=(R,G,K)=>({button:R,type:"button",ariaLabel:G,onClick:K,style:fa()}),T={div:[k("\xAB","Previous year",()=>Z(-1)),k("\u2039","Previous month",()=>X(-1)),{div:R=>D.format(new Date(y.get(R),S.get(R),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:R=>x(R)}},k("\u203A","Next month",()=>X(1)),k("\xBB","Next year",()=>Z(1))],style:{display:"flex",alignItems:"center",gap:c(1),marginBottom:c(2)}},P={div:Te.map((R,G)=>({div:R,style:{textAlign:"center",fontSize:K=>x(K,"decrease-1"),fontWeight:"600",color:K=>l(K,"shift-7"),paddingBlock:c(1)},_key:G})),role:"row",style:Ln()},L={div:R=>qn(R),role:"grid",ariaLabel:"Calendar",onKeyDown:Xn,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},z=[T,P,L];return n&&z.push(Yn()),z.push(Gn()),{div:z,role:"dialog",ariaModal:"false",_onMount:R=>{M=R.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:R=>c(b(R)*2),backgroundColor:R=>l(R,"base"),color:R=>l(R,"shift-10"),border:R=>`1px solid ${l(R,"border-strong")}`,boxShadow:A("medium")}}}function qn(k){let T=new Date(y.get(k),S.get(k),1),P=S.get(k),L=so(T,h),z=[];for(let R=0;R<6;R++){let G=[];for(let K=0;K<7;K++){let Oe=_e(L,R*7+K);G.push(Kn(Oe,P,k))}z.push({div:G,role:"row",style:Ln(),_key:R})}return z}function Kn(k,T,P){let L=ce(k),z=ge(k,P),R=Be(k,P),G=k.getMonth()!==T,K=Xe(k,C.get(P)),Oe=Xe(k,new Date);return{button:String(k.getDate()),type:"button",role:"gridcell",tabIndex:K?0:-1,ariaSelected:z,ariaDisabled:L,disabled:L,ariaLabel:H.format(k),dataDate:lo(k),onClick:()=>ae(k),onMouseEnter:()=>t==="range"&&E.set(k),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:V=>x(V),fontFamily:"inherit",opacity:L?.35:G?.5:1,backgroundColor:V=>z?l(V,"shift-7",m.get(V)):R?l(V,"hover",m.get(V)):"transparent",color:V=>z?l(V,"shift-0",m.get(V)):l(V,"text"),outline:Oe?V=>`1px solid ${l(V,"shift-6",m.get(V))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:V=>z?l(V,"shift-7",m.get(V)):l(V,"shift-3",m.get(V))},"&:focus-visible":{outline:V=>`2px solid ${l(V,"shift-6",m.get(V))}`}},_key:lo(k)}}function Yn(){let k=(T,P,L)=>({select:Array.from({length:T},(z,R)=>({option:String(R).padStart(2,"0"),value:String(R),selected:G=>P.get(G)===R,_key:R})),ariaLabel:L,onChange:z=>{P.set(Number(z.target.value)),le()},style:pa()});return{div:[k(24,w,"Hour"),{span:":",style:{fontWeight:"600"}},k(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:c(1),marginTop:c(3)}}}function Gn(){let k=(T,P)=>({button:T,type:"button",onClick:P,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>x(L,"decrease-1"),color:L=>l(L,"muted",m.get(L)),padding:c(1)}});return{div:[k("Today",()=>{let T=new Date;C.set(F(T)),q(T),Ne()}),k("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:T=>`1px solid ${l(T,"border")}`}}}function Xn(k){let T=k,P=C.get(),L=null;switch(T.key){case"ArrowLeft":L=_e(P,-1);break;case"ArrowRight":L=_e(P,1);break;case"ArrowUp":L=_e(P,-7);break;case"ArrowDown":L=_e(P,7);break;case"Home":L=so(P,h);break;case"End":L=_e(so(P,h),6);break;case"PageUp":L=ao(P,T.shiftKey?-12:-1);break;case"PageDown":L=ao(P,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),ae(P);return;default:return}T.preventDefault(),C.set(L),q(L),Ne()}}function Ln(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function fa(){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 pa(){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 ga(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},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 ya(e={}){var i,r;let{duration:t=240}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>l(a,"shift-2",n.get(a)),color:a=>l(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(b(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",n.get(a))}`,borderBottom:a=>`${c(.5)} solid ${l(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>l(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>c(b(a)*2),outlineOffset:`-${c(.5)}`,outline:a=>`${c(.5)} solid ${l(a,"shift-6",o.get(a))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(b(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(b(a)*1),paddingBottom:a=>c(b(a)*3)}}}}var Ze=0;function wt(){Ze++,Ze===1&&(document.body.style.overflow="hidden")}function Ae(){Ze=Math.max(0,Ze-1),Ze===0&&(document.body.style.overflow="")}var Rn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ba(e={}){let{color:t="neutral",open:n=!1}=e,o=g(n),i=null,r=!1,a=!1,s=u=>{r=!1,typeof u.close=="function"&&u.close(),u.style.visibility="hidden",u.style.pointerEvents="none",a&&(Ae(),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,h)=>{if(u.target!==h.domElement)return;let m=h.domElement.getBoundingClientRect();u.clientX>=m.left&&u.clientX<=m.right&&u.clientY>=m.top&&u.clientY<=m.bottom||o.set(!1)},onTransitionEnd:(u,h)=>{r&&u.target===h.domElement&&u.propertyName==="opacity"&&s(h.domElement)},_onMount:u=>{let h=u.domElement;h.setAttribute("aria-modal","true");let m=null,d=y=>{if(y.key!=="Tab")return;let S=Array.from(h.querySelectorAll(Rn)).filter(w=>!w.closest("[aria-hidden='true']")&&w.offsetParent!==null);if(!S.length){y.preventDefault();return}let C=S[0],E=S[S.length-1];y.shiftKey?(document.activeElement===C||document.activeElement===h)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),C.focus())},p=y=>{y.preventDefault(),o.set(!1)};h.addEventListener("cancel",p);let v=y=>{y?(i=document.activeElement,h.style.visibility="visible",h.style.pointerEvents="auto",typeof h.showModal=="function"&&h.showModal(),a||(wt(),a=!0),h.addEventListener("keydown",d),requestAnimationFrame(()=>{h.style.opacity="1";let S=h.querySelector(Rn);S==null||S.focus()})):(r=!0,h.style.opacity="0",h.removeEventListener("keydown",d),m=setTimeout(()=>{m=null,r&&s(h)},350))};v(o.get());let f=o.addListener(v);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),f(),h.removeEventListener("cancel",p),a&&(Ae(),a=!1),h.removeEventListener("keydown",d),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(b(u)*2),padding:u=>c(b(u)*3),boxShadow:A("high"),"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function va(e={}){var n;let t=g((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=>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 co={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},$n={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Je=e=>e==="left"||e==="right";function In(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Sa(e={}){let{color:t="neutral",open:n=!1,placement:o="end",size:i}=e,r=g(n),a=o==="start"||o==="end",s=In(o,!1),u=Je(s)?c(80):c(64),h=i!=null?i:u;return{_onInsert:m=>{m.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(m,d)=>{m.target===d.domElement&&r.set(!1)},_onMount:m=>{let d=m.domElement;d.setAttribute("aria-modal","true");let p=_=>{_.preventDefault(),r.set(!1)};d.addEventListener("cancel",p);let v=a&&(d.ownerDocument.documentElement.dir==="rtl"||d.ownerDocument.dir==="rtl"),f=In(o,v);a&&(d.style.transform=co[f],d.style.margin=$n[f],d.style.width=Je(f)?h:"100dvw",d.style.height=Je(f)?"100dvh":h);let y=!1,S=!1,C=null,E=()=>{C=null,y&&(y=!1,typeof d.close=="function"&&d.close(),d.style.visibility="hidden",d.style.pointerEvents="none",S&&(Ae(),S=!1))},w=_=>{_.target===d&&_.propertyName==="transform"&&E()};d.addEventListener("transitionend",w);let O=_=>{_?(y=!1,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),S||(wt(),S=!0),requestAnimationFrame(()=>{d.style.transform="translate(0, 0)"})):(y=!0,d.style.transform=co[f],C=setTimeout(E,350))};O(r.get());let M=r.addListener(O);m.addHook("Remove",()=>{C&&(clearTimeout(C),C=null),M(),d.removeEventListener("cancel",p),d.removeEventListener("transitionend",w),S&&(Ae(),S=!1)})},style:{transform:co[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(b(m)*3),margin:$n[s],width:Je(s)?h:"100dvw",height:Je(s)?"100dvh":h,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:A("high"),"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function xa(e={}){var n;let t=g((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=>l(o,"shift-10",t.get(o))}}}function wa(e={}){var n;let t=g((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=>l(o,"shift-6",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o))}}}}function Ca(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 ka={small:8,medium:10,large:14};function Ea(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=c(ka[(i=e.size)!=null?i:"medium"]);return{_onInsert:r=>{r.tagName!=="button"&&console.warn('"fab" patch must use button tag')},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=>l(r,"shift-9",t.get(r)),color:r=>l(r,"shift-0",t.get(r)),boxShadow:A("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:r=>l(r,"shift-10",t.get(r)),boxShadow:A("medium")},"&:focus-visible":{boxShadow:r=>`${A("medium")}, ${$(r,t.get(r))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function _a(e={}){var n;let t=g((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=>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 Ta(e={}){var i;let{layout:t="horizontal"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:r=>{r.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*3),border:"none",borderRadius:r=>c(b(r)*2),fontSize:r=>x(r,"inherit"),backgroundColor:r=>l(r,"inherit",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(b(r)*1),borderRadius:r=>c(b(r)*2),color:r=>l(r,"text",n.get(r)),backgroundColor:r=>l(r,"inherit",n.get(r))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:r=>o?0:c(b(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=>l(r,"text",n.get(r))}}}}var Oa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ma(e={}){var n;let t=g((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=>l(o,"shift-11",t.get(o)),marginTop:0,marginBottom:c(2),fontSize:o=>{let i=Oa[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function Pa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:c(3),marginBottom:c(3),backgroundColor:o=>l(o,"shift-4",t.get(o))}}}function Da(e={}){var n;let t=g((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=>l(o,"text",t.get(o))}}}function La(e={}){var n;let t=g((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=>l(o,"inherit",t.get(o))}}}function Ra(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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"),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 ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>l(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`,backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>l(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 ${l(r,"inherit",n.get(r))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`,backgroundColor:r=>l(r,"shift-3",n.get(r))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:c(1.5),outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>l(r,"shift-4","neutral"),pointerEvents:"none"}}}}function $a(e={}){return{type:"color",_onSchedule:(t,n)=>{t.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),n.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>x(t,"inherit"),paddingBlock:t=>c(b(t)*1),paddingInline:t=>c(b(t)*1),blockSize:t=>c(6+b(t)*2),inlineSize:t=>c(6+b(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>c(b(t)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>l(t,"shift-2","neutral"),outline:t=>`1px solid ${l(t,"border-strong","neutral")}`}}}}function Ia(e={}){var i,r;let{mode:t="datetime-local"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"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",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",n.get(a))}`,borderRadius:a=>c(b(a)*1.5),paddingInline:a=>c(b(a)*3),height:a=>c(6+b(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=>$(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 za(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,borderRadius:r=>c(b(r)*1.5),height:r=>c(6+b(r)*2),paddingInline:r=>c(b(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:r=>c(b(r)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:c(1),height:c(6),paddingInline:c(2),cursor:"pointer",color:r=>l(r,"shift-11",t.get(r)),backgroundColor:r=>l(r,"surface",t.get(r))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:r=>l(r,"muted","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,backgroundColor:r=>l(r,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:r=>l(r,"muted","neutral"),backgroundColor:r=>l(r,"shift-3","neutral")}}}}function Aa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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(b(r)*3),paddingInlineEnd:r=>c(b(r)*1.5),paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*1.5),fontSize:r=>x(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(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 ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,color:r=>l(r,"muted","neutral")}}}}var Va='<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>',Ba='<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 Na(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=g((r=e.accentColor)!=null?r:"primary","accentColor"),o=g(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type:h=>o.get(h)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:h=>o.get(h)?Ba:Va,type:"button",ariaLabel:h=>o.get(h)?"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(b(a)*1),paddingBlock:a=>c(b(a)*1),paddingInline:a=>c(b(a)*3),borderRadius:a=>c(b(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",n.get(a))}`},"&:focus-within":{boxShadow:a=>$(a,n.get(a))}}}}function Ha(){return{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 s=n(),u=a.target,h=s.indexOf(u);u.value&&h<s.length-1&&s[h+1].focus()},i=a=>{let s=n(),u=a.target,h=s.indexOf(u);a.key==="Backspace"&&!u.value&&h>0&&s[h-1].focus(),a.key==="ArrowLeft"&&h>0&&s[h-1].focus(),a.key==="ArrowRight"&&h<s.length-1&&s[h+1].focus()},r=a=>{var p,v,f;a.preventDefault();let s=(v=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?v:"",u=n(),h=u.indexOf(a.target),m=h===-1?0:h;[...s].forEach((y,S)=>{u[m+S]&&(u[m+S].value=y)});let d=Math.min(m+s.length-1,u.length-1);(f=u[d])==null||f.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)})}}}function ja(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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"),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 ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>l(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:"50%",outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>l(r,"shift-4","neutral"),pointerEvents:"none"}}}}function Fa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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=>l(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=>l(r,"shift-9",n.get(r))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:r=>l(r,"shift-10",n.get(r))},"&:focus-visible":{outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`,outlineOffset:c(1),borderRadius:c(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Wa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,borderRadius:r=>c(b(r)*1.5),minWidth:c(32),paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:r=>l(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 ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral"),backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`}}}}function Ua(e={}){var n;let t=g((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"),appearance:"none",position:"relative",display:"inline-flex",width:c(9),height:c(6),cursor:"pointer",margin:"0",paddingBlock:c(1),"&: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 qa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(r,a)=>{r.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:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*1.5),fontSize:r=>x(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:r=>l(r,"shift-7")},"&:not(:placeholder-shown)":{color:r=>l(r,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,color:r=>l(r,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=error]":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=warning]":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","warning")}`}}}}function Ka(e={}){var n;let t=g((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=>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 Ya(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((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=>l(r,"text",t.get(r)),cursor:"pointer","&:focus-within":{color:r=>l(r,"shift-10",n.get(r))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral")}}}}function Ga(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=g((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=>l(r),color:r=>l(r,"text",t.get(r)),textDecoration:"none","&:visited":{color:r=>l(r,"text",n.get(r))},"&:hover:not([disabled])":{color:r=>l(r,"shift-10",t.get(r)),textDecoration:"underline"},"&:focus-visible":{borderRadius:c(1),outlineOffset:c(1),outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral")}}}}function Xa(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{_onInsert:o=>{o.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:o=>x(o,"inherit"),textDecoration:"none",paddingBlock:o=>c(b(o)*1),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:o=>c(b(o)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),transition:"background-color 140ms ease, 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=>$(o,t.get(o))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,color:o=>l(o,"muted","neutral")}}}}function Za(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ja(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:n=>c(b(n)*2),paddingBlock:n=>c(t?1:b(n)*2),paddingInline:n=>c(b(n)*3),fontSize:n=>x(n,"inherit")}}}function Qa(e={}){var i,r;let t=g((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(b(a)*2),paddingBlock:a=>c(o?1:b(a)*2),paddingInline:a=>c(b(a)*3),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),borderRadius:a=>c(b(a)*1.5),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"hover",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>l(a,"shift-3",n),color:a=>l(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${l(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function el(e={}){var n;let t=g((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=>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 tl(e={items:[]}){var a;let{items:t=[],selectable:n=!0,color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,u)=>{if(t.length===0)return;let h=s.nodeId,m=t.map((d,p)=>{var f;let v=(f=d.key)!=null?f:p;return Me(N({button:typeof d.label=="string"?[{span:d.label}]:[d.label],_key:v,type:"button",id:`menuitem${h}${v}`,role:"menuitem"},n?{ariaCurrent:y=>r.get(y)===v||void 0}:{}),{onClick:()=>{var y;n&&r.set(v),(y=d.onClick)==null||y.call(d)},onKeyDown:y=>{var O;let S=y.key;if(S==="Enter"||S===" "){y.preventDefault(),y.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(S))return;y.preventDefault();let C=t.map((M,_)=>{var D;return(D=M.key)!=null?D:_}),E=C.indexOf(v),w=E;S==="ArrowDown"?w=(E+1)%C.length:S==="ArrowUp"?w=(E-1+C.length)%C.length:S==="Home"?w=0:S==="End"&&(w=C.length-1),(O=document.getElementById(`menuitem${h}${C[w]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:c(2),width:"100%",fontSize:y=>x(y,"inherit"),height:y=>c(6+b(y)*2),paddingInline:y=>c(b(y)*3),border:"none",outline:"none",color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-10")},"&:focus-visible":{outline:y=>`${c(.5)} solid ${l(y,"shift-6",i)}`,outlineOffset:`-${c(.5)}`}}})});u[s.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),borderRadius:s=>c(b(s)*2),outline:s=>`1px solid ${l(s,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:A("medium")}}}var zn=e=>!!e&&typeof e.get=="function"&&e._isState===!0,Ve=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 ol(e={}){var a,s,u,h;let{initial:t,animate:n,exit:o,transition:i={}}=e,r={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(u=i.easing)!=null?u:"ease",iterations:(h=i.iterations)!=null?h:1,fill:"both"};return{_onMount:m=>{let d=m.domElement;if(!d||typeof d.animate!="function")return;let p=zn(n)?n.get():n;if(p?d.animate(t?[Ve(t),Ve(p)]:[Ve(p)],r):t&&Object.assign(d.style,Ve(t)),zn(n)){let v=n.addListener(f=>{d.animate([Ve(f)],r)});m.setMetadata("motionRelease",v)}},_onBeforeRemove:(m,d)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return d();p.animate([Ve(o)],r).finished.then(d,d)},_onRemove:m=>{let d=m.getMetadata("motionRelease");d==null||d()}}}function nl(e={}){var n;let t=g((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=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"decimal",listStylePosition:"outside"}}}function rl(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 il(e){var s;let{total:t,color:n="neutral",accentColor:o="primary"}=e,i=g((s=e.value)!=null?s:1),r={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+b(u)*2),height:u=>c(6+b(u)*2),paddingInline:u=>c(b(u)*2),borderRadius:u=>c(b(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"text",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:u=>l(u,"hover",n)},"&:focus-visible":{boxShadow:u=>$(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Me(N({},r),{backgroundColor:u=>l(u,"shift-6",o),color:u=>l(u,"shift-11",o),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-6",o)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:u=>{u.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:u=>{let h={div:m=>{let d=i.get(m),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:d<=1,onClick:()=>d>1&&i.set(d-1),style:r});let v=0;for(let f of rl(d,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${v++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>c(b(y)*2),color:y=>l(y,"shift-7",n)}});else{let y=f===d;p.push({button:String(f),_key:`page-${f}`,type:"button",ariaLabel:`Page ${f}`,ariaCurrent:y?"page":void 0,disabled:y,onClick:()=>i.set(f),style:y?a:r})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:d>=t,onClick:()=>d<t&&i.set(d+1),style:r}),p},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(h)},style:{display:"inline-flex"}}}function al(e={}){var i;let{padding:t=4,divider:n=!1}=e,o=g((i=e.color)!=null?i:"neutral","color");return{style:N({padding:r=>c(b(r)*t)},n?{borderBottom:r=>`1px solid ${l(r,"border",o.get(r))}`}:{})}}function ll(e={}){var n;let t=g((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=>l(o,"text",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function sl(e){var p;let{open:t=!1,placement:n="bottom",openOn:o="click"}=e,i=null,r=g(t),a=g(n),{show:s,hide:u,anchorPartial:h}=ie({kind:"popover",open:r,placement:a,content:e.content,keepOpenOnContentHover:o==="hover"}),m={role:"dialog",dataTone:"shift-14",style:{backgroundColor:v=>l(v,"inherit"),borderRadius:v=>c(b(v)*2),outline:v=>`1px solid ${l(v,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")},_onInsert:v=>{let f=v.attributes.get("id");i=f||v.nodeId,!f&&v.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),I(h,{ariaHaspopup:"dialog",ariaExpanded:v=>r.get(v),onMouseEnter:(v,f)=>o==="hover"&&s(f),onMouseLeave:(v,f)=>o==="hover"&&u(f),onClick:(v,f)=>{o==="click"&&(r.get()?u(f):s(f))},onKeyDown:(v,f)=>{v.key==="Escape"&&r.get()&&u(f)},onFocus:(v,f)=>o==="hover"&&s(f),onBlur:(v,f)=>{let y=v.relatedTarget,S=f.getRoot().domElement,C=i?S.querySelector(`#${CSS.escape(i)}`):null;y&&(C!=null&&C.contains(y))||u(f)},_onMount:v=>i&&v.attributes.set("ariaControls",i)}),h}function uo(e={}){let{placement:t="bottom-end",color:n="neutral",sideOffset:o=c(6),bordered:i=!0}=e,r=g(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 d;return(d=a[r.get(m)])!=null?d:a["bottom-end"]},u=m=>m.includes("start")?o:m.includes("end")?"auto":"50%",h=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",n),position:"relative","&::after":{content:'""',position:"absolute",width:c(1.5),height:c(1.5),backgroundColor:m=>l(m,"inherit",n),borderWidth:i?"1px":0,borderColor:m=>l(m,"inherit",n),borderTopStyle:m=>{let d=s(m);return d.includes("top")||d.includes("right")?"solid":"none"},borderBottomStyle:m=>{let d=s(m);return d.includes("bottom")||d.includes("left")?"solid":"none"},borderLeftStyle:m=>{let d=s(m);return d.includes("top")||d.includes("left")?"solid":"none"},borderRightStyle:m=>{let d=s(m);return d.includes("bottom")||d.includes("right")?"solid":"none"},top:m=>{let d=s(m);return d.includes("top")?0:d.includes("bottom")?"auto":u(d)},right:m=>{let d=s(m);return d.includes("right")?0:d.includes("left")?"auto":h(d)},bottom:m=>{let d=s(m);return d.includes("bottom")?0:d.includes("top")?"auto":h(d)},left:m=>{let d=s(m);return d.includes("left")?0:d.includes("right")?"auto":u(d)},transform:m=>{let d=s(m),p=d.includes("right")||d.includes("end")&&!d.includes("left")?"50%":"-50%",v=d.includes("bottom")||d.includes("end")&&!d.includes("top")?"50%":"-50%";return`translate(${p},${v}) rotate(45deg)`}}}}}function cl(e={}){var n;let t=g((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=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*2)}}}function ul(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:c(2),border:0,borderRadius:c(999),overflow:"hidden",backgroundColor:r=>l(r,"shift-3",t.get(r)),"&::-webkit-progress-bar":{backgroundColor:r=>l(r,"shift-3",t.get(r)),borderRadius:c(999)},"&::-webkit-progress-value":{backgroundColor:r=>l(r,"shift-9",n.get(r)),borderRadius:c(999),transition:"width 220ms ease"}}}}var ml='<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>',hl='<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 dl(e={}){var u,h;let{max:t=5,readOnly:n=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",r=g((h=e.value)!=null?h:0),a=g(0),s=m=>{let d=a.get(m);return d>0?d:r.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:c(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:m=>l(m,"muted",i)},_onInit:m=>{for(let d=1;d<=t;d++){let p=d,v=n?{}:{onClick:()=>{let y=p===r.get()?0:p;r.set(y),o==null||o(y),a.set(0)},onMouseEnter:()=>a.set(p),onMouseLeave:()=>a.set(0),onKeyDown:y=>{var w,O;let S=r.get(),C=S;if(y.key==="ArrowRight"||y.key==="ArrowUp")C=Math.min(t,S+1),y.preventDefault();else if(y.key==="ArrowLeft"||y.key==="ArrowDown")C=Math.max(0,S-1),y.preventDefault();else return;r.set(C),o==null||o(C);let E=C>0?C-1:0;(O=(w=m.domElement)==null?void 0:w.children[E])==null||O.focus()}},f=Me(N({button:y=>p<=s(y)?ml:hl,_key:p,type:"button",ariaLabel:`${p} star${p>1?"s":""}`},v),{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:y=>$(y,i)}}});m.children.insert(f)}}}}function fl(e={}){var u,h,m;let{size:t=16,thickness:n=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((h=e.color)!=null?h:"primary","color"),r=g((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-n)*100),s=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:d=>String(Math.round(o.get(d))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:d=>{d.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%",background:d=>`conic-gradient(from -90deg, ${l(d,"shift-9",i.get(d))} ${o.get(d)}%, ${l(d,"shift-3",r.get(d))} 0%)`,WebkitMask:s,mask:s}}}function mo(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(b(r)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function pl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{overflow:"auto","&::-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 gl(e={items:[]}){var r,a,s;let{items:t=[],color:n="neutral",accentColor:o="primary"}=e,i=g((s=(a=e.value)!=null?a:(r=t[0])==null?void 0:r.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,h)=>{let m=t.map((d,p)=>{var y;let v=(y=d.key)!=null?y:String(p);return{button:[typeof d.label=="string"?{span:d.label}:d.label],_key:v,type:"button",role:"radio",ariaChecked:S=>i.get(S)===v,onClick:()=>i.set(v),style:{cursor:"pointer",fontSize:S=>x(S,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:S=>l(S,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:S=>l(S,"shift-3",n)},"&[aria-checked=true]":{backgroundColor:S=>l(S,"shift-0",o),color:S=>l(S,"shift-10",o)},"&:focus-visible":{boxShadow:S=>$(S,o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});h[u.tagName]=m},style:{display:"inline-flex",paddingBlock:c(1),paddingInline:c(1),gap:c(.5),borderRadius:c(10),backgroundColor:u=>l(u,"shift-2",n)}}}function yl(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=>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(b(o)*1.5),paddingBlock:o=>c(b(o)*1),paddingLeft:o=>c(b(o)*3),paddingRight:o=>c(b(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="${Zt(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+b(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${l(o,"shift-5",n)}`},"&:focus-visible":{boxShadow:o=>$(o,n)},"& 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 bl(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),s=g(i),{show:u,hide:h,anchorPartial:m}=ie({kind:"selectBox",open:s,placement:g(n),content:e.content}),d={onClick:(f,y)=>!r&&h(y),dataTone:"shift-14",style:{backgroundColor:f=>l(f,"inherit"),borderRadius:f=>c(b(f)*2),outline:f=>`1px solid ${l(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};I(e.content,d);let p={div:f=>{let y=a.get(f),S=Array.isArray(y)?y:[y];return t.filter(E=>S.includes(E.value)).map(E=>({span:E.label,$:[Ge({color:o,removable:r})],_key:E.value,_onRemove:w=>{let O=a.get(),_=(Array.isArray(O)?O:[O]).filter(D=>D!==E.value);r?a.set(_):a.set(_[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},v={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>s.get()?h(y):u(y),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>c(6+b(f)*2),minWidth:c(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"border-strong","neutral")}`,paddingInline:f=>c(b(f)*2),borderRadius:f=>c(b(f)*1.5),fontSize:f=>x(f,"inherit"),color:f=>l(f,"text",o),backgroundColor:f=>l(f,"inherit",o)}};return I(m,v),m}function vl(e={}){let{accentColor:t="primary",color:n="neutral",value:o=null}=e;return{role:"option",_onInit:r=>{r.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=r.getContext("select");if(a){let s=a.value;r.attributes.set("ariaSelected",u=>{let h=s.get(u);return a.multiple?h.includes(o):h===o}),r.addEvent("click",()=>{let u=s.get();a.multiple?u.includes(o)?s.set(u.filter(h=>h!==o)):s.set(u.concat([o])):u!==o&&s.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:r=>x(r,"inherit"),height:r=>c(6+b(r)*2),paddingInline:r=>c(b(r)*3),border:"none",outline:"none",color:r=>l(r,"text",n),backgroundColor:r=>l(r,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:r=>l(r,"hover",n)},"&[aria-selected=true]":{backgroundColor:r=>l(r,"shift-6",t),color:r=>l(r,"shift-11")},"&:focus-visible":{outline:r=>`${c(.5)} solid ${l(r,"shift-6",t)}`,outlineOffset:`-${c(.5)}`}}}}function Sl(e={}){var a;let{color:t="neutral",multiple:n=!1}=e,o=g((a=e.value)!=null?a:n?[]:null),i={div:s=>{let u=o.get(s);return(Array.isArray(u)?u:[u]).map(m=>({input:null,name:e.name,value:m==null?"":String(m)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:o,multiple:n}},_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(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",t)}}}function xl(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},o=Le(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:r=>x(r),color:r=>l(r,"text",t.get(r)),height:c(6),display:"block",borderRadius:c(1),backgroundColor:r=>l(r,"inherit",t.get(r)),animation:`${o} 1.5s ease-in-out infinite`,[`@keyframes ${o}`]:n}}}function wl(e={}){var n;let t=g((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=>l(o,"text",t.get(o))}}}var Vn={to:{transform:"rotate(360deg)"}},An=Le(JSON.stringify(Vn));function Cl(e={}){var n;let t=g((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=>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:`${An} 0.7s linear infinite`,[`@keyframes ${An}`]:Vn}}}function kl(e={}){let{direction:t="horizontal",defaultSize:n=50,min:o=10,max:i=90}=e;return{_onSchedule:(r,a)=>{I(a,{_context:{splitter:{direction:t,size:g(n),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function El(){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=s=>{n.style[o]=`${i?s:100-s}%`};r(t.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=t.size.addListener(r);e.addHook("Remove",a)}}}function _l(){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 h=u.shiftKey?10:1,m=null;o?u.key==="ArrowRight"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowLeft"&&(m=Math.max(t.size.get()-h,t.min)):u.key==="ArrowDown"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowUp"&&(m=Math.max(t.size.get()-h,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 h=n.parentElement,m=p=>{let v=h.getBoundingClientRect(),f=o?(p.clientX-v.left)/v.width*100:(p.clientY-v.top)/v.height*100;t.size.set(Math.min(Math.max(f,t.min),t.max))},d=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null};a=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null},document.addEventListener("mousemove",m),document.addEventListener("mouseup",d)};n.addEventListener("keydown",r),n.addEventListener("mousedown",s),e.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",r),n.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>l(e,"shift-2"),"&:hover":{backgroundColor:e=>l(e,"shift-3")},"&:focus-visible":{outline:e=>`2px solid ${l(e,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>l(e,"shift-4")}}}}function Tl(e={}){let{gap:t=3,align:n}=e;return{style:N({display:"flex",flexDirection:"column",gap:o=>c(b(o)*t)},n?{alignItems:n}:{})}}function Ol(e={items:[]}){var a;let{items:t=[],direction:n="horizontal",color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.current)!=null?a:0);return{_context:{steps:{current:r,direction:n,color:o,accentColor:i}},_onSchedule:(s,u)=>{let h=t.map((m,d)=>{var v;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(v=m.key)!=null?v:d,dataStep:String(d+1),dataStatus:f=>{let y=r.get(f);return d<y?"done":d===y?"active":"pending"},ariaCurrent:f=>r.get(f)===d?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:f=>x(f,"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:f=>x(f,"decrease-1"),fontWeight:"600",flexShrink:"0",border:f=>`2px solid ${l(f,"border-strong",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"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:f=>l(f,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:f=>l(f,"shift-6",i),borderColor:f=>l(f,"shift-6",i),color:f=>l(f,"shift-15",i)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:f=>l(f,"shift-3",o),borderColor:f=>l(f,"border",o),color:f=>l(f,"text",o)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-3",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-6",i)},"&[data-status=pending]":{color:f=>l(f,"shift-7")},"&[data-status=active]":{color:f=>l(f,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:f=>l(f,"muted")}}}});u[s.tagName]=h},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:c(2),listStyle:"none",margin:"0",padding:"0"}}}function Ml(e={}){var n;let t=g((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:700,color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function Pl(e={}){var n;let t=g((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=>l(o,"text",t.get(o))}}}function Dl(e={}){var n;let t=g((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=>l(o,"text",t.get(o))}}}function Ll(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},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(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(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(b(o)*3),paddingBlock:o=>c(b(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 Rl(e={items:[]}){var r,a,s;let{items:t=[],accentColor:n="primary",color:o="neutral"}=e,i=g((s=(a=e.activeKey)!=null?a:(r=t[0])==null?void 0:r.key)!=null?s:0);return{_onSchedule:(u,h)=>{let m=u.nodeId,p={div:t.map((f,y)=>{var E;let S=(E=f.key)!=null?E:y;return{button:[typeof f.label=="string"?{span:f.label}:f.label],_key:S,type:"button",role:"tab",id:`tab${m}${S}`,ariaControls:`panel${m}${S}`,ariaSelected:w=>i.get(w)===S,onClick:()=>i.set(S),onKeyDown:w=>{let O=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;w.preventDefault();let M=t.map((B,H)=>{var j;return(j=B.key)!=null?j:H}),_=M.indexOf(S),D=_;O==="ArrowRight"?D=(_+1)%M.length:O==="ArrowLeft"?D=(_-1+M.length)%M.length:O==="Home"?D=0:O==="End"&&(D=M.length-1),i.set(M[D])},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+b(w)*2),paddingInline:w=>c(b(w)*4),border:"none",outline:"none",color:w=>l(w,"text"),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])":{boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-6",n)}`},"&:focus-visible":{boxShadow:w=>$(w,n)}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},v=t.map((f,y)=>{var C;let S=(C=f.key)!=null?C:y;return{div:[f.content],_key:S,role:"tabpanel",id:`panel${m}${S}`,ariaLabelledby:`tab${m}${S}`,hidden:E=>i.get(E)!==S,style:{paddingBlock:E=>c(b(E)*2),paddingInline:E=>c(b(E)*2)}}});h[u.tagName]=[p,...v]}}}function $l(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=g((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 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(b(a)*2),paddingBlock:a=>c(b(a)*1.5),border:"none",borderRadius:a=>c(b(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",n.get(a))}`},"&:focus-visible":{boxShadow:a=>$(a,n.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 Il(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function zl(e={}){var r,a,s;let{last:t=!1}=e,n=(r=e.color)!=null?r:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=g((s=e.active)!=null?s:!1);return{style:N({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(b(u)*2),paddingBottom:u=>t?"0":c(b(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>l(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(b(u)*4)}`,width:"2px",backgroundColor:u=>l(u,"shift-3",n)}})}}function Al(e={}){let{position:t="top-center",color:n="neutral"}=e,o=g(!1),i=t.startsWith("top"),r=t.endsWith("center"),a=t.endsWith("right"),s={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 h=u.domElement.querySelector(`#domphy-toast-${t}`);return h||(h=u.children.insert(s).domElement),h},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:c(32),pointerEvents:"auto",paddingBlock:u=>c(b(u)*2),paddingInline:u=>c(b(u)*4),borderRadius:u=>c(b(u)*2),fontSize:u=>x(u,"inherit"),color:u=>l(u,"text",n),backgroundColor:u=>l(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,h)=>{let m=!1,d=null,p=()=>{m||(m=!0,d&&(clearTimeout(d),d=null),u.domElement.removeEventListener("transitionend",v),h())},v=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",v),d=setTimeout(p,350),u.addHook("Remove",()=>{var f;d&&(clearTimeout(d),d=null),(f=u.domElement)==null||f.removeEventListener("transitionend",v)}),o.set(!1)}}}function Vl(e={items:[]}){var a;let{items:t=[],multiple:n=!1,color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.value)!=null?a:n?[]:"");return{role:"group",_context:{toggleGroup:{value:r,multiple:n}},_onSchedule:(s,u)=>{let h=t.map((m,d)=>{var f;let p=(f=m.key)!=null?f:String(d);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:p,type:"button",role:"button",ariaPressed:y=>{let S=r.get(y);return Array.isArray(S)?S.includes(p):S===p},onClick:()=>{let y=r.get();if(n){let S=Array.isArray(y)?[...y]:[];r.set(S.includes(p)?S.filter(C=>C!==p):[...S,p])}else r.set(y===p?"":p)},style:{cursor:"pointer",fontSize:y=>x(y,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-12",i)},"&:focus-visible":{boxShadow:y=>$(y,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[s.tagName]=h},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),outline:s=>`1px solid ${l(s,"border",o)}`,outlineOffset:"-1px"}}}function Bl(e={}){return mo({gap:e.gap})}function Nl(){return{div:null,style:{flex:"1 1 0"}}}function Hl(e={}){let{open:t=!1,placement:n="top",content:o="Tooltip Content"}=e,i=g(n),r=g(o),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:v=>r.get(v),id:a},{show:u,hide:h,anchorPartial:m}=ie({kind:"tooltip",open:t,placement:i,content:s}),d={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:v=>c(b(v)*1),paddingInline:v=>c(b(v)*3),borderRadius:v=>c(b(v)*1.5),color:v=>l(v,"text"),backgroundColor:v=>l(v),fontSize:v=>x(v,"inherit"),boxShadow:A("low")},$:[uo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(d),I(m,{ariaDescribedby:a,onMouseEnter:(v,f)=>u(f),onMouseLeave:(v,f)=>h(f),onFocus:(v,f)=>u(f),onBlur:(v,f)=>h(f),onKeyDown:(v,f)=>v.key==="Escape"&&h(f)}),m}function Bn(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function jl(e={}){let{duration:t=300,delay:n=0}=e,o=new Map,i=new Map,r=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 r)clearTimeout(u);r.clear();for(let u of a)cancelAnimationFrame(u);a.clear()})},_onBeforeUpdate:s=>{o=new Map,s.children.items.forEach((u,h)=>{if(!(u instanceof U))return;let m=u.domElement;m&&o.set(Bn(u,h),m.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((u,h)=>{var M;if(!(u instanceof U))return;let m=u.domElement;if(!m)return;let d=Bn(u,h),p=o.get(d);if(!p)return;let v=m.getBoundingClientRect(),f=p.left-v.left,y=p.top-v.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(M=i.get(m))==null||M(),m.style.transition="none",m.style.transform=`translate(${f}px, ${y}px)`,m.getBoundingClientRect();let S=requestAnimationFrame(()=>{a.delete(S),m.style.transition=`transform ${t}ms ease ${n}ms`,m.style.transform="translate(0px, 0px)"});a.add(S);let C=!1,E=null,w=()=>{C||(C=!0,E&&(r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O),m.style.transition="",m.style.transform="")},O=_=>{_.propertyName==="transform"&&w()};i.set(m,()=>{C=!0,E&&(clearTimeout(E),r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O)}),m.addEventListener("transitionend",O),E=setTimeout(w,t+n+34),r.add(E)}),o.clear()}}}function Fl(e={}){var n;let t=g((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=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"disc",listStylePosition:"outside"}}}return nr(Wl);})();
4
+ ${i}}`}function re(e){if(!Ie[e])throw Error(`Theme "${e}" not found`);return Ie[e]}function qn(e,t){Wn(t),Ie[e]||(Ie[e]=Gt(qe)),Jo(Ie[e],t),at=null,Wt.clear()}function Kn(e){let t=Gt(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 Qo(e){let t=Wt.get(e);if(t)return t;let r=re(e),o=Zt(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 Wt.set(e,i),i}function lt(){if(at)return at;let e=re("light"),t=Zt(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-${Xo(n)})`}return at=r,r}function Ut(){return Object.entries(Ie).map(([e,t])=>Un(e,t)).join(`
5
+ `)}function Yn(e){var t;if(typeof document!="undefined")if(e){e.textContent=Ut();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=Ut(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function Gn(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 Zn(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 st(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 Xn=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],qt=["inherit"];[...Array(5).keys()].forEach(e=>{qt.push(`decrease-${e}`),qt.push(`increase-${e}`)});function Jn(e,t="inherit"){if(!qt.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 Qn(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=Jn(r,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),r}function b(e){let t=Qn(e);return re(e?st(e):"light").densities[t]}var ei=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],ti=[.75,1,1.5,2,2.5];function oi(e,t){let r=Ft(it(t)),o=0,i=1/0;for(let n=0;n<e.length;n++){let a=Ko(r,Ft(it(e[n])));a<i&&(i=a,o=n)}return o}function ri(e,t={}){var r,o,i,n,a,s;let u=(r=t.steps)!=null?r:18,d={},m={};for(let[h,p]of Object.entries(e)){let S=Go(p,u);d[h]=S,m[h]=oi(S,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:d,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:ei,densities:(n=t.densities)!=null?n:ti,darkBias:(a=t.darkBias)!=null?a:1,custom:(s=t.custom)!=null?s:{}}}var Kt=["inherit"];[...Array(8).keys()].forEach(e=>{Kt.push(`decrease-${e}`),Kt.push(`increase-${e}`)});function er(e,t="inherit"){if(!Kt.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 ni(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=er(r,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),r}function x(e,t="inherit"){let r=er(ni(e),t);return lt().fontSizes[r]}var fe=qe.colors.neutral.length,Yt={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},Ue=["inherit","base",...Object.keys(Yt)];[...Array(fe).keys()].forEach(e=>{Ue.push(`decrease-${e}`),Ue.push(`increase-${e}`),Ue.push(`shift-${e}`)});function Zo(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 ii(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 Ke(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!Ue.includes(t))throw Error(`tone name "${t}" invalid`);if(t in Yt&&(t=Yt[t]),t.startsWith("increase-")){let r=parseInt(t.replace("increase-",""),10);return Zo(e,r)}else if(t.startsWith("decrease-")){let r=parseInt(t.replace("decrease-",""),10);return Zo(e,-r)}else if(t.startsWith("shift-")){let r=parseInt(t.replace("shift-",""),10);return ii(e,r)}else return e}function tr(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=Ke(r,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),r}function or(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=lt()[o];if(!s)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?s[re("light").baseTones[o]]:s[Ke(0,t)]}let i=st(e),n;if(t==="base")n=re(i).baseTones[o];else{let s=re(i),u=or(tr(e),s.direction,s.darkBias);n=Ke(u,t)}let a=lt()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[n]}function Xt(e,t="inherit",r="inherit"){let o=r==="inherit"?"neutral":r,i=e?st(e):"light",n=Qo(i)[o];if(!n)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?n[re("light").baseTones[o]]:n[Ke(0,t)];let a;if(t==="base")a=re(i).baseTones[o];else{let s=re(i),u=or(tr(e),s.direction,s.darkBias);a=Ke(u,t)}return n[a]}var kt={};tt(kt,{abbreviation:()=>ai,accordion:()=>li,alert:()=>si,avatar:()=>ci,badge:()=>mi,blockquote:()=>ui,breadcrumb:()=>hi,breadcrumbEllipsis:()=>di,button:()=>gi,buttonGhost:()=>Jt,buttonSwitch:()=>yi,card:()=>vi,code:()=>Si,combobox:()=>ca,command:()=>ma,commandItem:()=>ha,commandSearch:()=>ua,datePicker:()=>fa,descriptionList:()=>ya,details:()=>ba,dialog:()=>va,divider:()=>Sa,drawer:()=>xa,emphasis:()=>wa,empty:()=>ka,errorBoundary:()=>Ca,fab:()=>_a,figure:()=>Ta,formGroup:()=>Ma,heading:()=>Da,horizontalRule:()=>Pa,icon:()=>La,image:()=>Ra,inputCheckbox:()=>Ia,inputColor:()=>$a,inputDateTime:()=>za,inputFile:()=>Aa,inputNumber:()=>Va,inputOTP:()=>Ba,inputPassword:()=>ja,inputRadio:()=>Fa,inputRange:()=>Wa,inputSearch:()=>Ua,inputSwitch:()=>qa,inputText:()=>Ka,keyboard:()=>Ya,label:()=>Ga,link:()=>Za,linkButton:()=>Qa,list:()=>el,listItem:()=>tl,listItemButton:()=>ol,mark:()=>rl,menu:()=>nl,motion:()=>il,orderedList:()=>al,pagination:()=>sl,panelSection:()=>cl,paragraph:()=>ml,popover:()=>ul,popoverArrow:()=>uo,preformated:()=>hl,progress:()=>dl,rating:()=>gl,ringProgress:()=>yl,row:()=>ho,scrollArea:()=>bl,segmented:()=>vl,select:()=>Sl,selectBox:()=>xl,selectItem:()=>wl,selectList:()=>kl,skeleton:()=>Cl,small:()=>El,spinner:()=>_l,splitter:()=>Tl,splitterHandle:()=>Ol,splitterPanel:()=>Ml,stack:()=>Dl,steps:()=>Pl,strong:()=>Ll,subscript:()=>Rl,superscript:()=>Il,table:()=>$l,tabs:()=>zl,tag:()=>Ze,textarea:()=>Al,timeline:()=>Vl,timelineItem:()=>Bl,toast:()=>Nl,toggleGroup:()=>Hl,toolbar:()=>jl,toolbarSpacer:()=>Fl,tooltip:()=>Wl,transitionGroup:()=>Ul,unorderedList:()=>ql});function ai(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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,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 li(e={}){var i,n;let{type:t="single"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((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(p=>{p!==h&&(p.open=!1)})};s.addEventListener("click",u),a.addHook("Remove",()=>s.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(b(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=>_(a,o.get(a))}}}}function si(e={}){var r;let t=g((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(b(o)*2),paddingInline:o=>c(b(o)*4),borderRadius:o=>c(b(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 ci(e={}){var r;let t=g((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 mi(e={}){var i;let{label:t=999}=e,r=g(t),o=g((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 ui(e={}){var r;let t=g((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(b(o)*2),paddingInline:o=>c(b(o)*4),margin:0}}}function hi(e={}){var o;let{separator:t="/"}=e,r=g((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 di(e={}){var r;let t=g((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=>_(o,t.get(o))}}}}var $e={small:"decrease-1",medium:"inherit",large:"increase-1"};var fi={small:.5,medium:1,large:1.5};function Jt(e={}){var i,n,a;let t=g((i=e.color)!=null?i:"neutral","color"),r=fi[(n=e.size)!=null?n:"medium"],o=$e[(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(b(s)*r),paddingInline:s=>c(b(s)*r),borderRadius:s=>c(b(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>c(b(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=>_(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 pi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function gi(e={}){var a,s,u,d;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return Jt({color:e.color,size:e.size});let r=g((s=e.color)!=null?s:"primary","color"),o=t==="solid",i=pi[(u=e.size)!=null?u:"medium"],n=$e[(d=e.size)!=null?d:"medium"];return te(A({_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},o?{dataTone:"shift-17",_doctorDisable:["low-contrast","color-shift-minimum"]}:{}),{style:{appearance:"none",fontSize:m=>x(m,n),paddingBlock:m=>c(b(m)*i.block),paddingInline:m=>c(b(m)*i.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(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-17",r.get(m)):l(m,"text",r.get(m)),backgroundColor: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-17",r.get(m)):l(m,"shift-10",r.get(m)),backgroundColor:m=>o?l(m,"decrease-1",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:m=>o?l(m,"decrease-2",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>_(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 yi(e={}){var n,a;let{checked:t=!1}=e,r=g(t),o=g((n=e.color)!=null?n:"neutral","color"),i=g((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=>_(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 bi={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 bi[e]}function vi(e={}){var r;let t=g((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(b(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(b(o)*2),paddingInline:o=>c(b(o)*4),fontWeight:"600",color:o=>l(o,"shift-11",t.get(o)),margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(b(o)*4),paddingBottom:o=>c(b(o)*2),color:o=>l(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(b(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(b(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderTop:o=>`1px solid ${l(o,"border",t.get(o))}`}}}}function Si(e={}){var r;let t=g((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 xi=Object.defineProperty,wi=Object.defineProperties,ki=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,rr=(e,t,r)=>t in e?xi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J=(e,t)=>{for(var r in t||(t={}))dr.call(t,r)&&rr(e,r,t[r]);if(ut)for(var r of ut(t))fr.call(t,r)&&rr(e,r,t[r]);return e},Ce=(e,t)=>wi(e,ki(t)),pr=(e,t)=>{var r={};for(var o in e)dr.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&ut)for(var o of ut(e))t.indexOf(o)<0&&fr.call(e,o)&&(r[o]=e[o]);return r},Te=(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())}),Ci=["top","right","bottom","left"],nr=["start","end"],lc=Ci.reduce((e,t)=>e.concat(t,`${t}-${nr[0]}`,`${t}-${nr[1]}`),[]),ht=Math.min,ke=Math.max,dt=Math.round,mt=Math.floor,ne=e=>({x:e,y:e}),Ei={left:"right",right:"left",bottom:"top",top:"bottom"};function ir(e,t,r){return ke(e,ht(t,r))}function gt(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function gr(e){return e==="x"?"y":"x"}function yr(e){return e==="y"?"height":"width"}function pe(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function br(e){return gr(pe(e))}function _i(e,t,r=!1){let o=yt(e),i=br(e),n=yr(i),a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=ft(a)),[a,ft(a)]}function Ti(e){let t=ft(e);return[to(e),t,to(t)]}function to(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var ar=["left","right"],lr=["right","left"],Mi=["top","bottom"],Oi=["bottom","top"];function Di(e,t,r){switch(e){case"top":case"bottom":return r?t?lr:ar:t?ar:lr;case"left":case"right":return t?Mi:Oi;default:return[]}}function Pi(e,t,r,o){let i=yt(e),n=Di(Ee(e),r==="start",o);return i&&(n=n.map(a=>`${a}-${i}`),t&&(n=n.concat(n.map(to)))),n}function ft(e){let t=Ee(e);return Ei[t]+e.slice(t.length)}function Li(e){return J({top:0,right:0,bottom:0,left:0},e)}function Ri(e){return typeof e!="number"?Li(e):{top:e,right:e,bottom:e,left:e}}function pt(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 sr({reference:e,floating:t},r,o){let i=pe(r),n=br(r),a=yr(n),s=Ee(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,p;switch(s){case"top":p={x:d,y:e.y-t.height};break;case"bottom":p={x:d,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:m};break;case"left":p={x:e.x-t.width,y:m};break;default:p={x:e.x,y:e.y}}switch(yt(r)){case"start":p[n]-=h*(o&&u?-1:1);break;case"end":p[n]+=h*(o&&u?-1:1);break;default:}return p}function Ii(e){return Te(this,arguments,function*(t,r={}){var o,i,n,a,s,u;let{x:d,y:m,platform:h,rects:p,elements:S,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:v="viewport",elementContext:k="floating",altBoundary:E=!1,padding:w=0}=gt(r,t),O=Ri(w),D=S[E?k==="floating"?"reference":"floating":k],T=pt(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:y,rootBoundary:v,strategy:f})),L=k==="floating"?{x:d,y:m,width:p.floating.width,height:p.floating.height}:p.reference,N=yield(a=h.getOffsetParent)==null?void 0:a.call(h,S.floating),H=(yield(s=h.isElement)==null?void 0:s.call(h,N))?(yield(u=h.getScale)==null?void 0:u.call(h,N))||{x:1,y:1}:{x:1,y:1},j=pt(h.convertOffsetParentRelativeRectToViewportRelativeRect?yield h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:S,rect:L,offsetParent:N,strategy:f}):L);return{top:(T.top-j.top+O.top)/H.y,bottom:(j.bottom-T.bottom+O.bottom)/H.y,left:(T.left-j.left+O.left)/H.x,right:(j.right-T.right+O.right)/H.x}})}var $i=50,zi=(e,t,r)=>Te(null,null,function*(){var o;let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,u=s.detectOverflow?s:Ce(J({},s),{detectOverflow:Ii}),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:p}=sr(m,i,d),S=i,f=0,y={};for(let v=0;v<a.length;v++){let k=a[v];if(!k)continue;let{name:E,fn:w}=k,{x:O,y:D,data:T,reset:L}=yield w({x:h,y:p,initialPlacement:i,placement:S,strategy:n,middlewareData:y,rects:m,platform:u,elements:{reference:e,floating:t}});h=O!=null?O:h,p=D!=null?D:p,y[E]=J(J({},y[E]),T),L&&f<$i&&(f++,typeof L=="object"&&(L.placement&&(S=L.placement),L.rects&&(m=L.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:n}):L.rects),{x:h,y:p}=sr(m,S,d)),v=-1)}return{x:h,y:p,placement:S,strategy:n,middlewareData:y}});var Ai=(e={})=>({name:"flip",options:e,fn(t){return Te(this,null,function*(){var r,o,i,n,a,s;let{placement:u,middlewareData:d,rects:m,initialPlacement:h,platform:p,elements:S}=t,f=gt(e,t),{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:k,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0}=f,D=pr(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=d.arrow)!=null&&r.alignmentOffset)return{};let T=Ee(u),L=pe(h),N=Ee(h)===h,H=yield(o=p.isRTL)==null?void 0:o.call(p,S.floating),j=k||(N||!O?[ft(h)]:Ti(h)),ye=w!=="none";!k&&ye&&j.push(...Pi(h,O,w,H));let Oe=[h,...j],ue=yield p.detectOverflow(t,D),W=[],se=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&W.push(ue[T]),v){let ce=_i(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,Ne=Oe[ce];if(Ne&&(!(v==="alignment"&&L!==pe(Ne))||se.every(q=>pe(q.placement)===L?q.overflows[0]>0:!0)))return{data:{index:ce,overflows:se},reset:{placement:Ne}};let be=(a=se.filter(q=>q.overflows[0]<=0).sort((q,Z)=>q.overflows[1]-Z.overflows[1])[0])==null?void 0:a.placement;if(!be)switch(E){case"bestFit":{let q=(s=se.filter(Z=>{if(ye){let X=pe(Z.placement);return X===L||X==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(X=>X>0).reduce((X,He)=>X+He,0)]).sort((Z,X)=>Z[1]-X[1])[0])==null?void 0:s[0];q&&(be=q);break}case"initialPlacement":be=h;break;default:}if(u!==be)return{reset:{placement:be}}}return{}})}});var Vi=new Set(["left","top"]);function Bi(e,t){return Te(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=Ee(o),u=yt(o),d=pe(o)==="y",m=Vi.has(s)?-1:1,h=a&&d?-1:1,p=gt(t,e),{mainAxis:S,crossAxis:f,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof y=="number"&&(f=u==="end"?y*-1:y),d?{x:f*h,y:S*m}:{x:S*m,y:f*h}})}var Ni=(e=0)=>({name:"offset",options:e,fn(t){return Te(this,null,function*(){var r,o;let{x:i,y:n,placement:a,middlewareData:s}=t,u=yield Bi(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:Ce(J({},u),{placement:a})}})}}),Hi=(e={})=>({name:"shift",options:e,fn(t){return Te(this,null,function*(){let{x:r,y:o,placement:i,platform:n}=t,a=gt(e,t),{mainAxis:s=!0,crossAxis:u=!1,limiter:d={fn:({x:E,y:w})=>({x:E,y:w})}}=a,m=pr(a,["mainAxis","crossAxis","limiter"]),h={x:r,y:o},p=yield n.detectOverflow(t,m),S=pe(Ee(i)),f=gr(S),y=h[f],v=h[S];if(s){let E=f==="y"?"top":"left",w=f==="y"?"bottom":"right",O=y+p[E],D=y-p[w];y=ir(O,y,D)}if(u){let E=S==="y"?"top":"left",w=S==="y"?"bottom":"right",O=v+p[E],D=v-p[w];v=ir(O,v,D)}let k=d.fn(Ce(J({},t),{[f]:y,[S]:v}));return Ce(J({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[f]:s,[S]:u}}})})}});function bt(){return typeof window!="undefined"}function Ve(e){return vr(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=(vr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vr(e){return bt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return bt()?e instanceof Element||e instanceof Y(e).Element:!1}function me(e){return bt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function cr(e){return!bt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ge(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 ji(e){return/^(table|td|th)$/.test(Ve(e))}function vt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Fi=/transform|translate|scale|rotate|perspective|filter/,Wi=/paint|layout|strict|content/,we=e=>!!e&&e!=="none",Qt;function ro(e){let t=Q(e)?ee(e):e;return we(t.transform)||we(t.translate)||we(t.scale)||we(t.rotate)||we(t.perspective)||!no()&&(we(t.backdropFilter)||we(t.filter))||Fi.test(t.willChange||"")||Wi.test(t.contain||"")}function Ui(e){let t=ge(e);for(;me(t)&&!Ae(t);){if(ro(t))return t;if(vt(t))return null;t=ge(t)}return null}function no(){return Qt==null&&(Qt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qt}function Ae(e){return/^(html|body|#document)$/.test(Ve(e))}function ee(e){return Y(e).getComputedStyle(e)}function St(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if(Ve(e)==="html")return e;let t=e.assignedSlot||e.parentNode||cr(e)&&e.host||ie(e);return cr(t)?t.host:t}function Sr(e){let t=ge(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:me(t)&&Ge(t)?t:Sr(t)}function Ye(e,t=[],r=!0){var o;let i=Sr(e),n=i===((o=e.ownerDocument)==null?void 0:o.body),a=Y(i);if(n){let s=oo(a);return t.concat(a,a.visualViewport||[],Ge(i)?i:[],s&&r?Ye(s):[])}else return t.concat(i,Ye(i,[],r))}function oo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xr(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=dt(r)!==n||dt(o)!==a;return s&&(r=n,o=a),{width:r,height:o,$:s}}function io(e){return Q(e)?e:e.contextElement}function ze(e){let t=io(e);if(!me(t))return ne(1);let r=t.getBoundingClientRect(),{width:o,height:i,$:n}=xr(t),a=(n?dt(r.width):r.width)/o,s=(n?dt(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var qi=ne(0);function wr(e){let t=Y(e);return!no()||!t.visualViewport?qi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ki(e,t=!1,r){return!r||t&&r!==Y(e)?!1:t}function _e(e,t=!1,r=!1,o){let i=e.getBoundingClientRect(),n=io(e),a=ne(1);t&&(o?Q(o)&&(a=ze(o)):a=ze(e));let s=Ki(n,r,o)?wr(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 p=Y(n),S=o&&Q(o)?Y(o):o,f=p,y=oo(f);for(;y&&o&&S!==f;){let v=ze(y),k=y.getBoundingClientRect(),E=ee(y),w=k.left+(y.clientLeft+parseFloat(E.paddingLeft))*v.x,O=k.top+(y.clientTop+parseFloat(E.paddingTop))*v.y;u*=v.x,d*=v.y,m*=v.x,h*=v.y,u+=w,d+=O,f=Y(y),y=oo(f)}}return pt({width:m,height:h,x:u,y:d})}function xt(e,t){let r=St(e).scrollLeft;return t?t.left+r:_e(ie(e)).left+r}function kr(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-xt(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Yi({elements:e,rect:t,offsetParent:r,strategy:o}){let i=o==="fixed",n=ie(r),a=e?vt(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)&&((Ve(r)!=="body"||Ge(n))&&(s=St(r)),m)){let p=_e(r);u=ze(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}let h=n&&!m&&!i?kr(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 Gi(e){return Array.from(e.getClientRects())}function Zi(e){let t=ie(e),r=St(e),o=e.ownerDocument.body,i=ke(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=ke(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-r.scrollLeft+xt(e),s=-r.scrollTop;return ee(o).direction==="rtl"&&(a+=ke(t.clientWidth,o.clientWidth)-i),{width:i,height:n,x:a,y:s}}var mr=25;function Xi(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=no();(!m||m&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}let d=xt(o);if(d<=0){let m=o.ownerDocument,h=m.body,p=getComputedStyle(h),S=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-h.clientWidth-S);f<=mr&&(n-=f)}else d<=mr&&(n+=d);return{width:n,height:a,x:s,y:u}}function Ji(e,t){let r=_e(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,n=me(e)?ze(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 ur(e,t,r){let o;if(t==="viewport")o=Xi(e,r);else if(t==="document")o=Zi(ie(e));else if(Q(t))o=Ji(t,r);else{let i=wr(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return pt(o)}function Cr(e,t){let r=ge(e);return r===t||!Q(r)||Ae(r)?!1:ee(r).position==="fixed"||Cr(r,t)}function Qi(e,t){let r=t.get(e);if(r)return r;let o=Ye(e,[],!1).filter(s=>Q(s)&&Ve(s)!=="body"),i=null,n=ee(e).position==="fixed",a=n?ge(e):e;for(;Q(a)&&!Ae(a);){let s=ee(a),u=ro(a);!u&&s.position==="fixed"&&(i=null),(n?!u&&!i:!u&&s.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Ge(a)&&!u&&Cr(e,a))?o=o.filter(d=>d!==a):i=s,a=ge(a)}return t.set(e,o),o}function ea({element:e,boundary:t,rootBoundary:r,strategy:o}){let i=[...t==="clippingAncestors"?vt(e)?[]:Qi(e,this._c):[].concat(t),r],n=ur(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=ur(e,i[m],o);a=ke(h.top,a),s=ht(h.right,s),u=ht(h.bottom,u),d=ke(h.left,d)}return{width:s-d,height:u-a,x:d,y:a}}function ta(e){let{width:t,height:r}=xr(e);return{width:t,height:r}}function oa(e,t,r){let o=me(t),i=ie(t),n=r==="fixed",a=_e(e,!0,n,t),s={scrollLeft:0,scrollTop:0},u=ne(0);function d(){u.x=xt(i)}if(o||!o&&!n)if((Ve(t)!=="body"||Ge(i))&&(s=St(t)),o){let S=_e(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?kr(i,s):ne(0),h=a.left+s.scrollLeft-u.x-m.x,p=a.top+s.scrollTop-u.y-m.y;return{x:h,y:p,width:a.width,height:a.height}}function eo(e){return ee(e).position==="static"}function hr(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 Er(e,t){let r=Y(e);if(vt(e))return r;if(!me(e)){let i=ge(e);for(;i&&!Ae(i);){if(Q(i)&&!eo(i))return i;i=ge(i)}return r}let o=hr(e,t);for(;o&&ji(o)&&eo(o);)o=hr(o,t);return o&&Ae(o)&&eo(o)&&!ro(o)?r:o||Ui(e)||r}var ra=function(e){return Te(this,null,function*(){let t=this.getOffsetParent||Er,r=this.getDimensions,o=yield r(e.floating);return{reference:oa(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function na(e){return ee(e).direction==="rtl"}var ia={convertOffsetParentRelativeRectToViewportRelativeRect:Yi,getDocumentElement:ie,getClippingRect:ea,getOffsetParent:Er,getElementRects:ra,getClientRects:Gi,getDimensions:ta,getScale:ze,isElement:Q,isRTL:na};function _r(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aa(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:p,height:S}=d;if(s||t(),!p||!S)return;let f=mt(h),y=mt(i.clientWidth-(m+p)),v=mt(i.clientHeight-(h+S)),k=mt(m),E={rootMargin:`${-f}px ${-y}px ${-v}px ${-k}px`,threshold:ke(0,ht(1,u))||1},w=!0;function O(D){let T=D[0].intersectionRatio;if(T!==u){if(!w)return a();T?a(!1,T):o=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!_r(d,e.getBoundingClientRect())&&a(),w=!1}try{r=new IntersectionObserver(O,Ce(J({},E),{root:i.ownerDocument}))}catch(D){r=new IntersectionObserver(O,E)}r.observe(e)}return a(!0),n}function Tr(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=io(e),m=i||n?[...d?Ye(d):[],...t?Ye(t):[]]:[];m.forEach(k=>{i&&k.addEventListener("scroll",r,{passive:!0}),n&&k.addEventListener("resize",r)});let h=d&&s?aa(d,r):null,p=-1,S=null;a&&(S=new ResizeObserver(([k])=>{k&&k.target===d&&S&&t&&(S.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{S==null||S.observe(t)})),r()}),d&&!u&&S.observe(d),t&&S.observe(t));let f,y=u?_e(e):null;u&&v();function v(){let k=_e(e);y&&!_r(y,k)&&r(),y=k,f=requestAnimationFrame(v)}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(f)}}var Mr=Ni;var Or=Hi,Dr=Ai;var Pr=(e,t,r)=>{let o=new Map,i=J({platform:ia},r),n=Ce(J({},i.platform),{_c:o});return zi(e,t,Ce(J({},i),{platform:n}))};function la(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,p=e.getRoot(),S={style:{position:"fixed",pointerEvents:"auto",visibility:T=>r.get(T)?"visible":"hidden"},onKeyDown:T=>{T.key==="Escape"&&w()},onMouseEnter:()=>n&&E(),onMouseLeave:()=>n&&w(),_onMount:T=>{var L;if(u=T.domElement,h&&u&&!u.hasAttribute("data-theme")){let N=(L=h.closest("[data-theme]"))==null?void 0:L.getAttribute("data-theme");N&&u.setAttribute("data-theme",N)}},_portal:T=>{let L=T.domElement.querySelector("#domphy-floating");if(!L){let N={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};L=T.children.insert(N).domElement}return L}},f=T=>z(T,S);f(i);let y=()=>{m||(m=!0,d=p.children.insert(i))},v=()=>{y(),h&&u&&(s==null||s(),s=Tr(h,u,()=>{Pr(h,u,{placement:o.get(),middleware:[Mr(12),Dr(),Or()],strategy:"fixed"}).then(({x:T,y:L,placement:N})=>{u&&(Object.assign(u.style,{left:`${T}px`,top:`${L}px`}),o.set(N))})}),r.set(!0))},k=()=>{s==null||s(),s=null,d&&(d.remove(),d=null),u=null,m=!1,r.set(!1)},E=()=>{a&&clearTimeout(a),a=setTimeout(v,100)},w=()=>{a&&clearTimeout(a),a=setTimeout(k,100)},O=T=>{if(!r.get()||!h||!u)return;let L=T.target;!h.contains(L)&&!u.contains(L)&&w()};return(D=p.domElement)==null||D.addEventListener("click",O),{show:E,hide:w,update(T){r=T.openState,o=T.placement,i=T.content,n=T.keepOpenOnContentHover,f(i),d&&d.patch(i)},destroy(){var T;a&&clearTimeout(a),s==null||s(),d==null||d.remove(),(T=p.domElement)==null||T.removeEventListener("click",O)}}}function ae(e){let{kind:t,open:r=!1,placement:o}=e,i=g(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)},Nt(n,la,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:u}}var sa='<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 Ze(e={}){var o;let{removable:t=!1}=e,r=g((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let n={span:sa,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=>_(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 ca(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=g(e.value),s=g(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"combobox",open:s,placement:g(r),content:e.content}),h={onClick:(v,k)=>!n&&d(k),dataTone:"shift-14",style:{backgroundColor:v=>l(v,"inherit"),borderRadius:v=>c(b(v)*2),outline:v=>`1px solid ${l(v,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:v=>x(v,"inherit"),color:v=>l(v,"text",o),backgroundColor:v=>l(v,"inherit",o)},S;if(e.input){let v={onFocus:(k,E)=>u(E),style:p,_key:"combobox-input"};z(e.input,v),S=e.input}else S={input:null,onFocus:(v,k)=>u(k),value:v=>(a.get(v),""),style:p,_key:"combobox-input"};let f={div:v=>{let k=a.get(v),E=Array.isArray(k)?k:[k],O=t.filter(D=>E.includes(D.value)).map(D=>({span:D.label,$:[Ze({color:o,removable:!0})],_key:D.value,_onRemove:T=>{let L=a.get(),H=(Array.isArray(L)?L:[L]).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)}},y={_onInsert:v=>{v.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:v=>v.children.insert(f),style:{minWidth:c(32),outlineOffset:"-1px",outline:v=>`1px solid ${l(v,"border-strong","neutral")}`,paddingBlock:v=>c(b(v)*1),paddingInline:v=>c(b(v)*1),borderRadius:v=>c(b(v)*1.5),fontSize:v=>x(v,"inherit"),color:v=>l(v,"text",o),backgroundColor:v=>l(v,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:v=>_(v,o)}}};return z(m,y),m}function ma(){return{_onSchedule:(e,t)=>{z(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function ua(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(b(o)*3),paddingBlock:o=>c(b(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=>_(o,r)}}}}function ha(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{role:"option",_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+b(o)*2),paddingInline:o=>c(b(o)*3),border:"none",outline:"none",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:o=>l(o,"hover",t)},"&:focus-visible":{boxShadow:o=>_(o,r)}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),Me=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),ao=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Xe=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),lo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,so=(e,t)=>Me(e,-((e.getDay()-t+7)%7));function da(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 fa(e={}){var fo,po,go,yo;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=(fo=e.weekStartsOn)!=null?fo:da(a),m=g((po=e.accentColor)!=null?po:"primary","accentColor"),h=g((go=e.placement)!=null?go:"bottom-start"),p=g((yo=e.value)!=null?yo:t==="range"?[null,null]:null),S=u?p.addListener(C=>u(C)):null,f=(()=>{let C=p.get(),M=t==="range"?C==null?void 0:C[0]:C;return M instanceof Date?M:new Date})(),y=g(f.getFullYear(),"viewYear"),v=g(f.getMonth(),"viewMonth"),k=g(F(f),"focused"),E=g(null,"hovered"),w=g(f.getHours(),"hour"),O=g(f.getMinutes(),"minute"),D=null,T=new Intl.DateTimeFormat(a,A({dateStyle:"medium"},r?{timeStyle:"short"}:{})),L=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),N=new Intl.DateTimeFormat(a,{weekday:"short"}),H=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=C=>C?T.format(C):"",ye=C=>{if(s)return s(C);if(t==="range"){let[M,P]=C!=null?C:[null,null];return M?`${j(M)} \u2013 ${j(P)}`:""}return j(C)},Oe=Array.from({length:7},(C,M)=>N.format(new Date(2023,0,1+(M+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 M=F(C);return M.setHours(w.get(),O.get(),0,0),M},se=C=>{var R;if(ue(C))return;if(t==="single"){p.set(W(C)),r||Et();return}let[M,P]=(R=p.get())!=null?R:[null,null];!M||M&&P?p.set([W(C),null]):F(C)<F(M)?(p.set([W(C),W(M)]),r||Et()):(p.set([M,W(C)]),r||Et())},ce=()=>{var C;if(r)if(t==="single"){let M=p.get();M&&p.set(W(M))}else{let[M,P]=(C=p.get())!=null?C:[null,null];p.set([M&&W(M),P&&W(P)])}},Ne=(C,M)=>{var De;if(t!=="range")return!1;let[P,R]=(De=p.get(M))!=null?De:[null,null],V=R!=null?R:E.get(M);if(!P||!V)return!1;let I=F(P)<=F(V)?P:V,G=F(P)<=F(V)?V:P,K=F(C);return K>=F(I)&&K<=F(G)},be=(C,M)=>{let P=p.get(M);if(t==="range"){let[R,V]=P!=null?P:[null,null];return Xe(C,R)||Xe(C,V)}return Xe(C,P)},q=C=>{y.set(C.getFullYear()),v.set(C.getMonth())},Z=C=>{let M=ao(new Date(y.get(),v.get(),1),C);q(M)},X=C=>y.set(y.get()+C),He=()=>{setTimeout(()=>{var C;(C=D==null?void 0:D.querySelector(`[data-date="${lo(k.get())}"]`))==null||C.focus()},0)},Nr=Ur(),{show:Hr,hide:jr,anchorPartial:Ct}=ae({kind:"datePicker",open:!1,placement:h,content:Nr});function Et(){jr()}Ct.onClick=()=>{};let Fr={type:"text",readonly:!0,value:C=>ye(p.get(C)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(C,M)=>{_t(M)},onFocus:(C,M)=>{_t(M)},onKeyDown:(C,M)=>{let P=C.key;(P==="ArrowDown"||P==="Enter")&&(C.preventDefault(),_t(M))},_onMount:C=>S&&C.addHook("Remove",()=>{S()})};function _t(C){var P;let M=(P=Wr())!=null?P:new Date;k.set(F(M)),q(M),Hr(C),He()}function Wr(){var M;let C=p.get();return t==="range"?(M=C==null?void 0:C[0])!=null?M:null:C!=null?C:null}return z(Ct,Fr),Ct;function Ur(){let C=(I,G,K)=>({button:I,type:"button",ariaLabel:G,onClick:K,style:pa()}),M={div:[C("\xAB","Previous year",()=>X(-1)),C("\u2039","Previous month",()=>Z(-1)),{div:I=>L.format(new Date(y.get(I),v.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)}},P={div:Oe.map((I,G)=>({div:I,style:{textAlign:"center",fontSize:K=>x(K,"decrease-1"),fontWeight:"bold",color:K=>l(K,"shift-7"),paddingBlock:c(1)},_key:G})),role:"row",style:Lr()},R={div:I=>qr(I),role:"grid",ariaLabel:"Calendar",onKeyDown:Zr,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},V=[M,P,R];return r&&V.push(Yr()),V.push(Gr()),{div:V,role:"dialog",ariaModal:"false",_onMount:I=>{D=I.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:I=>c(b(I)*2),backgroundColor:I=>l(I,"base"),color:I=>l(I,"shift-10"),border:I=>`1px solid ${l(I,"border-strong")}`,boxShadow:$("medium")}}}function qr(C){let M=new Date(y.get(C),v.get(C),1),P=v.get(C),R=so(M,d),V=[];for(let I=0;I<6;I++){let G=[];for(let K=0;K<7;K++){let De=Me(R,I*7+K);G.push(Kr(De,P,C))}V.push({div:G,role:"row",style:Lr(),_key:I})}return V}function Kr(C,M,P){let R=ue(C),V=be(C,P),I=Ne(C,P),G=C.getMonth()!==M,K=Xe(C,k.get(P)),De=Xe(C,new Date);return{button:String(C.getDate()),type:"button",role:"gridcell",tabIndex:K?0:-1,ariaSelected:V,ariaDisabled:R,disabled:R,ariaLabel:H.format(C),dataDate:lo(C),onClick:()=>se(C),onMouseEnter:()=>t==="range"&&E.set(C),style:{appearance:"none",border:"none",cursor:R?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:B=>x(B),fontFamily:"inherit",opacity:R?.35:G?.5:1,backgroundColor:B=>V?l(B,"shift-7",m.get(B)):I?l(B,"hover",m.get(B)):"transparent",color:B=>V?l(B,"shift-0",m.get(B)):l(B,"text"),outline:De?B=>`1px solid ${l(B,"shift-6",m.get(B))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:B=>V?l(B,"shift-7",m.get(B)):l(B,"shift-3",m.get(B))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:B=>_(B,m.get(B))}},_key:lo(C)}}function Yr(){let C=(M,P,R)=>({select:Array.from({length:M},(V,I)=>({option:String(I).padStart(2,"0"),value:String(I),selected:G=>P.get(G)===I,_key:I})),ariaLabel:R,onChange:V=>{P.set(Number(V.target.value)),ce()},style:ga()});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 Gr(){let C=(M,P)=>({button:M,type:"button",onClick:P,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 M=new Date;k.set(F(M)),q(M),He()}),C("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:M=>`1px solid ${l(M,"border")}`}}}function Zr(C){let M=C,P=k.get(),R=null;switch(M.key){case"ArrowLeft":R=Me(P,-1);break;case"ArrowRight":R=Me(P,1);break;case"ArrowUp":R=Me(P,-7);break;case"ArrowDown":R=Me(P,7);break;case"Home":R=so(P,d);break;case"End":R=Me(so(P,d),6);break;case"PageUp":R=ao(P,M.shiftKey?-12:-1);break;case"PageDown":R=ao(P,M.shiftKey?12:1);break;case"Enter":case" ":M.preventDefault(),se(P);return;default:return}M.preventDefault(),k.set(R),q(R),He()}}function Lr(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function pa(){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 ga(){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 ya(e={}){var r;let t=g((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 ba(e={}){var i,n;let{duration:t=240}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((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(b(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(b(a)*2),boxShadow:a=>_(a,o.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(b(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(b(a)*1),paddingBottom:a=>c(b(a)*3)}}}}var Je=0;function wt(){Je++,Je===1&&(document.body.style.overflow="hidden")}function Be(){Je=Math.max(0,Je-1),Je===0&&(document.body.style.overflow="")}var Rr='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function va(e={}){let{color:t="neutral",open:r=!1}=e,o=g(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&&(Be(),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=y=>{if(y.key!=="Tab")return;let v=Array.from(d.querySelectorAll(Rr)).filter(w=>!w.closest("[aria-hidden='true']")&&w.offsetParent!==null);if(!v.length){y.preventDefault();return}let k=v[0],E=v[v.length-1];y.shiftKey?(document.activeElement===k||document.activeElement===d)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),k.focus())},p=y=>{y.preventDefault(),o.set(!1)};d.addEventListener("cancel",p);let S=y=>{y?(i=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(wt(),a=!0),d.addEventListener("keydown",h),requestAnimationFrame(()=>{d.style.opacity="1";let v=d.querySelector(Rr);v==null||v.focus()})):(n=!0,d.style.opacity="0",d.removeEventListener("keydown",h),m=setTimeout(()=>{m=null,n&&s(d)},350))};S(o.get());let f=o.addListener(S);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),f(),d.removeEventListener("cancel",p),a&&(Be(),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(b(u)*2),padding:u=>c(b(u)*3),boxShadow:$("high"),"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function Sa(e={}){var r;let t=g((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 co={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Ir={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Qe=e=>e==="left"||e==="right";function $r(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function xa(e={}){let{color:t="neutral",open:r=!1,placement:o="end",size:i}=e,n=g(r),a=o==="start"||o==="end",s=$r(o,!1),u=Qe(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 p=T=>{T.preventDefault(),n.set(!1)};h.addEventListener("cancel",p);let S=a&&(h.ownerDocument.documentElement.dir==="rtl"||h.ownerDocument.dir==="rtl"),f=$r(o,S);a&&(h.style.transform=co[f],h.style.margin=Ir[f],h.style.width=Qe(f)?d:"100dvw",h.style.height=Qe(f)?"100dvh":d);let y=!1,v=!1,k=null,E=()=>{k=null,y&&(y=!1,typeof h.close=="function"&&h.close(),h.style.visibility="hidden",h.style.pointerEvents="none",v&&(Be(),v=!1))},w=T=>{T.target===h&&T.propertyName==="transform"&&E()};h.addEventListener("transitionend",w);let O=T=>{T?(y=!1,h.style.visibility="visible",h.style.pointerEvents="auto",typeof h.showModal=="function"&&h.showModal(),v||(wt(),v=!0),requestAnimationFrame(()=>{h.style.transform="translate(0, 0)"})):(y=!0,h.style.transform=co[f],k=setTimeout(E,350))};O(n.get());let D=n.addListener(O);m.addHook("Remove",()=>{k&&(clearTimeout(k),k=null),D(),h.removeEventListener("cancel",p),h.removeEventListener("transitionend",w),v&&(Be(),v=!1)})},style:{transform:co[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(b(m)*3),margin:Ir[s],width:Qe(s)?d:"100dvw",height:Qe(s)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:$("high"),"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function wa(e={}){var r;let t=g((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 ka(e={}){var r;let t=g((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 Ca(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 Ea={small:8,medium:10,large:14};function _a(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),r=c(Ea[(i=e.size)!=null?i:"medium"]);return{_onInsert:n=>{n.tagName!=="button"&&console.warn('"fab" patch must use button tag')},dataTone:"shift-17",_doctorDisable:["low-contrast","color-shift-minimum"],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,"inherit",t.get(n)),color:n=>l(n,"shift-17",t.get(n)),boxShadow:$("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:n=>l(n,"decrease-1",t.get(n)),boxShadow:$("medium")},"&:active:not([disabled])":{backgroundColor:n=>l(n,"decrease-2",t.get(n)),boxShadow:$("low")},"&:focus-visible":{boxShadow:n=>`${$("medium")}, ${_(n,t.get(n))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function Ta(e={}){var r;let t=g((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 Ma(e={}){var i;let{layout:t="horizontal"}=e,r=g((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(b(n)*3),paddingBlock:n=>c(b(n)*3),border:"none",borderRadius:n=>c(b(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(b(n)*1),borderRadius:n=>c(b(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(b(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 Oa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Da(e={}){var r;let t=g((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=Oa[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function Pa(e={}){var r;let t=g((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 La(e={}){var r;let t=g((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 Ra(e={}){var r;let t=g((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 Ia(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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=>_(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function $a(e={}){var r;let t=g((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(b(o)*1),paddingInline:o=>c(b(o)*1),blockSize:o=>c(6+b(o)*2),inlineSize:o=>c(6+b(o)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:o=>c(b(o)*1.5),"&:focus-visible":{boxShadow:o=>_(o,t.get(o))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>c(b(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 za(e={}){var i,n;let{mode:t="datetime-local"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((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(b(a)*1.5),paddingInline:a=>c(b(a)*3),height:a=>c(6+b(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=>_(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 Aa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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(b(n)*1.5),height:n=>c(6+b(n)*2),paddingInline:n=>c(b(n)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:n=>c(b(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=>_(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 Va(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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(b(n)*3),paddingInlineEnd:n=>c(b(n)*1.5),paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(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=>_(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 Ba(){return{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 p,S,f;a.preventDefault();let s=(S=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?S:"",u=r(),d=u.indexOf(a.target),m=d===-1?0:d;[...s].forEach((y,v)=>{u[m+v]&&(u[m+v].value=y)});let h=Math.min(m+s.length-1,u.length-1);(f=u[h])==null||f.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 Na='<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>',Ha='<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 ja(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=g((n=e.accentColor)!=null?n:"primary","accentColor"),o=g(!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",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:d=>o.get(d)?Ha:Na,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(b(a)*1),paddingBlock:a=>c(b(a)*1),paddingInline:a=>c(b(a)*3),borderRadius:a=>c(b(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=>_(a,r.get(a))}}}}function Fa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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=>_(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Wa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Ua(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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(b(n)*1.5),minWidth:c(32),paddingInline:n=>c(b(n)*3),paddingBlock:n=>c(b(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=>_(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 qa(e={}){var r;let t=g((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=>_(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 Ka(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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(b(n)*3),paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(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=>_(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 Ya(e={}){var r;let t=g((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 Ga(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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 Za(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),r=g((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,"text",t.get(n)),textDecoration:"none","&:visited":{color:n=>l(n,"text",r.get(n))},"&:hover:not([disabled])":{color:n=>l(n,"shift-10",t.get(n)),textDecoration:"underline"},borderRadius:c(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral")}}}}var Xa={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},Ja={small:.5,medium:1,large:1.5};function Qa(e={}){var s,u,d;let t=(s=e.variant)!=null?s:"outline",r=g((u=e.color)!=null?u:t==="ghost"?"neutral":"primary","color"),o=(d=e.size)!=null?d:"medium",i=$e[o];if(t==="ghost"){let m=Ja[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(b(h)*m),paddingInline:h=>c(b(h)*m),borderRadius:h=>c(b(h)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:h=>c(b(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=>_(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=Xa[o];return te(A({_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},n?{dataTone:"shift-17",_doctorDisable:["low-contrast","color-shift-minimum"]}:{}),{style:{fontSize:m=>x(m,i),textDecoration:"none",paddingBlock:m=>c(b(m)*a.block),paddingInline:m=>c(b(m)*a.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(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-17",r.get(m)):l(m,"text",r.get(m)),backgroundColor: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-17",r.get(m)):l(m,"shift-10",r.get(m)),backgroundColor:m=>n?l(m,"decrease-1",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([aria-disabled=true])":{backgroundColor:m=>n?l(m,"decrease-2",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>_(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 el(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function tl(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:r=>c(b(r)*2),paddingBlock:r=>c(t?1:b(r)*2),paddingInline:r=>c(b(r)*3),fontSize:r=>x(r,"inherit"),color:r=>l(r,"text")}}}function ol(e={}){var i,n;let t=g((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(b(a)*2),paddingBlock:a=>c(o?1:b(a)*2),paddingInline:a=>c(b(a)*3),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),borderRadius:a=>c(b(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=>_(a,r)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function rl(e={}){var r;let t=g((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 nl(e={items:[]}){var a;let{items:t=[],selectable:r=!0,color:o="neutral",accentColor:i="primary"}=e,n=g((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,u)=>{if(t.length===0)return;let d=s.nodeId,m=t.map((h,p)=>{var f;let S=(f=h.key)!=null?f:p;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:y=>n.get(y)===S||void 0}:{}),{onClick:()=>{var y;r&&n.set(S),(y=h.onClick)==null||y.call(h)},onKeyDown:y=>{var O;let v=y.key;if(v==="Enter"||v===" "){y.preventDefault(),y.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(v))return;y.preventDefault();let k=t.map((D,T)=>{var L;return(L=D.key)!=null?L:T}),E=k.indexOf(S),w=E;v==="ArrowDown"?w=(E+1)%k.length:v==="ArrowUp"?w=(E-1+k.length)%k.length:v==="Home"?w=0:v==="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:y=>x(y,"inherit"),height:y=>c(6+b(y)*2),paddingInline:y=>c(b(y)*3),border:"none",outline:"none",color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-10")},"&:focus-visible":{boxShadow:y=>_(y,i)}}})});u[s.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),color:s=>l(s,"text",o),borderRadius:s=>c(b(s)*2),outline:s=>`1px solid ${l(s,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:$("medium")}}}var mo=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 zr(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}function il(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 p=mo(r)?r.get():r;if(zr()){if(p?Object.assign(h.style,le(p)):t&&Object.assign(h.style,le(t)),mo(r)){let S=r.addListener(f=>{Object.assign(h.style,le(f))});m.setMetadata("motionRelease",S)}return}if(p?h.animate(t?[le(t),le(p)]:[le(p)],n):t&&Object.assign(h.style,le(t)),mo(r)){let S=r.addListener(f=>{h.animate([le(f)],n)});m.setMetadata("motionRelease",S)}},_onBeforeRemove:(m,h)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return h();if(zr())return Object.assign(p.style,le(o)),h();p.animate([le(o)],n).finished.then(h,h)},_onRemove:m=>{let h=m.getMetadata("motionRelease");h==null||h()}}}function al(e={}){var r;let t=g((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 ll(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 sl(e){var s;let{total:t,color:r="neutral",accentColor:o="primary"}=e,i=g((s=e.value)!=null?s:1),n={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+b(u)*2),height:u=>c(6+b(u)*2),paddingInline:u=>c(b(u)*2),borderRadius:u=>c(b(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"text",r),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:u=>l(u,"hover",r)},"&:focus-visible":{boxShadow:u=>_(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=te(A({},n),{backgroundColor:u=>l(u,"shift-6",o),color:u=>l(u,"shift-11",o),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-6",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),p=[];p.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 f of ll(h,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${S++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>c(b(y)*2),color:y=>l(y,"shift-7",r)}});else{let y=f===h;p.push({button:String(f),_key:`page-${f}`,type:"button",ariaLabel:`Page ${f}`,ariaCurrent:y?"page":void 0,disabled:y,onClick:()=>i.set(f),style:y?a:n})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:h>=t,onClick:()=>h<t&&i.set(h+1),style:n}),p},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(d)},style:{display:"inline-flex"}}}function cl(e={}){var i;let{padding:t=4,divider:r=!1}=e,o=g((i=e.color)!=null?i:"neutral","color");return{style:A({padding:n=>c(b(n)*t)},r?{borderBottom:n=>`1px solid ${l(n,"border",o.get(n))}`}:{})}}function ml(e={}){var r;let t=g((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 ul(e){var p;let{open:t=!1,placement:r="bottom",openOn:o="click"}=e,i=null,n=g(t),a=g(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(b(S)*2),outline:S=>`1px solid ${l(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")},_onInsert:S=>{let f=S.attributes.get("id");i=f||S.nodeId,!f&&S.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),z(d,{ariaHaspopup:"dialog",ariaExpanded:S=>n.get(S),onMouseEnter:(S,f)=>o==="hover"&&s(f),onMouseLeave:(S,f)=>o==="hover"&&u(f),onClick:(S,f)=>{o==="click"&&(n.get()?u(f):s(f))},onKeyDown:(S,f)=>{S.key==="Escape"&&n.get()&&u(f)},onFocus:(S,f)=>o==="hover"&&s(f),onBlur:(S,f)=>{let y=S.relatedTarget,v=f.getRoot().domElement,k=i?v.querySelector(`#${CSS.escape(i)}`):null;y&&(k!=null&&k.contains(y))||u(f)},_onMount:S=>i&&S.attributes.set("ariaControls",i)}),d}function uo(e={}){let{placement:t="bottom-end",color:r="neutral",sideOffset:o=c(6),bordered:i=!0}=e,n=g(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,"inherit",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),p=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(${p},${S}) rotate(45deg)`}}}}}function hl(e={}){var r;let t=g((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(b(o)*2),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*2)}}}function dl(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((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 fl='<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>',pl='<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 gl(e={}){var u,d;let{max:t=5,readOnly:r=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",n=g((d=e.value)!=null?d:0),a=g(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 p=h,S=r?{}:{onClick:()=>{let y=p===n.get()?0:p;n.set(y),o==null||o(y),a.set(0)},onMouseEnter:()=>a.set(p),onMouseLeave:()=>a.set(0),onKeyDown:y=>{var w,O;let v=n.get(),k=v;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(t,v+1),y.preventDefault();else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(0,v-1),y.preventDefault();else return;n.set(k),o==null||o(k);let E=k>0?k-1:0;(O=(w=m.domElement)==null?void 0:w.children[E])==null||O.focus()}},f=te(A({button:y=>p<=s(y)?fl:pl,_key:p,type:"button",ariaLabel:`${p} star${p>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:y=>_(y,i)}}});m.children.insert(f)}}}}function yl(e={}){var u,d,m;let{size:t=16,thickness:r=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((d=e.color)!=null?d:"primary","color"),n=g((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 ho(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(b(n)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function bl(e={}){var r;let t=g((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 vl(e={items:[]}){var n,a,s;let{items:t=[],color:r="neutral",accentColor:o="primary"}=e,i=g((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,p)=>{var y;let S=(y=h.key)!=null?y:String(p);return{button:[typeof h.label=="string"?{span:h.label}:h.label],_key:S,type:"button",role:"radio",ariaChecked:v=>i.get(v)===S,onClick:()=>i.set(S),style:{cursor:"pointer",fontSize:v=>x(v,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:v=>l(v,"text",r),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:v=>l(v,"shift-3",r)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:v=>l(v,"increase-2",r)},"&[aria-checked=true]":{backgroundColor:v=>l(v,"shift-0",o),color:v=>l(v,"shift-10",o),boxShadow:$("low")},"&:focus-visible":{boxShadow:v=>_(v,o)},"&[aria-checked=true]:focus-visible":{boxShadow:v=>`${$("low")}, ${_(v,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 Sl(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(b(o)*1.5),paddingBlock:o=>c(b(o)*1),paddingLeft:o=>c(b(o)*3),paddingRight:o=>c(b(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="${Xt(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+b(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${l(o,"shift-5",r)}`},"&:focus-visible":{boxShadow:o=>_(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 xl(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=g(e.value),s=g(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"selectBox",open:s,placement:g(r),content:e.content}),h={onClick:(f,y)=>!n&&d(y),dataTone:"shift-14",style:{backgroundColor:f=>l(f,"inherit"),borderRadius:f=>c(b(f)*2),outline:f=>`1px solid ${l(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let p={div:f=>{let y=a.get(f),v=Array.isArray(y)?y:[y];return t.filter(E=>v.includes(E.value)).map(E=>({span:E.label,$:[Ze({color:o,removable:n})],_key:E.value,_onRemove:w=>{let O=a.get(),T=(Array.isArray(O)?O:[O]).filter(L=>L!==E.value);n?a.set(T):a.set(T[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},S={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>s.get()?d(y):u(y),tabindex:0,style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>c(6+b(f)*2),minWidth:c(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"border-strong","neutral")}`,paddingInline:f=>c(b(f)*2),borderRadius:f=>c(b(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=>_(f,o)}}};return z(m,S),m}function wl(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+b(n)*2),paddingInline:n=>c(b(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=>_(n,t)}}}}function kl(e={}){var a;let{color:t="neutral",multiple:r=!1}=e,o=g((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,name:e.name,value:m==null?"":String(m)}))},hidden:!0};return{dataTone:"shift-17",_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(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",t),color:s=>l(s,"text",t)}}}function Cl(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),r={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},o=Re(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",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-4",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 El(e={}){var r;let t=g((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 Vr={to:{transform:"rotate(360deg)"}},Ar=Re(JSON.stringify(Vr));function _l(e={}){var r;let t=g((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:`${Ar} 0.7s linear infinite`,[`@keyframes ${Ar}`]:Vr}}}function Tl(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:g(r),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function Ml(){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 Ol(){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=p=>{let S=d.getBoundingClientRect(),f=o?(p.clientX-S.left)/S.width*100:(p.clientY-S.top)/S.height*100;t.size.set(Math.min(Math.max(f,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,"primary")},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>l(e,"shift-4")}}}}function Dl(e={}){let{gap:t=3,align:r}=e;return{style:A({display:"flex",flexDirection:"column",gap:o=>c(b(o)*t)},r?{alignItems:r}:{})}}function Pl(e={items:[]}){var a;let{items:t=[],direction:r="horizontal",color:o="neutral",accentColor:i="primary"}=e,n=g((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:f=>{let y=n.get(f);return h<y?"done":h===y?"active":"pending"},ariaCurrent:f=>n.get(f)===h?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:f=>x(f,"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:f=>x(f,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:f=>`2px solid ${l(f,"border-strong",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"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:f=>l(f,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:f=>l(f,"shift-9",i),borderColor:f=>l(f,"shift-9",i),color:f=>l(f,"shift-0",i),boxShadow:f=>`0 0 0 3px ${l(f,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:f=>l(f,"shift-9",i),borderColor:f=>l(f,"shift-9",i),color:f=>l(f,"shift-0",i)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-9",i)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-9",i)},"&[data-status=pending]":{color:f=>l(f,"muted")},"&[data-status=active]":{color:f=>l(f,"shift-11",i),fontWeight:"bold"},"&[data-status=done]":{color:f=>l(f,"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 Ll(e={}){var r;let t=g((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 Rl(e={}){var r;let t=g((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 Il(e={}){var r;let t=g((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 $l(e={}){var r;let t=g((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(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(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(b(o)*3),paddingBlock:o=>c(b(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 zl(e={items:[]}){var n,a,s;let{items:t=[],accentColor:r="primary",color:o="neutral"}=e,i=g((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,p={div:t.map((f,y)=>{var E;let v=(E=f.key)!=null?E:y;return{button:[typeof f.label=="string"?{span:f.label}:f.label],_key:v,type:"button",role:"tab",id:`tab${m}${v}`,ariaControls:`panel${m}${v}`,ariaSelected:w=>i.get(w)===v,onClick:()=>i.set(v),onKeyDown:w=>{let O=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;w.preventDefault();let D=t.map((N,H)=>{var j;return(j=N.key)!=null?j:H}),T=D.indexOf(v),L=T;O==="ArrowRight"?L=(T+1)%D.length:O==="ArrowLeft"?L=(T-1+D.length)%D.length:O==="Home"?L=0:O==="End"&&(L=D.length-1),i.set(D[L])},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+b(w)*2),paddingInline:w=>c(b(w)*4),border:"none",outline:"none",color:w=>l(w,"text"),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])":{boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{color:w=>l(w,"shift-12",r),boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-6",r)}`},"&:focus-visible":{boxShadow:w=>_(w,r)},"&[aria-selected=true]:focus-visible":{boxShadow:w=>`${_(w,r)}, inset 0 -${c(.5)} 0 0 ${l(w,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},S=t.map((f,y)=>{var k;let v=(k=f.key)!=null?k:y;return{div:[f.content],_key:v,role:"tabpanel",id:`panel${m}${v}`,ariaLabelledby:`tab${m}${v}`,hidden:E=>i.get(E)!==v,style:{paddingBlock:E=>c(b(E)*2),paddingInline:E=>c(b(E)*2)}}});d[u.tagName]=[p,...S]}}}function Al(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=g((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(b(a)*2),paddingBlock:a=>c(b(a)*1.5),border:"none",borderRadius:a=>c(b(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=>_(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 Vl(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Bl(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=g((s=e.active)!=null?s:!1);return{style:A({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(b(u)*2),paddingBottom:u=>t?"0":c(b(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(b(u)*4)}`,width:"2px",backgroundColor:u=>l(u,"shift-3",r)}})}}function Nl(e={}){let{position:t="top-center",color:r="neutral"}=e,o=g(!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(b(u)*2),paddingInline:u=>c(b(u)*4),borderRadius:u=>c(b(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,p=()=>{m||(m=!0,h&&(clearTimeout(h),h=null),u.domElement.removeEventListener("transitionend",S),d())},S=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",S),h=setTimeout(p,350),u.addHook("Remove",()=>{var f;h&&(clearTimeout(h),h=null),(f=u.domElement)==null||f.removeEventListener("transitionend",S)}),o.set(!1)}}}function Hl(e={items:[]}){var a;let{items:t=[],multiple:r=!1,color:o="neutral",accentColor:i="primary"}=e,n=g((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 f;let p=(f=m.key)!=null?f:String(h);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:p,type:"button",role:"button",ariaPressed:y=>{let v=n.get(y);return Array.isArray(v)?v.includes(p):v===p},onClick:()=>{let y=n.get();if(r){let v=Array.isArray(y)?[...y]:[];n.set(v.includes(p)?v.filter(k=>k!==p):[...v,p])}else n.set(y===p?"":p)},style:{cursor:"pointer",fontSize:y=>x(y,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{backgroundColor:y=>l(y,"hover",o)},"&:active:not([disabled])":{backgroundColor:y=>l(y,"increase-2",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-12",i)},"&:focus-visible":{boxShadow:y=>_(y,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 jl(e={}){return ho({gap:e.gap})}function Fl(){return{div:null,style:{flex:"1 1 0"}}}function Wl(e={}){let{open:t=!1,placement:r="top",content:o="Tooltip Content"}=e,i=g(r),n=g(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(b(S)*1),paddingInline:S=>c(b(S)*3),borderRadius:S=>c(b(S)*1.5),color:S=>l(S,"text"),backgroundColor:S=>l(S),fontSize:S=>x(S,"inherit"),boxShadow:$("low")},$:[uo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(h),z(m,{ariaDescribedby:a,onMouseEnter:(S,f)=>u(f),onMouseLeave:(S,f)=>d(f),onFocus:(S,f)=>u(f),onBlur:(S,f)=>d(f),onKeyDown:(S,f)=>S.key==="Escape"&&d(f)}),m}function Br(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function Ul(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(Br(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=Br(u,d),p=o.get(h);if(!p)return;let S=m.getBoundingClientRect(),f=p.left-S.left,y=p.top-S.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(D=i.get(m))==null||D(),m.style.transition="none",m.style.transform=`translate(${f}px, ${y}px)`,m.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),m.style.transition=`transform ${t}ms ease ${r}ms`,m.style.transform="translate(0px, 0px)"});a.add(v);let k=!1,E=null,w=()=>{k||(k=!0,E&&(n.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O),m.style.transition="",m.style.transform="")},O=T=>{T.propertyName==="transform"&&w()};i.set(m,()=>{k=!0,E&&(clearTimeout(E),n.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O)}),m.addEventListener("transitionend",O),E=setTimeout(w,t+r+34),n.add(E)}),o.clear()}}}function ql(e={}){var r;let t=g((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 rn(Kl);})();
6
6
  //# sourceMappingURL=core-theme-ui.global.js.map