@antadesign/anta 0.3.32 → 0.3.34

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.
Files changed (67) hide show
  1. package/dist/avatar-core.d.ts +7 -2
  2. package/dist/bundle.css +1 -1
  3. package/dist/bundle.js +48 -58
  4. package/dist/components/Breadcrumbs.d.ts +0 -1
  5. package/dist/components/Breadcrumbs.js +0 -1
  6. package/dist/components/Button.d.ts +2 -3
  7. package/dist/components/Input.d.ts +9 -3
  8. package/dist/components/Input.js +2 -0
  9. package/dist/components/InputDate.d.ts +0 -1
  10. package/dist/components/InputDate.js +0 -1
  11. package/dist/components/Select.d.ts +0 -1
  12. package/dist/components/Select.js +0 -1
  13. package/dist/components/SelectFaceted.d.ts +0 -1
  14. package/dist/components/SelectFaceted.js +0 -1
  15. package/dist/components/Slider.d.ts +22 -10
  16. package/dist/components/Slider.js +9 -5
  17. package/dist/components/Steps.d.ts +0 -1
  18. package/dist/components/Steps.js +0 -1
  19. package/dist/components/Tabs.js +2 -1
  20. package/dist/components/Title.d.ts +3 -1
  21. package/dist/elements/a-avatar.css +1 -1
  22. package/dist/elements/a-avatar.js +2 -28
  23. package/dist/elements/a-breadcrumbs.d.ts +1 -0
  24. package/dist/elements/a-breadcrumbs.js +1 -0
  25. package/dist/elements/a-button.css +1 -1
  26. package/dist/elements/a-button.d.ts +8 -6
  27. package/dist/elements/a-button.js +2 -4
  28. package/dist/elements/a-dialog.js +3 -1
  29. package/dist/elements/a-input-date.d.ts +1 -0
  30. package/dist/elements/a-input-date.js +1 -0
  31. package/dist/elements/a-input-time.js +1 -2
  32. package/dist/elements/a-input.css +1 -1
  33. package/dist/elements/a-input.js +13 -10
  34. package/dist/elements/a-menu.d.ts +1 -1
  35. package/dist/elements/a-menu.js +17 -4
  36. package/dist/elements/a-select-faceted.d.ts +1 -0
  37. package/dist/elements/a-select-faceted.js +1 -0
  38. package/dist/elements/a-select.d.ts +1 -0
  39. package/dist/elements/a-select.js +1 -0
  40. package/dist/elements/a-slider.d.ts +7 -5
  41. package/dist/elements/a-slider.js +256 -59
  42. package/dist/elements/a-steps.d.ts +1 -0
  43. package/dist/elements/a-steps.js +1 -0
  44. package/dist/elements/a-tabpanel.d.ts +2 -2
  45. package/dist/elements/a-tabpanel.js +13 -3
  46. package/dist/elements/a-tag.d.ts +1 -0
  47. package/dist/elements/a-tag.js +1 -0
  48. package/dist/elements/a-title.d.ts +1 -0
  49. package/dist/elements/a-title.js +1 -0
  50. package/dist/elements/index.d.ts +7 -1
  51. package/dist/elements/index.js +4 -0
  52. package/dist/general_types.d.ts +9 -4
  53. package/dist/index.d.ts +1 -1
  54. package/dist/theme-antithesis.css +1 -1
  55. package/dist/theme-antune.css +1 -1
  56. package/docs/changelog.md +61 -0
  57. package/docs/components/breadcrumbs.md +9 -6
  58. package/docs/components/button.md +9 -6
  59. package/docs/components/input.md +29 -9
  60. package/docs/components/panel.md +3 -2
  61. package/docs/components/select-faceted.md +19 -19
  62. package/docs/components/slider.md +139 -4
  63. package/docs/components/steps.md +4 -2
  64. package/docs/install-config.md +295 -87
  65. package/docs/packages/plot.md +222 -20
  66. package/docs/theming.md +22 -13
  67. package/package.json +7 -4
package/dist/bundle.js CHANGED
@@ -1,24 +1,4 @@
1
- import mn from"react";var sa=mn.createElement,he=mn.Fragment,$d=mn.useState,Gd=mn.useId,Kd=mn.useMemo,yv=mn.useRef,wv=mn.useLayoutEffect,Xd=mn.useSyncExternalStore;function kv(t,e,n){sa=t,e!==void 0&&(he=e),n?.useState&&($d=n.useState),n?.useId&&(Gd=n.useId),n?.useMemo&&(Kd=n.useMemo),n?.useRef&&(yv=n.useRef),n?.useLayoutEffect&&(wv=n.useLayoutEffect),n?.useSyncExternalStore&&(Xd=n.useSyncExternalStore)}function W(t){return $d(t)}function Ts(){return Gd()}function Ze(t,e){return Kd(t,e)}function Jd(t,e,n){return Xd(t,e,n)}function h(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,r):sa(t,o)}function S(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,...r):sa(t,o)}function Qd(t){return Array.isArray(t)?t.length>0:t!=null}function dt(t,e=!1){let n={};for(let[r,a]of Object.entries(t))(r==="className"||r==="style"||r.startsWith("data-")&&(!e||!r.startsWith("data-menu-")&&r!=="data-anta-menu-item"))&&(n[r]=a);return n}function mo(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((r,a)=>typeof r=="string"?r.trim()===""?null:h(e,{children:r},a):typeof r=="number"?Number.isNaN(r)?null:h(e,{children:r},a):r==null||typeof r=="boolean"?null:r)}function ie(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}function Vn(t){if(t)return e=>{let{event:n,detail:r}=ie(e);r!=null&&t(n,r)}}function Tt(t,e){if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e}function fo(t){let e=typeof t=="number"?t:t?1:void 0;return e!=null&&e>=1?e:void 0}var Ev=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Tab"]);function qe(t){return Ev.has(t.key)&&(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey&&t.key!=="Tab")}var Cv=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),bo=Cv?"\u2325+Click to select only this":"Alt+Click to select only this",go=700;function Xt(t){return t==="open"?"open":"closed"}function vo(t,e,n){t.addEventListener("click",r=>{let a=r.target;if(!(a instanceof Element))return;let o=a.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var Tv=new Set(["brand","neutral","info","success","warning","critical"]);function Q(t){return t&&t!=="neutral"?t:void 0}function _(t,e,n){return t!=null&&!Tv.has(t)?{...n,[e]:t}:n}function br(t){return typeof t=="number"?`${t}px`:t||void 0}function tt(t,e,n){let r=br(t);return r?{...n,[e]:r}:n}function ne(t,e,n){return tt(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function X(t){return t||t===0?"":void 0}var Sv=2e3;function xo(t,e,n){let[r,a]=W("idle"),o=Ze(()=>({timer:void 0}),[]);return{shownIcon:r==="ok"?"check":r==="fail"?"x":t,shownTone:r==="ok"?"success":r==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),a(c?"ok":"fail"),o.timer=setTimeout(()=>a("idle"),Sv),n?.(c)}}}function Ft(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var Ss=null;function eu(t){Ss=t}function tu(){return Ss?.isOpen()??!1}function nu(t){return Ss?.contains(t)??!1}var Jt=Symbol("anta.sync-popup-aria");function As(t){return t!=null&&typeof t[Jt]=="function"}var Av=typeof HTMLElement<"u"?HTMLElement:class{},B=class extends Av{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}};function la(t,e,n){if(t)try{"ariaLabelledByElements"in t&&(t.ariaLabelledByElements=e),"ariaDescribedByElements"in t&&(t.ariaDescribedByElements=n)}catch{}}var fr=class extends B{static observedAttributes=["selected"];ariaProp="ariaChecked";internals=this.attachInternals?.();connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"selected")){let e=this.selected;delete this.selected,this.selected=e}this.hasAttribute("selected")&&this.applyState(!0)}attributeChangedCallback(e){e==="selected"&&this.applyState(this.hasAttribute("selected"))}get selected(){return this.internals?.states?.has("selected")??!1}set selected(e){this.applyState(!!e)}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}applyState(e){this.internals&&(e?this.internals?.states?.add("selected"):this.internals?.states?.delete("selected"),this.internals[this.ariaProp]=e?"true":"false")}applyAccessibilityRelations(e,n){la(this.internals,e,n)}};function ou(t){let e=1779033703^t.length;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),3432918353),e=e<<13|e>>>19;return e=Math.imul(e^e>>>16,2246822507),e=Math.imul(e^e>>>13,3266489909),(e^=e>>>16)>>>0}function iu(t){let e=t>>>0;return()=>{e=e+1831565813|0;let n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}var su=t=>iu(ou(t));function zs(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var Mv=.4;function Iv(t,e,n){let r=n*Math.PI/180,a=e*Math.cos(r),o=e*Math.sin(r),i=(t+.3963377774*a+.2158037573*o)**3,s=(t-.1055613458*a-.0638541728*o)**3,l=(t-.0894841775*a-1.291485548*o)**3;return[4.0767416621*i-3.3077115913*s+.2309699292*l,-1.2684380046*i+2.6097574011*s-.3413193965*l,-.0041960863*i-.7034186147*s+1.707614701*l]}function Dv(t,e,n){let[r,a,o]=Iv(t,e,n),i=8e-4;return r>=-i&&r<=1+i&&a>=-i&&a<=1+i&&o>=-i&&o<=1+i}function lu(t,e){let n=0,r=Mv;for(let a=0;a<18;a++){let o=(n+r)/2;Dv(t,o,e)?n=o:r=o}return n}var St=(t,e=3)=>Math.round(t*10**e)/10**e;function yo(t,e,n){let r=Math.min(e,lu(t,n));return`oklch(${St(t)} ${St(r)} ${St((n%360+360)%360,1)})`}function Os(t){let e=t.trim(),n=/^oklch\(\s*([\d.]+)/i.exec(e);if(n)return Math.max(0,Math.min(1,parseFloat(n[1])));let r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(r){let a=r[1];a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let o=parseInt(a.slice(0,2),16)/255,i=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var fn={figureScale:{range:[.76,1.2],off:1},figureAngle:{range:[-15,15],off:0},headAngle:{range:[-20,20],off:0},bodyAngle:{range:[-16,16],off:0},figureGap:{range:[.12,.42],off:.25},headRadiusTop:{range:[.35,1.25],off:1,bias:.6},headRadiusBottom:{range:[.45,1.5],off:1,bias:.6},bodyBorderRadius:{range:[.25,1],off:1}},ca={x:[-15,15],y:[-14,4],off:[0,0]},Ms={bgColor:{l:[.5,.82],c:[.02,.12],h:[0,360],off:"oklch(0.7 0 0)"},headColor:{l:[.78,.96],c:[.015,.075],h:[0,360],off:"oklch(0.9 0 0)"},bodyColor:{l:[.68,.9],c:[.015,.09],h:[0,360],off:"oklch(0.88 0 0)"}},qn={bgColor:{mode:"any"},headColor:{mode:"any"},bodyColor:{mode:"any"},figureScale:{mode:"any"},figureTranslate:{mode:"any"},figureAngle:{mode:"any"},headAngle:{mode:"any"},bodyAngle:{mode:"any"},figureGap:{mode:"any"},headRadiusTop:{mode:"any"},headRadiusBottom:{mode:"any"},bodyBorderRadius:{mode:"any"},harmony:!0},jn=(t,e,n)=>e+(n-e)*t,Bs=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function bn(t,e,n){let r=e?.mode??"any";return r==="off"?n.off:r==="list"&&e?.values?.length?Bs(t(),e.values):r==="range"?jn(t(),e?.min??n.range[0],e?.max??n.range[1]):jn(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function Ov(t,e){let n=e?.mode??"off";if(n==="off")return ca.off;if(n==="list"&&e?.values?.length)return Bs(t(),e.values);let r=n==="range"?e?.x??ca.x:ca.x,a=n==="range"?e?.y??ca.y:ca.y;return[jn(t(),r[0],r[1]),jn(t(),a[0],a[1])]}function Is(t,e,n,r){let a=e?.mode??"any";if(a==="off")return{color:n.off,l:Os(n.off)};if(a==="list"&&e?.values?.length){let u=Bs(t(),e.values);return{color:u,l:Os(u)}}let o=a==="range"?e?.l??n.l:n.l,i=a==="range"?e?.c??n.c:n.c,s=a==="range"?e?.h??n.h:n.h,l=jn(t(),o[0],o[1]),c=jn(t(),i[0],i[1]),d=r??jn(t(),s[0],s[1]);return{color:yo(l,c,d),l}}var xr=100,Ds=xr/2,vr=40,Ps=74,Pv=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function cu(t){return Pv.some(e=>(t[e]?.mode??qn[e].mode)!=="off")}function Ls(t,e){let n={...qn,...t},r=su(e),a=Is(r,n.bgColor,Ms.bgColor),o=du(a.color),i=Is(r,n.headColor,Ms.headColor,n.harmony?o:void 0),s=Is(r,n.bodyColor,Ms.bodyColor,n.harmony?o:void 0),l=bn(r,n.figureScale,fn.figureScale),c=Ov(r,n.figureTranslate),d=bn(r,n.figureAngle,fn.figureAngle),u=bn(r,n.headAngle,fn.headAngle),m=bn(r,n.bodyAngle,fn.bodyAngle),p=bn(r,n.figureGap,fn.figureGap),f=bn(r,n.headRadiusTop,fn.headRadiusTop),b=bn(r,n.headRadiusBottom,fn.headRadiusBottom),g=bn(r,n.bodyBorderRadius,fn.bodyBorderRadius),v=vr/2,x=Ps/2,w=xr/Math.min(1,l),I=f,C=Math.max(f,b),L=Math.min(I,1)*v,R=Math.min(C,1)*v,O=Math.max(0,I-1)*v,A=Math.max(0,C-1)*v;return{figure:cu(t),bg:a.color,bgLightness:a.l,initialsColor:zv(a.color,a.l),scale:l,translate:c,angle:d,gap:p*(vr+O+A),head:{color:i.color,radiusTop:L,radiusBottom:R,extendTop:O,extendBottom:A,angle:u},body:{color:s.color,radius:g*x,height:w,angle:m}}}function zv(t,e){let n=/^oklch\(/i.test(t.trim()),r=n?du(t):0;return e>.5?yo(.35,n?.06:0,r):yo(.95,n?.04:0,r)}function du(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var gr=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function Rs(t,e={}){let n=gr(t.bg),r=e.title?`<title>${gr(e.title)}</title>`:"",a=`<rect x="0" y="0" width="${xr}" height="${xr}" fill="${n}"/>`;if(!t.figure){let v=e.initials?`<text x="50" y="50" text-anchor="middle" dominant-baseline="central" font-family="var(--avatar-font, system-ui, sans-serif)" font-weight="500" font-size="${Bv(e.initials.length)}" fill="var(--avatar-initials-color, ${gr(t.initialsColor)})">${gr(e.initials)}</text>`:"";return au(r+a+v)}let[o,i]=t.translate,s=`translate(${St(o,2)} ${St(i,2)}) rotate(${St(t.angle,2)} 50 50) translate(50 50) scale(${St(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Ds-vr/2-l,u=vr+l+c,m=ru(Ds-vr/2,d,vr,u,t.head.radiusTop,t.head.radiusBottom),p=`<g transform="rotate(${St(t.head.angle,2)} 50 50)"><path d="${m}" fill="${gr(t.head.color)}"/></g>`,f=d+u+t.gap,b=ru(Ds-Ps/2,f,Ps,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${St(t.body.angle,2)} 50 ${St(f,2)})"><path d="${b}" fill="${gr(t.body.color)}"/></g>`;return au(`${r}${a}<g transform="${s}">${g}${p}</g>`)}function ru(t,e,n,r,a,o){let i=Math.max(0,Math.min(a,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>r&&l>0){let u=r/l;i*=u,s*=u}let c=u=>St(u,2),d=(u,m,p)=>`A${c(u)} ${c(u)} 0 0 1 ${c(m)} ${c(p)}`;return[`M${c(t+i)} ${c(e)}`,`H${c(t+n-i)}`,i?d(i,t+n,e+i):"",`V${c(e+r-s)}`,s?d(s,t+n-s,e+r):"",`H${c(t+s)}`,s?d(s,t,e+r-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var au=t=>`<svg viewBox="0 0 ${xr} ${xr}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,Bv=t=>t>=3?30:t===2?38:46;var wo=class extends B{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Lv,this.#e=document.createElement("span"),this.#e.className="badge",this.#e.setAttribute("part","badge"),this.#e.style.display="none",e.append(n,this.#e)}#n(e){this.#t?this.#t.replaceWith(e):this.#e.before(e),this.#t=e}connectedCallback(){this.#r()}attributeChangedCallback(){this.#r()}#o(){let e=this.getAttribute("config");if(!e)return qn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:qn}catch{return qn}}#r(){let e=this.getAttribute("badge");this.#e.style.display=e&&e!=="none"?"":"none";let n=this.getAttribute("name")??void 0,r=this.getAttribute("src");if(r){let l=document.createElement("img");l.setAttribute("part","frame image"),l.src=r,l.alt=n??"",l.loading="lazy",this.#n(l);return}let a=this.getAttribute("seed")??n??"",o=Ls(this.#o(),a),i=document.createElement("template");i.innerHTML=Rs(o,{initials:zs(n),title:n});let s=i.content.firstElementChild;s&&(s.setAttribute("part","frame"),this.#n(s))}},Lv=`
2
- :host { display: inline-block; position: relative; vertical-align: middle; }
3
- svg, img {
4
- display: block;
5
- inline-size: 100%;
6
- block-size: 100%;
7
- border-radius: var(--avatar-radius);
8
- background: var(--avatar-placeholder-bg);
9
- mask-image: var(--avatar-badge-mask);
10
- }
11
- img { object-fit: cover; }
12
- .badge {
13
- position: absolute;
14
- right: var(--avatar-badge-inset);
15
- bottom: var(--avatar-badge-inset);
16
- inline-size: var(--avatar-badge-size);
17
- block-size: var(--avatar-badge-size);
18
- border-radius: 50%;
19
- background: var(--avatar-badge-color);
20
- }
21
- `;function uu(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",wo)}uu();var ko=class extends B{static observedAttributes=["value","max","tone"];indicator;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
1
+ import pn from"react";var sa=pn.createElement,me=pn.Fragment,Kd=pn.useState,Xd=pn.useId,Jd=pn.useMemo,kv=pn.useRef,Ev=pn.useLayoutEffect,Qd=pn.useSyncExternalStore;function Cv(t,e,n){sa=t,e!==void 0&&(me=e),n?.useState&&(Kd=n.useState),n?.useId&&(Xd=n.useId),n?.useMemo&&(Jd=n.useMemo),n?.useRef&&(kv=n.useRef),n?.useLayoutEffect&&(Ev=n.useLayoutEffect),n?.useSyncExternalStore&&(Qd=n.useSyncExternalStore)}function W(t){return Kd(t)}function Ss(){return Xd()}function Ge(t,e){return Jd(t,e)}function eu(t,e,n){return Qd(t,e,n)}function h(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,r):sa(t,o)}function S(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,...r):sa(t,o)}function tu(t){return Array.isArray(t)?t.length>0:t!=null}function ht(t,e=!1){let n={};for(let[r,a]of Object.entries(t))(r==="className"||r==="style"||r.startsWith("data-")&&(!e||!r.startsWith("data-menu-")&&r!=="data-anta-menu-item"))&&(n[r]=a);return n}function fo(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((r,a)=>typeof r=="string"?r.trim()===""?null:h(e,{children:r},a):typeof r=="number"?Number.isNaN(r)?null:h(e,{children:r},a):r==null||typeof r=="boolean"?null:r)}function oe(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}function Vn(t){if(t)return e=>{let{event:n,detail:r}=oe(e);r!=null&&t(n,r)}}function fr(t,e){if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e}function bo(t){let e=typeof t=="number"?t:t?1:void 0;return e!=null&&e>=1?e:void 0}var Av=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Tab"]);function Ye(t){return Av.has(t.key)&&(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey&&t.key!=="Tab")}var Sv=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),go=Sv?"\u2325+Click to select only this":"Alt+Click to select only this",vo=700;function Kt(t){return t==="open"?"open":"closed"}function xo(t,e,n){t.addEventListener("click",r=>{let a=r.target;if(!(a instanceof Element))return;let o=a.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var Tv=new Set(["brand","neutral","info","success","warning","critical"]);function Q(t){return t&&t!=="neutral"?t:void 0}function F(t,e,n){return t!=null&&!Tv.has(t)?{...n,[e]:t}:n}function br(t){return typeof t=="number"?`${t}px`:t||void 0}function nt(t,e,n){let r=br(t);return r?{...n,[e]:r}:n}function te(t,e,n){return nt(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function X(t){return t||t===0?"":void 0}var Mv=2e3;function yo(t,e,n){let[r,a]=W("idle"),o=Ge(()=>({timer:void 0}),[]);return{shownIcon:r==="ok"?"check":r==="fail"?"x":t,shownTone:r==="ok"?"success":r==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),a(c?"ok":"fail"),o.timer=setTimeout(()=>a("idle"),Mv),n?.(c)}}}function _t(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var Ts=null;function nu(t){Ts=t}function ru(){return Ts?.isOpen()??!1}function au(t){return Ts?.contains(t)??!1}var Xt=Symbol("anta.sync-popup-aria");function Ms(t){return t!=null&&typeof t[Xt]=="function"}var Iv=typeof HTMLElement<"u"?HTMLElement:class{},z=class extends Iv{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}};function la(t,e,n){if(t)try{"ariaLabelledByElements"in t&&(t.ariaLabelledByElements=e),"ariaDescribedByElements"in t&&(t.ariaDescribedByElements=n)}catch{}}var mr=class extends z{static observedAttributes=["selected"];ariaProp="ariaChecked";internals=this.attachInternals?.();connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"selected")){let e=this.selected;delete this.selected,this.selected=e}this.hasAttribute("selected")&&this.applyState(!0)}attributeChangedCallback(e){e==="selected"&&this.applyState(this.hasAttribute("selected"))}get selected(){return this.internals?.states?.has("selected")??!1}set selected(e){this.applyState(!!e)}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}applyState(e){this.internals&&(e?this.internals?.states?.add("selected"):this.internals?.states?.delete("selected"),this.internals[this.ariaProp]=e?"true":"false")}applyAccessibilityRelations(e,n){la(this.internals,e,n)}};function su(t){let e=1779033703^t.length;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),3432918353),e=e<<13|e>>>19;return e=Math.imul(e^e>>>16,2246822507),e=Math.imul(e^e>>>13,3266489909),(e^=e>>>16)>>>0}function lu(t){let e=t>>>0;return()=>{e=e+1831565813|0;let n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}var cu=t=>lu(su(t));function Bs(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var Dv=.4;function Ov(t,e,n){let r=n*Math.PI/180,a=e*Math.cos(r),o=e*Math.sin(r),i=(t+.3963377774*a+.2158037573*o)**3,s=(t-.1055613458*a-.0638541728*o)**3,l=(t-.0894841775*a-1.291485548*o)**3;return[4.0767416621*i-3.3077115913*s+.2309699292*l,-1.2684380046*i+2.6097574011*s-.3413193965*l,-.0041960863*i-.7034186147*s+1.707614701*l]}function Pv(t,e,n){let[r,a,o]=Ov(t,e,n),i=8e-4;return r>=-i&&r<=1+i&&a>=-i&&a<=1+i&&o>=-i&&o<=1+i}function du(t,e){let n=0,r=Dv;for(let a=0;a<18;a++){let o=(n+r)/2;Pv(t,o,e)?n=o:r=o}return n}var St=(t,e=3)=>Math.round(t*10**e)/10**e;function wo(t,e,n){let r=Math.min(e,du(t,n));return`oklch(${St(t)} ${St(r)} ${St((n%360+360)%360,1)})`}function Ps(t){let e=t.trim(),n=/^oklch\(\s*([\d.]+)/i.exec(e);if(n)return Math.max(0,Math.min(1,parseFloat(n[1])));let r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(r){let a=r[1];a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let o=parseInt(a.slice(0,2),16)/255,i=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var mn={figureScale:{range:[.76,1.2],off:1},figureAngle:{range:[-15,15],off:0},headAngle:{range:[-20,20],off:0},bodyAngle:{range:[-16,16],off:0},figureGap:{range:[.12,.42],off:.25},headRadiusTop:{range:[.35,1.25],off:1,bias:.6},headRadiusBottom:{range:[.45,1.5],off:1,bias:.6},bodyBorderRadius:{range:[.25,1],off:1}},ca={x:[-15,15],y:[-14,4],off:[0,0]},Is={bgColor:{l:[.5,.82],c:[.02,.12],h:[0,360],off:"oklch(0.7 0 0)"},headColor:{l:[.78,.96],c:[.015,.075],h:[0,360],off:"oklch(0.9 0 0)"},bodyColor:{l:[.68,.9],c:[.015,.09],h:[0,360],off:"oklch(0.88 0 0)"}},jn={bgColor:{mode:"any"},headColor:{mode:"any"},bodyColor:{mode:"any"},figureScale:{mode:"any"},figureTranslate:{mode:"any"},figureAngle:{mode:"any"},headAngle:{mode:"any"},bodyAngle:{mode:"any"},figureGap:{mode:"any"},headRadiusTop:{mode:"any"},headRadiusBottom:{mode:"any"},bodyBorderRadius:{mode:"any"},harmony:!0},Hn=(t,e,n)=>e+(n-e)*t,Ls=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function fn(t,e,n){let r=e?.mode??"any";return r==="off"?n.off:r==="list"&&e?.values?.length?Ls(t(),e.values):r==="range"?Hn(t(),e?.min??n.range[0],e?.max??n.range[1]):Hn(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function zv(t,e){let n=e?.mode??"off";if(n==="off")return ca.off;if(n==="list"&&e?.values?.length)return Ls(t(),e.values);let r=n==="range"?e?.x??ca.x:ca.x,a=n==="range"?e?.y??ca.y:ca.y;return[Hn(t(),r[0],r[1]),Hn(t(),a[0],a[1])]}function Ds(t,e,n,r){let a=e?.mode??"any";if(a==="off")return{color:n.off,l:Ps(n.off)};if(a==="list"&&e?.values?.length){let u=Ls(t(),e.values);return{color:u,l:Ps(u)}}let o=a==="range"?e?.l??n.l:n.l,i=a==="range"?e?.c??n.c:n.c,s=a==="range"?e?.h??n.h:n.h,l=Hn(t(),o[0],o[1]),c=Hn(t(),i[0],i[1]),d=r??Hn(t(),s[0],s[1]);return{color:wo(l,c,d),l}}var xr=100,Os=xr/2,vr=40,zs=74,Bv=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function uu(t){return Bv.some(e=>(t[e]?.mode??jn[e].mode)!=="off")}function Rs(t,e){let n={...jn,...t},r=cu(e),a=Ds(r,n.bgColor,Is.bgColor),o=hu(a.color),i=Ds(r,n.headColor,Is.headColor,n.harmony?o:void 0),s=Ds(r,n.bodyColor,Is.bodyColor,n.harmony?o:void 0),l=fn(r,n.figureScale,mn.figureScale),c=zv(r,n.figureTranslate),d=fn(r,n.figureAngle,mn.figureAngle),u=fn(r,n.headAngle,mn.headAngle),m=fn(r,n.bodyAngle,mn.bodyAngle),p=fn(r,n.figureGap,mn.figureGap),f=fn(r,n.headRadiusTop,mn.headRadiusTop),b=fn(r,n.headRadiusBottom,mn.headRadiusBottom),g=fn(r,n.bodyBorderRadius,mn.bodyBorderRadius),v=vr/2,x=zs/2,w=xr/Math.min(1,l),I=f,C=Math.max(f,b),B=Math.min(I,1)*v,L=Math.min(C,1)*v,D=Math.max(0,I-1)*v,T=Math.max(0,C-1)*v;return{figure:uu(t),bg:a.color,bgLightness:a.l,initialsColor:Lv(a.color,a.l),scale:l,translate:c,angle:d,gap:p*(vr+D+T),head:{color:i.color,radiusTop:B,radiusBottom:L,extendTop:D,extendBottom:T,angle:u},body:{color:s.color,radius:g*x,height:w,angle:m}}}function Lv(t,e){let n=/^oklch\(/i.test(t.trim()),r=n?hu(t):0;return e>.5?wo(.35,n?.06:0,r):wo(.95,n?.04:0,r)}function hu(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var gr=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function Ns(t,e={}){let n=gr(t.bg),r=e.title?`<title>${gr(e.title)}</title>`:"",a=`<rect x="0" y="0" width="${xr}" height="${xr}" fill="${n}"/>`;if(!t.figure){let v=e.initials?`<text x="50" y="50" text-anchor="middle" dominant-baseline="central" font-family="var(--avatar-font, system-ui, sans-serif)" font-weight="500" font-size="${Rv(e.initials.length)}" fill="var(--avatar-initials-color, ${gr(t.initialsColor)})">${gr(e.initials)}</text>`:"";return iu(r+a+v)}let[o,i]=t.translate,s=`translate(${St(o,2)} ${St(i,2)}) rotate(${St(t.angle,2)} 50 50) translate(50 50) scale(${St(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Os-vr/2-l,u=vr+l+c,m=ou(Os-vr/2,d,vr,u,t.head.radiusTop,t.head.radiusBottom),p=`<g transform="rotate(${St(t.head.angle,2)} 50 50)"><path d="${m}" fill="${gr(t.head.color)}"/></g>`,f=d+u+t.gap,b=ou(Os-zs/2,f,zs,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${St(t.body.angle,2)} 50 ${St(f,2)})"><path d="${b}" fill="${gr(t.body.color)}"/></g>`;return iu(`${r}${a}<g transform="${s}">${g}${p}</g>`)}function ou(t,e,n,r,a,o){let i=Math.max(0,Math.min(a,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>r&&l>0){let u=r/l;i*=u,s*=u}let c=u=>St(u,2),d=(u,m,p)=>`A${c(u)} ${c(u)} 0 0 1 ${c(m)} ${c(p)}`;return[`M${c(t+i)} ${c(e)}`,`H${c(t+n-i)}`,i?d(i,t+n,e+i):"",`V${c(e+r-s)}`,s?d(s,t+n-s,e+r):"",`H${c(t+s)}`,s?d(s,t,e+r-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var iu=t=>`<svg viewBox="0 0 ${xr} ${xr}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,Rv=t=>t>=3?30:t===2?38:46;var ko=class extends z{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"});this.#e=document.createElement("span"),this.#e.className="badge",this.#e.setAttribute("part","badge"),e.append(this.#e)}#n(e){this.#t?this.#t.replaceWith(e):this.#e.before(e),this.#t=e}connectedCallback(){this.#r()}attributeChangedCallback(){this.#r()}#o(){let e=this.getAttribute("config");if(!e)return jn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:jn}catch{return jn}}#r(){let e=this.getAttribute("name")??void 0,n=this.getAttribute("src");if(n){let s=document.createElement("img");s.setAttribute("part","frame image"),s.src=n,s.alt=e??"",s.loading="lazy",this.#n(s);return}let r=this.getAttribute("seed")??e??"",a=Rs(this.#o(),r),o=document.createElement("template");o.innerHTML=Ns(a,{initials:Bs(e),title:e});let i=o.content.firstElementChild;i&&(i.setAttribute("part","frame"),this.#n(i))}};function pu(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",ko)}pu();var Eo=class extends z{static observedAttributes=["value","max","tone"];indicator;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
22
2
  :host {
23
3
  display: block;
24
4
  position: relative;
@@ -74,7 +54,7 @@ import mn from"react";var sa=mn.createElement,he=mn.Fragment,$d=mn.useState,Gd=m
74
54
  display: block;
75
55
  position: relative;
76
56
  }
77
- `,this.indicator=document.createElement("div"),this.indicator.className="indicator",this.indicator.setAttribute("part","indicator");let r=document.createElement("slot");e.append(n,this.indicator,r)}connectedCallback(){this.update()}attributeChangedCallback(){this.update()}update(){let e=this.getAttribute("value");if(e==null){this.indicator.style.removeProperty("--_percent");return}let n=Number(e),r=Number(this.getAttribute("max")??100),a=Number.isFinite(n)&&Number.isFinite(r)&&r>0?Math.min(100,Math.max(0,n/r*100)):0;this.indicator.style.setProperty("--_percent",`${a}%`)}};function hu(){typeof customElements>"u"||customElements.get("a-progress")||customElements.define("a-progress",ko)}hu();var Eo=class extends B{};function pu(){typeof customElements>"u"||customElements.get("a-loader")||customElements.define("a-loader",Eo)}pu();var Rv=`
57
+ `,this.indicator=document.createElement("div"),this.indicator.className="indicator",this.indicator.setAttribute("part","indicator");let r=document.createElement("slot");e.append(n,this.indicator,r)}connectedCallback(){this.update()}attributeChangedCallback(){this.update()}update(){let e=this.getAttribute("value");if(e==null){this.indicator.style.removeProperty("--_percent");return}let n=Number(e),r=Number(this.getAttribute("max")??100),a=Number.isFinite(n)&&Number.isFinite(r)&&r>0?Math.min(100,Math.max(0,n/r*100)):0;this.indicator.style.setProperty("--_percent",`${a}%`)}};function mu(){typeof customElements>"u"||customElements.get("a-progress")||customElements.define("a-progress",Eo)}mu();var Co=class extends z{};function fu(){typeof customElements>"u"||customElements.get("a-loader")||customElements.define("a-loader",Co)}fu();var Nv=`
78
58
  :host {
79
59
  display: block;
80
60
  position: relative;
@@ -172,7 +152,7 @@ import mn from"react";var sa=mn.createElement,he=mn.Fragment,$d=mn.useState,Gd=m
172
152
  .expand-btn.expanded::before {
173
153
  transform: rotate(180deg);
174
154
  }
175
- `,Co=class extends B{static observedAttributes=["expandable","truncate","collapsible"];slotEl;expandBtn;expanded=!1;overflowObserver;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Rv,this.slotEl=document.createElement("slot"),e.append(n,this.slotEl)}connectedCallback(){this.syncExpandButton(),this.#e&&this.startOverflowObserver()}disconnectedCallback(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect()}attributeChangedCallback(e,n,r){n!==r&&((e==="truncate"||e==="expandable")&&this.setExpanded(!1),this.syncExpandButton(),(e==="truncate"||e==="expandable")&&(this.#e?this.startOverflowObserver():this.stopOverflowObserver()))}get#e(){return this.hasAttribute("truncate")&&this.hasAttribute("expandable")}get#t(){return this.hasAttribute("collapsible")}get isTruncated(){if(!this.hasAttribute("truncate")||this.expanded)return!1;let e=this.slotEl;return e.clientWidth===0&&e.clientHeight===0?!1:e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1}syncExpandButton(){if(this.#e&&!this.expandBtn){let e=document.createElement("button");e.className="expand-btn",e.type="button",e.addEventListener("click",this.handleToggle),this.shadowRoot.append(e),this.expandBtn=e}else!this.#e&&this.expandBtn&&(this.expandBtn.remove(),this.expandBtn=void 0);this.refreshButton()}handleToggle=()=>{this.setExpanded(!this.expanded)};setExpanded(e){e!==this.expanded&&(this.expanded=e,this.slotEl.classList.toggle("expanded",e),this.refreshButton(),e||this.measureOverflow())}startOverflowObserver(){this.#e&&(this.overflowObserver??=new ResizeObserver(()=>this.measureOverflow()),this.contentObserver??=new MutationObserver(()=>this.measureOverflow()),this.overflowObserver.observe(this.slotEl),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}),this.measureOverflow())}stopOverflowObserver(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect(),this.slotEl.classList.remove("overflowing")}measureOverflow(){!this.#e||this.expanded||this.slotEl.classList.toggle("overflowing",this.isTruncated)}refreshButton(){let e=this.expandBtn;if(e){if(this.expanded&&!this.#t){e.remove(),this.expandBtn=void 0;return}e.setAttribute("aria-expanded",this.expanded?"true":"false"),e.setAttribute("aria-label",this.expanded?"Show less":"Show more"),e.classList.toggle("expanded",this.expanded)}}};function mu(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",Co)}mu();var Ns=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function da(t,e,{signal:n,edges:r}={}){let a,o=null,i=r!=null&&r.includes("leading"),s=r==null||r.includes("trailing"),l=()=>{o!==null&&(t.apply(a,o),a=void 0,o=null)},c=()=>{s&&l(),p()},d=null,u=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,c()},e)},m=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{m(),a=void 0,o=null},f=()=>{l()},b=function(...g){if(n?.aborted)return;a=this,o=g;let v=d==null;u(),i&&v&&l()};return b.schedule=u,b.cancel=p,b.flush=f,n?.addEventListener("abort",p,{once:!0}),b}function fu(){}function _s(t,e,{signal:n,edges:r=["leading","trailing"]}={}){let a=null,o=da(function(...s){a=Date.now(),t.apply(this,s)},e,{signal:n,edges:r}),i=function(...s){if(a==null&&(a=Date.now()),Date.now()-a>=e){a=Date.now(),t.apply(this,s),o.cancel(),o.schedule();return}o.apply(this,s)};return i.cancel=o.cancel,i.flush=o.flush,i}function Fs(t){return typeof Ns.Buffer<"u"&&Ns.Buffer.isBuffer(t)}function Hs(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Vs(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var bu="[object RegExp]",gu="[object String]",vu="[object Number]",xu="[object Boolean]";var yu="[object Symbol]",wu="[object Date]",ku="[object Map]",Eu="[object Set]",Cu="[object Array]",Tu="[object Function]",Su="[object ArrayBuffer]",To="[object Object]",Au="[object Error]",Mu="[object DataView]",Iu="[object Uint8Array]",Du="[object Uint8ClampedArray]",Ou="[object Uint16Array]",Pu="[object Uint32Array]",zu="[object BigUint64Array]",Bu="[object Int8Array]",Lu="[object Int16Array]",Ru="[object Int32Array]",Nu="[object BigInt64Array]",_u="[object Float32Array]",Fu="[object Float64Array]";function js(t){if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function Hu(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Vu(t,e,n){return ua(t,e,void 0,void 0,void 0,void 0,n)}function ua(t,e,n,r,a,o,i){let s=i(t,e,n,r,a,o);if(s!==void 0)return s;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return ha(t,e,o,i)}return ha(t,e,o,i)}function ha(t,e,n,r){if(Object.is(t,e))return!0;let a=Vs(t),o=Vs(e);if(a==="[object Arguments]"&&(a=To),o==="[object Arguments]"&&(o=To),a!==o)return!1;switch(a){case gu:return t.toString()===e.toString();case vu:return Hu(t.valueOf(),e.valueOf());case xu:case wu:case yu:return Object.is(t.valueOf(),e.valueOf());case bu:return t.source===e.source&&t.flags===e.flags;case Tu:return t===e}n=n??new Map;let i=n.get(t),s=n.get(e);if(i!=null&&s!=null)return i===e;n.set(t,e),n.set(e,t);try{switch(a){case ku:if(t.size!==e.size)return!1;for(let[l,c]of t.entries())if(!e.has(l)||!ua(c,e.get(l),l,t,e,n,r))return!1;return!0;case Eu:{if(t.size!==e.size)return!1;let l=Array.from(t.values()),c=Array.from(e.values());for(let d=0;d<l.length;d++){let u=l[d],m=c.findIndex(p=>ua(u,p,void 0,t,e,n,r));if(m===-1)return!1;c.splice(m,1)}return!0}case Cu:case Iu:case Du:case Ou:case Pu:case zu:case Bu:case Lu:case Ru:case Nu:case _u:case Fu:if(Fs(t)!==Fs(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!ua(t[l],e[l],l,t,e,n,r))return!1;return!0;case Su:return t.byteLength!==e.byteLength?!1:ha(new Uint8Array(t),new Uint8Array(e),n,r);case Mu:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:ha(new Uint8Array(t),new Uint8Array(e),n,r);case Au:return t.name===e.name&&t.message===e.message;case To:{if(!(ha(t.constructor,e.constructor,n,r)||js(t)&&js(e)))return!1;let l=[...Object.keys(t),...Hs(t)],c=[...Object.keys(e),...Hs(e)];if(l.length!==c.length)return!1;for(let d=0;d<l.length;d++){let u=l[d],m=t[u];if(!Object.hasOwn(e,u))return!1;let p=e[u];if(!ua(m,p,u,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function So(t,e){return Vu(t,e,fu)}var pa={width:["width"],height:["height"],size:["width","height"],overflow:["clientWidth","clientHeight","scrollWidth","scrollHeight","overflowX","overflowY","clippedX","clippedY","scrollableX","scrollableY"],edges:["hiddenStartX","hiddenEndX","hiddenStartY","hiddenEndY"],scroll:["scrollLeft","scrollTop"]},Nv=new Set(Object.values(pa).flat());function Ao(t){let e=new Set,n=!1,r=t===""?["all"]:t?.trim().split(/\s+/)??[];for(let i of r)if(i==="all"){for(let s of Nv)e.add(s);n=!0}else if(i==="context")n=!0;else if(Object.hasOwn(pa,i))for(let s of pa[i])e.add(s);let a=[...e].some(i=>i!=="width"&&i!=="height"),o=[...pa.scroll,...pa.edges].some(i=>e.has(i));return{fields:e,context:n,content:a,scroll:o}}var Mo=new WeakMap,_v=140,Fv=/(?:^|\s)(?:dark|light)(?:\s|$)/;function Hv(t){return t.classList.contains("dark")||t.classList.contains("light")}var qs=class{constructor(e,n){this.view=e;this.doc=n;this.#n=e.matchMedia("(prefers-color-scheme: dark)"),this.#o=e.matchMedia("(pointer: fine)"),this.#r=e.matchMedia("(pointer: coarse)"),this.#a=e.matchMedia("(hover: hover)"),this.#s=e.matchMedia("(prefers-reduced-motion: reduce)"),this.#f=[this.#n,this.#o,this.#r,this.#a,this.#s],this.#h=Uv(e.navigator)}view;doc;#e=new Set;#t=new Set;#n;#o;#r;#a;#s;#f;#l;#u;#m;#b=0;#h;subscribeContext(e){this.#e.size===0&&this.#i(),this.#e.add(e)}unsubscribeContext(e){this.#e.delete(e)&&(this.#e.size===0&&this.#x(),this.#c())}observeVisibility(e){if(!this.#t.has(e)){if(typeof this.view.IntersectionObserver>"u"){e.visibilityDidChange(!0);return}this.#u??=new this.view.IntersectionObserver(n=>{for(let r of n){let a=r.target;this.#t.has(a)&&a.visibilityDidChange(r.isIntersecting)}},{root:null,rootMargin:"0px",threshold:0}),this.#t.add(e),this.#u.observe(e)}}unobserveVisibility(e){this.#t.delete(e)&&(this.#u?.unobserve(e),this.#t.size===0&&(this.#u?.disconnect(),this.#u=void 0),this.#c())}snapshot(){return{globalMode:Yu(this.doc.documentElement),systemAppearance:this.#n.matches?"dark":"light",...this.#h,pointer:this.#o.matches?"fine":this.#r.matches?"coarse":"none",hover:this.#a.matches,reducedMotion:this.#s.matches,devicePixelRatio:this.view.devicePixelRatio}}#p(){this.#m?.removeEventListener("change",this.#d),this.#m=this.view.matchMedia(`(resolution: ${this.view.devicePixelRatio}dppx)`),this.#m.addEventListener("change",this.#d,{once:!0}),this.#b=this.view.devicePixelRatio}#d=()=>{this.view.devicePixelRatio!==this.#b&&(this.#p(),this.#y())};#i(){for(let n of this.#f)n.addEventListener("change",this.#y);this.#p(),this.view.addEventListener("resize",this.#d,{passive:!0});let e=this.doc.documentElement;e&&(this.#l=new this.view.MutationObserver(this.#v),this.#l.observe(e,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}))}#x(){for(let e of this.#f)e.removeEventListener("change",this.#y);this.#m?.removeEventListener("change",this.#d),this.#m=void 0,this.view.removeEventListener("resize",this.#d),this.#l?.disconnect(),this.#l=void 0}#c(){this.#e.size>0||this.#t.size>0||Mo.get(this.view)===this&&Mo.delete(this.view)}#v=e=>{let n=new Set;for(let r of e){let a=r.target;if(a instanceof this.view.Element&&!(!Hv(a)&&!Fv.test(r.oldValue??"")))for(let o of this.#e)(a===o||a.contains(o))&&n.add(o)}for(let r of n)r.contextStoreDidChange()};#y=()=>{for(let e of this.#e)e.contextStoreDidChange()}};function ju(t,e){let n=Mo.get(t);return n||(n=new qs(t,e),Mo.set(t,n)),n}function Yu(t){return t?.classList.contains("dark")?"dark":"light"}function Vv(t){for(let e=t;e;e=e.parentElement){if(e.classList.contains("dark"))return"dark";if(e.classList.contains("light"))return"light"}return Yu(t.ownerDocument.documentElement)}var jv={edge:/edg[ea]?\/(\d+)/,opera:/opr\/(\d+)/,firefox:/(?:firefox|fxios)\/(\d+)/,chrome:/(?:chrome|crios)\/(\d+)/,safari:/version\/(\d+)/,unknown:/(?!)/},qv={windows:/windows nt ([\d.]+)/,macos:/mac os x (\d+[._]\d+(?:[._]\d+)?)/,ios:/os (\d+[._]\d+(?:[._]\d+)?)/,android:/android (\d+(?:\.\d+)*)/};function Uv(t){let e=t,n=(t.userAgent??"").toLowerCase(),r=`${e.userAgentData?.platform??""} ${t.platform??""} ${n}`.toLowerCase(),a=/android/.test(r)?"android":/iphone|ipad|ipod|ios/.test(r)?"ios":/mac/.test(r)?"macos":/win/.test(r)?"windows":/linux/.test(r)?"linux":"unknown",o=/edg[ea]?\//.test(n)?"edge":/opr\/|opera/.test(n)?"opera":/firefox\/|fxios\//.test(n)?"firefox":/chrome\/|crios\//.test(n)?"chrome":/safari\//.test(n)?"safari":"unknown",s=(e.userAgentData?.brands??[]).filter(l=>!/not.a.brand/i.test(l.brand)).sort((l,c)=>Number(/chromium/i.test(l.brand))-Number(/chromium/i.test(c.brand)))[0];return{os:a,osVersion:parseInt(n.match(qv[a]??/(?!)/)?.[1]??"",10)||0,browser:o,browserVersion:Number(s?.version??n.match(jv[o])?.[1])||0,mobile:e.userAgentData?.mobile??/android|mobi|iphone|ipad|ipod/.test(r)}}function Yv(t,e){return t!==void 0&&Object.keys(e).every(n=>So(t[n],e[n]))}function qu(t,e){return t?Object.fromEntries(Object.entries(e).filter(([n,r])=>!So(t[n],r))):{...e}}function gn(t){return parseFloat(t)||0}function Wv(t){return{paddingTop:gn(t.paddingTop),paddingRight:gn(t.paddingRight),paddingBottom:gn(t.paddingBottom),paddingLeft:gn(t.paddingLeft),borderTop:gn(t.borderTopWidth),borderRight:gn(t.borderRightWidth),borderBottom:gn(t.borderBottomWidth),borderLeft:gn(t.borderLeftWidth)}}function Uu(t){return t==="normal"?"0px":t}function Zv(t){let e=parseFloat(t.lineHeight),n=Number.isFinite(e)?e:null,r=t.fontStyle&&t.fontStyle!=="normal"?`${t.fontStyle} `:"",a=t.fontWeight&&t.fontWeight!=="400"?`${t.fontWeight} `:"",o=n!=null?`/${n}px`:"";return{shorthand:`${r}${a}${t.fontSize}${o} ${t.fontFamily}`,family:t.fontFamily,size:parseFloat(t.fontSize)||0,weight:parseFloat(t.fontWeight)||400,style:t.fontStyle,stretch:t.fontStretch,lineHeight:n,letterSpacing:Uu(t.letterSpacing),wordSpacing:Uu(t.wordSpacing),color:t.color,featureSettings:t.fontFeatureSettings,variationSettings:t.fontVariationSettings,kerning:t.fontKerning,variantCaps:t.fontVariantCaps,textRendering:t.textRendering,direction:t.direction}}function vn(t){return Math.round(t*100)/100}var Io=class extends B{static observedAttributes=["fade","observe","observe-offscreen","throttle"];#e=this.attachInternals?.();#t;#n;#o;#r;#a;#s=!1;#f;#l=new Set;#u=!1;#m=!1;#b;#h;#p;#d;#i=!1;#x=!1;#c=new Set;#v=!1;#y;#w=!1;#g=!1;connectedCallback(){this.#t=ju(this.view,this.doc),this.#E()}disconnectedCallback(){this.#_(),this.#M(),this.#B(),this.#t?.unobserveVisibility(this),this.#t=void 0,this.#y=void 0}attributeChangedCallback(e,n,r){n!==r&&(e==="fade"&&r===null&&this.#_(),this.#t&&((e==="fade"||e==="observe"||e==="observe-offscreen")&&this.#E(),e==="throttle"&&this.#N(),(e==="observe"||e==="throttle")&&this.#k()))}get measurement(){return this.#R()}get context(){return this.#z()}get isTruncated(){let e=this.#R(!1);return e.clippedX||e.clippedY}contextStoreDidChange(){this.#O(),this.#k()}visibilityDidChange(e){this.#y!==e&&(this.#y=e,this.#E())}#E(){let{fields:e,context:n,content:r,scroll:a}=Ao(this.getAttribute("observe"));(e.size!==this.#l.size||[...e].some(l=>!this.#l.has(l)))&&(this.#w=!0,this.#N()),this.#l=e,this.#u=this.hasAttribute("fade")||r,this.#m=this.hasAttribute("fade")||a;let o=this.hasAttribute("fade")||e.size>0,i=this.hasAttribute("observe-offscreen");this.isConnected&&o&&(i||(this.#y??this.hasAttribute("fade")))?this.#A():this.#M(),this.#i&&this.#C(),this.isConnected&&o&&!i?this.#t?.observeVisibility(this):this.#t?.unobserveVisibility(this),this.isConnected&&n?this.#F():this.#B(),this.#T()}#T(){let e=this.#i||this.#v;e!==!!this.#r&&(e?(this.#r=new this.view.MutationObserver(this.#D),this.#r.observe(this,{attributes:!0})):(this.#r?.disconnect(),this.#r=void 0))}#D=()=>{this.#k(),this.#O()};#A(){this.#i||(this.#i=!0,this.#N(),this.#n=new this.view.ResizeObserver(this.#k),this.#n.observe(this),this.doc.fonts?.addEventListener("loadingdone",this.#k),this.#f=this.#R(!1),this.#q(this.#f),this.#I(),this.#w=!0,this.#k())}#C(){this.#u&&!this.#o?(this.#o=new this.view.MutationObserver(this.#k),this.#o.observe(this,{subtree:!0,childList:!0,characterData:!0}),this.addEventListener("input",this.#k),this.addEventListener("load",this.#k,!0)):!this.#u&&this.#o&&(this.#o.disconnect(),this.#o=void 0,this.removeEventListener("input",this.#k),this.removeEventListener("load",this.#k,!0)),this.#m?this.addEventListener("scroll",this.#k,{passive:!0}):this.removeEventListener("scroll",this.#k),this.#I()}#I(){if(!this.#u||!this.#x||!this.#i){for(let n of this.#c)this.#n?.unobserve(n);this.#c.clear();return}let e=new Set(this.children);for(let n of this.#c)e.has(n)||(this.#n?.unobserve(n),this.#c.delete(n));for(let n of e)this.#c.has(n)||(this.#n?.observe(n),this.#c.add(n))}#M(){this.#i&&(this.#i=!1,this.#c.clear(),this.#n?.disconnect(),this.#n=void 0,this.#o?.disconnect(),this.#o=void 0,this.#a!=null&&this.view.cancelAnimationFrame(this.#a),this.#a=void 0,this.#h?.cancel(),this.#h=void 0,this.removeEventListener("input",this.#k),this.removeEventListener("scroll",this.#k),this.removeEventListener("load",this.#k,!0),this.doc.fonts?.removeEventListener("loadingdone",this.#k))}#F(){this.#v||(this.#v=!0,this.#t?.subscribeContext(this),this.addEventListener("focusin",this.#O),this.addEventListener("focusout",this.#L),this.doc.fonts?.addEventListener("loadingdone",this.#O),this.#g=!0,this.#O())}#B(){this.#v&&(this.#v=!1,this.#t?.unsubscribeContext(this),this.removeEventListener("focusin",this.#O),this.removeEventListener("focusout",this.#L),this.doc.fonts?.removeEventListener("loadingdone",this.#O))}#L=e=>{let n=e.relatedTarget;n instanceof this.view.Node&&this.contains(n)||this.#O()};#k=()=>{!this.#i||this.#a!=null||(this.#a=this.view.requestAnimationFrame(()=>{this.#a=void 0,this.#i&&(this.#h?this.#h():this.#j())}))};#O=()=>{!this.#v||this.#s||(this.#s=!0,queueMicrotask(()=>{if(this.#s=!1,!this.#v)return;let e=this.#g;this.#g=!1,this.#Z(e)}))};#H(e){let n=[],r=this.getAttribute("include-rects-for");if(r)try{let a=e??this.getBoundingClientRect();n=Array.from(this.querySelectorAll(r),o=>{let i=o.getBoundingClientRect();return{top:vn(i.top-a.top),right:vn(i.right-a.left),bottom:vn(i.bottom-a.top),left:vn(i.left-a.left),width:vn(i.width),height:vn(i.height)}})}catch(a){if(!(a instanceof this.view.DOMException)||a.name!=="SyntaxError")throw a}return n}#R(e=!0){let n=this.getBoundingClientRect(),r=this.clientWidth,a=this.clientHeight,o=this.scrollWidth,i=this.scrollHeight,s=r>0||a>0,l=s&&o>r+1,c=s&&i>a+1,d=this.view.getComputedStyle(this);this.#x=d.overflowX!=="visible"||d.overflowY!=="visible";let u=l&&d.overflowX!=="visible",m=c&&d.overflowY!=="visible",p=l&&(d.overflowX==="auto"||d.overflowX==="scroll"),f=c&&(d.overflowY==="auto"||d.overflowY==="scroll"),b=Math.round(this.scrollLeft),g=Math.round(this.scrollTop),v=Math.max(0,d.direction==="rtl"?-b:b),x=Math.max(0,g);return{width:vn(n.width),height:vn(n.height),rects:e?this.#H(n):[],clientWidth:r,clientHeight:a,scrollWidth:o,scrollHeight:i,overflowX:l,overflowY:c,clippedX:u,clippedY:m,scrollableX:p,scrollableY:f,scrollLeft:b,scrollTop:g,hiddenStartX:u&&v>1,hiddenEndX:u&&v<o-r-1,hiddenStartY:m&&x>1,hiddenEndY:m&&x<i-a-1}}#z(){let e=(this.#t??ju(this.view,this.doc)).snapshot(),n=this.view.getComputedStyle(this);return{...e,mode:Vv(this),focusWithin:this.matches(":focus-within"),font:Zv(n),inset:Wv(n),backgroundColor:n.backgroundColor}}#N(){this.#h?.cancel(),this.#h=void 0;let e=Number(this.getAttribute("throttle"));this.#i&&Number.isFinite(e)&&e>0&&(this.#h=_s(()=>this.#j(),Math.min(e,2147483647)))}#W(e){if(this.#l.size===0)return!1;let n=this.#b;if(!n||this.#w)return!0;for(let r of this.#l)if(n[r]!==e[r])return!0;return!1}#j(){let e=this.#R(!1);if(this.#f=e,this.#q(e),this.#I(),!this.#W(e))return;let n={...e,rects:this.#H()},r=this.#w,a=this.#b;this.#w=!1,this.#b=n;let o={changed:qu(r?void 0:a,n),current:n};this.dispatchEvent(new this.view.CustomEvent("measurechange",{detail:o}))}#Z(e){let n=this.#z(),r=this.#d;if(this.#d=n,!e&&Yv(r,n))return;let a={changed:e?{...n}:qu(r,n),current:n};this.dispatchEvent(new this.view.CustomEvent("contextchange",{detail:a}))}#q(e){this.#S("overflow-x",e.overflowX),this.#S("overflow-y",e.overflowY),this.#S("clipped-x",e.clippedX),this.#S("clipped-y",e.clippedY),this.#S("scrollable-x",e.scrollableX),this.#S("scrollable-y",e.scrollableY),this.#S("hidden-start-x",e.hiddenStartX),this.#S("hidden-end-x",e.hiddenEndX),this.#S("hidden-start-y",e.hiddenStartY),this.#S("hidden-end-y",e.hiddenEndY),this.#U(e)}#U(e){if((e.hiddenStartX||e.hiddenEndX||e.hiddenStartY||e.hiddenEndY)&&this.hasAttribute("fade")){this.#p!==void 0&&this.view.clearTimeout(this.#p),this.#p=void 0,this.#S("fade-mask-active",!0);return}if(!this.hasAttribute("fade")){this.#_();return}if(!(!this.#e?.states?.has("fade-mask-active")||this.#p!==void 0)){if(this.view.matchMedia("(prefers-reduced-motion: reduce)").matches){this.#_();return}this.#p=this.view.setTimeout(()=>this.#_(),_v)}}#_(){this.#p!==void 0&&this.view.clearTimeout(this.#p),this.#p=void 0,this.#S("fade-mask-active",!1)}#S(e,n){n?this.#e?.states?.add(e):this.#e?.states?.delete(e)}};function Wu(){typeof customElements>"u"||customElements.get("a-box")||customElements.define("a-box",Io)}Wu();var eh=["wheel-capture","wheel-activation","wheel-modifier","wheel-delay","wheel-tolerance","wheel-reset-on-move","pointer-capture","pointer-buttons","pointer-threshold","pointer-modifier","pointer-include-interactive","pan","pan-pointer-types","pan-threshold","pan-directions","pan-inertia","pan-time-constant","pan-min-velocity"],ut=new WeakMap,ht=new WeakMap,th={up:1,down:2,left:4,right:8},$s={mouse:1,pen:2,touch:4},$v='textarea, select, input[type="number"], input[type="range"], a-menu',Zu=['input, textarea, select, button, summary, a[href], [contenteditable]:not([contenteditable="false"])',...["button","checkbox","combobox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","scrollbar","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"].map(t=>`[role~="${t}"]`),"a-input, a-button, a-slider, a-checkbox, a-switch, a-radio, a-menu, a-menu-item, a-tab"].join(", ");function Do(t,e,n){return t===null||t===""?n:t==="all"?Object.values(e).reduce((r,a)=>r|a,0):t.trim().split(/\s+/).reduce((r,a)=>r|(e[a]??0),0)}function yr(t,e,n,r=0){return Math.max(r,Tt(t.getAttribute(e)?.trim()??null,n))}function nh(t,e,n){let r=t.getAttribute(e);return r==="any"||r==="none"||r==="alt"||r==="ctrl"||r==="meta"||r==="shift"?r:n}function Gv(t){if(!t.hasAttribute("wheel-capture"))return;let e=Do(t.getAttribute("wheel-capture"),th,15),n=t.getAttribute("wheel-activation");return{directions:e,activation:n==="hover"||n==="focus"||n==="settled-or-focus"?n:"settled",modifier:nh(t,"wheel-modifier","none"),delay:yr(t,"wheel-delay",150),tolerance:yr(t,"wheel-tolerance",5),resetOnMove:t.hasAttribute("wheel-reset-on-move")}}function Kv(t){if(!t.hasAttribute("pointer-capture"))return;let e=Do(t.getAttribute("pointer-capture"),$s,7);if(!e)return;let n=t.getAttribute("pointer-buttons"),r=n===null?1:n.split(/\s+/).reduce((a,o)=>{let i=Number(o);return Number.isInteger(i)&&i>=0&&i<=5?a|1<<i:a},0);if(r)return{types:e,buttons:r,threshold:yr(t,"pointer-threshold",0),modifier:nh(t,"pointer-modifier","any"),interactive:t.hasAttribute("pointer-include-interactive")}}function Xv(t){if(!t.hasAttribute("pan"))return;let e=t.getAttribute("pan");if(e!==""&&e!=="both"&&e!=="x"&&e!=="y")return;let n=Do(t.getAttribute("pan-pointer-types"),$s,4);if(n)return{types:n,axis:e||"both",threshold:yr(t,"pan-threshold",3),directions:Do(t.getAttribute("pan-directions"),th,15),inertia:t.hasAttribute("pan-inertia"),tau:yr(t,"pan-time-constant",325,1),minVelocity:yr(t,"pan-min-velocity",.02,.001)}}function Jv(t){let e=t.ownerDocument,n=ht.get(e);if(n)return n;let r=e.defaultView;return n={doc:e,view:r,states:new Set,dwell:new Map,sessions:new Map,momenta:new Set,tracking:!1,listening:!1},ht.set(e,n),r.addEventListener("blur",xh),e.addEventListener("visibilitychange",yh),n}function Gs(t,e){if(!t.isConnected||!t.ownerDocument.defaultView)return;let n=ut.get(t);if(!n&&!t.hasAttribute("wheel-capture")&&!t.hasAttribute("pointer-capture")&&!t.hasAttribute("pan"))return;let r=Gv(t),a=Kv(t),o=Xv(t);if(!r&&!a&&!o){Ks(t,"disabled");return}n||(n={surface:t,store:Jv(t)},ut.set(t,n),n.store.states.add(n));let i=!!n.wheel,s=!!(n.pointer||n.pan);n.wheel=r,n.pointer=a,n.pan=o,i!==!!r&&(r?t.addEventListener("wheel",Ws,{passive:!1}):t.removeEventListener("wheel",Ws)),s!==!!(a||o)&&(a||o?(t.addEventListener("pointerdown",sh),t.addEventListener("lostpointercapture",ch),t.addEventListener("click",bh,!0),t.addEventListener("dragstart",gh)):rh(t)),(!r||e?.startsWith("wheel-")&&e!=="wheel-capture")&&n.store.dwell.delete(t),n.session&&e&&(e.startsWith("pointer-")||e==="pan"||e==="pan-pointer-types"||e==="pan-threshold")&&Yn(n.session,null,"disabled"),n.momentum&&(!o?.inertia||!o.directions)&&Un(n.momentum,"disabled"),ah(n.store)}function Ks(t,e="disconnected"){let n=ut.get(t);if(!n)return;ut.delete(t),n.wheel=void 0,n.pointer=void 0,n.pan=void 0,t.removeEventListener("wheel",Ws),rh(t),n.session&&Yn(n.session,null,e),n.momentum&&Un(n.momentum,e);let r=n.store;r.dwell.delete(t),r.states.delete(n),ah(r),!r.states.size&&(r.view.removeEventListener("blur",xh),r.doc.removeEventListener("visibilitychange",yh),ht.get(r.doc)===r&&ht.delete(r.doc))}function rh(t){t.removeEventListener("pointerdown",sh),t.removeEventListener("lostpointercapture",ch),t.removeEventListener("click",bh,!0),t.removeEventListener("dragstart",gh)}function Xs(t){return t?.activation==="settled"||t?.activation==="settled-or-focus"}function ah(t){let e=Array.from(t.states).some(n=>Xs(n.wheel));e!==t.tracking&&(t.tracking=e,e?(t.doc.addEventListener("pointermove",$u,{passive:!0,capture:!0}),t.doc.addEventListener("pointerout",Gu,{passive:!0,capture:!0}),t.doc.addEventListener("wheel",Ku,{passive:!0,capture:!0})):(t.doc.removeEventListener("pointermove",$u,!0),t.doc.removeEventListener("pointerout",Gu,!0),t.doc.removeEventListener("wheel",Ku,!0),t.dwell.clear()))}function $u(t){let e=ht.get(this);if(!e||t.pointerType==="touch")return;let n=t.composedPath();for(let r of e.dwell.keys())(!n.includes(r)||t.buttons&&!ma(r,t.clientX,t.clientY).inside)&&e.dwell.delete(r);for(let r of n){let a=ut.get(r),o=a?.wheel;if(!a||!o||!Xs(o))continue;let i=e.dwell.get(a.surface);if(!i){if(t.buttons)continue;e.dwell.set(a.surface,{x:t.clientX,y:t.clientY,time:t.timeStamp});continue}t.clientX===i.x&&t.clientY===i.y||t.timeStamp-i.time>=o.delay&&!o.resetOnMove||(Math.abs(t.clientX-i.x)>o.tolerance||Math.abs(t.clientY-i.y)>o.tolerance)&&(i={x:t.clientX,y:t.clientY,time:t.timeStamp},e.dwell.set(a.surface,i))}}function Gu(t){t.pointerType!=="touch"&&t.relatedTarget===null&&ht.get(this)?.dwell.clear()}function Ku(t){let e=ht.get(this);if(!e)return;let n=t.composedPath();for(let r of e.dwell.keys())n.includes(r)||e.dwell.delete(r)}function oh(t,e){return e==="any"?!0:e==="none"?!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey:t[`${e}Key`]}function Us(t,e,n){let r=t.ownerDocument.defaultView;for(let a of e.composedPath()){if(a===t)break;if(a instanceof r.Element&&(a.hasAttribute("data-capture-ignore")||n&&a.matches(n)))return!0}return t.hasAttribute("data-capture-ignore")}function Ys(t,e,n){return e!==0&&!!(t&(n?e<0?4:8:e<0?1:2))}function ma(t,e,n){let r=t.getBoundingClientRect();return{localX:e-r.left,localY:n-r.top,boxWidth:r.width,boxHeight:r.height,inside:e>=r.left&&e<=r.right&&n>=r.top&&n<=r.bottom,focusWithin:t.matches(":focus-within")}}function ih(t){return{type:t.type,timeStamp:t.timeStamp,isTrusted:t.isTrusted,cancelable:t.cancelable,defaultPrevented:t.defaultPrevented,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,offsetX:t.offsetX,offsetY:t.offsetY}}function Js(t){return{...ih(t),pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist}}function Qs(t,e,n){t.surface.dispatchEvent(new t.store.view.CustomEvent(e,{detail:n}))}function Ws(t){let e=ut.get(this),n=e?.wheel;if(!e||!n||!n.directions||t.defaultPrevented||!t.cancelable||!oh(t,n.modifier))return;let r=t.deltaMode,a=t.deltaX,o=t.deltaY,i=Math.abs(a)>Math.abs(o);if(!Ys(n.directions,i?a:o,i))return;let s;if((n.activation==="focus"||n.activation==="settled-or-focus")&&this.matches(":focus-within"))s="focus";else if(n.activation==="hover")s="immediate";else{let d=e.store.dwell.get(this);if(!Xs(n)||!d||t.timeStamp-d.time<n.delay)return;s="settled"}if(Us(this,t,$v))return;let l=ma(this,t.clientX,t.clientY);if(!l.inside||(t.preventDefault(),!t.defaultPrevented))return;t.stopPropagation();let c={...ih(t),deltaMode:r,deltaX:a,deltaY:o,deltaZ:t.deltaZ};e.momentum&&Un(e.momentum,"interrupted"),Qs(e,"wheelinput",{wheelEvent:c,...l,activationReason:s})}function Oo(t){return{x:t.clientX,y:t.clientY,time:t.timeStamp}}function sh(t){let e=ut.get(this);if(!e||(e.suppressClickUntil=void 0,e.momentum&&Un(e.momentum,"interrupted"),t.defaultPrevented||!t.isPrimary||e.session||e.store.sessions.has(t.pointerId)))return;let n=$s[t.pointerType]??0,r=e.pointer,a=!!r&&!!(r.types&n)&&!!(r.buttons&1<<t.button)&&oh(t,r.modifier)&&!Us(this,t,r.interactive?"":Zu),o=!!e.pan&&!!(e.pan.types&n)&&t.button===0&&e.pan.directions!==0&&!Us(this,t,Zu);if(!a&&!o)return;let i=Js(t),s=Oo(i),l={state:e,id:t.pointerId,start:{pointerEvent:i,...ma(this,t.clientX,t.clientY)},current:i,pointer:a,pan:o,pointerStarted:!1,panStarted:!1,captured:!1,pointerReason:r?.threshold?"drag-threshold":"pointer-down",panReason:e.pan?.threshold?"drag-threshold":"pointer-down",pointerLast:s,panLast:s,samples:o?[s]:[],lastMoveTime:t.timeStamp};e.session=l,e.store.sessions.set(l.id,l),lh(e.store),ph(l,t,!0)}function lh(t){let e=t.sessions.size>0;e!==t.listening&&(t.listening=e,e?(t.doc.addEventListener("pointermove",Xu,{capture:!0,passive:!1}),t.doc.addEventListener("pointerup",Ju,{capture:!0,passive:!1}),t.doc.addEventListener("pointercancel",Qu,!0)):(t.doc.removeEventListener("pointermove",Xu,!0),t.doc.removeEventListener("pointerup",Ju,!0),t.doc.removeEventListener("pointercancel",Qu,!0)))}function Xu(t){let e=ht.get(this)?.sessions.get(t.pointerId);e&&ph(e,t)}function Ju(t){let e=ht.get(this)?.sessions.get(t.pointerId);e&&Yn(e,t)}function Qu(t){let e=ht.get(this)?.sessions.get(t.pointerId);e&&Yn(e,t,"pointer-cancel")}function ch(t){let e=ut.get(this)?.session;e?.id===t.pointerId&&e.captured&&Yn(e,t,"lost-capture")}function dh(t){t.cancelable&&t.preventDefault()}function uh(t,e){if(!t.pan)return;let n=t.samples.at(-1);for((!n||n.x!==e.clientX||n.y!==e.clientY)&&(t.lastMoveTime=e.timeStamp),t.samples.push(Oo(e));t.samples.length>8||t.samples.length>2&&e.timeStamp-t.samples[0].time>100;)t.samples.shift()}function hh(t,e){if(e-t.lastMoveTime>80)return{x:0,y:0};let n=t.samples.at(-1),r=t.samples.find(o=>n&&n.time-o.time<=100),a=n&&r?n.time-r.time:0;return a>0&&r&&n?{x:(r.x-n.x)/a,y:(r.y-n.y)/a}:{x:0,y:0}}function wr(t,e,n){return{x:t.axis!=="y"&&Ys(t.directions,e,!0)?e:0,y:t.axis!=="x"&&Ys(t.directions,n,!1)?n:0}}function ph(t,e,n=!1){let r=t.state,a=e.clientX-t.start.pointerEvent.clientX,o=e.clientY-t.start.pointerEvent.clientY,i=Math.hypot(a,o),s=t.pointer&&!t.pointerStarted&&!!r.pointer&&i>=r.pointer.threshold,l=r.pan?.axis==="x"?Math.abs(a):r.pan?.axis==="y"?Math.abs(o):i,c=t.pan&&!t.panStarted&&!!r.pan&&l>=r.pan.threshold;if(s||c||t.captured){if(!t.captured){try{r.surface.setPointerCapture(t.id)}catch{Yn(t,e,"lost-capture");return}t.captured=!0}dh(e)}if(t.current=Js(e),n&&(t.start.pointerEvent=t.current),n||uh(t,e),!(s&&(t.pointerStarted=!0,Zs(t,"start",t.start.pointerEvent),r.session!==t))&&!(c&&(t.panStarted=!0,xn(t,"start",t.start.pointerEvent),r.session!==t))&&!n&&!(t.pointerStarted&&(Zs(t,"move",t.current),r.session!==t))&&t.panStarted&&r.pan){let d=wr(r.pan,t.panLast.x-e.clientX,t.panLast.y-e.clientY),u=hh(t,e.timeStamp),m=wr(r.pan,u.x,u.y);t.panLast=Oo(e),xn(t,"move",t.current,{deltaX:d.x,deltaY:d.y,velocityX:m.x,velocityY:m.y})}}function Zs(t,e,n,r){let a=n??t.current,o=t.start.pointerEvent,i=e==="start",s=i?0:a.clientX-t.pointerLast.x,l=i?0:a.clientY-t.pointerLast.y;t.pointerLast=Oo(a),Qs(t.state,"pointerinput",{phase:e,pointerEvent:n?{...n}:null,start:mh(t),...ma(t.state.surface,a.clientX,a.clientY),deltaX:s,deltaY:l,movementX:a.clientX-o.clientX,movementY:a.clientY-o.clientY,activationReason:t.pointerReason,...r?{cancelReason:r}:{}})}function xn(t,e,n,r){let a=n??t.current;Qs(t.state,"paninput",{phase:e,pointerEvent:n?{...n}:null,start:mh(t),...ma(t.state.surface,a.clientX,a.clientY),deltaX:0,deltaY:0,velocityX:0,velocityY:0,activationReason:t.panReason,...r})}function mh(t){return{...t.start,pointerEvent:{...t.start.pointerEvent}}}function Yn(t,e,n){let r=t.state;if(r.session!==t||(r.session=void 0,r.store.sessions.delete(t.id),lh(r.store),e&&(t.captured&&!n&&dh(e),uh(t,e),t.current=Js(e)),r.surface.hasPointerCapture(t.id)&&r.surface.releasePointerCapture(t.id),t.captured&&(r.suppressClickUntil=r.store.view.performance.now()+400),t.pointerStarted&&Zs(t,n?"cancel":"end",e?t.current:null,n),!t.panStarted))return;if(n||ut.get(r.surface)!==r||!r.pan){xn(t,"cancel",e?t.current:null,{cancelReason:n??"disabled"});return}let a=wr(r.pan,t.panLast.x-t.current.clientX,t.panLast.y-t.current.clientY),o=hh(t,t.current.timeStamp),i=wr(r.pan,o.x,o.y);xn(t,"release",t.current,{deltaX:a.x,deltaY:a.y,velocityX:i.x,velocityY:i.y});let s=r.pan;if(ut.get(r.surface)!==r||!s||r.session){xn(t,"cancel",null,{cancelReason:"disabled"});return}if(s.inertia&&(Math.abs(i.x)>=s.minVelocity||Math.abs(i.y)>=s.minVelocity)){let l={state:r,session:t,vx:i.x,vy:i.y,time:r.store.view.performance.now()};r.momentum=l,r.store.momenta.add(l),fh(r.store)}else xn(t,"end",t.current)}function fh(t){t.frame!==void 0||!t.momenta.size||(t.animate??=e=>Qv(t,e),t.frame=t.view.requestAnimationFrame(t.animate))}function Qv(t,e){t.frame=void 0;for(let n of Array.from(t.momenta)){let r=n.state.pan;if(!r?.inertia||!n.state.surface.isConnected){Un(n,"disabled");continue}let a=Math.min(50,Math.max(0,e-n.time));n.time=e;let o=Math.exp(-a/r.tau),i=wr(r,n.vx*r.tau*(1-o),n.vy*r.tau*(1-o)),s=wr(r,n.vx*o,n.vy*o);n.vx=s.x,n.vy=s.y,(i.x||i.y)&&xn(n.session,"inertia",null,{deltaX:i.x,deltaY:i.y,velocityX:s.x,velocityY:s.y}),t.momenta.has(n)&&Math.abs(s.x)<r.minVelocity&&Math.abs(s.y)<r.minVelocity&&Un(n)}fh(t)}function Un(t,e){let n=t.state;n.momentum===t&&(n.momentum=void 0,n.store.momenta.delete(t),!n.store.momenta.size&&n.store.frame!==void 0&&(n.store.view.cancelAnimationFrame(n.store.frame),n.store.frame=void 0),xn(t.session,e?"cancel":"end",null,e?{cancelReason:e}:void 0))}function bh(t){let e=ut.get(this);!e?.suppressClickUntil||t.detail===0||e.store.view.performance.now()>e.suppressClickUntil||(e.suppressClickUntil=void 0,t.preventDefault(),t.stopPropagation())}function gh(t){ut.get(this)?.session&&t.preventDefault()}function vh(t){t.dwell.clear();for(let e of Array.from(t.sessions.values()))Yn(e,null,"blur");for(let e of Array.from(t.momenta))Un(e,"blur")}function xh(){let t=ht.get(this.document);t&&vh(t)}function yh(){let t=ht.get(this);t&&this.hidden&&vh(t)}var Po=class extends B{static observedAttributes=eh;connectedCallback(){Gs(this)}disconnectedCallback(){Ks(this)}attributeChangedCallback(e){Gs(this,e)}};function wh(){typeof customElements>"u"||customElements.get("a-capture")||customElements.define("a-capture",Po)}wh();var Ch=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],el=Ch.join(","),Th=typeof Element>"u",kr=Th?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zo=!Th&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},Bo=function(e,n){var r;n===void 0&&(n=!0);var a=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=a===""||a==="true",i=o||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Bo(e.parentNode));return i},ex=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},tx=function(e,n,r){if(Bo(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(el));return n&&kr.call(e,el)&&a.unshift(e),a=a.filter(r),a},tl=function(e,n,r){for(var a=[],o=Array.from(e);o.length;){var i=o.shift();if(!Bo(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=tl(l,!0,r);r.flatten?a.push.apply(a,c):a.push({scopeParent:i,candidates:c})}else{var d=kr.call(i,el);d&&r.filter(i)&&(n||!e.includes(i))&&a.push(i);var u=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),m=!Bo(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(u&&m){var p=tl(u===!0?i.children:u.children,!0,r);r.flatten?a.push.apply(a,p):a.push({scopeParent:i,candidates:p})}else o.unshift.apply(o,i.children)}}return a},Sh=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ah=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ex(e))&&!Sh(e)?0:e.tabIndex},nx=function(e,n){var r=Ah(e);return r<0&&n&&!Sh(e)?0:r},rx=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Mh=function(e){return e.tagName==="INPUT"},ax=function(e){return Mh(e)&&e.type==="hidden"},ox=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},ix=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},sx=function(e){if(!e.name)return!0;var n=e.form||zo(e),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(e.name));else try{a=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=ix(a,e.form);return!o||o===e},lx=function(e){return Mh(e)&&e.type==="radio"},cx=function(e){return lx(e)&&!sx(e)},dx=function(e){var n,r=e&&zo(e),a=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var i,s,l;for(o=!!((i=a)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(a)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&a;){var c,d,u;r=zo(a),a=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=a)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(a))}}return o},kh=function(e){var n=e.getBoundingClientRect(),r=n.width,a=n.height;return r===0&&a===0},ux=function(e,n){var r=n.displayCheck,a=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var i=getComputedStyle(e),s=i.visibility;if(s==="hidden"||s==="collapse")return!0;var l=kr.call(e,"details>summary:first-of-type"),c=l?e.parentElement:e;if(kr.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof a=="function"){for(var d=e;e;){var u=e.parentElement,m=zo(e);if(u&&!u.shadowRoot&&a(u)===!0)return kh(e);e.assignedSlot?e=e.assignedSlot:!u&&m!==e.ownerDocument?e=m.host:e=u}e=d}if(dx(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kh(e);return!1},hx=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var a=n.children.item(r);if(a.tagName==="LEGEND")return kr.call(n,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}n=n.parentElement}return!1},Ih=function(e,n){return!(n.disabled||ax(n)||ux(n,e)||ox(n)||hx(n))},Eh=function(e,n){return!(cx(n)||Ah(n)<0||!Ih(e,n))},px=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Dh=function(e){var n=[],r=[];return e.forEach(function(a,o){var i=!!a.scopeParent,s=i?a.scopeParent:a,l=nx(s,i),c=i?Dh(a.candidates):s;l===0?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:a,isScope:i,content:c})}),r.sort(rx).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},Oh=function(e,n){n=n||{};var r;return n.getShadowRoot?r=tl([e],n.includeContainer,{filter:Eh.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:px}):r=tx(e,n.includeContainer,Eh.bind(null,n)),Dh(r)};var mx=Ch.concat("iframe:not([inert]):not([inert] *)").join(","),Ph=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return kr.call(e,mx)===!1?!1:Ih(n,e)};var zh={getShadowRoot:!0};function Qt(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function nl(t){if(t.nodeType===1&&t.assignedSlot)return t.assignedSlot;let e=t.parentNode;return e?.nodeType===11&&"host"in e?e.host:e}function fa(t,e){for(;e;){if(e===t)return!0;e=nl(e)}return!1}function ba(t){return!!t&&"focus"in t&&Ph(t,zh)}function ga(t){return Oh(t,zh)}function Lo(t,e,n,r){let a=t.indexOf(e),o=a<0?n?t.length-1:0:(a+(n?-1:1)+t.length)%t.length,i=t[o]??r;return i?(i.focus(),!0):!1}var Bh=new WeakMap,Ro=class{#e;#t;#n;#o=null;#r=null;#a=!1;#s=!1;constructor(e){this.#n=e,this.#t=e.ownerDocument,this.#e=Bh.get(this.#t)??[],Bh.set(this.#t,this.#e)}get#f(){return this.#e.at(-1)===this&&this.#n.matches(":popover-open")}activate(e){this.#a||(this.#a=!0,this.#o=e,this.#r=fa(this.#n,e)?e:null,this.#e.push(this),this.#t.addEventListener("focusin",this.#u,!0),this.#t.addEventListener("keydown",this.#m))}focusInside(e=this.#r){if(!this.#f)return;(fa(this.#n,e)&&ba(e)?e:ga(this.#n)[0]??this.#n).focus({preventScroll:!0})}deactivate(){if(!this.#a)return()=>{};let e=Qt(this.#t),n=this.#e.at(-1)===this&&fa(this.#n,e),r=this.#o,a=r&&!fa(this.#n,r)?r:e;this.#a=!1;let o=this.#e.indexOf(this);return o>=0&&this.#e.splice(o,1),this.#t.removeEventListener("focusin",this.#u,!0),this.#t.removeEventListener("keydown",this.#m),this.#o=this.#r=null,()=>{n&&(ba(a)?a.focus({preventScroll:!0}):ba(e)?e.focus({preventScroll:!0}):ba(r)?r.focus({preventScroll:!0}):this.#e.at(-1)?.focusInside())}}#l(e){for(let n of e){if(n===this.#n)return!1;if(n instanceof Element&&n.matches(":modal"))return!0}return!1}#u=e=>{if(!this.#f||this.#s)return;let n=e.composedPath();if(!this.#l(n)){if(n.includes(this.#n)){this.#r=Qt(this.#t);return}this.#s=!0,this.focusInside(),this.#s=!1}};#m=e=>{!this.#f||e.defaultPrevented||e.key!=="Tab"||e.altKey||e.ctrlKey||e.metaKey||this.#l(e.composedPath())||(e.preventDefault(),Lo(ga(this.#n),Qt(this.#t),e.shiftKey,this.#n))}};var fx=`
155
+ `,Ao=class extends z{static observedAttributes=["expandable","truncate","collapsible"];slotEl;expandBtn;expanded=!1;overflowObserver;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Nv,this.slotEl=document.createElement("slot"),e.append(n,this.slotEl)}connectedCallback(){this.syncExpandButton(),this.#e&&this.startOverflowObserver()}disconnectedCallback(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect()}attributeChangedCallback(e,n,r){n!==r&&((e==="truncate"||e==="expandable")&&this.setExpanded(!1),this.syncExpandButton(),(e==="truncate"||e==="expandable")&&(this.#e?this.startOverflowObserver():this.stopOverflowObserver()))}get#e(){return this.hasAttribute("truncate")&&this.hasAttribute("expandable")}get#t(){return this.hasAttribute("collapsible")}get isTruncated(){if(!this.hasAttribute("truncate")||this.expanded)return!1;let e=this.slotEl;return e.clientWidth===0&&e.clientHeight===0?!1:e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1}syncExpandButton(){if(this.#e&&!this.expandBtn){let e=document.createElement("button");e.className="expand-btn",e.type="button",e.addEventListener("click",this.handleToggle),this.shadowRoot.append(e),this.expandBtn=e}else!this.#e&&this.expandBtn&&(this.expandBtn.remove(),this.expandBtn=void 0);this.refreshButton()}handleToggle=()=>{this.setExpanded(!this.expanded)};setExpanded(e){e!==this.expanded&&(this.expanded=e,this.slotEl.classList.toggle("expanded",e),this.refreshButton(),e||this.measureOverflow())}startOverflowObserver(){this.#e&&(this.overflowObserver??=new ResizeObserver(()=>this.measureOverflow()),this.contentObserver??=new MutationObserver(()=>this.measureOverflow()),this.overflowObserver.observe(this.slotEl),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}),this.measureOverflow())}stopOverflowObserver(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect(),this.slotEl.classList.remove("overflowing")}measureOverflow(){!this.#e||this.expanded||this.slotEl.classList.toggle("overflowing",this.isTruncated)}refreshButton(){let e=this.expandBtn;if(e){if(this.expanded&&!this.#t){e.remove(),this.expandBtn=void 0;return}e.setAttribute("aria-expanded",this.expanded?"true":"false"),e.setAttribute("aria-label",this.expanded?"Show less":"Show more"),e.classList.toggle("expanded",this.expanded)}}};function bu(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",Ao)}bu();var _s=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function da(t,e,{signal:n,edges:r}={}){let a,o=null,i=r!=null&&r.includes("leading"),s=r==null||r.includes("trailing"),l=()=>{o!==null&&(t.apply(a,o),a=void 0,o=null)},c=()=>{s&&l(),p()},d=null,u=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,c()},e)},m=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{m(),a=void 0,o=null},f=()=>{l()},b=function(...g){if(n?.aborted)return;a=this,o=g;let v=d==null;u(),i&&v&&l()};return b.schedule=u,b.cancel=p,b.flush=f,n?.addEventListener("abort",p,{once:!0}),b}function gu(){}function Fs(t,e,{signal:n,edges:r=["leading","trailing"]}={}){let a=null,o=da(function(...s){a=Date.now(),t.apply(this,s)},e,{signal:n,edges:r}),i=function(...s){if(a==null&&(a=Date.now()),Date.now()-a>=e){a=Date.now(),t.apply(this,s),o.cancel(),o.schedule();return}o.apply(this,s)};return i.cancel=o.cancel,i.flush=o.flush,i}function Vs(t){return typeof _s.Buffer<"u"&&_s.Buffer.isBuffer(t)}function Hs(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function js(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var vu="[object RegExp]",xu="[object String]",yu="[object Number]",wu="[object Boolean]";var ku="[object Symbol]",Eu="[object Date]",Cu="[object Map]",Au="[object Set]",Su="[object Array]",Tu="[object Function]",Mu="[object ArrayBuffer]",So="[object Object]",Iu="[object Error]",Du="[object DataView]",Ou="[object Uint8Array]",Pu="[object Uint8ClampedArray]",zu="[object Uint16Array]",Bu="[object Uint32Array]",Lu="[object BigUint64Array]",Ru="[object Int8Array]",Nu="[object Int16Array]",_u="[object Int32Array]",Fu="[object BigInt64Array]",Vu="[object Float32Array]",Hu="[object Float64Array]";function qs(t){if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function ju(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function qu(t,e,n){return ua(t,e,void 0,void 0,void 0,void 0,n)}function ua(t,e,n,r,a,o,i){let s=i(t,e,n,r,a,o);if(s!==void 0)return s;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return ha(t,e,o,i)}return ha(t,e,o,i)}function ha(t,e,n,r){if(Object.is(t,e))return!0;let a=js(t),o=js(e);if(a==="[object Arguments]"&&(a=So),o==="[object Arguments]"&&(o=So),a!==o)return!1;switch(a){case xu:return t.toString()===e.toString();case yu:return ju(t.valueOf(),e.valueOf());case wu:case Eu:case ku:return Object.is(t.valueOf(),e.valueOf());case vu:return t.source===e.source&&t.flags===e.flags;case Tu:return t===e}n=n??new Map;let i=n.get(t),s=n.get(e);if(i!=null&&s!=null)return i===e;n.set(t,e),n.set(e,t);try{switch(a){case Cu:if(t.size!==e.size)return!1;for(let[l,c]of t.entries())if(!e.has(l)||!ua(c,e.get(l),l,t,e,n,r))return!1;return!0;case Au:{if(t.size!==e.size)return!1;let l=Array.from(t.values()),c=Array.from(e.values());for(let d=0;d<l.length;d++){let u=l[d],m=c.findIndex(p=>ua(u,p,void 0,t,e,n,r));if(m===-1)return!1;c.splice(m,1)}return!0}case Su:case Ou:case Pu:case zu:case Bu:case Lu:case Ru:case Nu:case _u:case Fu:case Vu:case Hu:if(Vs(t)!==Vs(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!ua(t[l],e[l],l,t,e,n,r))return!1;return!0;case Mu:return t.byteLength!==e.byteLength?!1:ha(new Uint8Array(t),new Uint8Array(e),n,r);case Du:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:ha(new Uint8Array(t),new Uint8Array(e),n,r);case Iu:return t.name===e.name&&t.message===e.message;case So:{if(!(ha(t.constructor,e.constructor,n,r)||qs(t)&&qs(e)))return!1;let l=[...Object.keys(t),...Hs(t)],c=[...Object.keys(e),...Hs(e)];if(l.length!==c.length)return!1;for(let d=0;d<l.length;d++){let u=l[d],m=t[u];if(!Object.hasOwn(e,u))return!1;let p=e[u];if(!ua(m,p,u,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function To(t,e){return qu(t,e,gu)}var pa={width:["width"],height:["height"],size:["width","height"],overflow:["clientWidth","clientHeight","scrollWidth","scrollHeight","overflowX","overflowY","clippedX","clippedY","scrollableX","scrollableY"],edges:["hiddenStartX","hiddenEndX","hiddenStartY","hiddenEndY"],scroll:["scrollLeft","scrollTop"]},_v=new Set(Object.values(pa).flat());function Mo(t){let e=new Set,n=!1,r=t===""?["all"]:t?.trim().split(/\s+/)??[];for(let i of r)if(i==="all"){for(let s of _v)e.add(s);n=!0}else if(i==="context")n=!0;else if(Object.hasOwn(pa,i))for(let s of pa[i])e.add(s);let a=[...e].some(i=>i!=="width"&&i!=="height"),o=[...pa.scroll,...pa.edges].some(i=>e.has(i));return{fields:e,context:n,content:a,scroll:o}}var Io=new WeakMap,Fv=140,Vv=/(?:^|\s)(?:dark|light)(?:\s|$)/;function Hv(t){return t.classList.contains("dark")||t.classList.contains("light")}var Us=class{constructor(e,n){this.view=e;this.doc=n;this.#n=e.matchMedia("(prefers-color-scheme: dark)"),this.#o=e.matchMedia("(pointer: fine)"),this.#r=e.matchMedia("(pointer: coarse)"),this.#a=e.matchMedia("(hover: hover)"),this.#l=e.matchMedia("(prefers-reduced-motion: reduce)"),this.#u=[this.#n,this.#o,this.#r,this.#a,this.#l],this.#p=Yv(e.navigator)}view;doc;#e=new Set;#t=new Set;#n;#o;#r;#a;#l;#u;#i;#h;#f;#b=0;#p;subscribeContext(e){this.#e.size===0&&this.#s(),this.#e.add(e)}unsubscribeContext(e){this.#e.delete(e)&&(this.#e.size===0&&this.#A(),this.#v())}observeVisibility(e){if(!this.#t.has(e)){if(typeof this.view.IntersectionObserver>"u"){e.visibilityDidChange(!0);return}this.#h??=new this.view.IntersectionObserver(n=>{for(let r of n){let a=r.target;this.#t.has(a)&&a.visibilityDidChange(r.isIntersecting)}},{root:null,rootMargin:"0px",threshold:0}),this.#t.add(e),this.#h.observe(e)}}unobserveVisibility(e){this.#t.delete(e)&&(this.#h?.unobserve(e),this.#t.size===0&&(this.#h?.disconnect(),this.#h=void 0),this.#v())}snapshot(){return{globalMode:Zu(this.doc.documentElement),systemAppearance:this.#n.matches?"dark":"light",...this.#p,pointer:this.#o.matches?"fine":this.#r.matches?"coarse":"none",hover:this.#a.matches,reducedMotion:this.#l.matches,devicePixelRatio:this.view.devicePixelRatio}}#m(){this.#f?.removeEventListener("change",this.#c),this.#f=this.view.matchMedia(`(resolution: ${this.view.devicePixelRatio}dppx)`),this.#f.addEventListener("change",this.#c,{once:!0}),this.#b=this.view.devicePixelRatio}#c=()=>{this.view.devicePixelRatio!==this.#b&&(this.#m(),this.#S())};#s(){for(let n of this.#u)n.addEventListener("change",this.#S);this.#m(),this.view.addEventListener("resize",this.#c,{passive:!0});let e=this.doc.documentElement;e&&(this.#i=new this.view.MutationObserver(this.#x),this.#i.observe(e,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}))}#A(){for(let e of this.#u)e.removeEventListener("change",this.#S);this.#f?.removeEventListener("change",this.#c),this.#f=void 0,this.view.removeEventListener("resize",this.#c),this.#i?.disconnect(),this.#i=void 0}#v(){this.#e.size>0||this.#t.size>0||Io.get(this.view)===this&&Io.delete(this.view)}#x=e=>{let n=new Set;for(let r of e){let a=r.target;if(a instanceof this.view.Element&&!(!Hv(a)&&!Vv.test(r.oldValue??"")))for(let o of this.#e)(a===o||a.contains(o))&&n.add(o)}for(let r of n)r.contextStoreDidChange()};#S=()=>{for(let e of this.#e)e.contextStoreDidChange()}};function Uu(t,e){let n=Io.get(t);return n||(n=new Us(t,e),Io.set(t,n)),n}function Zu(t){return t?.classList.contains("dark")?"dark":"light"}function jv(t){for(let e=t;e;e=e.parentElement){if(e.classList.contains("dark"))return"dark";if(e.classList.contains("light"))return"light"}return Zu(t.ownerDocument.documentElement)}var qv={edge:/edg[ea]?\/(\d+)/,opera:/opr\/(\d+)/,firefox:/(?:firefox|fxios)\/(\d+)/,chrome:/(?:chrome|crios)\/(\d+)/,safari:/version\/(\d+)/,unknown:/(?!)/},Uv={windows:/windows nt ([\d.]+)/,macos:/mac os x (\d+[._]\d+(?:[._]\d+)?)/,ios:/os (\d+[._]\d+(?:[._]\d+)?)/,android:/android (\d+(?:\.\d+)*)/};function Yv(t){let e=t,n=(t.userAgent??"").toLowerCase(),r=`${e.userAgentData?.platform??""} ${t.platform??""} ${n}`.toLowerCase(),a=/android/.test(r)?"android":/iphone|ipad|ipod|ios/.test(r)?"ios":/mac/.test(r)?"macos":/win/.test(r)?"windows":/linux/.test(r)?"linux":"unknown",o=/edg[ea]?\//.test(n)?"edge":/opr\/|opera/.test(n)?"opera":/firefox\/|fxios\//.test(n)?"firefox":/chrome\/|crios\//.test(n)?"chrome":/safari\//.test(n)?"safari":"unknown",s=(e.userAgentData?.brands??[]).filter(l=>!/not.a.brand/i.test(l.brand)).sort((l,c)=>Number(/chromium/i.test(l.brand))-Number(/chromium/i.test(c.brand)))[0];return{os:a,osVersion:parseInt(n.match(Uv[a]??/(?!)/)?.[1]??"",10)||0,browser:o,browserVersion:Number(s?.version??n.match(qv[o])?.[1])||0,mobile:e.userAgentData?.mobile??/android|mobi|iphone|ipad|ipod/.test(r)}}function Wv(t,e){return t!==void 0&&Object.keys(e).every(n=>To(t[n],e[n]))}function Yu(t,e){return t?Object.fromEntries(Object.entries(e).filter(([n,r])=>!To(t[n],r))):{...e}}function bn(t){return parseFloat(t)||0}function Zv(t){return{paddingTop:bn(t.paddingTop),paddingRight:bn(t.paddingRight),paddingBottom:bn(t.paddingBottom),paddingLeft:bn(t.paddingLeft),borderTop:bn(t.borderTopWidth),borderRight:bn(t.borderRightWidth),borderBottom:bn(t.borderBottomWidth),borderLeft:bn(t.borderLeftWidth)}}function Wu(t){return t==="normal"?"0px":t}function $v(t){let e=parseFloat(t.lineHeight),n=Number.isFinite(e)?e:null,r=t.fontStyle&&t.fontStyle!=="normal"?`${t.fontStyle} `:"",a=t.fontWeight&&t.fontWeight!=="400"?`${t.fontWeight} `:"",o=n!=null?`/${n}px`:"";return{shorthand:`${r}${a}${t.fontSize}${o} ${t.fontFamily}`,family:t.fontFamily,size:parseFloat(t.fontSize)||0,weight:parseFloat(t.fontWeight)||400,style:t.fontStyle,stretch:t.fontStretch,lineHeight:n,letterSpacing:Wu(t.letterSpacing),wordSpacing:Wu(t.wordSpacing),color:t.color,featureSettings:t.fontFeatureSettings,variationSettings:t.fontVariationSettings,kerning:t.fontKerning,variantCaps:t.fontVariantCaps,textRendering:t.textRendering,direction:t.direction}}function gn(t){return Math.round(t*100)/100}var Do=class extends z{static observedAttributes=["fade","observe","observe-offscreen","throttle"];#e=this.attachInternals?.();#t;#n;#o;#r;#a;#l=!1;#u;#i=new Set;#h=!1;#f=!1;#b;#p;#m;#c;#s=!1;#A=!1;#v=new Set;#x=!1;#S;#y=!1;#T=!1;connectedCallback(){this.#t=Uu(this.view,this.doc),this.#d()}disconnectedCallback(){this.#F(),this.#B(),this.#D(),this.#t?.unobserveVisibility(this),this.#t=void 0,this.#S=void 0}attributeChangedCallback(e,n,r){n!==r&&(e==="fade"&&r===null&&this.#F(),this.#t&&((e==="fade"||e==="observe"||e==="observe-offscreen")&&this.#d(),e==="throttle"&&this.#L(),(e==="observe"||e==="throttle")&&this.#k()))}get measurement(){return this.#N()}get context(){return this.#Z()}get isTruncated(){let e=this.#N(!1);return e.clippedX||e.clippedY}contextStoreDidChange(){this.#P(),this.#k()}visibilityDidChange(e){this.#S!==e&&(this.#S=e,this.#d())}#d(){let{fields:e,context:n,content:r,scroll:a}=Mo(this.getAttribute("observe"));(e.size!==this.#i.size||[...e].some(l=>!this.#i.has(l)))&&(this.#y=!0,this.#L()),this.#i=e,this.#h=this.hasAttribute("fade")||r,this.#f=this.hasAttribute("fade")||a;let o=this.hasAttribute("fade")||e.size>0,i=this.hasAttribute("observe-offscreen");this.isConnected&&o&&(i||(this.#S??this.hasAttribute("fade")))?this.#E():this.#B(),this.#s&&this.#O(),this.isConnected&&o&&!i?this.#t?.observeVisibility(this):this.#t?.unobserveVisibility(this),this.isConnected&&n?this.#w():this.#D(),this.#g()}#g(){let e=this.#s||this.#x;e!==!!this.#r&&(e?(this.#r=new this.view.MutationObserver(this.#I),this.#r.observe(this,{attributes:!0})):(this.#r?.disconnect(),this.#r=void 0))}#I=()=>{this.#k(),this.#P()};#E(){this.#s||(this.#s=!0,this.#L(),this.#n=new this.view.ResizeObserver(this.#k),this.#n.observe(this),this.doc.fonts?.addEventListener("loadingdone",this.#k),this.#u=this.#N(!1),this.#q(this.#u),this.#M(),this.#y=!0,this.#k())}#O(){this.#h&&!this.#o?(this.#o=new this.view.MutationObserver(this.#k),this.#o.observe(this,{subtree:!0,childList:!0,characterData:!0}),this.addEventListener("input",this.#k),this.addEventListener("load",this.#k,!0)):!this.#h&&this.#o&&(this.#o.disconnect(),this.#o=void 0,this.removeEventListener("input",this.#k),this.removeEventListener("load",this.#k,!0)),this.#f?this.addEventListener("scroll",this.#k,{passive:!0}):this.removeEventListener("scroll",this.#k),this.#M()}#M(){if(!this.#h||!this.#A||!this.#s){for(let n of this.#v)this.#n?.unobserve(n);this.#v.clear();return}let e=new Set(this.children);for(let n of this.#v)e.has(n)||(this.#n?.unobserve(n),this.#v.delete(n));for(let n of e)this.#v.has(n)||(this.#n?.observe(n),this.#v.add(n))}#B(){this.#s&&(this.#s=!1,this.#v.clear(),this.#n?.disconnect(),this.#n=void 0,this.#o?.disconnect(),this.#o=void 0,this.#a!=null&&this.view.cancelAnimationFrame(this.#a),this.#a=void 0,this.#p?.cancel(),this.#p=void 0,this.removeEventListener("input",this.#k),this.removeEventListener("scroll",this.#k),this.removeEventListener("load",this.#k,!0),this.doc.fonts?.removeEventListener("loadingdone",this.#k))}#w(){this.#x||(this.#x=!0,this.#t?.subscribeContext(this),this.addEventListener("focusin",this.#P),this.addEventListener("focusout",this.#V),this.doc.fonts?.addEventListener("loadingdone",this.#P),this.#T=!0,this.#P())}#D(){this.#x&&(this.#x=!1,this.#t?.unsubscribeContext(this),this.removeEventListener("focusin",this.#P),this.removeEventListener("focusout",this.#V),this.doc.fonts?.removeEventListener("loadingdone",this.#P))}#V=e=>{let n=e.relatedTarget;n instanceof this.view.Node&&this.contains(n)||this.#P()};#k=()=>{!this.#s||this.#a!=null||(this.#a=this.view.requestAnimationFrame(()=>{this.#a=void 0,this.#s&&(this.#p?this.#p():this.#R())}))};#P=()=>{!this.#x||this.#l||(this.#l=!0,queueMicrotask(()=>{if(this.#l=!1,!this.#x)return;let e=this.#T;this.#T=!1,this.#H(e)}))};#j(e){let n=[],r=this.getAttribute("include-rects-for");if(r)try{let a=e??this.getBoundingClientRect();n=Array.from(this.querySelectorAll(r),o=>{let i=o.getBoundingClientRect();return{top:gn(i.top-a.top),right:gn(i.right-a.left),bottom:gn(i.bottom-a.top),left:gn(i.left-a.left),width:gn(i.width),height:gn(i.height)}})}catch(a){if(!(a instanceof this.view.DOMException)||a.name!=="SyntaxError")throw a}return n}#N(e=!0){let n=this.getBoundingClientRect(),r=this.clientWidth,a=this.clientHeight,o=this.scrollWidth,i=this.scrollHeight,s=r>0||a>0,l=s&&o>r+1,c=s&&i>a+1,d=this.view.getComputedStyle(this);this.#A=d.overflowX!=="visible"||d.overflowY!=="visible";let u=l&&d.overflowX!=="visible",m=c&&d.overflowY!=="visible",p=l&&(d.overflowX==="auto"||d.overflowX==="scroll"),f=c&&(d.overflowY==="auto"||d.overflowY==="scroll"),b=Math.round(this.scrollLeft),g=Math.round(this.scrollTop),v=Math.max(0,d.direction==="rtl"?-b:b),x=Math.max(0,g);return{width:gn(n.width),height:gn(n.height),rects:e?this.#j(n):[],clientWidth:r,clientHeight:a,scrollWidth:o,scrollHeight:i,overflowX:l,overflowY:c,clippedX:u,clippedY:m,scrollableX:p,scrollableY:f,scrollLeft:b,scrollTop:g,hiddenStartX:u&&v>1,hiddenEndX:u&&v<o-r-1,hiddenStartY:m&&x>1,hiddenEndY:m&&x<i-a-1}}#Z(){let e=(this.#t??Uu(this.view,this.doc)).snapshot(),n=this.view.getComputedStyle(this);return{...e,mode:jv(this),focusWithin:this.matches(":focus-within"),font:$v(n),inset:Zv(n),backgroundColor:n.backgroundColor}}#L(){this.#p?.cancel(),this.#p=void 0;let e=Number(this.getAttribute("throttle"));this.#s&&Number.isFinite(e)&&e>0&&(this.#p=Fs(()=>this.#R(),Math.min(e,2147483647)))}#_(e){if(this.#i.size===0)return!1;let n=this.#b;if(!n||this.#y)return!0;for(let r of this.#i)if(n[r]!==e[r])return!0;return!1}#R(){let e=this.#N(!1);if(this.#u=e,this.#q(e),this.#M(),!this.#_(e))return;let n={...e,rects:this.#j()},r=this.#y,a=this.#b;this.#y=!1,this.#b=n;let o={changed:Yu(r?void 0:a,n),current:n};this.dispatchEvent(new this.view.CustomEvent("measurechange",{detail:o}))}#H(e){let n=this.#Z(),r=this.#c;if(this.#c=n,!e&&Wv(r,n))return;let a={changed:e?{...n}:Yu(r,n),current:n};this.dispatchEvent(new this.view.CustomEvent("contextchange",{detail:a}))}#q(e){this.#C("overflow-x",e.overflowX),this.#C("overflow-y",e.overflowY),this.#C("clipped-x",e.clippedX),this.#C("clipped-y",e.clippedY),this.#C("scrollable-x",e.scrollableX),this.#C("scrollable-y",e.scrollableY),this.#C("hidden-start-x",e.hiddenStartX),this.#C("hidden-end-x",e.hiddenEndX),this.#C("hidden-start-y",e.hiddenStartY),this.#C("hidden-end-y",e.hiddenEndY),this.#U(e)}#U(e){if((e.hiddenStartX||e.hiddenEndX||e.hiddenStartY||e.hiddenEndY)&&this.hasAttribute("fade")){this.#m!==void 0&&this.view.clearTimeout(this.#m),this.#m=void 0,this.#C("fade-mask-active",!0);return}if(!this.hasAttribute("fade")){this.#F();return}if(!(!this.#e?.states?.has("fade-mask-active")||this.#m!==void 0)){if(this.view.matchMedia("(prefers-reduced-motion: reduce)").matches){this.#F();return}this.#m=this.view.setTimeout(()=>this.#F(),Fv)}}#F(){this.#m!==void 0&&this.view.clearTimeout(this.#m),this.#m=void 0,this.#C("fade-mask-active",!1)}#C(e,n){n?this.#e?.states?.add(e):this.#e?.states?.delete(e)}};function $u(){typeof customElements>"u"||customElements.get("a-box")||customElements.define("a-box",Do)}$u();var nh=["wheel-capture","wheel-activation","wheel-modifier","wheel-delay","wheel-tolerance","wheel-reset-on-move","pointer-capture","pointer-buttons","pointer-threshold","pointer-modifier","pointer-include-interactive","pan","pan-pointer-types","pan-threshold","pan-directions","pan-inertia","pan-time-constant","pan-min-velocity"],pt=new WeakMap,mt=new WeakMap,rh={up:1,down:2,left:4,right:8},Gs={mouse:1,pen:2,touch:4},Gv='textarea, select, input[type="number"], input[type="range"], a-menu',Gu=['input, textarea, select, button, summary, a[href], [contenteditable]:not([contenteditable="false"])',...["button","checkbox","combobox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","scrollbar","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"].map(t=>`[role~="${t}"]`),"a-input, a-button, a-slider, a-checkbox, a-switch, a-radio, a-menu, a-menu-item, a-tab"].join(", ");function Oo(t,e,n){return t===null||t===""?n:t==="all"?Object.values(e).reduce((r,a)=>r|a,0):t.trim().split(/\s+/).reduce((r,a)=>r|(e[a]??0),0)}function yr(t,e,n,r=0){return Math.max(r,fr(t.getAttribute(e)?.trim()??null,n))}function ah(t,e,n){let r=t.getAttribute(e);return r==="any"||r==="none"||r==="alt"||r==="ctrl"||r==="meta"||r==="shift"?r:n}function Kv(t){if(!t.hasAttribute("wheel-capture"))return;let e=Oo(t.getAttribute("wheel-capture"),rh,15),n=t.getAttribute("wheel-activation");return{directions:e,activation:n==="hover"||n==="focus"||n==="settled-or-focus"?n:"settled",modifier:ah(t,"wheel-modifier","none"),delay:yr(t,"wheel-delay",150),tolerance:yr(t,"wheel-tolerance",5),resetOnMove:t.hasAttribute("wheel-reset-on-move")}}function Xv(t){if(!t.hasAttribute("pointer-capture"))return;let e=Oo(t.getAttribute("pointer-capture"),Gs,7);if(!e)return;let n=t.getAttribute("pointer-buttons"),r=n===null?1:n.split(/\s+/).reduce((a,o)=>{let i=Number(o);return Number.isInteger(i)&&i>=0&&i<=5?a|1<<i:a},0);if(r)return{types:e,buttons:r,threshold:yr(t,"pointer-threshold",0),modifier:ah(t,"pointer-modifier","any"),interactive:t.hasAttribute("pointer-include-interactive")}}function Jv(t){if(!t.hasAttribute("pan"))return;let e=t.getAttribute("pan");if(e!==""&&e!=="both"&&e!=="x"&&e!=="y")return;let n=Oo(t.getAttribute("pan-pointer-types"),Gs,4);if(n)return{types:n,axis:e||"both",threshold:yr(t,"pan-threshold",3),directions:Oo(t.getAttribute("pan-directions"),rh,15),inertia:t.hasAttribute("pan-inertia"),tau:yr(t,"pan-time-constant",325,1),minVelocity:yr(t,"pan-min-velocity",.02,.001)}}function Qv(t){let e=t.ownerDocument,n=mt.get(e);if(n)return n;let r=e.defaultView;return n={doc:e,view:r,states:new Set,dwell:new Map,sessions:new Map,momenta:new Set,tracking:!1,listening:!1},mt.set(e,n),r.addEventListener("blur",wh),e.addEventListener("visibilitychange",kh),n}function Ks(t,e){if(!t.isConnected||!t.ownerDocument.defaultView)return;let n=pt.get(t);if(!n&&!t.hasAttribute("wheel-capture")&&!t.hasAttribute("pointer-capture")&&!t.hasAttribute("pan"))return;let r=Kv(t),a=Xv(t),o=Jv(t);if(!r&&!a&&!o){Xs(t,"disabled");return}n||(n={surface:t,store:Qv(t)},pt.set(t,n),n.store.states.add(n));let i=!!n.wheel,s=!!(n.pointer||n.pan);n.wheel=r,n.pointer=a,n.pan=o,i!==!!r&&(r?t.addEventListener("wheel",Zs,{passive:!1}):t.removeEventListener("wheel",Zs)),s!==!!(a||o)&&(a||o?(t.addEventListener("pointerdown",ch),t.addEventListener("lostpointercapture",uh),t.addEventListener("click",vh,!0),t.addEventListener("dragstart",xh)):oh(t)),(!r||e?.startsWith("wheel-")&&e!=="wheel-capture")&&n.store.dwell.delete(t),n.session&&e&&(e.startsWith("pointer-")||e==="pan"||e==="pan-pointer-types"||e==="pan-threshold")&&Un(n.session,null,"disabled"),n.momentum&&(!o?.inertia||!o.directions)&&qn(n.momentum,"disabled"),ih(n.store)}function Xs(t,e="disconnected"){let n=pt.get(t);if(!n)return;pt.delete(t),n.wheel=void 0,n.pointer=void 0,n.pan=void 0,t.removeEventListener("wheel",Zs),oh(t),n.session&&Un(n.session,null,e),n.momentum&&qn(n.momentum,e);let r=n.store;r.dwell.delete(t),r.states.delete(n),ih(r),!r.states.size&&(r.view.removeEventListener("blur",wh),r.doc.removeEventListener("visibilitychange",kh),mt.get(r.doc)===r&&mt.delete(r.doc))}function oh(t){t.removeEventListener("pointerdown",ch),t.removeEventListener("lostpointercapture",uh),t.removeEventListener("click",vh,!0),t.removeEventListener("dragstart",xh)}function Js(t){return t?.activation==="settled"||t?.activation==="settled-or-focus"}function ih(t){let e=Array.from(t.states).some(n=>Js(n.wheel));e!==t.tracking&&(t.tracking=e,e?(t.doc.addEventListener("pointermove",Ku,{passive:!0,capture:!0}),t.doc.addEventListener("pointerout",Xu,{passive:!0,capture:!0}),t.doc.addEventListener("wheel",Ju,{passive:!0,capture:!0})):(t.doc.removeEventListener("pointermove",Ku,!0),t.doc.removeEventListener("pointerout",Xu,!0),t.doc.removeEventListener("wheel",Ju,!0),t.dwell.clear()))}function Ku(t){let e=mt.get(this);if(!e||t.pointerType==="touch")return;let n=t.composedPath();for(let r of e.dwell.keys())(!n.includes(r)||t.buttons&&!ma(r,t.clientX,t.clientY).inside)&&e.dwell.delete(r);for(let r of n){let a=pt.get(r),o=a?.wheel;if(!a||!o||!Js(o))continue;let i=e.dwell.get(a.surface);if(!i){if(t.buttons)continue;e.dwell.set(a.surface,{x:t.clientX,y:t.clientY,time:t.timeStamp});continue}t.clientX===i.x&&t.clientY===i.y||t.timeStamp-i.time>=o.delay&&!o.resetOnMove||(Math.abs(t.clientX-i.x)>o.tolerance||Math.abs(t.clientY-i.y)>o.tolerance)&&(i={x:t.clientX,y:t.clientY,time:t.timeStamp},e.dwell.set(a.surface,i))}}function Xu(t){t.pointerType!=="touch"&&t.relatedTarget===null&&mt.get(this)?.dwell.clear()}function Ju(t){let e=mt.get(this);if(!e)return;let n=t.composedPath();for(let r of e.dwell.keys())n.includes(r)||e.dwell.delete(r)}function sh(t,e){return e==="any"?!0:e==="none"?!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey:t[`${e}Key`]}function Ys(t,e,n){let r=t.ownerDocument.defaultView;for(let a of e.composedPath()){if(a===t)break;if(a instanceof r.Element&&(a.hasAttribute("data-capture-ignore")||n&&a.matches(n)))return!0}return t.hasAttribute("data-capture-ignore")}function Ws(t,e,n){return e!==0&&!!(t&(n?e<0?4:8:e<0?1:2))}function ma(t,e,n){let r=t.getBoundingClientRect();return{localX:e-r.left,localY:n-r.top,boxWidth:r.width,boxHeight:r.height,inside:e>=r.left&&e<=r.right&&n>=r.top&&n<=r.bottom,focusWithin:t.matches(":focus-within")}}function lh(t){return{type:t.type,timeStamp:t.timeStamp,isTrusted:t.isTrusted,cancelable:t.cancelable,defaultPrevented:t.defaultPrevented,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,offsetX:t.offsetX,offsetY:t.offsetY}}function Qs(t){return{...lh(t),pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist}}function el(t,e,n){t.surface.dispatchEvent(new t.store.view.CustomEvent(e,{detail:n}))}function Zs(t){let e=pt.get(this),n=e?.wheel;if(!e||!n||!n.directions||t.defaultPrevented||!t.cancelable||!sh(t,n.modifier))return;let r=t.deltaMode,a=t.deltaX,o=t.deltaY,i=Math.abs(a)>Math.abs(o);if(!Ws(n.directions,i?a:o,i))return;let s;if((n.activation==="focus"||n.activation==="settled-or-focus")&&this.matches(":focus-within"))s="focus";else if(n.activation==="hover")s="immediate";else{let d=e.store.dwell.get(this);if(!Js(n)||!d||t.timeStamp-d.time<n.delay)return;s="settled"}if(Ys(this,t,Gv))return;let l=ma(this,t.clientX,t.clientY);if(!l.inside||(t.preventDefault(),!t.defaultPrevented))return;t.stopPropagation();let c={...lh(t),deltaMode:r,deltaX:a,deltaY:o,deltaZ:t.deltaZ};e.momentum&&qn(e.momentum,"interrupted"),el(e,"wheelinput",{wheelEvent:c,...l,activationReason:s})}function Po(t){return{x:t.clientX,y:t.clientY,time:t.timeStamp}}function ch(t){let e=pt.get(this);if(!e||(e.suppressClickUntil=void 0,e.momentum&&qn(e.momentum,"interrupted"),t.defaultPrevented||!t.isPrimary||e.session||e.store.sessions.has(t.pointerId)))return;let n=Gs[t.pointerType]??0,r=e.pointer,a=!!r&&!!(r.types&n)&&!!(r.buttons&1<<t.button)&&sh(t,r.modifier)&&!Ys(this,t,r.interactive?"":Gu),o=!!e.pan&&!!(e.pan.types&n)&&t.button===0&&e.pan.directions!==0&&!Ys(this,t,Gu);if(!a&&!o)return;let i=Qs(t),s=Po(i),l={state:e,id:t.pointerId,start:{pointerEvent:i,...ma(this,t.clientX,t.clientY)},current:i,pointer:a,pan:o,pointerStarted:!1,panStarted:!1,captured:!1,pointerReason:r?.threshold?"drag-threshold":"pointer-down",panReason:e.pan?.threshold?"drag-threshold":"pointer-down",pointerLast:s,panLast:s,samples:o?[s]:[],lastMoveTime:t.timeStamp};e.session=l,e.store.sessions.set(l.id,l),dh(e.store),fh(l,t,!0)}function dh(t){let e=t.sessions.size>0;e!==t.listening&&(t.listening=e,e?(t.doc.addEventListener("pointermove",Qu,{capture:!0,passive:!1}),t.doc.addEventListener("pointerup",eh,{capture:!0,passive:!1}),t.doc.addEventListener("pointercancel",th,!0)):(t.doc.removeEventListener("pointermove",Qu,!0),t.doc.removeEventListener("pointerup",eh,!0),t.doc.removeEventListener("pointercancel",th,!0)))}function Qu(t){let e=mt.get(this)?.sessions.get(t.pointerId);e&&fh(e,t)}function eh(t){let e=mt.get(this)?.sessions.get(t.pointerId);e&&Un(e,t)}function th(t){let e=mt.get(this)?.sessions.get(t.pointerId);e&&Un(e,t,"pointer-cancel")}function uh(t){let e=pt.get(this)?.session;e?.id===t.pointerId&&e.captured&&Un(e,t,"lost-capture")}function hh(t){t.cancelable&&t.preventDefault()}function ph(t,e){if(!t.pan)return;let n=t.samples.at(-1);for((!n||n.x!==e.clientX||n.y!==e.clientY)&&(t.lastMoveTime=e.timeStamp),t.samples.push(Po(e));t.samples.length>8||t.samples.length>2&&e.timeStamp-t.samples[0].time>100;)t.samples.shift()}function mh(t,e){if(e-t.lastMoveTime>80)return{x:0,y:0};let n=t.samples.at(-1),r=t.samples.find(o=>n&&n.time-o.time<=100),a=n&&r?n.time-r.time:0;return a>0&&r&&n?{x:(r.x-n.x)/a,y:(r.y-n.y)/a}:{x:0,y:0}}function wr(t,e,n){return{x:t.axis!=="y"&&Ws(t.directions,e,!0)?e:0,y:t.axis!=="x"&&Ws(t.directions,n,!1)?n:0}}function fh(t,e,n=!1){let r=t.state,a=e.clientX-t.start.pointerEvent.clientX,o=e.clientY-t.start.pointerEvent.clientY,i=Math.hypot(a,o),s=t.pointer&&!t.pointerStarted&&!!r.pointer&&i>=r.pointer.threshold,l=r.pan?.axis==="x"?Math.abs(a):r.pan?.axis==="y"?Math.abs(o):i,c=t.pan&&!t.panStarted&&!!r.pan&&l>=r.pan.threshold;if(s||c||t.captured){if(!t.captured){try{r.surface.setPointerCapture(t.id)}catch{Un(t,e,"lost-capture");return}t.captured=!0}hh(e)}if(t.current=Qs(e),n&&(t.start.pointerEvent=t.current),n||ph(t,e),!(s&&(t.pointerStarted=!0,$s(t,"start",t.start.pointerEvent),r.session!==t))&&!(c&&(t.panStarted=!0,vn(t,"start",t.start.pointerEvent),r.session!==t))&&!n&&!(t.pointerStarted&&($s(t,"move",t.current),r.session!==t))&&t.panStarted&&r.pan){let d=wr(r.pan,t.panLast.x-e.clientX,t.panLast.y-e.clientY),u=mh(t,e.timeStamp),m=wr(r.pan,u.x,u.y);t.panLast=Po(e),vn(t,"move",t.current,{deltaX:d.x,deltaY:d.y,velocityX:m.x,velocityY:m.y})}}function $s(t,e,n,r){let a=n??t.current,o=t.start.pointerEvent,i=e==="start",s=i?0:a.clientX-t.pointerLast.x,l=i?0:a.clientY-t.pointerLast.y;t.pointerLast=Po(a),el(t.state,"pointerinput",{phase:e,pointerEvent:n?{...n}:null,start:bh(t),...ma(t.state.surface,a.clientX,a.clientY),deltaX:s,deltaY:l,movementX:a.clientX-o.clientX,movementY:a.clientY-o.clientY,activationReason:t.pointerReason,...r?{cancelReason:r}:{}})}function vn(t,e,n,r){let a=n??t.current;el(t.state,"paninput",{phase:e,pointerEvent:n?{...n}:null,start:bh(t),...ma(t.state.surface,a.clientX,a.clientY),deltaX:0,deltaY:0,velocityX:0,velocityY:0,activationReason:t.panReason,...r})}function bh(t){return{...t.start,pointerEvent:{...t.start.pointerEvent}}}function Un(t,e,n){let r=t.state;if(r.session!==t||(r.session=void 0,r.store.sessions.delete(t.id),dh(r.store),e&&(t.captured&&!n&&hh(e),ph(t,e),t.current=Qs(e)),r.surface.hasPointerCapture(t.id)&&r.surface.releasePointerCapture(t.id),t.captured&&(r.suppressClickUntil=r.store.view.performance.now()+400),t.pointerStarted&&$s(t,n?"cancel":"end",e?t.current:null,n),!t.panStarted))return;if(n||pt.get(r.surface)!==r||!r.pan){vn(t,"cancel",e?t.current:null,{cancelReason:n??"disabled"});return}let a=wr(r.pan,t.panLast.x-t.current.clientX,t.panLast.y-t.current.clientY),o=mh(t,t.current.timeStamp),i=wr(r.pan,o.x,o.y);vn(t,"release",t.current,{deltaX:a.x,deltaY:a.y,velocityX:i.x,velocityY:i.y});let s=r.pan;if(pt.get(r.surface)!==r||!s||r.session){vn(t,"cancel",null,{cancelReason:"disabled"});return}if(s.inertia&&(Math.abs(i.x)>=s.minVelocity||Math.abs(i.y)>=s.minVelocity)){let l={state:r,session:t,vx:i.x,vy:i.y,time:r.store.view.performance.now()};r.momentum=l,r.store.momenta.add(l),gh(r.store)}else vn(t,"end",t.current)}function gh(t){t.frame!==void 0||!t.momenta.size||(t.animate??=e=>e0(t,e),t.frame=t.view.requestAnimationFrame(t.animate))}function e0(t,e){t.frame=void 0;for(let n of Array.from(t.momenta)){let r=n.state.pan;if(!r?.inertia||!n.state.surface.isConnected){qn(n,"disabled");continue}let a=Math.min(50,Math.max(0,e-n.time));n.time=e;let o=Math.exp(-a/r.tau),i=wr(r,n.vx*r.tau*(1-o),n.vy*r.tau*(1-o)),s=wr(r,n.vx*o,n.vy*o);n.vx=s.x,n.vy=s.y,(i.x||i.y)&&vn(n.session,"inertia",null,{deltaX:i.x,deltaY:i.y,velocityX:s.x,velocityY:s.y}),t.momenta.has(n)&&Math.abs(s.x)<r.minVelocity&&Math.abs(s.y)<r.minVelocity&&qn(n)}gh(t)}function qn(t,e){let n=t.state;n.momentum===t&&(n.momentum=void 0,n.store.momenta.delete(t),!n.store.momenta.size&&n.store.frame!==void 0&&(n.store.view.cancelAnimationFrame(n.store.frame),n.store.frame=void 0),vn(t.session,e?"cancel":"end",null,e?{cancelReason:e}:void 0))}function vh(t){let e=pt.get(this);!e?.suppressClickUntil||t.detail===0||e.store.view.performance.now()>e.suppressClickUntil||(e.suppressClickUntil=void 0,t.preventDefault(),t.stopPropagation())}function xh(t){pt.get(this)?.session&&t.preventDefault()}function yh(t){t.dwell.clear();for(let e of Array.from(t.sessions.values()))Un(e,null,"blur");for(let e of Array.from(t.momenta))qn(e,"blur")}function wh(){let t=mt.get(this.document);t&&yh(t)}function kh(){let t=mt.get(this);t&&this.hidden&&yh(t)}var zo=class extends z{static observedAttributes=nh;connectedCallback(){Ks(this)}disconnectedCallback(){Xs(this)}attributeChangedCallback(e){Ks(this,e)}};function Eh(){typeof customElements>"u"||customElements.get("a-capture")||customElements.define("a-capture",zo)}Eh();var Sh=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],tl=Sh.join(","),Th=typeof Element>"u",kr=Th?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Bo=!Th&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},Lo=function(e,n){var r;n===void 0&&(n=!0);var a=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=a===""||a==="true",i=o||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Lo(e.parentNode));return i},t0=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},n0=function(e,n,r){if(Lo(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(tl));return n&&kr.call(e,tl)&&a.unshift(e),a=a.filter(r),a},nl=function(e,n,r){for(var a=[],o=Array.from(e);o.length;){var i=o.shift();if(!Lo(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=nl(l,!0,r);r.flatten?a.push.apply(a,c):a.push({scopeParent:i,candidates:c})}else{var d=kr.call(i,tl);d&&r.filter(i)&&(n||!e.includes(i))&&a.push(i);var u=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),m=!Lo(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(u&&m){var p=nl(u===!0?i.children:u.children,!0,r);r.flatten?a.push.apply(a,p):a.push({scopeParent:i,candidates:p})}else o.unshift.apply(o,i.children)}}return a},Mh=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ih=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||t0(e))&&!Mh(e)?0:e.tabIndex},r0=function(e,n){var r=Ih(e);return r<0&&n&&!Mh(e)?0:r},a0=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Dh=function(e){return e.tagName==="INPUT"},o0=function(e){return Dh(e)&&e.type==="hidden"},i0=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},s0=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},l0=function(e){if(!e.name)return!0;var n=e.form||Bo(e),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(e.name));else try{a=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=s0(a,e.form);return!o||o===e},c0=function(e){return Dh(e)&&e.type==="radio"},d0=function(e){return c0(e)&&!l0(e)},u0=function(e){var n,r=e&&Bo(e),a=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var i,s,l;for(o=!!((i=a)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(a)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&a;){var c,d,u;r=Bo(a),a=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=a)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(a))}}return o},Ch=function(e){var n=e.getBoundingClientRect(),r=n.width,a=n.height;return r===0&&a===0},h0=function(e,n){var r=n.displayCheck,a=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var i=getComputedStyle(e),s=i.visibility;if(s==="hidden"||s==="collapse")return!0;var l=kr.call(e,"details>summary:first-of-type"),c=l?e.parentElement:e;if(kr.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof a=="function"){for(var d=e;e;){var u=e.parentElement,m=Bo(e);if(u&&!u.shadowRoot&&a(u)===!0)return Ch(e);e.assignedSlot?e=e.assignedSlot:!u&&m!==e.ownerDocument?e=m.host:e=u}e=d}if(u0(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ch(e);return!1},p0=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var a=n.children.item(r);if(a.tagName==="LEGEND")return kr.call(n,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}n=n.parentElement}return!1},Oh=function(e,n){return!(n.disabled||o0(n)||h0(n,e)||i0(n)||p0(n))},Ah=function(e,n){return!(d0(n)||Ih(n)<0||!Oh(e,n))},m0=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ph=function(e){var n=[],r=[];return e.forEach(function(a,o){var i=!!a.scopeParent,s=i?a.scopeParent:a,l=r0(s,i),c=i?Ph(a.candidates):s;l===0?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:a,isScope:i,content:c})}),r.sort(a0).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},zh=function(e,n){n=n||{};var r;return n.getShadowRoot?r=nl([e],n.includeContainer,{filter:Ah.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:m0}):r=n0(e,n.includeContainer,Ah.bind(null,n)),Ph(r)};var f0=Sh.concat("iframe:not([inert]):not([inert] *)").join(","),Bh=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return kr.call(e,f0)===!1?!1:Oh(n,e)};var Lh={getShadowRoot:!0};function Jt(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function rl(t){if(t.nodeType===1&&t.assignedSlot)return t.assignedSlot;let e=t.parentNode;return e?.nodeType===11&&"host"in e?e.host:e}function fa(t,e){for(;e;){if(e===t)return!0;e=rl(e)}return!1}function ba(t){return!!t&&"focus"in t&&Bh(t,Lh)}function ga(t){return zh(t,Lh)}function Ro(t,e,n,r){let a=t.indexOf(e),o=a<0?n?t.length-1:0:(a+(n?-1:1)+t.length)%t.length,i=t[o]??r;return i?(i.focus(),!0):!1}var Rh=new WeakMap,No=class{#e;#t;#n;#o=null;#r=null;#a=!1;#l=!1;constructor(e){this.#n=e,this.#t=e.ownerDocument,this.#e=Rh.get(this.#t)??[],Rh.set(this.#t,this.#e)}get#u(){return this.#e.at(-1)===this&&this.#n.matches(":popover-open")}activate(e){this.#a||(this.#a=!0,this.#o=e,this.#r=fa(this.#n,e)?e:null,this.#e.push(this),this.#t.addEventListener("focusin",this.#h,!0),this.#t.addEventListener("keydown",this.#f))}focusInside(e=this.#r){if(!this.#u)return;(fa(this.#n,e)&&ba(e)?e:ga(this.#n)[0]??this.#n).focus({preventScroll:!0})}deactivate(){if(!this.#a)return()=>{};let e=Jt(this.#t),n=this.#e.at(-1)===this&&fa(this.#n,e),r=this.#o,a=r&&!fa(this.#n,r)?r:e;this.#a=!1;let o=this.#e.indexOf(this);return o>=0&&this.#e.splice(o,1),this.#t.removeEventListener("focusin",this.#h,!0),this.#t.removeEventListener("keydown",this.#f),this.#o=this.#r=null,()=>{n&&(ba(a)?a.focus({preventScroll:!0}):ba(e)?e.focus({preventScroll:!0}):ba(r)?r.focus({preventScroll:!0}):this.#e.at(-1)?.focusInside())}}#i(e){for(let n of e){if(n===this.#n)return!1;if(n instanceof Element&&n.matches(":modal"))return!0}return!1}#h=e=>{if(!this.#u||this.#l)return;let n=e.composedPath();if(!this.#i(n)){if(n.includes(this.#n)){this.#r=Jt(this.#t);return}this.#l=!0,this.focusInside(),this.#l=!1}};#f=e=>{!this.#u||e.defaultPrevented||e.key!=="Tab"||e.altKey||e.ctrlKey||e.metaKey||this.#i(e.composedPath())||(e.preventDefault(),Ro(ga(this.#n),Jt(this.#t),e.shiftKey,this.#n))}};var b0=`
176
156
  slot:not([popover]) { display: contents; }
177
157
  slot:popover-open {
178
158
  display: block;
@@ -199,8 +179,8 @@ import mn from"react";var sa=mn.createElement,he=mn.Fragment,$d=mn.useState,Gd=m
199
179
  max-width: 100%;
200
180
  pointer-events: none;
201
181
  }
202
- `,rl=t=>t==="maximized"?"maximized":"normal",No=class extends B{static observedAttributes=["state"];#e;#t;#n;#o="normal";#r=!1;#a=!1;#s;constructor(){super(),this.#n=this.attachInternals();let e=this.attachShadow({mode:"open"}),n=this.ownerDocument,r=n.createElement("style");r.textContent=fx,this.#e=n.createElement("slot"),this.#e.setAttribute("part","content"),this.#s=new Ro(this.#e),this.#t=n.createElement("div"),this.#t.className="placeholder",this.#t.setAttribute("aria-hidden","true"),e.append(r,this.#t,this.#e),this.#e.addEventListener("toggle",()=>{this.#a&&this.isConnected&&this.#m()}),this.addEventListener("panelmaximizerequest",this.#l),this.addEventListener("panelrestorerequest",this.#l),this.addEventListener("paneltoggle",this.#l)}get#f(){return typeof this.#e.showPopover=="function"&&this.#e.matches(":popover-open")?"maximized":"normal"}connectedCallback(){this.hasAttribute("state")?this.#o=rl(this.getAttribute("state")):this.#r||(this.#o=rl(this.getAttribute("default-state"))),this.#r=!0,queueMicrotask(()=>{this.isConnected&&(this.#a=!0,this.#m())})}disconnectedCallback(){this.#a=!1,this.#b(!1)}attributeChangedCallback(){this.hasAttribute("state")&&(this.#o=rl(this.getAttribute("state")),this.#a&&this.isConnected&&this.#m())}requestMaximize(){this.#u("maximized")}requestRestore(){this.#u("normal")}#l=e=>{e.composedPath().find(r=>r instanceof Element&&r.localName==="a-panel")!==this||e.defaultPrevented||this.#u(e.type==="paneltoggle"?this.#f==="maximized"?"normal":"maximized":e.type==="panelmaximizerequest"?"maximized":"normal")};#u(e){let n=this.#f;e===n||!this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))||this.hasAttribute("state")||(this.#o=e,this.#a&&this.isConnected&&this.#m())}#m(){if(!(this.#f===this.#o&&(this.#o==="maximized"||!this.#e.hasAttribute("popover"))))if(this.#o==="maximized"){if(typeof this.#e.showPopover!="function")return;let e=Qt(this.ownerDocument),n=this.ownerDocument.defaultView.getComputedStyle(this),r=n.boxSizing==="border-box",a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),i=Math.max(0,this.offsetWidth-this.clientWidth-Math.round(a)),s=Math.max(0,this.offsetHeight-this.clientHeight-Math.round(o)),l=parseFloat(n.width)-(r?parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+a:0)-i,c=parseFloat(n.height)-(r?parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+o:0)-s;this.#t.style.width=`${Math.max(0,l||0)}px`,this.#t.style.height=`${Math.max(0,c||0)}px`,this.#t.classList.add("active"),this.#e.tabIndex=-1,this.#e.setAttribute("popover","manual"),this.#s.activate(e),this.#e.showPopover(),this.#n.states?.add("maximized"),this.#s.focusInside(e)}else this.#b()}#b(e=!0){let n=this.#s.deactivate();this.#f==="maximized"&&this.#e.hidePopover(),this.#e.removeAttribute("popover"),this.#e.removeAttribute("tabindex"),this.#t.classList.remove("active"),this.#n.states?.delete("maximized"),e&&n()}};function Lh(){typeof customElements>"u"||customElements.get("a-panel")||customElements.define("a-panel",No)}Lh();var _o=class extends B{};function Rh(){typeof customElements>"u"||customElements.get("a-icon")||customElements.define("a-icon",_o)}Rh();function Fo(t,e){let n=null;t.addEventListener("keydown",r=>{if(r.repeat||!e.keys.includes(r.key))return;let a=e.resolve(r.target);a&&(r.preventDefault(),n=e.blocked?.(a)?null:a)},!0),t.addEventListener("keyup",r=>{if(!e.keys.includes(r.key))return;let a=e.resolve(r.target);if(!a||a!==n){n=null;return}n=null,!e.blocked?.(a)&&e.activate(a)},!0)}function Nh(t){!t||t.hasKeyListenerForAButton||(Fo(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",gx,!0),t.hasKeyListenerForAButton=!0)}var Ho=class extends B{static observedAttributes=["aria-label","aria-labelledby","aria-describedby"];internals;popupAriaSource;#e;#t;constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){Nh(this.doc),this.parentElement?.localName==="a-select-field"&&(this.#t=this.parentElement,this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this.#t,{childList:!0,subtree:!0}),this.#t.addEventListener("click",this.#o),this.#n())}disconnectedCallback(){this.#t&&(this.#e?.disconnect(),this.#t?.removeEventListener("click",this.#o),this.#t=void 0,this.#n())}attributeChangedCallback(){this.#t&&this.#n()}#n(){if(!this.internals)return;let e=this.#t?.querySelector(":scope > a-select-label"),n=this.#t?.querySelector(":scope > a-select-hint"),a=[this.#t?this.querySelector(":scope > a-button-label"):null,n].filter(o=>!!o);try{this.internals.ariaLabelledByElements=e&&!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")?[e]:null,this.internals.ariaDescribedByElements=a.length&&!this.hasAttribute("aria-describedby")?a:null}catch{}}#o=e=>{this.hasAttribute("disabled")||this.hasAttribute("loading")||e.composedPath().some(n=>n instanceof Element&&n.localName==="a-select-label")&&this.focus()};[Jt](e){if(!(!this.internals||!("ariaControlsElements"in this.internals))){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0;try{this.internals.ariaControlsElements=null}catch{}return}if("controls"in e){this.popupAriaSource=e.source;try{this.internals.ariaControlsElements=e.controls?[e.controls]:null}catch{}}}}};function bx(t){let e=t.getAttribute("form");return e?t.ownerDocument.getElementById(e):t.closest("form")}function gx(t){let e=t.target.closest("a-button");if(!e||e.hasAttribute("disabled")||e.hasAttribute("loading"))return;let n=e.getAttribute("data-custom-event");n&&e.dispatchEvent(new CustomEvent(n,{bubbles:!0,cancelable:!0}));let r=e.getAttribute("type")||"button",a=bx(e);if(a)if(r==="submit"){a.requestSubmit();let o=new FormData(a);a.dispatchEvent(new CustomEvent("submitdetailed",{bubbles:!0,cancelable:!0,detail:{formData:Object.fromEntries(o.entries()),submitter:{tag:e.tagName.toLowerCase(),attrs:Object.fromEntries(Array.from(e.attributes).map(i=>[i.name,i.value]))}}}))}else r==="reset"&&a.reset()}function _h(){typeof customElements>"u"||(Nh(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Ho))}_h();async function vx(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}async function xx(t){let e=t.cloneNode(!0);e.querySelectorAll("[data-copy-node-button]").forEach(a=>a.remove());let n=e.outerHTML,r=e.textContent??"";try{return typeof ClipboardItem<"u"&&navigator.clipboard?.write?(await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([n],{type:"text/html"}),"text/plain":new Blob([r],{type:"text/plain"})})]),!0):(await navigator.clipboard.writeText(r),!0)}catch{return!1}}function yx(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function Fh(t,e){e.then(n=>{t.dispatchEvent(new CustomEvent("copydone",{bubbles:!1,detail:{ok:n}}))})}function Hh(){return typeof location<"u"?location.href:""}function wx(t){if(t.hasAttribute("copy-url"))return Hh();let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${Hh()}
203
- ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function Vo(t){t.hasAttribute("copy")&&t.dispatchEvent(new CustomEvent("copyrequest",{bubbles:!1}))}function Vh(t){if(t.hasAttribute("copy-node")){let e=yx(t);return Fh(t,e?xx(e):Promise.resolve(!1)),!0}return kx(t)?(Fh(t,vx(wx(t))),!0):!1}var qh="a-button, button, [role=button]",Uh="a-menu-item, [role=menuitem]",Yh=`${qh}, ${Uh}`,Wn=new WeakMap;function al(t){return t?.querySelector(":scope > a-copy")??null}function ol(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function Ex(t){if(!t||t.hasCopyDelegation)return;let e=(n,r)=>{let a=n?.closest?.(Yh);if(!a||ol(a))return;let o=al(a);o&&(r?Wn.set(o,r):Wn.delete(o),Vo(o))};t.addEventListener("pointerdown",n=>e(n.target,{x:n.clientX,y:n.clientY}),!0),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&e(n.target)},!0),t.addEventListener("click",n=>{let r=n.target?.closest?.(qh);if(!r||ol(r))return;let a=al(r);a&&(n.detail?Wn.set(a,{x:n.clientX,y:n.clientY}):Wn.delete(a),a.activate())},!0),t.addEventListener("menuselect",n=>{let r=n.target?.closest?.(Uh);!r||ol(r)||al(r)?.activate()},!0),t.hasCopyDelegation=!0}var Wh=900,jh=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=`
182
+ `,al=t=>t==="maximized"?"maximized":"normal",_o=class extends z{static observedAttributes=["state"];#e;#t;#n;#o="normal";#r=!1;#a=!1;#l;constructor(){super(),this.#n=this.attachInternals();let e=this.attachShadow({mode:"open"}),n=this.ownerDocument,r=n.createElement("style");r.textContent=b0,this.#e=n.createElement("slot"),this.#e.setAttribute("part","content"),this.#l=new No(this.#e),this.#t=n.createElement("div"),this.#t.className="placeholder",this.#t.setAttribute("aria-hidden","true"),e.append(r,this.#t,this.#e),this.#e.addEventListener("toggle",()=>{this.#a&&this.isConnected&&this.#f()}),this.addEventListener("panelmaximizerequest",this.#i),this.addEventListener("panelrestorerequest",this.#i),this.addEventListener("paneltoggle",this.#i)}get#u(){return typeof this.#e.showPopover=="function"&&this.#e.matches(":popover-open")?"maximized":"normal"}connectedCallback(){this.hasAttribute("state")?this.#o=al(this.getAttribute("state")):this.#r||(this.#o=al(this.getAttribute("default-state"))),this.#r=!0,queueMicrotask(()=>{this.isConnected&&(this.#a=!0,this.#f())})}disconnectedCallback(){this.#a=!1,this.#b(!1)}attributeChangedCallback(){this.hasAttribute("state")&&(this.#o=al(this.getAttribute("state")),this.#a&&this.isConnected&&this.#f())}requestMaximize(){this.#h("maximized")}requestRestore(){this.#h("normal")}#i=e=>{e.composedPath().find(r=>r instanceof Element&&r.localName==="a-panel")!==this||e.defaultPrevented||this.#h(e.type==="paneltoggle"?this.#u==="maximized"?"normal":"maximized":e.type==="panelmaximizerequest"?"maximized":"normal")};#h(e){let n=this.#u;e===n||!this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))||this.hasAttribute("state")||(this.#o=e,this.#a&&this.isConnected&&this.#f())}#f(){if(!(this.#u===this.#o&&(this.#o==="maximized"||!this.#e.hasAttribute("popover"))))if(this.#o==="maximized"){if(typeof this.#e.showPopover!="function")return;let e=Jt(this.ownerDocument),n=this.ownerDocument.defaultView.getComputedStyle(this),r=n.boxSizing==="border-box",a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),i=Math.max(0,this.offsetWidth-this.clientWidth-Math.round(a)),s=Math.max(0,this.offsetHeight-this.clientHeight-Math.round(o)),l=parseFloat(n.width)-(r?parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+a:0)-i,c=parseFloat(n.height)-(r?parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+o:0)-s;this.#t.style.width=`${Math.max(0,l||0)}px`,this.#t.style.height=`${Math.max(0,c||0)}px`,this.#t.classList.add("active"),this.#e.tabIndex=-1,this.#e.setAttribute("popover","manual"),this.#l.activate(e),this.#e.showPopover(),this.#n.states?.add("maximized"),this.#l.focusInside(e)}else this.#b()}#b(e=!0){let n=this.#l.deactivate();this.#u==="maximized"&&this.#e.hidePopover(),this.#e.removeAttribute("popover"),this.#e.removeAttribute("tabindex"),this.#t.classList.remove("active"),this.#n.states?.delete("maximized"),e&&n()}};function Nh(){typeof customElements>"u"||customElements.get("a-panel")||customElements.define("a-panel",_o)}Nh();var Fo=class extends z{};function _h(){typeof customElements>"u"||customElements.get("a-icon")||customElements.define("a-icon",Fo)}_h();function Vo(t,e){let n=null;t.addEventListener("keydown",r=>{if(r.repeat||!e.keys.includes(r.key))return;let a=e.resolve(r.target);a&&(r.preventDefault(),n=e.blocked?.(a)?null:a)},!0),t.addEventListener("keyup",r=>{if(!e.keys.includes(r.key))return;let a=e.resolve(r.target);if(!a||a!==n){n=null;return}n=null,!e.blocked?.(a)&&e.activate(a)},!0)}function Fh(t){!t||t.hasKeyListenerForAButton||(Vo(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",v0,!0),t.hasKeyListenerForAButton=!0)}var Ho=class extends z{static observedAttributes=["aria-label","aria-labelledby","aria-describedby"];internals;popupAriaSource;#e;#t;constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){Fh(this.doc),this.parentElement?.localName==="a-select-field"&&(this.#t=this.parentElement,this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this.#t,{childList:!0,subtree:!0}),this.#t.addEventListener("click",this.#o),this.#n())}disconnectedCallback(){this.#t&&(this.#e?.disconnect(),this.#t?.removeEventListener("click",this.#o),this.#t=void 0,this.#n())}attributeChangedCallback(){this.#t&&this.#n()}#n(){if(!this.internals)return;let e=this.#t?.querySelector(":scope > a-select-label"),n=this.#t?.querySelector(":scope > a-select-hint"),a=[this.#t?this.querySelector(":scope > a-button-label"):null,n].filter(o=>!!o);try{this.internals.ariaLabelledByElements=e&&!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")?[e]:null,this.internals.ariaDescribedByElements=a.length&&!this.hasAttribute("aria-describedby")?a:null}catch{}}#o=e=>{this.hasAttribute("disabled")||this.hasAttribute("loading")||e.composedPath().some(n=>n instanceof Element&&n.localName==="a-select-label")&&this.focus()};[Xt](e){if(!(!this.internals||!("ariaControlsElements"in this.internals))){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0;try{this.internals.ariaControlsElements=null}catch{}return}if("controls"in e){this.popupAriaSource=e.source;try{this.internals.ariaControlsElements=e.controls?[e.controls]:null}catch{}}}}};function g0(t){let e=t.getAttribute("form"),n=e===null?t.closest("form"):t.ownerDocument.getElementById(e);return n?.namespaceURI==="http://www.w3.org/1999/xhtml"&&n.localName==="form"?n:null}function v0(t){let e=t.target.closest("a-button");if(!e||e.hasAttribute("disabled")||e.hasAttribute("loading"))return;let n=e.getAttribute("data-custom-event");n&&e.dispatchEvent(new CustomEvent(n,{bubbles:!0,cancelable:!0}));let r=e.getAttribute("type")||"button",a=g0(e);if(a)if(r==="submit"){a.requestSubmit();let o=new FormData(a);a.dispatchEvent(new CustomEvent("submitdetailed",{bubbles:!0,cancelable:!0,detail:{formData:Object.fromEntries(o.entries()),submitter:{tag:e.tagName.toLowerCase(),attrs:Object.fromEntries(Array.from(e.attributes).map(i=>[i.name,i.value]))}}}))}else r==="reset"&&a.reset()}function Vh(){typeof customElements>"u"||(Fh(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Ho))}Vh();async function x0(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}async function y0(t){let e=t.cloneNode(!0);e.querySelectorAll("[data-copy-node-button]").forEach(a=>a.remove());let n=e.outerHTML,r=e.textContent??"";try{return typeof ClipboardItem<"u"&&navigator.clipboard?.write?(await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([n],{type:"text/html"}),"text/plain":new Blob([r],{type:"text/plain"})})]),!0):(await navigator.clipboard.writeText(r),!0)}catch{return!1}}function w0(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function Hh(t,e){e.then(n=>{t.dispatchEvent(new CustomEvent("copydone",{bubbles:!1,detail:{ok:n}}))})}function jh(){return typeof location<"u"?location.href:""}function k0(t){if(t.hasAttribute("copy-url"))return jh();let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${jh()}
183
+ ${e}`:e}function E0(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function jo(t){t.hasAttribute("copy")&&t.dispatchEvent(new CustomEvent("copyrequest",{bubbles:!1}))}function qh(t){if(t.hasAttribute("copy-node")){let e=w0(t);return Hh(t,e?y0(e):Promise.resolve(!1)),!0}return E0(t)?(Hh(t,x0(k0(t))),!0):!1}var Yh="a-button, button, [role=button]",Wh="a-menu-item, [role=menuitem]",Zh=`${Yh}, ${Wh}`,Yn=new WeakMap;function ol(t){return t?.querySelector(":scope > a-copy")??null}function il(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function C0(t){if(!t||t.hasCopyDelegation)return;let e=(n,r)=>{let a=n?.closest?.(Zh);if(!a||il(a))return;let o=ol(a);o&&(r?Yn.set(o,r):Yn.delete(o),jo(o))};t.addEventListener("pointerdown",n=>e(n.target,{x:n.clientX,y:n.clientY}),!0),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&e(n.target)},!0),t.addEventListener("click",n=>{let r=n.target?.closest?.(Yh);if(!r||il(r))return;let a=ol(r);a&&(n.detail?Yn.set(a,{x:n.clientX,y:n.clientY}):Yn.delete(a),a.activate())},!0),t.addEventListener("menuselect",n=>{let r=n.target?.closest?.(Wh);!r||il(r)||ol(r)?.activate()},!0),t.hasCopyDelegation=!0}var $h=900,Uh=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=`
204
184
  .feedback {
205
185
  position: fixed;
206
186
  margin: 0;
@@ -232,12 +212,12 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
232
212
  transform: translate(var(--_feedback-x), var(--_feedback-y-to));
233
213
  }
234
214
  .feedback:not(:popover-open) { display: none; }
235
- .feedback[data-show] { animation: a-copy-feedback-rise ${Wh}ms ease-out forwards; }
215
+ .feedback[data-show] { animation: a-copy-feedback-rise ${$h}ms ease-out forwards; }
236
216
  @keyframes a-copy-feedback-rise {
237
217
  from { opacity: 1; transform: translate(var(--_feedback-x), var(--_feedback-y-from)); }
238
218
  to { opacity: 0; transform: translate(var(--_feedback-x), var(--_feedback-y-to)); }
239
219
  }
240
- `;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.textContent="\u2713";let a=document.createElement("span");return a.className="label",n.append(r,a),t.content.append(e,n),t})(),jo=class extends B{#e;#t;#n;connectedCallback(){Ex(this.doc),this.addEventListener("copydone",this.#o)}activate(){Vh(this)}#o=e=>{let n=Wn.get(this);if(Wn.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let r=this.closest(Yh);r&&this.#a(r,n)};#r(){if(!jh)return;let e=this.attachShadow({mode:"open"});e.append(jh.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#a(e,n){this.#e||this.#r();let r=this.#e,a=this.#t;if(!r||!a)return;a.textContent=this.getAttribute("copied-label")??"Copied";let o;if(n)r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.setProperty("--_feedback-x","8px"),o=n.y;else{let s=e.getBoundingClientRect(),l=this.view.getComputedStyle(e).direction==="rtl";r.style.left=`${l?s.right-12:s.left+12}px`,r.style.top=`${s.top}px`,r.style.setProperty("--_feedback-x",l?"-100%":"0"),o=s.bottom}clearTimeout(this.#n),r.removeAttribute("data-show"),r.removeAttribute("data-placement"),r.matches(":popover-open")&&r.hidePopover(),r.showPopover(),r.setAttribute("data-measure-end","");let i=r.getBoundingClientRect().top<0;r.removeAttribute("data-measure-end"),i&&(r.setAttribute("data-placement","below"),r.style.top=`${o}px`),r.offsetWidth,r.setAttribute("data-show",""),this.#n=setTimeout(()=>{r.removeAttribute("data-show"),r.matches(":popover-open")&&r.hidePopover()},Wh)}disconnectedCallback(){clearTimeout(this.#n),Wn.delete(this),this.removeEventListener("copydone",this.#o)}};function Zh(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",jo)}Zh();var il=t=>t==="checked"||t==="indeterminate"?t:"unchecked",qo=class extends B{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;get checked(){return this.currentState==="checked"}get indeterminate(){return this.currentState==="indeterminate"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=il(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=il(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e.states?.delete("checked"),e.states?.delete("indeterminate"),this.currentState==="indeterminate"?e.states?.add("indeterminate"):this.currentState==="checked"&&e.states?.add("checked"),e.ariaChecked=this.currentState==="indeterminate"?"mixed":this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}syncAccessibilityRelations(){la(this.internals,Array.from(this.querySelectorAll(":scope > a-checkbox-label")),Array.from(this.querySelectorAll(":scope > a-checkbox-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=il(e),this.paint()}formDisabledCallback(){this.paint()}};function $h(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",qo)}$h();var sl=t=>t==="checked"?"checked":"unchecked",Uo=class extends B{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;get checked(){return this.currentState==="checked"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=sl(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=sl(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e?.states?.delete("checked"),this.currentState==="checked"&&e?.states?.add("checked"),e.ariaChecked=this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}syncAccessibilityRelations(){la(this.internals,Array.from(this.querySelectorAll(":scope > a-switch-label")),Array.from(this.querySelectorAll(":scope > a-switch-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=sl(e),this.paint()}formDisabledCallback(){this.paint()}};function Gh(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",Uo)}Gh();var Kh=200,Cx='a-button,a-checkbox,a-radio,a-radio-group,a-input,a-input-time,a-calendar,a-menu-item,a-tab,[data-anta][role="button"],button,a[href],input,select,textarea,label,[contenteditable=""],[contenteditable="true"]',Tx=':disabled,[disabled],[aria-disabled="true"]';function Sx(t){return t.matches("[data-expander-ignore]")?!0:t.matches(Cx)&&!t.matches(Tx)}var Ax=`
220
+ `;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.textContent="\u2713";let a=document.createElement("span");return a.className="label",n.append(r,a),t.content.append(e,n),t})(),qo=class extends z{#e;#t;#n;connectedCallback(){C0(this.doc),this.addEventListener("copydone",this.#o)}activate(){qh(this)}#o=e=>{let n=Yn.get(this);if(Yn.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let r=this.closest(Zh);r&&this.#a(r,n)};#r(){if(!Uh)return;let e=this.attachShadow({mode:"open"});e.append(Uh.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#a(e,n){this.#e||this.#r();let r=this.#e,a=this.#t;if(!r||!a)return;a.textContent=this.getAttribute("copied-label")??"Copied";let o;if(n)r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.setProperty("--_feedback-x","8px"),o=n.y;else{let s=e.getBoundingClientRect(),l=this.view.getComputedStyle(e).direction==="rtl";r.style.left=`${l?s.right-12:s.left+12}px`,r.style.top=`${s.top}px`,r.style.setProperty("--_feedback-x",l?"-100%":"0"),o=s.bottom}clearTimeout(this.#n),r.removeAttribute("data-show"),r.removeAttribute("data-placement"),r.matches(":popover-open")&&r.hidePopover(),r.showPopover(),r.setAttribute("data-measure-end","");let i=r.getBoundingClientRect().top<0;r.removeAttribute("data-measure-end"),i&&(r.setAttribute("data-placement","below"),r.style.top=`${o}px`),r.offsetWidth,r.setAttribute("data-show",""),this.#n=setTimeout(()=>{r.removeAttribute("data-show"),r.matches(":popover-open")&&r.hidePopover()},$h)}disconnectedCallback(){clearTimeout(this.#n),Yn.delete(this),this.removeEventListener("copydone",this.#o)}};function Gh(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",qo)}Gh();var sl=t=>t==="checked"||t==="indeterminate"?t:"unchecked",Uo=class extends z{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;get checked(){return this.currentState==="checked"}get indeterminate(){return this.currentState==="indeterminate"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=sl(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=sl(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e.states?.delete("checked"),e.states?.delete("indeterminate"),this.currentState==="indeterminate"?e.states?.add("indeterminate"):this.currentState==="checked"&&e.states?.add("checked"),e.ariaChecked=this.currentState==="indeterminate"?"mixed":this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}syncAccessibilityRelations(){la(this.internals,Array.from(this.querySelectorAll(":scope > a-checkbox-label")),Array.from(this.querySelectorAll(":scope > a-checkbox-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=sl(e),this.paint()}formDisabledCallback(){this.paint()}};function Kh(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",Uo)}Kh();var ll=t=>t==="checked"?"checked":"unchecked",Yo=class extends z{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;get checked(){return this.currentState==="checked"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=ll(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=ll(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e?.states?.delete("checked"),this.currentState==="checked"&&e?.states?.add("checked"),e.ariaChecked=this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}syncAccessibilityRelations(){la(this.internals,Array.from(this.querySelectorAll(":scope > a-switch-label")),Array.from(this.querySelectorAll(":scope > a-switch-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=ll(e),this.paint()}formDisabledCallback(){this.paint()}};function Xh(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",Yo)}Xh();var Jh=200,A0='a-button,a-checkbox,a-radio,a-radio-group,a-input,a-input-time,a-calendar,a-menu-item,a-tab,[data-anta][role="button"],button,a[href],input,select,textarea,label,[contenteditable=""],[contenteditable="true"]',S0=':disabled,[disabled],[aria-disabled="true"]';function T0(t){return t.matches("[data-expander-ignore]")?!0:t.matches(A0)&&!t.matches(S0)}var M0=`
241
221
  :host { display: block; }
242
222
 
243
223
  .header {
@@ -412,20 +392,20 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
412
392
  margin-inline-start: -1px;
413
393
  }
414
394
  @media (prefers-reduced-motion: no-preference) {
415
- .region { transition: grid-template-rows ${Kh}ms ease; }
395
+ .region { transition: grid-template-rows ${Jh}ms ease; }
416
396
  }
417
397
 
418
398
  [part="content"] { display: block; min-height: 0; overflow: clip; }
419
399
  .header:has(button[aria-expanded="true"]) + .region [part="content"] {
420
400
  overflow: visible;
421
- transition: overflow 0s ${Kh}ms;
401
+ transition: overflow 0s ${Jh}ms;
422
402
  transition-behavior: allow-discrete;
423
403
  }
424
- `,Xh=Xt,Yo=class extends B{static observedAttributes=["state","disabled","round"];summary;titleSlot;region;header;roundStyle;roundObserver;internals;constructor(){super(),this.internals=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Ax,this.summary=document.createElement("button"),this.summary.type="button",this.summary.setAttribute("aria-expanded","false"),this.summary.setAttribute("part","summary");let r=document.createElement("slot");r.name="title",this.titleSlot=r;let a=document.createElement("span");a.className="indicator",a.setAttribute("part","indicator"),a.setAttribute("aria-hidden","true"),a.inert=!0;let o=document.createElement("slot");o.name="indicator";let i=document.createElement("span");i.className="glyph",o.append(i),o.addEventListener("slotchange",()=>{let d=o.assignedElements(),u=d.some(m=>m.hasAttribute("data-when"));a.classList.toggle("has-custom",d.length>0&&!u),a.classList.toggle("has-pair",u)}),a.append(o),this.summary.append(r,a),this.summary.addEventListener("click",this.onSummaryClick);let s=document.createElement("div");s.className="header",this.header=s;let l=document.createElement("slot");l.name="actions",l.setAttribute("part","actions"),l.addEventListener("slotchange",()=>{s.classList.toggle("has-actions",l.assignedElements().length>0)}),s.append(this.summary,l),this.region=document.createElement("div"),this.region.className="region";let c=document.createElement("slot");c.setAttribute("part","content"),this.region.append(c),this.roundStyle=document.createElement("style"),typeof ResizeObserver<"u"&&(this.roundObserver=new ResizeObserver(()=>this.measureRoundRadius())),e.append(n,this.roundStyle,s,this.region)}hasFixedRound(){let e=this.getAttribute("round");return e!=null&&e.trim()!==""}measureRoundRadius(){if(!this.hasAttribute("round")||this.hasFixedRound())return;let e=this.header.getBoundingClientRect().height;if(e<=0)return;let n=getComputedStyle(this),r=(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),a=(e+r)/2;this.roundStyle.textContent=`:host{--_expander-round-radius:${a}px}`}startRoundObserver(){!this.roundObserver||this.hasFixedRound()||(this.roundObserver.observe(this.header),this.measureRoundRadius())}stopRoundObserver(){this.roundObserver?.disconnect(),this.roundStyle.textContent=""}get#e(){return this.hasAttribute("state")}get#t(){return this.summary.getAttribute("aria-expanded")==="true"?"open":"closed"}connectedCallback(){this.syncDisabled(),this.applyState(Xh(this.getAttribute(this.#e?"state":"default-state"))),this.hasAttribute("round")&&this.startRoundObserver()}disconnectedCallback(){this.roundObserver?.disconnect()}attributeChangedCallback(e){e==="disabled"?this.syncDisabled():e==="state"&&this.#e?this.applyState(Xh(this.getAttribute("state"))):e==="round"&&(this.hasAttribute("round")?this.startRoundObserver():this.stopRoundObserver())}syncDisabled(){this.summary.disabled=this.hasAttribute("disabled")}applyState(e){let n=e==="open";this.summary.setAttribute("aria-expanded",n?"true":"false"),this.region.inert=!n;try{n?this.internals?.states?.add("open"):this.internals?.states?.delete("open")}catch{}}#n(e){let n=e.composedPath(),r=n.indexOf(this.summary);return(r===-1?n:n.slice(0,r)).some(o=>o instanceof Element&&Sx(o))}#o(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||e.rangeCount===0)return!1;let n=e.getRangeAt(0);return this.titleSlot.assignedNodes().some(r=>n.intersectsNode(r))}onSummaryClick=e=>{if(this.#n(e)||e.detail!==0&&this.#o())return;let n=this.#t,r=n==="open"?"closed":"open",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#e||a&&this.applyState(r)}};function Jh(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",Yo)}Jh();var nt=4,Qh=16,Mx=8,ep=300,tp=150,Ix=300,Dx=120,ll=10,np=100,Ox=60,Px=500,zx="a-tab-label, a-button-label, a-step-hint";function rp(t){return typeof t.isTruncated=="boolean"}var cl="data-anta-text-tooltip",Bx=1500,Lx=10,rt=null,Cr,Wo=!1;function Rx(){return Cr!==void 0}function Nx(t){return t.hasAttribute("follow")?rt?rt.hasAttribute("follow"):Rx()&&Wo:!1}function sp(){Cr!==void 0&&(clearTimeout(Cr),Cr=void 0),Wo=!1}function _x(t){rt&&rt!==t&&(rt.isConnected?rt.hide():rt.cleanup()),rt=t,sp()}function ap(t){rt===t&&(rt=null,sp(),Wo=t.hasAttribute("follow"),Cr=setTimeout(()=>{Cr=void 0,Wo=!1},Ix))}var Er=new WeakMap;function op(t){let e,n;for(let r of t.tooltips)r.hasAttribute(cl)?e=r:n=r;return n??e}function dl(t,e){let n=op(e);for(let r of e.tooltips)r!==n&&r.teardownListeners();if(!n||!e.intersecting){n?.teardownListeners();return}requestAnimationFrame(()=>{let r=Er.get(t);r!==e||!r.intersecting||op(r)!==n||n.setupListeners()})}function Fx(t){for(let e of t){let n=Er.get(e.target);n&&(n.intersecting=e.isIntersecting,dl(e.target,n))}}var ip=typeof IntersectionObserver<"u"?new IntersectionObserver(Fx,{root:null,rootMargin:"0px",threshold:0}):null,Zo=class extends B{static observedAttributes=["delay"];container;bubble;anchor=null;listening=!1;shown=!1;touchOpen=!1;lastMouse;debouncedShow;teardown;closeTimer;fading=!1;fadeTimer;docMoveBound=!1;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
404
+ `,Qh=Kt,Wo=class extends z{static observedAttributes=["state","disabled","round"];summary;titleSlot;region;header;roundStyle;roundObserver;internals;constructor(){super(),this.internals=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=M0,this.summary=document.createElement("button"),this.summary.type="button",this.summary.setAttribute("aria-expanded","false"),this.summary.setAttribute("part","summary");let r=document.createElement("slot");r.name="title",this.titleSlot=r;let a=document.createElement("span");a.className="indicator",a.setAttribute("part","indicator"),a.setAttribute("aria-hidden","true"),a.inert=!0;let o=document.createElement("slot");o.name="indicator";let i=document.createElement("span");i.className="glyph",o.append(i),o.addEventListener("slotchange",()=>{let d=o.assignedElements(),u=d.some(m=>m.hasAttribute("data-when"));a.classList.toggle("has-custom",d.length>0&&!u),a.classList.toggle("has-pair",u)}),a.append(o),this.summary.append(r,a),this.summary.addEventListener("click",this.onSummaryClick);let s=document.createElement("div");s.className="header",this.header=s;let l=document.createElement("slot");l.name="actions",l.setAttribute("part","actions"),l.addEventListener("slotchange",()=>{s.classList.toggle("has-actions",l.assignedElements().length>0)}),s.append(this.summary,l),this.region=document.createElement("div"),this.region.className="region";let c=document.createElement("slot");c.setAttribute("part","content"),this.region.append(c),this.roundStyle=document.createElement("style"),typeof ResizeObserver<"u"&&(this.roundObserver=new ResizeObserver(()=>this.measureRoundRadius())),e.append(n,this.roundStyle,s,this.region)}hasFixedRound(){let e=this.getAttribute("round");return e!=null&&e.trim()!==""}measureRoundRadius(){if(!this.hasAttribute("round")||this.hasFixedRound())return;let e=this.header.getBoundingClientRect().height;if(e<=0)return;let n=getComputedStyle(this),r=(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),a=(e+r)/2;this.roundStyle.textContent=`:host{--_expander-round-radius:${a}px}`}startRoundObserver(){!this.roundObserver||this.hasFixedRound()||(this.roundObserver.observe(this.header),this.measureRoundRadius())}stopRoundObserver(){this.roundObserver?.disconnect(),this.roundStyle.textContent=""}get#e(){return this.hasAttribute("state")}get#t(){return this.summary.getAttribute("aria-expanded")==="true"?"open":"closed"}connectedCallback(){this.syncDisabled(),this.applyState(Qh(this.getAttribute(this.#e?"state":"default-state"))),this.hasAttribute("round")&&this.startRoundObserver()}disconnectedCallback(){this.roundObserver?.disconnect()}attributeChangedCallback(e){e==="disabled"?this.syncDisabled():e==="state"&&this.#e?this.applyState(Qh(this.getAttribute("state"))):e==="round"&&(this.hasAttribute("round")?this.startRoundObserver():this.stopRoundObserver())}syncDisabled(){this.summary.disabled=this.hasAttribute("disabled")}applyState(e){let n=e==="open";this.summary.setAttribute("aria-expanded",n?"true":"false"),this.region.inert=!n;try{n?this.internals?.states?.add("open"):this.internals?.states?.delete("open")}catch{}}#n(e){let n=e.composedPath(),r=n.indexOf(this.summary);return(r===-1?n:n.slice(0,r)).some(o=>o instanceof Element&&T0(o))}#o(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||e.rangeCount===0)return!1;let n=e.getRangeAt(0);return this.titleSlot.assignedNodes().some(r=>n.intersectsNode(r))}onSummaryClick=e=>{if(this.#n(e)||e.detail!==0&&this.#o())return;let n=this.#t,r=n==="open"?"closed":"open",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#e||a&&this.applyState(r)}};function ep(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",Wo)}ep();var rt=4,tp=16,I0=8,np=300,rp=150,D0=300,O0=120,cl=10,ap=100,P0=60,z0=500,B0="a-tab-label, a-button-label, a-step-hint";function op(t){return typeof t.isTruncated=="boolean"}var dl="data-anta-text-tooltip",L0=1500,R0=10,at=null,Cr,Zo=!1;function N0(){return Cr!==void 0}function _0(t){return t.hasAttribute("follow")?at?at.hasAttribute("follow"):N0()&&Zo:!1}function cp(){Cr!==void 0&&(clearTimeout(Cr),Cr=void 0),Zo=!1}function F0(t){at&&at!==t&&(at.isConnected?at.hide():at.cleanup()),at=t,cp()}function ip(t){at===t&&(at=null,cp(),Zo=t.hasAttribute("follow"),Cr=setTimeout(()=>{Cr=void 0,Zo=!1},D0))}var Er=new WeakMap;function sp(t){let e,n;for(let r of t.tooltips)r.hasAttribute(dl)?e=r:n=r;return n??e}function ul(t,e){let n=sp(e);for(let r of e.tooltips)r!==n&&r.teardownListeners();if(!n||!e.intersecting){n?.teardownListeners();return}requestAnimationFrame(()=>{let r=Er.get(t);r!==e||!r.intersecting||sp(r)!==n||n.setupListeners()})}function V0(t){for(let e of t){let n=Er.get(e.target);n&&(n.intersecting=e.isIntersecting,ul(e.target,n))}}var lp=typeof IntersectionObserver<"u"?new IntersectionObserver(V0,{root:null,rootMargin:"0px",threshold:0}):null,$o=class extends z{static observedAttributes=["delay"];container;bubble;anchor=null;listening=!1;shown=!1;touchOpen=!1;lastMouse;debouncedShow;teardown;closeTimer;fading=!1;fadeTimer;docMoveBound=!1;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
425
405
  :host { display: contents; }
426
406
 
427
407
  .container {
428
- --_dur: ${tp}ms;
408
+ --_dur: ${rp}ms;
429
409
  position: fixed;
430
410
  left: 0;
431
411
  top: 0;
@@ -481,11 +461,11 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
481
461
  word-break: break-word;
482
462
  overflow-wrap: break-word;
483
463
  opacity: 1;
484
- transition: opacity ${Ox}ms linear;
464
+ transition: opacity ${P0}ms linear;
485
465
  }
486
466
 
487
467
  :host([interactive]) .container { pointer-events: auto; }
488
- `,this.container=document.createElement("div"),this.container.className="container",this.container.setAttribute("popover","manual"),this.container.setAttribute("role","tooltip"),this.bubble=document.createElement("slot"),this.bubble.className="bubble",this.bubble.setAttribute("part","bubble"),this.container.append(this.bubble),this.container.addEventListener("mouseenter",()=>{this.#e&&this.cancelHide()}),this.container.addEventListener("mouseleave",()=>{this.#e&&this.shown&&this.scheduleHide()}),e.append(n,this.container)}connectedCallback(){let e=this.parentElement;if(!e)return;this.anchor=e;let n=Er.get(e);n||(n={tooltips:new Set,intersecting:!1},Er.set(e,n),ip?.observe(e)),n.tooltips.add(this),dl(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=Er.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(Er.delete(e),ip?.unobserve(this.anchor)):n&&dl(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=da(e=>this.show(e),this.#r)}get#e(){return this.hasAttribute("interactive")}get#t(){return this.#e||this.touchOpen?!0:!this.hasAttribute("follow")}get#n(){return this.getAttribute("placement")==="top"}get#o(){return this.getAttribute("placement")==="left"}get#r(){let e=this.getAttribute("delay");if(e==null)return ep;let n=parseInt(e,10);return Number.isFinite(n)?n:ep}get#a(){return this.hasAttribute("truncated-only")}get#s(){return this.hasAttribute(cl)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#s||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(cl))}anchorText(){let e=n=>n.nodeType===3?n.textContent??"":n.nodeType===1&&n.localName==="a-tooltip"?"":Array.from(n.childNodes).map(e).join("");return this.anchor?Array.from(this.anchor.childNodes).map(e).join("").trim():""}syncAutomaticTextContent(){this.#s&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let a=Array.from(e.querySelectorAll(n));if(a.length)return a}catch{}if(rp(e))return[e];let r=Array.from(e.querySelectorAll(zx));return r.length?r:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>rp(e)?e.isTruncated:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1)}isEmpty(){return this.#s?this.anchorText()==="":this.children.length===0&&(this.textContent??"").trim()===""}observeContent(){typeof MutationObserver>"u"||(this.contentObserver||(this.contentObserver=new MutationObserver(()=>{this.shown&&(this.syncAutomaticTextContent(),this.isEmpty()&&this.hide())})),this.contentObserver.observe(this.#s?this.anchor??this:this,{childList:!0,characterData:!0,subtree:!0}))}positionFrame;pendingPosition;schedulePosition(e){this.pendingPosition=e,this.positionFrame==null&&(this.positionFrame=this.view.requestAnimationFrame(()=>{this.positionFrame=void 0;let n=this.pendingPosition;this.pendingPosition=void 0,n?.()}))}flipVertical(e,n,r,a,o){return o?e<nt?n:e:n+r>a?e:n}place(e,n,r,a,o,i){e+r>o&&(e=o-r-nt),e=Math.max(nt,e),n+a>i&&(n=i-a-nt),n=Math.max(nt,n),this.container.style.transform=`translate(${Math.round(e)}px, ${Math.round(n)}px)`}positionToTarget=()=>{this.schedulePosition(()=>{if(!this.anchor||!this.shown)return;let e=Ft(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#o){let i=e.left-n.width-nt,s=i>=nt?i:e.right+nt,l=e.top+(e.height-n.height)/2;this.place(s,l,n.width,n.height,r,a);return}let o=this.flipVertical(e.top-n.height-nt,e.bottom+nt,n.height,a,this.#n||this.touchOpen);this.place(e.left,o,n.width,n.height,r,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#o){let i=e.clientX-n.width-nt,s=i>=nt?i:e.clientX+Qh;this.place(s,e.clientY-n.height/2,n.width,n.height,r,a);return}let o=this.flipVertical(e.clientY-n.height-nt*2,e.clientY+Qh,n.height,a,this.#n);this.place(e.clientX-Mx,o,n.width,n.height,r,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=Ft(this.anchor),r=Math.max(n.left-e.clientX,0,e.clientX-n.right),a=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(r,a);return o<=ll?1:o>=np?0:1-(o-ll)/(np-ll)}show=e=>{this.anchor&&(tu()&&!nu(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#a&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(rt&&rt!==this&&this.anchor.contains(rt.anchor))&&(_x(this),this.shown||(this.shown=!0,this.fading=!1,this.bubble.style.opacity="1",this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.container.showPopover(),this.view.addEventListener("scroll",this.hide,{capture:!0,passive:!0}),this.doc.addEventListener("keydown",this.onKeyDown,!0),this.docMoveBound||(this.doc.addEventListener("mousemove",this.onDocMove),this.docMoveBound=!0),this.observeContent()),this.position(e))))};hide=()=>{this.cancelHide(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.contentObserver?.disconnect(),this.container.hidePopover(),this.fading=!0,this.fadeTimer!==void 0&&clearTimeout(this.fadeTimer),this.fadeTimer=setTimeout(()=>this.detachGlobals(),tp),ap(this))};detachGlobals(){this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.fading=!1,this.view.removeEventListener("scroll",this.hide,{capture:!0}),this.doc.removeEventListener("keydown",this.onKeyDown,!0),this.docMoveBound&&(this.doc.removeEventListener("mousemove",this.onDocMove),this.docMoveBound=!1)}cleanup(){this.cancelHide(),this.contentObserver?.disconnect(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.container.matches(":popover-open")&&this.container.hidePopover()),this.detachGlobals(),this.teardownListeners(),ap(this),this.bubble.style.opacity=""}onDocMove=e=>{if(!this.isConnected){this.cleanup();return}if(!(this.shown||this.fading)||this.#t)return;this.lastMouse=e;let n=this.proximityOpacity(e);if(n===0){this.bubble.style.transition="none",this.bubble.style.opacity="0",this.shown&&this.hide();return}this.positionToMouse(e),this.bubble.style.transition="",this.bubble.style.opacity=String(n)};scheduleHide=(e=Dx)=>{this.cancelHide(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.hide()},e)};cancelHide(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}onKeyDown=e=>{e.key==="Escape"&&this.hide()};trigger(e){this.hasExplicitTextTooltip()||this.isEmpty()||this.#a&&!this.isTargetTruncated()||(Nx(this)?(this.debouncedShow?.cancel(),this.show(e)):this.debouncedShow?.(e))}setupListeners(){if(this.listening||!this.anchor){this.listening=!0;return}let e=this.anchor,n=this.view,r=this.doc;this.makeDebouncedShow();let a=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",a),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger())},l,c,d=g=>g.preventDefault(),u=()=>{l!==void 0&&(clearTimeout(l),l=void 0),c=void 0},m=g=>{c&&Math.hypot(g.clientX-c.x,g.clientY-c.y)>Lx&&u()},p=()=>{u(),f(),this.shown&&this.touchOpen&&this.scheduleHide(Bx)},f=()=>{e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",p),e.removeEventListener("pointercancel",p),e.removeEventListener("contextmenu",d)},b=g=>{g.pointerType!=="mouse"&&(u(),c={x:g.clientX,y:g.clientY},e.addEventListener("pointermove",m),e.addEventListener("pointerup",p),e.addEventListener("pointercancel",p),e.addEventListener("contextmenu",d),l=setTimeout(()=>{l=void 0,this.touchOpen=!0,this.show()},Px))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",b),this.teardown=()=>{this.debouncedShow?.cancel(),u(),f(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",b),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function lp(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",Zo)}lp();var $o=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Go=new Set($o),Hx={role:"role","aria-activedescendant":"ariaActiveDescendant","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-braillelabel":"ariaBrailleLabel","aria-brailleroledescription":"ariaBrailleRoleDescription","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colspan":"ariaColSpan","aria-controls":"ariaControls","aria-current":"ariaCurrent","aria-description":"ariaDescription","aria-describedby":"ariaDescribedBy","aria-details":"ariaDetails","aria-disabled":"ariaDisabled","aria-dropeffect":"ariaDropEffect","aria-errormessage":"ariaErrorMessage","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowTo","aria-grabbed":"ariaGrabbed","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledBy","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwns","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-relevant":"ariaRelevant","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"};function Ko(t){return Hx[t]}var Vx={"aria-activedescendant":"ariaActiveDescendantElement","aria-controls":"ariaControlsElements","aria-describedby":"ariaDescribedByElements","aria-details":"ariaDetailsElements","aria-errormessage":"ariaErrorMessageElements","aria-flowto":"ariaFlowToElements","aria-labelledby":"ariaLabelledByElements","aria-owns":"ariaOwnsElements"};function jx(t,e){let n=t.getRootNode();return"getElementById"in n?e.trim().split(/\s+/).filter(Boolean).map(r=>n.getElementById(r)).filter(r=>r!=null):[]}function Zn(t,e,n,r){let a=Vx[n];if(!a){r==null?e.removeAttribute(n):e.setAttribute(n,r);return}let o=e,i=r==null?[]:jx(t,r);try{if(!(a in o))throw new Error("ARIA element reflection is unavailable");n==="aria-activedescendant"?o.ariaActiveDescendantElement=i[0]??null:o[a]=i}catch{r==null?e.removeAttribute(n):e.setAttribute(n,r)}}var cp=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step"],qx=new Set(["readonly","required"]),ul=!1,dp=new WeakSet;function Ux(t){dp.has(t)||(dp.add(t),t.addEventListener("keydown",()=>{ul=!0},!0),t.addEventListener("pointerdown",()=>{ul=!1},!0))}var Yx="clearrequest",Wx="clearclick",Zx="clearinput",up=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),$x=`
468
+ `,this.container=document.createElement("div"),this.container.className="container",this.container.setAttribute("popover","manual"),this.container.setAttribute("role","tooltip"),this.bubble=document.createElement("slot"),this.bubble.className="bubble",this.bubble.setAttribute("part","bubble"),this.container.append(this.bubble),this.container.addEventListener("mouseenter",()=>{this.#e&&this.cancelHide()}),this.container.addEventListener("mouseleave",()=>{this.#e&&this.shown&&this.scheduleHide()}),e.append(n,this.container)}connectedCallback(){let e=this.parentElement;if(!e)return;this.anchor=e;let n=Er.get(e);n||(n={tooltips:new Set,intersecting:!1},Er.set(e,n),lp?.observe(e)),n.tooltips.add(this),ul(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=Er.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(Er.delete(e),lp?.unobserve(this.anchor)):n&&ul(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=da(e=>this.show(e),this.#r)}get#e(){return this.hasAttribute("interactive")}get#t(){return this.#e||this.touchOpen?!0:!this.hasAttribute("follow")}get#n(){return this.getAttribute("placement")==="top"}get#o(){return this.getAttribute("placement")==="left"}get#r(){let e=this.getAttribute("delay");if(e==null)return np;let n=parseInt(e,10);return Number.isFinite(n)?n:np}get#a(){return this.hasAttribute("truncated-only")}get#l(){return this.hasAttribute(dl)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#l||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(dl))}anchorText(){let e=n=>n.nodeType===3?n.textContent??"":n.nodeType===1&&n.localName==="a-tooltip"?"":Array.from(n.childNodes).map(e).join("");return this.anchor?Array.from(this.anchor.childNodes).map(e).join("").trim():""}syncAutomaticTextContent(){this.#l&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let a=Array.from(e.querySelectorAll(n));if(a.length)return a}catch{}if(op(e))return[e];let r=Array.from(e.querySelectorAll(B0));return r.length?r:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>op(e)?e.isTruncated:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1)}isEmpty(){return this.#l?this.anchorText()==="":this.children.length===0&&(this.textContent??"").trim()===""}observeContent(){typeof MutationObserver>"u"||(this.contentObserver||(this.contentObserver=new MutationObserver(()=>{this.shown&&(this.syncAutomaticTextContent(),this.isEmpty()&&this.hide())})),this.contentObserver.observe(this.#l?this.anchor??this:this,{childList:!0,characterData:!0,subtree:!0}))}positionFrame;pendingPosition;schedulePosition(e){this.pendingPosition=e,this.positionFrame==null&&(this.positionFrame=this.view.requestAnimationFrame(()=>{this.positionFrame=void 0;let n=this.pendingPosition;this.pendingPosition=void 0,n?.()}))}flipVertical(e,n,r,a,o){return o?e<rt?n:e:n+r>a?e:n}place(e,n,r,a,o,i){e+r>o&&(e=o-r-rt),e=Math.max(rt,e),n+a>i&&(n=i-a-rt),n=Math.max(rt,n),this.container.style.transform=`translate(${Math.round(e)}px, ${Math.round(n)}px)`}positionToTarget=()=>{this.schedulePosition(()=>{if(!this.anchor||!this.shown)return;let e=_t(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#o){let i=e.left-n.width-rt,s=i>=rt?i:e.right+rt,l=e.top+(e.height-n.height)/2;this.place(s,l,n.width,n.height,r,a);return}let o=this.flipVertical(e.top-n.height-rt,e.bottom+rt,n.height,a,this.#n||this.touchOpen);this.place(e.left,o,n.width,n.height,r,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#o){let i=e.clientX-n.width-rt,s=i>=rt?i:e.clientX+tp;this.place(s,e.clientY-n.height/2,n.width,n.height,r,a);return}let o=this.flipVertical(e.clientY-n.height-rt*2,e.clientY+tp,n.height,a,this.#n);this.place(e.clientX-I0,o,n.width,n.height,r,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=_t(this.anchor),r=Math.max(n.left-e.clientX,0,e.clientX-n.right),a=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(r,a);return o<=cl?1:o>=ap?0:1-(o-cl)/(ap-cl)}show=e=>{this.anchor&&(ru()&&!au(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#a&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(at&&at!==this&&this.anchor.contains(at.anchor))&&(F0(this),this.shown||(this.shown=!0,this.fading=!1,this.bubble.style.opacity="1",this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.container.showPopover(),this.view.addEventListener("scroll",this.hide,{capture:!0,passive:!0}),this.doc.addEventListener("keydown",this.onKeyDown,!0),this.docMoveBound||(this.doc.addEventListener("mousemove",this.onDocMove),this.docMoveBound=!0),this.observeContent()),this.position(e))))};hide=()=>{this.cancelHide(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.contentObserver?.disconnect(),this.container.hidePopover(),this.fading=!0,this.fadeTimer!==void 0&&clearTimeout(this.fadeTimer),this.fadeTimer=setTimeout(()=>this.detachGlobals(),rp),ip(this))};detachGlobals(){this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.fading=!1,this.view.removeEventListener("scroll",this.hide,{capture:!0}),this.doc.removeEventListener("keydown",this.onKeyDown,!0),this.docMoveBound&&(this.doc.removeEventListener("mousemove",this.onDocMove),this.docMoveBound=!1)}cleanup(){this.cancelHide(),this.contentObserver?.disconnect(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.container.matches(":popover-open")&&this.container.hidePopover()),this.detachGlobals(),this.teardownListeners(),ip(this),this.bubble.style.opacity=""}onDocMove=e=>{if(!this.isConnected){this.cleanup();return}if(!(this.shown||this.fading)||this.#t)return;this.lastMouse=e;let n=this.proximityOpacity(e);if(n===0){this.bubble.style.transition="none",this.bubble.style.opacity="0",this.shown&&this.hide();return}this.positionToMouse(e),this.bubble.style.transition="",this.bubble.style.opacity=String(n)};scheduleHide=(e=O0)=>{this.cancelHide(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.hide()},e)};cancelHide(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}onKeyDown=e=>{e.key==="Escape"&&this.hide()};trigger(e){this.hasExplicitTextTooltip()||this.isEmpty()||this.#a&&!this.isTargetTruncated()||(_0(this)?(this.debouncedShow?.cancel(),this.show(e)):this.debouncedShow?.(e))}setupListeners(){if(this.listening||!this.anchor){this.listening=!0;return}let e=this.anchor,n=this.view,r=this.doc;this.makeDebouncedShow();let a=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",a),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger())},l,c,d=g=>g.preventDefault(),u=()=>{l!==void 0&&(clearTimeout(l),l=void 0),c=void 0},m=g=>{c&&Math.hypot(g.clientX-c.x,g.clientY-c.y)>R0&&u()},p=()=>{u(),f(),this.shown&&this.touchOpen&&this.scheduleHide(L0)},f=()=>{e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",p),e.removeEventListener("pointercancel",p),e.removeEventListener("contextmenu",d)},b=g=>{g.pointerType!=="mouse"&&(u(),c={x:g.clientX,y:g.clientY},e.addEventListener("pointermove",m),e.addEventListener("pointerup",p),e.addEventListener("pointercancel",p),e.addEventListener("contextmenu",d),l=setTimeout(()=>{l=void 0,this.touchOpen=!0,this.show()},z0))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",b),this.teardown=()=>{this.debouncedShow?.cancel(),u(),f(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",b),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function dp(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",$o)}dp();var Go=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Ko=new Set(Go),H0={role:"role","aria-activedescendant":"ariaActiveDescendant","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-braillelabel":"ariaBrailleLabel","aria-brailleroledescription":"ariaBrailleRoleDescription","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colspan":"ariaColSpan","aria-controls":"ariaControls","aria-current":"ariaCurrent","aria-description":"ariaDescription","aria-describedby":"ariaDescribedBy","aria-details":"ariaDetails","aria-disabled":"ariaDisabled","aria-dropeffect":"ariaDropEffect","aria-errormessage":"ariaErrorMessage","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowTo","aria-grabbed":"ariaGrabbed","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledBy","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwns","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-relevant":"ariaRelevant","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"};function Xo(t){return H0[t]}var j0={"aria-activedescendant":"ariaActiveDescendantElement","aria-controls":"ariaControlsElements","aria-describedby":"ariaDescribedByElements","aria-details":"ariaDetailsElements","aria-errormessage":"ariaErrorMessageElements","aria-flowto":"ariaFlowToElements","aria-labelledby":"ariaLabelledByElements","aria-owns":"ariaOwnsElements"};function q0(t,e){let n=t.getRootNode();return"getElementById"in n?e.trim().split(/\s+/).filter(Boolean).map(r=>n.getElementById(r)).filter(r=>r!=null):[]}function Wn(t,e,n,r){let a=j0[n];if(!a){r==null?e.removeAttribute(n):e.setAttribute(n,r);return}let o=e,i=r==null?[]:q0(t,r);try{if(!(a in o))throw new Error("ARIA element reflection is unavailable");n==="aria-activedescendant"?o.ariaActiveDescendantElement=i[0]??null:o[a]=i}catch{r==null?e.removeAttribute(n):e.setAttribute(n,r)}}var up=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step"],U0=new Set(["readonly","required"]),hl=!1,hp=new WeakSet;function Y0(t){hp.has(t)||(hp.add(t),t.addEventListener("keydown",()=>{hl=!0},!0),t.addEventListener("pointerdown",()=>{hl=!1},!0))}var W0="clearrequest",Z0="clearclick",$0="clearinput",pp=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),G0=`
489
469
  :host {
490
470
  --_fs: 15px;
491
471
  --_lh: 20px;
@@ -506,8 +486,8 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
506
486
  }
507
487
 
508
488
  .field {
509
- --_bc: var(--input-border);
510
- --_bw: 0.5px;
489
+ --_bc: var(--input-rest-border);
490
+ --_bw: var(--input-border-width);
511
491
  --_pad-block: 4px;
512
492
 
513
493
  display: flex;
@@ -520,7 +500,6 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
520
500
  transition: box-shadow 120ms ease;
521
501
  }
522
502
  :host([multiline]) .field { align-items: stretch; }
523
- :host([status]:not([status="neutral"])) .field { --_bw: 1px; }
524
503
  :host([size="small"]) { --_fs: 13px; --_lh: 16px; }
525
504
  :host([size="large"]) { --_fs: 17px; --_lh: 22px; }
526
505
  :host([size="small"]) .field { min-height: 24px; }
@@ -528,13 +507,14 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
528
507
  :host([round]) .field { border-radius: var(--input-round, 999px); }
529
508
 
530
509
  @media (hover: hover) and (pointer: fine) {
531
- :host(:not(:disabled)) .field:hover { --_bw: 1px; }
510
+ :host(:not(:disabled)) .field:hover { --_bw: 1px; --_bc: var(--input-border); }
532
511
  }
533
512
  :host(:not([readonly])) .field:has(input:focus, textarea:focus, button:focus-visible),
534
513
  :host([readonly]:state(kb-focus)) .field {
535
514
  --_bw: 1px;
536
- outline: 1px solid var(--focus-ring);
537
- outline-offset: 1px;
515
+ --_bc: var(--input-border);
516
+ outline: var(--_input-focus-width, 1px) solid var(--focus-ring);
517
+ outline-offset: var(--_input-focus-offset, 1px);
538
518
  }
539
519
  @media (forced-colors: active) { .field { border: 1px solid ButtonBorder; } }
540
520
 
@@ -609,10 +589,13 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
609
589
  :host(:disabled) slot[name="leading"],
610
590
  :host(:disabled) slot[name="trailing"] { opacity: 0.5; pointer-events: none; }
611
591
 
612
- slot[name="clear"] { display: none; flex-shrink: 0; }
613
- :host(:state(filled)) slot[name="clear"] { display: flex; align-items: center; }
614
- :host(:disabled) slot[name="clear"],
615
- :host([readonly]) slot[name="clear"] { display: none; }
592
+ slot[name="clear"] {
593
+ display: flex;
594
+ align-items: center;
595
+ flex-shrink: 0;
596
+ visibility: hidden;
597
+ }
598
+ :host(:state(filled):not(:disabled):not([readonly])) slot[name="clear"] { visibility: visible; }
616
599
 
617
600
  :host([multiline]:state(filled)) slot[name="clear"] {
618
601
  align-self: flex-start;
@@ -629,7 +612,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
629
612
  font-size: calc(var(--_fs) - 1px);
630
613
  line-height: calc(var(--_lh) - 2px);
631
614
  }
632
- `,hp=Symbol("readDelegatedAria"),pp=Symbol("writeDelegatedAria"),va=class extends B{static formAssociated=!0;static observedAttributes=[...cp,...$o,"value","defaultvalue","multiline","button","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;delegatedAria=new Map;consumingAria=new Set;ariaApplyQueued=!1;popupAriaSource;popupControls=null;popupActiveDescendant=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(i){console.warn("a-input: ElementInternals unavailable \u2014 form association disabled.",i)}let e=this.attachShadow({mode:"open",delegatesFocus:!0}),n=document.createElement("style");n.textContent=$x,this.labelSlot=document.createElement("slot"),this.labelSlot.className="label",this.labelSlot.setAttribute("part","label"),this.labelSlot.name="label",this.labelSlot.addEventListener("click",()=>this.control?.focus()),this.labelSlot.addEventListener("slotchange",this.onLabelSlotChange),this.field=document.createElement("div"),this.field.className="field",this.field.setAttribute("part","field"),this.leadingSlot=document.createElement("slot"),this.leadingSlot.name="leading",this.leadingSlot.setAttribute("part","leading");let r=document.createElement("slot");r.name="trailing",r.setAttribute("part","trailing");let a=document.createElement("slot");a.name="clear",a.setAttribute("part","clear"),this.field.append(this.leadingSlot,a,r),this.addEventListener(Yx,()=>{this.dispatchEvent(new CustomEvent(Wx,{bubbles:!0,cancelable:!0}))&&this.clear()}),this.hintSlot=document.createElement("slot"),this.hintSlot.className="hint",this.hintSlot.setAttribute("part","hint"),this.hintSlot.name="hint",this.hintSlot.addEventListener("slotchange",this.onHintSlotChange);let o=document.createElement("slot");e.append(n,this.labelSlot,this.field,o,this.hintSlot)}getAnchorRect(){return this.field.getBoundingClientRect()}connectedCallback(){if(Ux(this.doc),Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.control||this.buildControl(),this.ready=!0}[Jt](e){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0,this.popupControls=null,this.popupActiveDescendant=null}else this.popupAriaSource=e.source,"controls"in e&&(this.popupControls=e.controls??null),"activeDescendant"in e&&(this.popupActiveDescendant=e.activeDescendant??null);this.applyPopupAria()}attributeChangedCallback(e,n,r){if(Go.has(e)){if(this.consumingAria.has(e))return;this.consumeAria(e,r);return}if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="button"||e==="rows"||e==="maxrows"){if(!this.control)return;let a=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement,i=!a&&this.hasAttribute("button"),s=this.control instanceof HTMLButtonElement;a!==o||i!==s?this.buildControl(this.value):this.control instanceof HTMLTextAreaElement&&this.configureTextarea(this.control);return}if(e==="status"){this.syncStatus(),this.updateValidity();return}if(e==="disabled"){this.syncDisabled();return}if(e==="value"){r!==null&&(this.value=r);return}e!=="defaultvalue"&&this.control&&(this.forward(e,r),this.syncButtonPresentation(),this.updateValidity())}}consumeAria(e,n){n==null?this.delegatedAria.delete(e):this.delegatedAria.set(e,n),this.hasAttribute(e)&&(this.consumingAria.add(e),super.removeAttribute(e),this.consumingAria.delete(e)),this.applyDelegatedAria(e),this.queueDelegatedAria()}removeAttribute(e){if(Go.has(e)&&!this.consumingAria.has(e)&&!this.hasAttribute(e)){let n=e;this.delegatedAria.delete(n)&&(this.applyDelegatedAria(n),this.queueDelegatedAria());return}super.removeAttribute(e)}toggleAttribute(e,n){if(Go.has(e)){let r=e,a=n??!this.delegatedAria.has(r);return this.consumeAria(r,a?"":null),a}return super.toggleAttribute(e,n)}[hp](e){return this.delegatedAria.get(e)??null}[pp](e,n){this.consumeAria(e,n==null?null:String(n))}applyDelegatedAria(e){let n=this.control;n&&(Zn(this,n,e,this.delegatedAria.get(e)??null),(e==="aria-label"||e==="aria-labelledby")&&this.applyLabelAria(),(e==="aria-description"||e==="aria-describedby")&&this.applyDescriptionAria(),e==="aria-invalid"&&!this.delegatedAria.has(e)&&this.syncStatus(),(e==="aria-controls"||e==="aria-activedescendant")&&this.applyPopupAria())}queueDelegatedAria(){this.ariaApplyQueued||(this.ariaApplyQueued=!0,queueMicrotask(()=>{this.ariaApplyQueued=!1;let e=this.control;if(e)for(let[n,r]of this.delegatedAria)Zn(this,e,n,r)}))}buildControl(e){let n=this.control,r=n!=null&&this.shadowRoot?.activeElement===n,a=null,o=null;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)try{a=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=!i&&this.hasAttribute("button"),l=document.createElement(s?"button":i?"textarea":"input");l instanceof HTMLButtonElement&&(l.type="button"),l.setAttribute("part","input"),this.control?this.control.replaceWith(l):this.leadingSlot.after(l),this.control=l;for(let d of cp)l instanceof HTMLTextAreaElement&&d==="type"||this.forward(d,this.getAttribute(d));this.syncDisabled(),this.syncStatus();for(let[d,u]of this.delegatedAria)Zn(this,l,d,u);this.queueDelegatedAria(),this.applyLabelAria(),this.applyDescriptionAria(),this.applyPopupAria(),i&&this.configureTextarea(l);let c=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(l.value=c,this.syncButtonPresentation(),l.addEventListener("input",this.onInput),l.addEventListener("change",this.onChange),l.addEventListener("focus",this.onFocus),l.addEventListener("blur",this.onBlur),r&&(l.focus(),a!=null&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)))try{l.setSelectionRange(a,o??a)}catch{}this.syncFormValue(c),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),r=this.getAttribute("maxrows");n!=null?(e.rows=Math.max(1,parseInt(n,10)||1),e.style.setProperty("field-sizing","fixed"),e.style.removeProperty("--_maxrows"),e.style.removeProperty("height")):(e.rows=1,up?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),r!=null?e.style.setProperty("--_maxrows",String(parseInt(r,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(up)return;let e=this.control;!(e instanceof HTMLTextAreaElement)||this.getAttribute("rows")!=null||(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)};forward(e,n){let r=this.control;r&&(r instanceof HTMLButtonElement||r instanceof HTMLTextAreaElement&&e==="type"||(qx.has(e)?r.toggleAttribute(e,n!=null):n==null?r.removeAttribute(e):r.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncButtonPresentation(){let e=this.control;if(!(e instanceof HTMLButtonElement))return;let n=e.value;e.textContent=n||this.getAttribute("placeholder")||"",e.classList.toggle("placeholder",!n)}syncFormValue(e){this.internals?.setFormValue(this.control instanceof HTMLButtonElement?null:e)}syncStatus(){let e=this.getAttribute("status")==="critical",n=this.delegatedAria.get("aria-invalid");this.control?.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.internals?.states?.add("invalid"):this.internals?.states?.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.syncFormValue(n),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),e.composed||this.dispatchEvent(new Event("input",{bubbles:!0}))};onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};onFocus=()=>{try{ul?this.internals?.states?.add("kb-focus"):this.internals?.states?.delete("kb-focus")}catch{}};onBlur=()=>{try{this.internals?.states?.delete("kb-focus")}catch{}};onLabelSlotChange=()=>{this.applyLabelAria()};applyLabelAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-label")||this.delegatedAria.has("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-description")||this.delegatedAria.has("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}applyPopupAria(){let e=this.control;if(e)try{!this.delegatedAria.has("aria-controls")&&"ariaControlsElements"in e&&(e.ariaControlsElements=this.popupControls?[this.popupControls]:null),!this.delegatedAria.has("aria-activedescendant")&&"ariaActiveDescendantElement"in e&&(e.ariaActiveDescendantElement=this.popupActiveDescendant)}catch{}}updateFilled(){this.value?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}updateValidity(){let e=this.control;!this.internals||!e||(this.getAttribute("status")==="critical"&&e.validity.valid?this.internals.setValidity({customError:!0},"Invalid value.",e):this.internals.setValidity(e.validity,e.validationMessage,e))}get value(){return this.control?this.control.value:this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??""}set value(e){this.pendingValue=e,this.control&&this.control.value!==e&&(this.control.value=e),this.syncButtonPresentation(),this.syncFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.syncButtonPresentation(),this.syncFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(Zx,{bubbles:!0})),this.control.focus())}get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){this.value=this.getAttribute("defaultvalue")??"",this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}formDisabledCallback(e){this.formDisabled=e,this.syncDisabled()}formStateRestoreCallback(e){this.value=e??""}};for(let t of $o)Object.defineProperty(va.prototype,Ko(t),{configurable:!0,enumerable:!0,get(){return this[hp](t)},set(e){this[pp](t,e)}});function mp(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",va)}mp();var hl=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},Xo=class extends B{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix"];internals;#e;#t;#n;#o;#r;#a;#s;#f;#l;#u;#m;#b;#h;#p;#d;#i;#x;#c=0;#v=!1;#y=!1;#w;get value(){return this.#c}set value(e){this.setAttribute("value",String(e))}get defaultValue(){return Tt(this.getAttribute("defaultvalue"),this.#g)}set defaultValue(e){this.setAttribute("defaultvalue",String(e))}constructor(){super(),this.internals=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
615
+ `,mp=Symbol("readDelegatedAria"),fp=Symbol("writeDelegatedAria"),va=class extends z{static formAssociated=!0;static observedAttributes=[...up,...Go,"value","defaultvalue","multiline","button","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;delegatedAria=new Map;consumingAria=new Set;ariaApplyQueued=!1;popupAriaSource;popupControls=null;popupActiveDescendant=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(i){console.warn("a-input: ElementInternals unavailable \u2014 form association disabled.",i)}let e=this.attachShadow({mode:"open",delegatesFocus:!0}),n=document.createElement("style");n.textContent=G0,this.labelSlot=document.createElement("slot"),this.labelSlot.className="label",this.labelSlot.setAttribute("part","label"),this.labelSlot.name="label",this.labelSlot.addEventListener("click",()=>this.control?.focus()),this.labelSlot.addEventListener("slotchange",this.onLabelSlotChange),this.field=document.createElement("div"),this.field.className="field",this.field.setAttribute("part","field"),this.leadingSlot=document.createElement("slot"),this.leadingSlot.name="leading",this.leadingSlot.setAttribute("part","leading");let r=document.createElement("slot");r.name="trailing",r.setAttribute("part","trailing");let a=document.createElement("slot");a.name="clear",a.setAttribute("part","clear"),this.field.append(this.leadingSlot,a,r),this.addEventListener(W0,()=>{this.dispatchEvent(new CustomEvent(Z0,{bubbles:!0,cancelable:!0}))&&this.clear()}),this.hintSlot=document.createElement("slot"),this.hintSlot.className="hint",this.hintSlot.setAttribute("part","hint"),this.hintSlot.name="hint",this.hintSlot.addEventListener("slotchange",this.onHintSlotChange);let o=document.createElement("slot");e.append(n,this.labelSlot,this.field,o,this.hintSlot)}getAnchorRect(){return this.field.getBoundingClientRect()}connectedCallback(){if(Y0(this.doc),Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.control||this.buildControl(),this.ready=!0}[Xt](e){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0,this.popupControls=null,this.popupActiveDescendant=null}else this.popupAriaSource=e.source,"controls"in e&&(this.popupControls=e.controls??null),"activeDescendant"in e&&(this.popupActiveDescendant=e.activeDescendant??null);this.applyPopupAria()}attributeChangedCallback(e,n,r){if(Ko.has(e)){if(this.consumingAria.has(e))return;this.consumeAria(e,r);return}if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="button"||e==="rows"||e==="maxrows"){if(!this.control)return;let a=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement,i=!a&&this.hasAttribute("button"),s=this.control instanceof HTMLButtonElement;a!==o||i!==s?this.buildControl(this.value):this.control instanceof HTMLTextAreaElement&&this.configureTextarea(this.control);return}if(e==="status"){this.syncStatus(),this.updateValidity();return}if(e==="disabled"){this.syncDisabled();return}if(e==="value"){r!==null&&(this.value=r);return}e!=="defaultvalue"&&this.control&&(this.forward(e,r),this.syncButtonPresentation(),this.updateValidity())}}consumeAria(e,n){n==null?this.delegatedAria.delete(e):this.delegatedAria.set(e,n),this.hasAttribute(e)&&(this.consumingAria.add(e),super.removeAttribute(e),this.consumingAria.delete(e)),this.applyDelegatedAria(e),this.queueDelegatedAria()}removeAttribute(e){if(Ko.has(e)&&!this.consumingAria.has(e)&&!this.hasAttribute(e)){let n=e;this.delegatedAria.delete(n)&&(this.applyDelegatedAria(n),this.queueDelegatedAria());return}super.removeAttribute(e)}toggleAttribute(e,n){if(Ko.has(e)){let r=e,a=n??!this.delegatedAria.has(r);return this.consumeAria(r,a?"":null),a}return super.toggleAttribute(e,n)}[mp](e){return this.delegatedAria.get(e)??null}[fp](e,n){this.consumeAria(e,n==null?null:String(n))}applyDelegatedAria(e){let n=this.control;n&&(Wn(this,n,e,this.delegatedAria.get(e)??null),(e==="aria-label"||e==="aria-labelledby")&&this.applyLabelAria(),(e==="aria-description"||e==="aria-describedby")&&this.applyDescriptionAria(),e==="aria-invalid"&&!this.delegatedAria.has(e)&&this.syncStatus(),(e==="aria-controls"||e==="aria-activedescendant")&&this.applyPopupAria())}queueDelegatedAria(){this.ariaApplyQueued||(this.ariaApplyQueued=!0,queueMicrotask(()=>{this.ariaApplyQueued=!1;let e=this.control;if(e)for(let[n,r]of this.delegatedAria)Wn(this,e,n,r)}))}buildControl(e){let n=this.control,r=n!=null&&this.shadowRoot?.activeElement===n,a=null,o=null;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)try{a=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=!i&&this.hasAttribute("button"),l=document.createElement(s?"button":i?"textarea":"input");l instanceof HTMLButtonElement&&(l.type="button"),l.setAttribute("part","input"),this.control?this.control.replaceWith(l):this.leadingSlot.after(l),this.control=l;for(let d of up)l instanceof HTMLTextAreaElement&&d==="type"||this.forward(d,this.getAttribute(d));this.syncDisabled(),this.syncStatus();for(let[d,u]of this.delegatedAria)Wn(this,l,d,u);this.queueDelegatedAria(),this.applyLabelAria(),this.applyDescriptionAria(),this.applyPopupAria(),i&&this.configureTextarea(l);let c=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(l.value=c,this.syncButtonPresentation(),l.addEventListener("input",this.onInput),l.addEventListener("change",this.onChange),l.addEventListener("focus",this.onFocus),l.addEventListener("blur",this.onBlur),r&&(l.focus(),a!=null&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)))try{l.setSelectionRange(a,o??a)}catch{}this.syncFormValue(c),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),r=this.getAttribute("maxrows");n!=null?(e.rows=Math.max(1,parseInt(n,10)||1),e.style.setProperty("field-sizing","fixed"),e.style.removeProperty("--_maxrows"),e.style.removeProperty("height")):(e.rows=1,pp?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),r!=null?e.style.setProperty("--_maxrows",String(parseInt(r,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(pp)return;let e=this.control;!(e instanceof HTMLTextAreaElement)||this.getAttribute("rows")!=null||(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)};forward(e,n){let r=this.control;r&&(r instanceof HTMLButtonElement||r instanceof HTMLTextAreaElement&&e==="type"||(U0.has(e)?r.toggleAttribute(e,n!=null):n==null?r.removeAttribute(e):r.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncButtonPresentation(){let e=this.control;if(!(e instanceof HTMLButtonElement))return;let n=e.value;e.textContent=n||this.getAttribute("placeholder")||"",e.classList.toggle("placeholder",!n)}syncFormValue(e){this.internals?.setFormValue(this.control instanceof HTMLButtonElement?null:e)}syncStatus(){let e=this.getAttribute("status")==="critical",n=this.delegatedAria.get("aria-invalid");this.control?.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.internals?.states?.add("invalid"):this.internals?.states?.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.syncFormValue(n),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),e.composed||this.dispatchEvent(new Event("input",{bubbles:!0}))};onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};onFocus=()=>{try{hl?this.internals?.states?.add("kb-focus"):this.internals?.states?.delete("kb-focus")}catch{}};onBlur=()=>{try{this.internals?.states?.delete("kb-focus")}catch{}};onLabelSlotChange=()=>{this.applyLabelAria()};applyLabelAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-label")||this.delegatedAria.has("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-description")||this.delegatedAria.has("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}applyPopupAria(){let e=this.control;if(e)try{!this.delegatedAria.has("aria-controls")&&"ariaControlsElements"in e&&(e.ariaControlsElements=this.popupControls?[this.popupControls]:null),!this.delegatedAria.has("aria-activedescendant")&&"ariaActiveDescendantElement"in e&&(e.ariaActiveDescendantElement=this.popupActiveDescendant)}catch{}}updateFilled(){this.value?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}updateValidity(){let e=this.control;!this.internals||!e||(this.getAttribute("status")==="critical"&&e.validity.valid?this.internals.setValidity({customError:!0},"Invalid value.",e):this.internals.setValidity(e.validity,e.validationMessage,e))}get value(){return this.control?this.control.value:this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??""}set value(e){this.pendingValue=e,this.control&&this.control.value!==e&&(this.control.value=e),this.syncButtonPresentation(),this.syncFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.syncButtonPresentation(),this.syncFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent($0,{bubbles:!0})),this.control.focus())}get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){this.value=this.getAttribute("defaultvalue")??"",this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}formDisabledCallback(e){this.formDisabled=e,this.syncDisabled()}formStateRestoreCallback(e){this.value=e??""}};for(let t of Go)Object.defineProperty(va.prototype,Xo(t),{configurable:!0,enumerable:!0,get(){return this[mp](t)},set(e){this[fp](t,e)}});function bp(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",va)}bp();var pl=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},xa=(t,e)=>{if(t===null||!t.trim())return e;let n=t.trim().split(/\s+/);if(n.length!==1&&n.length!==2)return e;let r=n.map(Number);return r.every(Number.isFinite)?r.length===2?[r[0],r[1]]:r[0]:e},K0=t=>Array.isArray(t)?t.join(" "):String(t),ml=(t,e)=>Array.isArray(t)&&Array.isArray(e)?t[0]===e[0]&&t[1]===e[1]:!Array.isArray(t)&&!Array.isArray(e)&&t===e,Jo=class extends z{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix","inverted","name","aria-label","aria-labelledby"];internals;#e;#t;#n;#o;#r;#a;#l;#u;#i;#h;#f;#b;#p;#m;#c;#s;#A;#v;#x;#S;#y;#T;#d=0;#g=[0,0];#I=!1;#E=0;#O=!1;#M=!1;#B;get value(){return Array.isArray(this.#d)?[...this.#d]:this.#d}set value(e){this.setAttribute("value",Array.isArray(e)?e.join(" "):String(e))}get defaultValue(){return xa(this.getAttribute("defaultvalue"),this.#P())}set defaultValue(e){this.setAttribute("defaultvalue",Array.isArray(e)?e.join(" "):String(e))}constructor(){super(),this.internals=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
633
616
  :host {
634
617
  display: grid;
635
618
  grid-template-columns: minmax(0, 1fr);
@@ -685,7 +668,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
685
668
  }
686
669
  :host([track-click="jump"]) .control { cursor: pointer; }
687
670
  .control[data-dragging] { cursor: grabbing; }
688
- .control[data-dragging] .thumb { background: var(--slider-thumb-active); }
671
+ .control[data-dragging] .thumb[data-active] { background: var(--slider-thumb-active); }
689
672
  :host(:focus-visible) .control:not([data-pointer-focus]) {
690
673
  outline: 1px solid var(--focus-ring);
691
674
  outline-offset: 0;
@@ -709,9 +692,9 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
709
692
  background: var(--slider-track);
710
693
  }
711
694
  .fill {
712
- inset-inline-start: calc(var(--slider-track-inset) - var(--anta-slider-thumb-size) / 2);
695
+ inset-inline-start: calc(var(--_fill-start, 0%) + var(--_fill-start-edge, 0px));
713
696
  inset-inline-end: auto;
714
- inline-size: calc(var(--_percent, 0%) + var(--anta-slider-thumb-size) / 2 - var(--slider-track-inset));
697
+ inline-size: calc(var(--_fill-end, 0%) - var(--_fill-start, 0%) + var(--_fill-end-edge, 0px) - var(--_fill-start-edge, 0px));
715
698
  background: var(--slider-fill);
716
699
  }
717
700
  .thumb {
@@ -727,6 +710,12 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
727
710
  transition: background-color 75ms ease-out, border-color 75ms ease-out;
728
711
  transform: translate(-50%, -50%);
729
712
  }
713
+ .thumb[data-last-active] { z-index: 1; }
714
+ .thumb:focus-visible {
715
+ outline: 1px solid var(--focus-ring);
716
+ outline-offset: 2px;
717
+ z-index: 2;
718
+ }
730
719
  .thumb-value {
731
720
  display: none;
732
721
  position: absolute;
@@ -748,6 +737,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
748
737
  ));
749
738
  }
750
739
  :host([value-display="thumb"]) .thumb-value { display: block; }
740
+ :host([value-display="thumb"]) .thumb-value[hidden] { display: none !important; }
751
741
  slot[name="markers"] {
752
742
  display: block;
753
743
  position: relative;
@@ -776,13 +766,14 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
776
766
  .fill { background: Highlight; }
777
767
  .thumb { background: Canvas; border-color: CanvasText; }
778
768
  :host(:focus-visible) .control { outline: 2px solid Highlight; }
769
+ .thumb:focus-visible { outline: 2px solid Highlight; }
779
770
  }
780
771
  @media (prefers-reduced-motion: reduce) {
781
772
  .rail,
782
773
  .fill,
783
774
  .thumb { transition: none; }
784
775
  }
785
- `,this.#r=document.createElement("div"),this.#r.className="header",this.#r.part.add("header"),this.#a=document.createElement("slot"),this.#a.name="label",this.#a.part.add("label");let r=document.createElement("span");r.className="inline-separator",r.textContent=":",this.#s=document.createElement("span"),this.#s.className="inline-value",this.#s.part.add("value"),this.#f=document.createElement("span"),this.#f.className="value-affix",this.#l=document.createElement("span"),this.#l.className="value-affix",this.#s.append(this.#f,this.#l),this.#u=document.createElement("span"),this.#u.className="end-value",this.#u.part.add("value"),this.#m=document.createElement("span"),this.#m.className="value-affix",this.#b=document.createElement("span"),this.#b.className="value-affix",this.#u.append(this.#m,this.#b),this.#r.append(this.#a,r,this.#s,this.#u),this.#e=document.createElement("div"),this.#e.className="control",this.#e.part.add("control"),this.#t=document.createElement("div"),this.#t.className="rail-area";let a=document.createElement("div");a.className="rail",a.part.add("track"),this.#n=document.createElement("div"),this.#n.className="fill",this.#n.part.add("fill"),this.#o=document.createElement("div"),this.#o.className="thumb",this.#o.part.add("thumb"),this.#h=document.createElement("span"),this.#h.className="thumb-value",this.#h.part.add("thumb-value"),this.#p=document.createElement("span"),this.#p.className="value-affix",this.#d=document.createElement("span"),this.#d.className="value-affix",this.#h.append(this.#p,this.#d),this.#t.append(a,this.#n,this.#o,this.#h),this.#e.append(this.#t),this.#i=document.createElement("slot"),this.#i.name="markers",this.#i.part.add("markers"),this.#x=document.createElement("slot"),this.#x.part.add("extras");for(let o of[this.#a,this.#i,this.#x])o.addEventListener("slotchange",()=>this.#B());this.#e.addEventListener("pointerdown",o=>this.#H(o)),this.#e.addEventListener("pointermove",o=>this.#R(o)),this.#e.addEventListener("pointerup",o=>this.#z(o)),this.#e.addEventListener("pointercancel",o=>this.#z(o)),this.#e.addEventListener("lostpointercapture",o=>this.#z(o)),this.addEventListener("keydown",o=>this.#N(o)),this.addEventListener("blur",()=>delete this.#e.dataset.pointerFocus),e.append(n,this.#r,this.#e,this.#i,this.#x)}connectedCallback(){this.#v||(this.#c=this.#A(),this.#v=!0),this.#M(),this.#B()}attributeChangedCallback(e){this.#v&&(e==="value"?this.hasAttribute("value")?(this.#c=this.#C(Tt(this.getAttribute("value"),this.#g)),this.#y=!1):this.#y||(this.#c=this.#A()):e==="defaultvalue"&&!this.hasAttribute("value")&&!this.#y?this.#c=this.#A():(e==="min"||e==="max"||e==="step")&&(this.#c=this.#C(this.#c)),this.#M(),e==="value-display"&&this.#B())}formResetCallback(){let e=this.#c;this.#c=this.#C(Tt(this.getAttribute("defaultvalue"),this.#g)),this.#y=!1,this.#M(),this.#c!==e&&this.#k()}formStateRestoreCallback(e){typeof e=="string"&&(this.#c=this.#C(Tt(e,this.#g)),this.#y=!0,this.#M())}formDisabledCallback(){this.#M()}get#g(){return Tt(this.getAttribute("min"),0)}get#E(){return Math.max(this.#g,Tt(this.getAttribute("max"),100))}get#T(){let e=Tt(this.getAttribute("step"),1);return e>0?e:1}get#D(){return this.hasAttribute("disabled")||this.matches(":disabled")}#A(){let e=this.getAttribute("value")??this.getAttribute("defaultvalue");return this.#C(Tt(e,this.#g))}#C(e){let n=this.#g,r=this.#E,a=this.#T,o=n+Math.round((Math.min(r,Math.max(n,e))-n)/a)*a,i=Math.min(12,Math.max(hl(n),hl(r),hl(a)));return Number(Math.min(r,Math.max(n,o)).toFixed(i))}#I(e=this.#c){let n=this.#E-this.#g;return n>0?(e-this.#g)/n*100:0}#M(){let e=`${this.#I()}%`;this.#t.style.setProperty("--_percent",e);let n=this.#F(),r=String(this.#c),a=this.getAttribute("value-prefix")??"",o=this.getAttribute("value-suffix")??"";for(let[s,l,c]of[[this.#s,this.#f,this.#l],[this.#u,this.#m,this.#b],[this.#h,this.#p,this.#d]])s.textContent=r,l.textContent=a,c.textContent=o,s.prepend(l),s.append(c);let i=this.internals;i&&(i.ariaValueMin=String(this.#g),i.ariaValueMax=String(this.#E),i.ariaValueNow=String(this.#c),i.ariaValueText=n,i.setFormValue(this.#D?null:String(this.#c),String(this.#c)))}#F(){return`${this.getAttribute("value-prefix")??""}${this.#c}${this.getAttribute("value-suffix")??""}`}#B(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#r.hidden=!e(this.#a)&&this.getAttribute("value-display")==="none",this.#i.hidden=!e(this.#i),this.#x.hidden=!e(this.#x)}#L(e){let n=this.#C(e);return n===this.#c?!1:(this.#c=n,this.#y=!0,this.#M(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),!0)}#k(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#O(e){let n=this.#t.getBoundingClientRect();return n.width<=0?this.#c:this.#g+(e-n.left)/n.width*(this.#E-this.#g)}#H(e){this.#D||e.button!==0||this.#t.getBoundingClientRect().width<=0||(this.#w={pointerId:e.pointerId,startX:e.clientX,startValue:this.#c},this.#e.setPointerCapture(e.pointerId),this.#e.dataset.dragging="",this.#e.dataset.pointerFocus="",this.focus({preventScroll:!0}),this.getAttribute("track-click")==="jump"&&this.#L(this.#O(e.clientX)),e.preventDefault())}#R(e){let n=this.#w;if(!n||n.pointerId!==e.pointerId)return;if(!(e.buttons&1)){this.#z(e);return}let r=this.getAttribute("track-click")==="jump"?this.#O(e.clientX):n.startValue+(e.clientX-n.startX)/this.#t.getBoundingClientRect().width*(this.#E-this.#g);this.#L(r),e.preventDefault()}#z(e){let n=this.#w;!n||n.pointerId!==e.pointerId||(this.#w=void 0,delete this.#e.dataset.dragging,this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId),this.#c!==n.startValue&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}#N(e){if(e.target!==this||this.#D||qe(e))return;delete this.#e.dataset.pointerFocus;let n=Math.max(this.#T,(this.#E-this.#g)/10),r;switch(e.key){case"ArrowRight":case"ArrowUp":r=this.#c+this.#T;break;case"ArrowLeft":case"ArrowDown":r=this.#c-this.#T;break;case"PageUp":r=this.#c+n;break;case"PageDown":r=this.#c-n;break;case"Home":r=this.#g;break;case"End":r=this.#E;break;default:return}e.preventDefault(),this.#L(r)&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}};function fp(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",Xo)}fp();var ml=["aria-label","aria-labelledby","aria-description","aria-describedby","aria-invalid","aria-errormessage"],pl=new Set(ml),xp=Symbol("readDelegatedAria"),yp=Symbol("writeDelegatedAria"),Gx="clearrequest",Kx="clearinput",xa=t=>String(t).padStart(2,"0"),bp=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-꓏가-힣豈-﫿︐-﹯!-⦆¢-₩]/u.test(n)?2:1),0),Xx=(t,e)=>e==="pm"?t%12+12:t%12,gp=t=>{let e=/^(\d{1,2}):(\d{2})$/.exec((t??"").trim());return e?{h:Math.min(23,Number(e[1])),min:Math.min(59,Number(e[2]))}:null},Jx=`
776
+ `,this.#l=document.createElement("div"),this.#l.className="header",this.#l.part.add("header"),this.#u=document.createElement("slot"),this.#u.name="label",this.#u.part.add("label");let r=document.createElement("span");r.className="inline-separator",r.textContent=":",this.#i=document.createElement("span"),this.#i.className="inline-value",this.#i.part.add("value"),this.#h=document.createElement("span"),this.#h.className="value-affix",this.#f=document.createElement("span"),this.#f.className="value-affix",this.#i.append(this.#h,this.#f),this.#b=document.createElement("span"),this.#b.className="end-value",this.#b.part.add("value"),this.#p=document.createElement("span"),this.#p.className="value-affix",this.#m=document.createElement("span"),this.#m.className="value-affix",this.#b.append(this.#p,this.#m),this.#l.append(this.#u,r,this.#i,this.#b),this.#e=document.createElement("div"),this.#e.className="control",this.#e.part.add("control"),this.#t=document.createElement("div"),this.#t.className="rail-area";let a=document.createElement("div");a.className="rail",a.part.add("track"),this.#n=document.createElement("div"),this.#n.className="fill",this.#n.part.add("fill"),this.#o=document.createElement("div"),this.#o.className="fill",this.#o.part.add("fill","fill-end"),this.#r=document.createElement("div"),this.#r.className="thumb",this.#r.part.add("thumb","thumb-1"),this.#a=document.createElement("div"),this.#a.className="thumb",this.#a.part.add("thumb","thumb-2"),this.#c=document.createElement("span"),this.#c.className="thumb-value",this.#c.part.add("thumb-value"),this.#A=document.createElement("span"),this.#A.className="value-affix",this.#v=document.createElement("span"),this.#v.className="value-affix",this.#c.append(this.#A,this.#v),this.#s=document.createElement("span"),this.#s.className="thumb-value",this.#s.part.add("thumb-value","thumb-value-2"),this.#x=document.createElement("span"),this.#x.className="value-affix",this.#S=document.createElement("span"),this.#S.className="value-affix",this.#s.append(this.#x,this.#S),this.#t.append(a,this.#n,this.#o,this.#r,this.#a,this.#c,this.#s),this.#e.append(this.#t),this.#y=document.createElement("slot"),this.#y.name="markers",this.#y.part.add("markers"),this.#T=document.createElement("slot"),this.#T.part.add("extras");for(let o of[this.#u,this.#y,this.#T])o.addEventListener("slotchange",()=>{this.#C(),o===this.#u&&this.#U()});for(let[o,i]of[this.#r,this.#a].entries())i.addEventListener("focus",()=>{Array.isArray(this.#d)&&(this.#E=o,this.#R())});this.#e.addEventListener("pointerdown",o=>this.#Y(o)),this.#e.addEventListener("pointermove",o=>this.#G(o)),this.#e.addEventListener("pointerup",o=>this.#W(o)),this.#e.addEventListener("pointercancel",o=>this.#W(o)),this.#e.addEventListener("lostpointercapture",o=>this.#W(o)),this.addEventListener("keydown",o=>this.#J(o)),this.addEventListener("blur",()=>delete this.#e.dataset.pointerFocus),e.append(n,this.#l,this.#e,this.#y,this.#T)}connectedCallback(){this.#O||(this.#L(this.#j()),this.#O=!0),this.#R(),this.#C()}attributeChangedCallback(e){this.#O&&(e==="value"?this.hasAttribute("value")?(this.#L(xa(this.getAttribute("value"),this.#P())),this.#M=!1):this.#M||this.#L(this.#j()):e==="defaultvalue"&&!this.hasAttribute("value")&&!this.#M?this.#L(this.#j()):(e==="min"||e==="max"||e==="step")&&this.#L(this.#d),this.#R(),e==="value-display"&&this.#C())}formResetCallback(){let e=this.#d;this.#L(this.defaultValue),this.#M=!1,this.#R(),ml(this.#d,e)||this.#z()}formStateRestoreCallback(e){typeof e=="string"&&(this.#L(xa(e,this.#P())),this.#M=!0,this.#R())}formDisabledCallback(){this.#R()}get#w(){return fr(this.getAttribute("min"),0)}get#D(){return Math.max(this.#w,fr(this.getAttribute("max"),100))}get#V(){let e=fr(this.getAttribute("step"),1);return e>0?e:1}get#k(){return this.hasAttribute("disabled")||this.matches(":disabled")}#P(){return Array.isArray(this.#d)||Array.isArray(xa(this.getAttribute("value"),this.#w))?[this.#w,this.#D]:this.#w}#j(){let e=this.getAttribute("value")??this.getAttribute("defaultvalue");return xa(e,this.#P())}#N(e){let n=this.#w,r=this.#D,a=this.#V,o=n+Math.round((Math.min(r,Math.max(n,e))-n)/a)*a,i=Math.min(12,Math.max(pl(n),pl(r),pl(a)));return Number(Math.min(r,Math.max(n,o)).toFixed(i))}#Z(e){if(!Array.isArray(e))return this.#N(e);let n=this.#N(e[0]),r=this.#N(e[1]);return n<=r?[n,r]:[r,n]}#L(e){let n=this.#Z(e),r=Array.isArray(this.#d);this.#d=n,Array.isArray(n)?(r||(this.#I=!1),this.#g=this.#I?[n[1],n[0]]:[n[0],n[1]]):(this.#g=[n,n],this.#I=!1)}#_(e){let n=this.#D-this.#w;return n>0?(e-this.#w)/n*100:0}#R(){let e=this.#d,n=Array.isArray(e),r=n?e[0]:this.#w,a=n?e[1]:e,o=`${this.#_(r)}%`,i=`${this.#_(a)}%`,[s,l]=n?this.#g:[a,a];this.#r.style.setProperty("--_percent",`${this.#_(s)}%`),this.#a.style.setProperty("--_percent",`${this.#_(l)}%`),this.#r.toggleAttribute("data-last-active",this.#E===0),this.#a.toggleAttribute("data-last-active",this.#E===1),this.#c.style.setProperty("--_percent",`${this.#_(s)}%`),this.#s.style.setProperty("--_percent",`${this.#_(l)}%`),this.#a.hidden=!n;let c=n&&s===l;this.#c.hidden=c&&this.#E!==0,this.#s.hidden=!n||c&&this.#E!==1;let d="calc(var(--slider-track-inset) - var(--anta-slider-thumb-size) / 2)",u="calc(var(--anta-slider-thumb-size) / 2 - var(--slider-track-inset))",m=(p,f,b,g="0px",v="0px")=>{p.style.setProperty("--_fill-start",f),p.style.setProperty("--_fill-end",b),p.style.setProperty("--_fill-start-edge",g),p.style.setProperty("--_fill-end-edge",v)};this.hasAttribute("inverted")?(this.#n.hidden=n?r===this.#w:a===this.#D,m(this.#n,n?"0%":i,n?o:"100%",n||a===this.#w?d:"0px",n?"0px":u),this.#o.hidden=!n||a===this.#D,n&&m(this.#o,i,"100%","0px",u)):(this.#n.hidden=n?r===a:a===this.#w,m(this.#n,n?o:"0%",i,n&&r!==this.#w?"0px":d,n&&a===this.#D?u:"0px"),this.#o.hidden=!0),this.#H(this.#i,this.#h,this.#f,n?r:a,n?a:void 0),this.#H(this.#b,this.#p,this.#m,n?r:a,n?a:void 0),this.#H(this.#c,this.#A,this.#v,s),n&&this.#H(this.#s,this.#x,this.#S,l),this.#U(),this.#F()}#H(e,n,r,a,o){let i=this.getAttribute("value-prefix")??"",s=this.getAttribute("value-suffix")??"";if(e.textContent=String(a),n.textContent=i,r.textContent=s,e.prepend(n),e.append(r),o===void 0)return;let l=n.cloneNode(!0),c=r.cloneNode(!0);e.append("\u2013",l,String(o),c)}#q(e){let n=this.getAttribute("value-prefix")??"",r=this.getAttribute("value-suffix")??"";return`${n}${e}${r}`}#U(){let e=Array.isArray(this.#d),n=this.#u.assignedNodes({flatten:!0}).map(s=>s.textContent??"").join("").trim(),r=this.getRootNode(),a=(this.getAttribute("aria-labelledby")??"").split(/\s+/).map(s=>r.getElementById(s)?.textContent?.trim()??"").filter(Boolean).join(" "),o=(this.getAttribute("aria-label")??a??n).trim()||n,i=this.internals;i&&(i.role=e?"group":"slider",i.ariaLabel=!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&n||null,i.ariaValueMin=e?null:String(this.#w),i.ariaValueMax=e?null:String(this.#D),i.ariaValueNow=e?null:String(this.#d),i.ariaValueText=e?null:this.#q(this.#d));for(let[s,l]of[this.#r,this.#a].entries()){if(!e){l.removeAttribute("role"),l.tabIndex=-1,l.removeAttribute("aria-label"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuenow"),l.removeAttribute("aria-valuetext"),l.removeAttribute("aria-disabled");continue}let c=s===0!==this.#I?"minimum":"maximum",d=this.#g[s];l.role="slider",l.tabIndex=this.#k?-1:0,l.ariaLabel=o?`${o} ${c}`:`${c[0].toUpperCase()}${c.slice(1)} value`,l.ariaValueMin=String(this.#w),l.ariaValueMax=String(this.#D),l.ariaValueNow=String(d),l.ariaValueText=this.#q(d),l.ariaDisabled=this.#k?"true":null}}#F(){let e=this.internals;if(!e)return;let n=K0(this.#d);if(this.#k)e.setFormValue(null,n);else if(Array.isArray(this.#d)){let r=new FormData,a=this.getAttribute("name");a&&(r.append(a,String(this.#d[0])),r.append(a,String(this.#d[1]))),e.setFormValue(r,n)}else e.setFormValue(n,n)}#C(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#l.hidden=!e(this.#u)&&this.getAttribute("value-display")==="none",this.#y.hidden=!e(this.#y),this.#T.hidden=!e(this.#T)}#K(e,n=0){let r=this.#N(e);if(Array.isArray(this.#d)){let a=this.#d;if(this.#g[n]=r,this.#g[0]!==this.#g[1]&&(this.#I=this.#g[0]>this.#g[1]),this.#d=this.#I?[this.#g[1],this.#g[0]]:[this.#g[0],this.#g[1]],this.#E=n,this.#R(),ml(a,this.#d))return!1}else{if(r===this.#d)return!1;this.#d=r,this.#g=[r,r],this.#R()}return this.#M=!0,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),!0}#z(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#$(e){let n=this.#t.getBoundingClientRect();return n.width<=0?Array.isArray(this.#d)?this.#g[this.#E]:this.#d:this.#w+(e-n.left)/n.width*(this.#D-this.#w)}#X(e){if(!Array.isArray(this.#d))return 0;let n=this.#$(e),r=Math.abs(n-this.#g[0]),a=Math.abs(n-this.#g[1]);return r===a?this.#E:r<a?0:1}#Y(e){if(this.#k||e.button!==0||this.#t.getBoundingClientRect().width<=0)return;let r=e.composedPath()[0]===this.#r?0:e.composedPath()[0]===this.#a?1:this.#X(e.clientX),a=Array.isArray(this.#d)?this.#g[r]:this.#d;this.#B={pointerId:e.pointerId,startX:e.clientX,startValue:a,startPublicValue:this.value,thumb:r},this.#e.setPointerCapture(e.pointerId),this.#e.dataset.dragging="",this.#e.dataset.pointerFocus="",this.#E=r,this.#r.toggleAttribute("data-last-active",r===0),this.#a.toggleAttribute("data-last-active",r===1),(Array.isArray(this.#d)?[this.#r,this.#a][r]:this).focus({preventScroll:!0}),[this.#r,this.#a][r].dataset.active="",this.getAttribute("track-click")==="jump"&&this.#K(this.#$(e.clientX),r),e.preventDefault()}#G(e){let n=this.#B;if(!n||n.pointerId!==e.pointerId)return;if(!(e.buttons&1)){this.#W(e);return}let r=this.getAttribute("track-click")==="jump"?this.#$(e.clientX):n.startValue+(e.clientX-n.startX)/this.#t.getBoundingClientRect().width*(this.#D-this.#w);this.#K(r,n.thumb),e.preventDefault()}#W(e){let n=this.#B;!n||n.pointerId!==e.pointerId||(this.#B=void 0,delete this.#e.dataset.dragging,delete[this.#r,this.#a][n.thumb].dataset.active,this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId),ml(this.#d,n.startPublicValue)||this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}#J(e){let n=e.composedPath()[0],r=Array.isArray(this.#d),a=n===this.#r?0:n===this.#a?1:void 0;if((r?a===void 0:n!==this)||this.#k||Ye(e))return;delete this.#e.dataset.pointerFocus;let o=Math.max(this.#V,(this.#D-this.#w)/10),i=r?this.#g[a??0]:this.#d,s;switch(e.key){case"ArrowRight":case"ArrowUp":s=i+this.#V;break;case"ArrowLeft":case"ArrowDown":s=i-this.#V;break;case"PageUp":s=i+o;break;case"PageDown":s=i-o;break;case"Home":s=this.#w;break;case"End":s=this.#D;break;default:return}e.preventDefault(),this.#K(s,r?a??0:0)&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}};function gp(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",Jo)}gp();var bl=["aria-label","aria-labelledby","aria-description","aria-describedby","aria-invalid","aria-errormessage"],fl=new Set(bl),wp=Symbol("readDelegatedAria"),kp=Symbol("writeDelegatedAria"),X0="clearrequest",J0="clearinput",ya=t=>String(t).padStart(2,"0"),vp=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-꓏가-힣豈-﫿︐-﹯!-⦆¢-₩]/u.test(n)?2:1),0),Q0=(t,e)=>e==="pm"?t%12+12:t%12,xp=t=>{let e=/^(\d{1,2}):(\d{2})$/.exec((t??"").trim());return e?{h:Math.min(23,Number(e[1])),min:Math.min(59,Number(e[2]))}:null},ex=`
786
777
  :host {
787
778
  display: grid;
788
779
  grid-template-columns: minmax(0, 1fr);
@@ -907,8 +898,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
907
898
  flex-shrink: 0;
908
899
  visibility: hidden;
909
900
  }
910
- :host(:state(filled)) slot[name="clear"] { visibility: visible; }
911
- :host(:disabled) slot[name="clear"] { display: none; }
901
+ :host(:state(filled):not(:disabled)) slot[name="clear"] { visibility: visible; }
912
902
 
913
903
  .hint {
914
904
  display: none;
@@ -920,7 +910,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
920
910
  font-size: calc(var(--input-time-font-size) - 1px);
921
911
  line-height: calc(var(--input-time-line-height) - 2px);
922
912
  }
923
- `,vp=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=Jx;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let r=document.createElement("div");r.className="field",r.part.add("field");let a=document.createElement("slot");a.name="leading",a.part.add("leading");let o=document.createElement("div");o.className="segments",o.part.add("segments"),o.setAttribute("role","group");let i=document.createElement("slot");i.name="clear",i.part.add("clear");let s=document.createElement("slot");s.name="trailing",s.part.add("trailing"),r.append(a,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,r,document.createElement("slot"),l),t})(),ya=class extends B{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","required",...ml];#e;#t;#n;#o;#r;#a=!1;#s=!1;#f=!1;#l=new Map;#u=new Set;#m=!1;#b="";#h=null;#p=null;#d=null;#i=[];#x=[];#c;constructor(){super();try{this.#e=this.attachInternals?.()}catch(n){console.warn("a-input-time: ElementInternals unavailable \u2014 form association disabled.",n)}let e=this.attachShadow({mode:"open",delegatesFocus:!0});if(!vp)throw new Error("a-input-time requires a DOM document");e.append(vp.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#i[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#re),this.#o=e.querySelector(".hint"),this.#o.addEventListener("slotchange",this.#ae),this.#t=e.querySelector(".field"),this.#r=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#M),this.#r.addEventListener("input",this.#O),this.#r.addEventListener("keydown",this.#L),this.#r.addEventListener("focusin",this.#F),this.#r.addEventListener("focusout",this.#B),this.#r.addEventListener("paste",this.#k),this.addEventListener(Gx,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#v(e)}else this.#f||this.#v(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#D(),this.#a=!0}#v(e){this.#V(e),this.#b=this.value}attributeChangedCallback(e,n,r){if(pl.has(e)){if(this.#u.has(e))return;this.#y(e,r);return}if(this.#a){if(e==="value"){r!==null&&(this.value=r);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#D();return}if(e==="status"){this.#J();return}if(e==="disabled"){this.#X();return}if(e==="min"||e==="max"){this.#Q();return}if(e==="required"){this.#te(),this.#Q();return}}}}#y(e,n){n==null?this.#l.delete(e):this.#l.set(e,n),this.hasAttribute(e)&&(this.#u.add(e),super.removeAttribute(e),this.#u.delete(e)),this.#w(e),this.#g()}removeAttribute(e){if(pl.has(e)&&!this.#u.has(e)&&!this.hasAttribute(e)){let n=e;this.#l.delete(n)&&(this.#w(n),this.#g());return}super.removeAttribute(e)}toggleAttribute(e,n){if(pl.has(e)){let r=e,a=n??!this.#l.has(r);return this.#y(r,a?"":null),a}return super.toggleAttribute(e,n)}[xp](e){return this.#l.get(e)??null}[yp](e,n){this.#y(e,n==null?null:String(n))}#w(e){let n=this.#l.get(e)??null;if(e==="aria-invalid"||e==="aria-errormessage"){for(let r of this.#i)Zn(this,r.el,e,n);e==="aria-invalid"&&n==null&&this.#J();return}Zn(this,this.#r,e,n),(e==="aria-label"||e==="aria-labelledby")&&this.#G(),(e==="aria-description"||e==="aria-describedby")&&this.#K()}#g(){this.#m||(this.#m=!0,queueMicrotask(()=>{this.#m=!1;for(let e of this.#l.keys())this.#w(e)}))}get#E(){return this.getAttribute("locale")||(typeof navigator<"u"?navigator.language:"en-US")}get#T(){let e=this.getAttribute("hour12");if(e==="true")return!0;if(e==="false")return!1;try{let n=new Intl.DateTimeFormat(this.#E,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#D(){let e=this.#T,n=this.#E,r=this.#b,a=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});a=s.formatToParts(new Date(2e3,0,1,13,5));let l=s.formatToParts(new Date(2e3,0,1,1,5)).find(d=>d.type==="dayPeriod"),c=a.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{a=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#A=o,this.#C=i,this.#r.replaceChildren(),this.#i=[],this.#x=[];for(let s of a)if(s.type==="hour"||s.type==="minute"||s.type==="dayPeriod"){let l=document.createElement("input"),c=s.type==="dayPeriod"?"period":s.type;if(l.className=`seg seg--${c}`,l.type="text",l.spellcheck=!1,l.part.add("segment",c),l.autocomplete="off",l.autocorrect=!1,l.autocapitalize="off",l.setAttribute("aria-label",c==="hour"?"Hour":c==="minute"?"Minute":"AM/PM"),l.inputMode=c==="period"?"text":"numeric",c==="period"){let u=Math.max(2,bp(this.#A),bp(this.#C));l.maxLength=u,l.size=u}else l.maxLength=2,l.size=2;let d=c==="hour"?{kind:c,el:l,min:e?1:0,max:e?12:23}:c==="minute"?{kind:c,el:l,min:0,max:59}:{kind:c,el:l,min:0,max:1};this.#r.append(l),this.#i.push(d)}else{if(!s.value.trim())continue;let l=document.createElement("span");l.className="lit",l.part.add("literal"),l.setAttribute("aria-hidden","true"),l.textContent=s.value,this.#r.append(l),this.#x.push(s.value)}this.#V(r);for(let s of this.#l.keys())this.#w(s);this.#g(),this.#G(),this.#K(),this.#te(),this.#J(),this.#X(),this.#P({dispatch:!1})}#A="AM";#C="PM";#I(e){if(e instanceof HTMLInputElement)return this.#i.find(n=>n.el===e)}#M=e=>{let n=this.#I(e.target);if(n){this.#c=n.el;return}(e.target===this.#t||e.target===this.#r)&&(e.preventDefault(),this.#_(this.#i[0]))};#F=e=>{let n=this.#I(e.target);if(!n)return;let r=this.#c===n.el;this.#c=void 0,r||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#B=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#i.some(r=>r.el===n)||(this.#U()&&this.#P(),this.#Y("change"))})};#L=e=>{if(qe(e))return;let n=this.#I(e.target);if(!n)return;let{el:r}=n,a=e.key;if(a==="ArrowUp"||a==="ArrowDown"){e.preventDefault(),this.#z(n,a==="ArrowUp"?1:-1);return}if(a==="PageUp"||a==="PageDown"){e.preventDefault(),this.#z(n,(a==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(a==="ArrowLeft"||a==="ArrowRight"){let o=r.selectionStart??0,i=r.selectionEnd??o;(a==="ArrowLeft"?o===0&&i===0:o===r.value.length&&i===r.value.length)&&(e.preventDefault(),this.#$(),this.#S(n,a==="ArrowRight"?1:-1));return}if(a==="Backspace"&&r.value===""){e.preventDefault(),this.#S(n,-1);return}n.kind!=="period"&&this.#x.some(o=>o.includes(a))&&(e.preventDefault(),this.#$(),this.#S(n,1,{numeric:!0}))};#k=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#V(n),this.#P(),this.#Y("change"))};#O=e=>{let n=this.#I(e.target);!n||e.isComposing||(n.kind==="period"?this.#R(e,n):this.#H(n))};#H(e){let{el:n}=e,r=n.value.replace(/\D/g,"");r!==n.value&&(n.value=r);let a=e.kind==="hour"&&this.#T,o=a?23:e.max;if(r===""){e.kind==="hour"?this.#h=null:this.#p=null,this.#P({dispatch:!1,preserve:n});return}let i=r.slice(0,2),s=Number(i),l=!1;s>o&&(i=i.at(-1),s=Number(i),l=!0);let c=i.length===2||+`${s}0`>o;a?s===0&&i.length===1?this.#h=null:s===0?(this.#h=12,this.#d="am"):s>12?(this.#h=s-12,this.#d="pm"):(this.#h=s,this.#d==null&&(this.#d="am")):this.#N(e,Math.max(e.min,s)),this.#P({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#S(e,1)}#R(e,n){let{el:r}=n,a=r.value.trim();if(!a){this.#d=null,this.#P({dispatch:!1,preserve:r});return}let o=a.toLowerCase(),i=this.#A.toLowerCase(),s=this.#C.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#d=l,this.#P({dispatch:!1}),this.#S(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#d=null,this.#P({dispatch:!1,preserve:r});return}e.stopPropagation(),r.value=this.#d==="pm"?this.#C:this.#d==="am"?this.#A:""}#z(e,n){if(e.kind==="period"){this.#d=this.#d==null?"am":this.#d==="am"?"pm":"am",this.#U(),this.#P();return}let r=e.kind==="hour"?this.#h:this.#p,a=e.max-e.min+1,o;r==null?o=n>0?e.min:e.max:o=((r-e.min+n)%a+a)%a+e.min,this.#N(e,o),this.#U(),this.#P()}#N(e,n){e.kind==="hour"?this.#h=n:this.#p=n,e.kind==="hour"&&this.#T&&this.#d==null&&(this.#d="am")}#W(e){let n=gp(e);return n?n.h*60+n.min:null}get#j(){return this.#W(this.getAttribute("min"))}get#Z(){return this.#W(this.getAttribute("max"))}#q(){let e=this.#ee;return e==null||this.#p==null?null:e*60+this.#p}#U(){let e=this.#q();if(e==null)return!1;let n=this.#j,r=this.#Z,a=e;return n!=null&&a<n&&(a=n),r!=null&&a>r&&(a=r),a===e?!1:(this.#V(`${xa(Math.floor(a/60))}:${xa(a%60)}`),!0)}#_(e){e&&(e.el.focus(),e.el.select())}#S(e,n,r={}){let a=this.#i.indexOf(e);for(let o=a+n;o>=0&&o<this.#i.length;o+=n){let i=this.#i[o];if(!r.numeric||i.kind!=="period"){this.#_(i);return}}}get#ee(){return this.#h==null?null:this.#T?this.#d==null?null:Xx(this.#h,this.#d):this.#h}#P({dispatch:e=!0,preserve:n}={}){this.#$(n),this.#b=this.value,this.#e?.setFormValue(this.value),this.#oe(),this.#Q(),e&&this.#Y("input")}#$(e){for(let n of this.#i)this.#ne(n,e===n.el)}#ne(e,n){let r=e.el;if(e.kind==="period"){let o=this.#d==="pm"?this.#C:this.#d==="am"?this.#A:"";n||(r.value=o),r.placeholder=this.#A;return}let a=e.kind==="hour"?this.#h:this.#p;n||(r.value=a==null?"":xa(a)),r.placeholder="\u2013\u2013"}#V(e){let n=gp(e);if(!n){this.#h=null,this.#p=null,this.#d=null;return}this.#p=n.min,this.#T?(this.#h=(n.h+11)%12+1,this.#d=n.h<12?"am":"pm"):(this.#h=n.h,this.#d=null)}#Y(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#G(){if(this.#l.has("aria-label")||this.#l.has("aria-labelledby"))return;let e=this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-label",e):this.#r.removeAttribute("aria-label")}#re=()=>{this.#G()};#K(){if(this.#l.has("aria-description")||this.#l.has("aria-describedby"))return;let e=this.#o.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-description",e):this.#r.removeAttribute("aria-description")}#ae=()=>{this.#K()};#X(){let e=this.hasAttribute("disabled")||this.#s;for(let n of this.#i)n.el.disabled=e}#J(){let e=this.getAttribute("status")==="critical",n=this.#l.get("aria-invalid");for(let r of this.#i)r.el.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.#e?.states?.add("invalid"):this.#e?.states?.delete("invalid")}catch{}}#te(){let e=this.hasAttribute("required");for(let n of this.#i)n.el.setAttribute("aria-required",e?"true":"false")}#oe(){this.value?this.#e?.states?.add("filled"):this.#e?.states?.delete("filled")}#Q(){if(!this.#e)return;let e=this.#i[0]?.el??this,n=this.hasAttribute("required"),r=this.#q(),a=this.#j,o=this.#Z;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):r!=null&&a!=null&&r<a?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):r!=null&&o!=null&&r>o?this.#e.setValidity({rangeOverflow:!0},`Time must be ${this.getAttribute("max")} or earlier.`,e):this.getAttribute("status")==="critical"?this.#e.setValidity({customError:!0},"Invalid value.",e):this.#e.setValidity({})}get value(){let e=this.#ee;return e==null||this.#p==null?"":`${xa(e)}:${xa(this.#p)}`}set value(e){this.#f=!0;let n=e??"";n!==this.value&&(this.#V(n),this.#a?this.#P({dispatch:!1}):this.#b=this.value)}clear(){this.#h=null,this.#p=null,this.#d=null,this.#P(),this.#Y("change"),this.dispatchEvent(new CustomEvent(Kx,{bubbles:!0})),this.#i[0]?.el.focus()}focus(e){this.#i[0]?.el.focus(e)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get validity(){return this.#e?.validity}get validationMessage(){return this.#e?.validationMessage??""}get willValidate(){return this.#e?.willValidate??!1}checkValidity(){return this.#e?.checkValidity()??!0}reportValidity(){return this.#e?.reportValidity()??!0}formResetCallback(){this.#V(this.getAttribute("defaultvalue")??""),this.#P(),this.#Y("change")}formDisabledCallback(e){this.#s=e,this.#X()}formStateRestoreCallback(e){this.value=e??""}};for(let t of ml)Object.defineProperty(ya.prototype,Ko(t),{configurable:!0,enumerable:!0,get(){return this[xp](t)},set(e){this[yp](t,e)}});function wp(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",ya)}wp();var fl=globalThis.Temporal;var kp=(t,e)=>`Non-positive ${t}: ${e}`,Ep=(t,e)=>`Non-finite ${t}: ${e}`,Cp=t=>`Cannot convert bigint to ${t}`,Tp="Invalid object",wa=(t,e,n,r)=>$n(t,e)+`; must be between ${n}-${r}`,$n=(t,e)=>`Invalid ${t}: ${e}`;var bl=1e3,gl=1e6,vl=1e9,xl=6e10,yl=36e11;function pt(t){return t===void 0?Object.create(null):yn(t)}function Jo(t,e="number"){if(typeof t=="bigint")throw new TypeError(Cp(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Ep(e,t));return t}function Me(t,e){return Math.trunc(Jo(t,e))||0}function Qo(t,e){return Sp(Me(t,e),e)}function Sp(t,e="number"){if(t<=0)throw new RangeError(kp(e,t));return t}function wl(t,e,n){return Math.min(Math.max(t,e),n)}function Gn(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function yn(t){if(!Gn(t))throw new TypeError(Tp);return t}function ti(t,e){return typeof t=="string"?((n,r)=>{let a=Object.create(null);return a[n]=r,a})(e,t):yn(t)}var en="smallestUnit",r0={constrain:0,reject:1},a0={compatible:0,reject:1,earlier:2,later:3},o0={reject:0,use:1,prefer:2,ignore:3},i0={auto:0,never:1,critical:2,always:3},s0={auto:0,never:1,critical:2},l0={auto:0,never:1},c0={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Ap=[Math.floor,Up,Math.ceil,Yp,Math.trunc,Wp,jp,qp,Zp],d0={previous:-1,next:1};function kl(t){let e=t.roundingIncrement;return e===void 0?1:Me(e,"roundingIncrement")}function El(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Ca(e)==="auto")return;P(Ea("fractionalSecondDigits",e))}e=At("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function Cl(t,e,n=0,r){let a=e[t];if(a===void 0)return r?n:void 0;if(a=Ca(a),a==="auto")return r?n:null;let o=ei[a];return o===void 0&&(o=ke.indexOf(a)),o<0&&P(Il(t,a,ei)),o}function wn(t,e,n,r=0){let a=n[t];if(a===void 0)return r;let o=Ca(a),i=e[o];return i===void 0&&P(Il(t,o,e)),i}var Sr=_e(Cl,en),Mp=_e(Cl,"largestUnit"),u0=_e(Cl,"unit"),Ip=_e(wn,"overflow",r0),Dp=_e(wn,"disambiguation",a0),h0=_e(wn,"offset",o0),Tl=_e(wn,"calendarName",i0),p0=_e(wn,"timeZoneName",s0),m0=_e(wn,"offset",l0),Ar=_e(wn,"roundingMode",c0),f0=_e(wn,"direction",d0);function Sl(t,e,n,r){let a=r?Ht:mt[e+1];if(a){let o=mt[e];a%((t=At("roundingIncrement",t,1,a/o-(r?0:1),1))*o)&&P(Ea("roundingIncrement",t))}else t=At("roundingIncrement",t,1,n?10**9:1,1);return t}function Tr(t,e,n,r){return e!=null&&At(t,e,n,r,1,ri),e}function Op(t,e){e>t&&P(Vp)}function Kn(t,e,n,r=9,a=0,o=4){e=pt(e);let i=Mp(e,a),s=kl(e),l=Ar(e,o),c=Sr(e,a,1);return i=Tr("largestUnit",i,a,r),c=Tr(en,c,a,r),i==null?i=Math.max(n,c):Op(i,c),s=Sl(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function Pp(t,e,n){t=ti(t,en);let r=Mp(t),a=n(t.relativeTo),o=kl(t),i=Ar(t,7),s=Sr(t);return r===void 0&&s===void 0&&P(Hp),s==null&&(s=0),r==null&&(r=Math.max(s,e)),Op(r,s),o=Sl(o,s,1),o>1&&s>5&&r!==s&&P("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[r,s,o,i,a]}function ka(t,e=6,n){let r=kl(t=ti(t,en)),a=Ar(t,7),o=Sr(t);return o=Dl(en,o),o=Tr(en,o,0,e),r=Sl(r,o,void 0,n),[o,r,a]}function zp(t,e){let n=e((t=ti(t,"unit")).relativeTo),r=u0(t);return r=Dl("unit",r),[r,n]}function Z(t){return t===void 0?0:Ip(yn(t))}function kn(t,e=0){t=pt(t);let n=Dp(t),r=h0(t,e);return[Ip(t),r,n]}function Bp(t){return Dp(pt(t))}function Lp(t,e=4){let n=El(t),r=Ar(t,4),a=Sr(t);return[r,...Ml(Tr(en,a,0,e),n)]}function Rp(t){return t=pt(t),[Tl(t),...Lp(t)]}function ni(t){return Tl(pt(t))}function Al(t,e){return Lp(pt(t),e)}function Np(t){t=pt(t);let e=Tl(t),n=El(t),r=m0(t),a=Ar(t,4),o=Sr(t);return[e,p0(t),r,a,...Ml(Tr(en,o,0,4),n)]}function _p(t){let e=El(t=pt(t)),n=Ar(t,4),r=Sr(t);return[t.timeZone,n,...Ml(Tr(en,r,0,4),e)]}function Ml(t,e){return t!=null?[mt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function Fp(t){let e=ti(t,"direction"),n=f0(e,0);return n||P(Ea("direction",n)),n}var Ea=$n;var Ia=t=>`Missing ${t}`,rm=t=>"No valid fields: "+t.join(),am="Invalid bag",Il=(t,e,n)=>$n(t,e)+"; must be "+Object.keys(n).join(),om="Cannot use valueOf",im="Invalid calling context",Ul=t=>"Missing year"+(t?"/era/eraYear":""),Jn="Invalid leap month",sm=t=>$n("Calendar",t),lm=(t,e)=>`Unknown calendar ${t}; might need ${e}`,Yl=t=>$n("TimeZone",t),En="Out-of-bounds date";var Hp="Required smallestUnit or largestUnit",Vp="smallestUnit > largestUnit",cm=t=>`Cannot parse: ${t}`,tn=t=>`Invalid substring: ${t}`;var Wl=wl,$e=Gn;function P(t){throw new RangeError(t)}function ue(t){throw new TypeError(t)}function Ll(t,e,n,r,a){return At(e,((o,i)=>{let s=o[i];return s===void 0&&ue(Ia(i)),s})(t,e),n,r,a)}function At(t,e,n,r,a,o){let i=Wl(e,n,r);return a&&e!==i&&P(((s,l,c,d,u)=>u?wa(s,u[l],u[c],u[d]):wa(s,l,c,d))(t,e,n,r,o)),i}function Ir(t,e=Map){let n=new e;return(r,...a)=>{if(n.has(r))return n.get(r);let o=t(r,...a);return n.set(r,o),o}}var dm=t=>hi({name:t},1),hi=(t,e)=>Sn(n=>({value:n,configurable:1,writable:!e}),t),Da=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function Sn(t,e){let n={};for(let r in e)n[r]=t(e[r],r);return n}function Oa(t,e){let n={};for(let r of t)n[r]=e;return n}function Zl(t){let e={};for(let n of t)e[n]=r=>r[n];return e}function jt(t,e,n=Object.create(null)){for(let r of t)n[r]=e[r];return n}function um(t,e,n){for(let r of t)if(e[r]!==n[r])return 0;return 1}function b0(t,e,n){let r={...n};for(let a=0;a<e;a++)r[t[a]]=0;return r}function _e(t,...e){return(...n)=>t(...e,...n)}function $l(){}function $p(t){return t[0].toUpperCase()+t.substring(1)}function Be(...t){return[].concat(...t).sort()}function Pr(t){return new RegExp(`^${t}$`,"i")}function Gl(t){return parseInt(t.padEnd(9,"0"))}function Kl(t){return t&&t!=="+"?-1:1}function Mr(t){return t===void 0?0:parseInt(t)}function oi(t,e){return String(e).padStart(t,"0")}var Mt=_e(oi,2);function nn(t,e){return Math.sign(t-e)}function at(t,e){return t<e?-1:t>e?1:0}function hm(t,e){let n=t/e;return t%e<0n?n-1n:n}function Xl(t,e){let n=hm(t,e);return[n,t-n*e]}function Vt(t,e){return[Math.floor(t/e),pi(t,e)]}function pi(t,e){return(t%e+e)%e}function zr(t,e){return Math.trunc(t/e)||0}function Jl(t,e){return t%e||0}function jp(t){return t<0?Math.floor(t):Math.ceil(t)}function pm(t,e=1){return e*(.5+t/5)}function qp(t){return Math.sign(t)*Math.round(Math.abs(t))||0}function Up(t){return mi(t)?Math.floor(t):Math.round(t)}function Yp(t){return mi(t)?Math.ceil(t):Math.round(t)}function Wp(t){return mi(t)?Math.trunc(t)||0:Math.round(t)}function Zp(t){return mi(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)}function mi(t){return Math.abs(t%1)===.5}var Ql="iso8601",mm="gregory",g0={bce:-1,ce:0};function fm(t){let e=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return e==="bc"||e==="b"?"bce":e==="ad"||e==="a"?"ce":e}var ot=void 0,bm=0;function Dt(t){return t===ot?"iso8601":t===0?"gregory":t.id}var v0=/^M(\d{2})(L?)$/;function gm(t){let e=v0.exec(t);return e||P((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function vm(t,e){return"M"+Mt(t)+(e?"L":"")}function Rl(t,e,n){return t+(e||n&&t>=n?1:0)}var ei={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},ri=Object.keys(ei);var Pa=bl,za=gl,An=vl,Ba=xl,La=yl,Ht=864e11,mt=[1,Pa,za,An,Ba,La,Ht],x0=BigInt(Pa),Br=BigInt(za),Qn=BigInt(An),y0=BigInt(Ba),w0=BigInt(La),Ee=BigInt(Ht);function xm(t,e){let n=Number(t/Ee),r=Number(t%Ee);return n*(Ht/e)+(Math.trunc(r/e)+r%e/e)}var Ue=ri.slice(0,6),Ra=Zl(Ue),fi=["year"],tr=["day"],ec=["day","month","year"],bi=["offset"],tc=["timeZone"],Lr=["era","eraYear"],k0=["era","eraYear","year"],ym=["month","monthCode"],E0=["day","month","monthCode"],Nl=Be(Ue),C0=Be(Lr,fi),Na=Be(ym,fi),wm=Be(Lr,Na),_a=Be(["monthCode"],fi),km=Be(Lr,_a),Em=Be(tr,["monthCode"]),nr=Be(tr,Na),rr=Be(tr,Lr,Na),Cm=Be(nr,Ue),Tm=Be(rr,Ue),T0=Be(nr,Ue,bi),S0=Be(rr,Ue,bi),Sm=Be(nr,Ue,bi,tc),Am=Be(rr,Ue,bi,tc),A0=Be(tr,_a),M0=Be(tr,Lr,_a),Ot=Oa(Ue,0);function Fa(t){return gi(t,1),t}var I0={hour:23,minute:59,second:59};function gi(t,e){let n={};for(let r of Ue)n[r]=At(r,t[r],0,I0[r]||999,e);return n}function it(t){return rc(t)*An+Mm(t)}function nc(t){return 1e3*rc(t)+t.millisecond}function rc(t){return 3600*t.hour+60*t.minute+t.second}function Mm(t){return t.millisecond*za+t.microsecond*Pa+t.nanosecond}function ac(t){let[e,n]=Vt(t,Ht);return[Im(n),e]}function Im(t){let[e,n]=Vt(t,za),[r,a]=Vt(n,Pa);return D0(e,r,a)}function D0(t,e=0,n=0){let[r,a]=Vt(t,36e5),[o,i]=Vt(a,6e4),[s,l]=Vt(i,1e3);return{hour:r,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function Gp(t){let[e,n]=Xl(t,Qn);return[Number(e),Number(n)]}function Ha(t){return Number(hm(t,Br))}function Fe(t){return rn(t)+BigInt(it(t))}function Dm(t){return Va(t)+nc(t)}function rn(t){return BigInt(qt(t))*Ee}function Va(t){return 864e5*qt(t)}function qt(t){return Ta(t.year,t.month,t.day)}function Ta(t,e=1,n=1){let r=e-1;return t+=Math.floor(r/12),e=pi(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(zr(t,400)+1)+n}function ja(t){let[e,n]=Xl(t,Ee);return{...Om(Number(e)),...Im(Number(n))}}function Om(t){let e=new Date(864e5*pi(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var Pm=1972;function O0(t){return[t,0]}function _l(t,e){if(!e)return{year:1972,month:t}}function P0(t,e,n){return{year:t,month:e,day:n}}function zm(t,e){switch(e){case 2:return vi(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function z0(t){return vi(t)?366:365}function vi(t){return t%4==0&&(t%100!=0||t%400==0)}function B0(t,e,n){return t+=zr(n,12),(e+=Jl(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function L0(t,e,n,r){return 12*(n-t)+r-e}function xi(t){return pi(Ta(t.year,t.month,t.day)+4,7)||7}function Bm(t){return Ta(t.year,t.month,t.day)-Ta(t.year)+1}function Lm(t){let e=t.year,n=Math.floor((Bm(t)-xi(t)+10)/7),r=Ol(e);return n<1?n=r=Ol(--e):n>r&&(n=1,r=Ol(++e)),{weekOfYear:n,yearOfWeek:e,De:r}}function Ol(t){let e=xi({year:t,month:1,day:1});return e===4||e===3&&vi(t)?53:52}function R0({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function qa(t){return on(t),Fa(t)}function on(t){return Rm(t,1),t}function Kp(t){return um(ec,t,Rm(t))}function Rm(t,e){let{year:n}=t,r=Ll(t,"month",1,12,e);return{year:n,month:r,day:Ll(t,"day",1,zm(n,r),e)}}function xe(t,e){return t?t.de(e):e}function er(t,e,n){return t?t.N(e,n):O0(n)}function Ua(t,e){return t===0?R0(e):t&&t.h?.(e)||{}}function ar(t,e,n,r){return t?t.fe(e,n,r):P0(e,n,r)}function Sa(t,e){return t?t.j(e):12}function Aa(t,e,n){return t?t.o(e,n):zm(e,n)}function yi(t,e){let{year:n,month:r}=xe(t,e),[a,o]=er(t,n,r);return vm(a,o)}function oc(t,e){let{year:n}=xe(t,e);return t?t.q(n):vi(n)}function ic(t,e){let{year:n}=xe(t,e);return Sa(t,n)}function sc(t,e){let{year:n,month:r}=xe(t,e);return Aa(t,n,r)}function lc(t,e){let{year:n}=xe(t,e);return t?t.i(n):z0(n)}function Nm(t,e){if(!t)return Bm(e);let{year:n}=xe(t,e),r=ar(t,n,1,1);return qt(e)-qt(r)+1}function _m(t,e){return t===ot?Lm(e).weekOfYear:void 0}function Fm(t,e){return t===ot?Lm(e).yearOfWeek:void 0}var ke=ri.map(t=>t+"s"),cc=Zl(ke),Hm=Be(ke),N0=ke.slice(0,6),Vm=ke.slice(6),_0=Vm.slice(1),Pe=Oa(ke,0),dc=Oa(N0,0),uc=_e(b0,ke);function Dl(t,e){return e==null&&P(Ia(t)),e}var He=_e(F0,"string");function F0(t,e,n=t){return typeof e!==t&&ue(Ea(n,e)),e}function hc(t,e="number"){return Number.isInteger(t)||P(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function Ca(t){return typeof t=="symbol"&&ue("Cannot convert Symbol to string"),String(t)}function pc(t){if(!Gn(t))return t;let e=t[Symbol.toPrimitive];if(e!=null){typeof e!="function"&&ue();let n=Reflect.apply(e,t,["string"]);return Gn(n)&&ue(),n}return Date.prototype[Symbol.toPrimitive].call(t,"string")}function wi(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&ue(`Invalid bigint: ${t}`),t)}function Ya(t,e){return hc(Jo(t,e),e)}function Ce(t,e){return jt(ec,t,jt(Ue,e))}var mc=BigInt(1e8)*Ee,fc=BigInt(-1e8)*Ee,jm=fc-Ee,qm=-3261848;function ki(t){let e=12*t.year+t.month;return(e<qm||e>3309129)&&P(En),t}function st(t,e=1){let n=rn(t);return(n<(e?jm:fc)||n>mc)&&P(En),t}function or(t){return H0(Fe(t)),t}function H0(t){return(t<=jm||t>=mc+Ee)&&P(En),t}function zt(t){return(t<fc||t>mc)&&P(En),t}function bc(t,e){return zt(rn(t)+BigInt(it(t)-e))}function Dr(t,e,n){return gc(t/e,n)*e}function gc(t,e){return Ap[e](t)}function V0(t,e,n,r){let a=vc(t,e,r,n);return Um(a,Number(n-a.I)/Number(a.O-a.I))}function j0(t,e,n,r){return Dr(Um(t,Ym(e,t.I,t.O)),n,r)}function vc(t,e,n,r){let a=Xp(t,e,n);return((o,i,s,l)=>l>0?i<=o&&o<=s:s<=o&&o<=i)(r,a.I,a.O,Math.sign(e))||(a=Xp(t+e,e,n)),a}function Xp(t,e,n){let r=t+e;return{ve:t,qe:r,I:n(t),O:n(r)}}function Um(t,e){return t.ve+e*(t.qe-t.ve)}function Ym(t,e,n){let r=n-e,a=t-e;if(!a)return 0;let o=a<0n?-a:a,i=r<0n?-r:r,s=at(a,0n)===at(r,0n)?1:-1;return at(o,i)<=0?o===i?s:pm(at(2n*o,i),s):Number(a)/Number(r)}function ft(t){return{epochNanoseconds:t}}function bt(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Ut(t,e){return jt(Ue,t,ye(t,e))}function ye(t,e){return jt(ec,t,{calendar:e})}function ir(t){return jt(Ue,t)}function Pt(t){return jt(ke,t,{sign:Ja(t)})}function Wm(t,e,n,r){return bt(e===6?U0(t,r):Y0(t,e,n,r),t.timeZone,t.calendar)}function Zm(t){let[e,n]=Gm(t);return xm(n-e,La)}function $m(t){let{timeZone:e,calendar:n}=t;return bt(Or(e,Ce(ze(t),Ot)),e,n)}function Ei(t,e,n,r,a,o,i,s){if(r===0&&a===1)return t;let l=Ja(t)||1,c=li(r,s)?s&&r<6&&n>=6?Z0:$0:W0,[d,u,m]=c(l,t,e,n,r,a,o,i);return m&&r!==7&&(d=((p,f,b,g,v,x)=>{for(let w=g+1;w<=b;w++){if(w===7&&b!==7)continue;let I=uc(w,p);I[ke[w]]+=v;let C=at(f,Di(x,I));if(C&&C!==v)break;p=I}return p})(d,u,n,Math.max(6,r),l,i)),d}function q0(t,e,n){let r=Math.min(Tn(t),6);return Cn(Si(an(t),BigInt(e),n),r)}function U0(t,e){let[n,r]=Gm(t);return G0(t.epochNanoseconds,n,r,e)}function Y0(t,e,n,r){if(e===0&&n===1)return t.epochNanoseconds;let a=ze(t);return Nr(t.timeZone,Ci(a,Rr(e,n),r),a.offsetNanoseconds,2,0,1)}function Ci(t,e,n){let[r,a]=Ti(t,e,n),o=Ce(Fr(t,a),r);return or(o),o}function Ti(t,e,n){return ac(Dr(it(t),e,n))}function W0(t,e,n,r,a,o,i,s){let l=ke[a],c=uc(a,e);a===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=zr(e[l],o)*o,u=vc(d,o*t,p=>(c[l]=p,Di(s,c)),n),m=j0(u,n,o,i);return c[l]=m,[c,m===u.qe?u.O:u.I,m!==d]}function Z0(t,e,n,r,a,o,i,s){let l=Number(Hr(e)),c=Rr(a,o),d=Dr(l,c,i),u={...e,...dc},m=vc(u.days,t,x=>(u.days=x,Di(s,u)),n),p=m.I,f=m.O,b=d-Number(f-p),g=0;b&&Math.sign(b)!==t?n=p+BigInt(d):(g+=t,d=Dr(b,c,i),n=f+BigInt(d));let v=Oi(d);return[{...e,...v,days:e.days+g},n,!!g]}function $0(t,e,n,r,a,o,i){let s=an(e),l=Si(s,Wa(a,o),i),c=l-s,d=Math.sign(Number(l/Ee)-Number(s/Ee))===t,u=Cn(l,Math.min(r,6));return[{...e,...u},n+c,d]}function Gm(t){let{timeZone:e}=t,n=Ce(ze(t),Ot),r=Ce(Fr(n,1),Ot);return[Or(e,n),Or(e,r)]}function G0(t,e,n,r){return gc(Ym(t<n?t:n-1n,e,n),r)?n:e}function ii(t){return Dr(t,Ba,7)}function Si(t,e,n){return Km(t,e,n,t/e%2n)}function Ai(t,e,n){let[r,a]=Xl(t,Ee),o=r*Ee;return o+Km(a,e,n,(o/e+a/e)%2n)}function Km(t,e,n,r){let a=t/e,o=t%e,i=0;o&&(i=pm(at(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=gc(Number(r)+i,n);return(a-r+BigInt(s))*e}function Rr(t,e){return mt[t]*e}function Wa(t,e){return BigInt(mt[t])*BigInt(e)}var ze=Ir(K0,WeakMap);function K0(t){let{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{...ja(e+BigInt(r)),offsetNanoseconds:r}}function Nr(t,e,n,r=0,a=0,o,i){if(n!==void 0&&r===1&&(r===1||i))return bc(e,n);r!==2&&r!==0||st(e,0);let s=t.R(e);if(n!==void 0&&r!==3){let l=((c,d,u,m)=>{let p=Fe(d);m&&(u=ii(u));for(let f of c){let b=Number(p-f);if(m&&(b=ii(b)),b===u)return f}})(s,e,n,o);if(l!==void 0)return l;r===0&&P("Invalid TimeZone offset")}return i?Fe(e):_r(t,e,a,s)}function _r(t,e,n=0,r=t.R(e)){if(r.length===1)return r[0];if(n===1&&P("Ambiguous offset"),r.length)return r[n===3?1:0];let a=Fe(e),o=((s,l)=>{let c=s.B(l-Ee);return(d=>(d>Ht&&P("Out-of-bounds TimeZone gap"),d))(s.B(l+Ee)-c)})(t,a),i=ja(a+BigInt(o*(n===2?-1:1)));return(r=t.R(i))[n===2?0:r.length-1]}function Or(t,e){let n=t.R(e);if(n.length)return n[0];let r=Fe(e)-Ee;return t.C(r,1)}function xc(t,e,n,r=0){Ja(n)&&Tn(n)<8&&P("Cannot use small units");let a=st(Ma(t,e));return Ma(t,sn(t,a,n,r))}function Za(t,e,n=0){let{calendar:r,epochNanoseconds:a,timeZone:o}=t,i=Hr(e),s=a;if(Mc(e)){let l=ze(t);s=_r(o,Ce(sn(r,l,{...e,...dc},n),l))+i}else s+=i;return{...t,epochNanoseconds:zt(s)}}function $a(t,e,n,r=0){let[a,o]=Mi(e,n);return or(Ce(sn(t,e,{...n,...dc,days:n.days+o},r),a))}function Mi(t,e){return X0(t,Hr(e))}function yc(t,e){return J0(t,(Mc(n=e)&&P("Cannot use large units"),Hr(n)));var n}function sn(t,e,n,r=0){let{years:a,months:o,weeks:i,days:s}=n,l;if(s+=Number(Hr(n)/Ee),a||o)l=si(t,e,a,o,r);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=Fr(l,7*i+s)),st(l)}function Ma(t,e){return Fr(e,1-xe(t,e).day)}function si(t,e,n,r,a){let o=xe(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=er(t,i,s);i+=n,s=Fl(t,c,d,t?t.p(i):void 0,a),s=At("month",s,1,Sa(t,i),a)}return r&&({year:i,month:s}=Xm(t,i,s,r)),l=At("day",l,1,Aa(t,i,s),a),ar(t,i,s,l)}function Xm(t,e,n,r){return t?t.ae(e,n,r):B0(e,n,r)}function Fl(t,e,n,r,a){if(n){let o=t?t.l:void 0;return r!==void 0&&(o<0||r===e+1)?r:(a===1&&P(Jn),o<0?-o:e)}return Rl(e,0,r)}function X0(t,e){let n=Number(e/Ee),r=Number(e%Ee),[a,o]=ac(it(t)+r);return[a,n+o]}function J0(t,e){return zt(t+e)}function Fr(t,e){return e?Om(qt(t)+e):t}function Ga(t,e){return Dt(t)!==Dt(e)&&P("Mismatching Calendars"),t}function Jm(t,e){return t.m!==e.m&&P("Mismatching TimeZones"),t}function Qm(t){return t.timeZone.id}function ef(t,e,n,r,a,o,i){return r<6?Ka(e.epochNanoseconds,n.epochNanoseconds,r,a,o,i):((s,l,c,d,u,m,p)=>{let f=c.epochNanoseconds;if(f===l.epochNanoseconds)return Pe;let b,g=Jm(l.timeZone,c.timeZone);return b=wc(g,s,l,c,d),b=Ei(b,f,d,u,m,p,Ec(s,g,l),1),b})(t,e,n,r,a,o,i)}function tf(t,e,n,r,a,o,i){return r<=6?Ka(Fe(e),Fe(n),r,a,o,i):((s,l,c,d,u,m,p)=>{let f=Fe(c),b=at(f,Fe(l));if(!b)return Pe;let g;return g=lf(s,l,c,b,d),g=Ei(g,f,d,u,m,p,((v,x)=>({ne:Fe(x),ke:w=>Fe(Ce(sn(v,x,w),x))}))(s,l)),g})(t,e,n,r,a,o,i)}function nf(t,e,n,r,a,o,i){let s=Ma(t,e),l=Ma(t,n);return kc(s,l)?of(t,st(s),st(l),r,a,o,i,8):Pe}function rf(t,e,n,r,a,o,i,s=6){return r===6?Ka(rn(e),rn(n),r,a,o,i):of(t,e,n,r,a,o,i,s)}function af(t,e,n,r,a,o){let i=Dr(it(e)-it(t),Rr(r,a),o);return{...Pe,...Oi(i,n)}}function of(t,e,n,r,a,o,i,s=6){let l=rn(n);if(!kc(e,n))return Pe;let c;return c=Ii(t,e,n,r),a===s&&o===1||(c=Ei(c,l,r,a,o,i,Cc(t,e))),c}function Ka(t,e,n,r,a,o){return{...Pe,...Cn(Si(e-t,Wa(r,a),o),n)}}function wc(t,e,n,r,a){return a<6?{...Pe,...Cn(r.epochNanoseconds-n.epochNanoseconds,a)}:((o,i,s)=>{let l=at(s.epochNanoseconds,i.epochNanoseconds);if(!l)return Pe;if(!kc(ze(i),ze(s)))return{...Pe,...Cn(s.epochNanoseconds-i.epochNanoseconds,5)};let[c,d,u]=Q0(o,i,s,l);return{...(m=c,p=d,Ii(e,m,p,a)),...Oi(u)};var m,p})(t,n,r)}function sf(t,e,n,r){let a=Fe(e),o=Fe(n),i=at(o,a);return i?r<=6?{...Pe,...Cn(o-a,r)}:lf(t,e,n,i,r):Pe}function lf(t,e,n,r,a){let o=n,i=it(n)-it(e);return Math.sign(i)===-r&&(o=Fr(n,-r),i+=Ht*r),{...Ii(t,e,o,a),...Oi(i)}}function Q0(t,e,n,r){let a=ze(e),o=ze(n),i=n.epochNanoseconds,s=0,l=it(o)-it(a);Math.sign(l)===-r&&s++;let c=s+(r>0?1:0);for(;;s++){let d=Fr(o,s*-r),u=_r(t,Ce(d,a));if(s===c||at(i,u)!==-r)return[a,d,Number(i-u)]}}function Ii(t,e,n,r){if(r<=7)return((b,g,v)=>{let x=Pl(g,v);return b?{...Pe,weeks:zr(x,7),days:Jl(x,7)}:{...Pe,days:x}})(r===7,e,n);let a=xe(t,e),o=xe(t,n);if(r===8){let{year:b,month:g,day:v}=a,{year:x,month:w,day:I}=o,C=Math.sign(nn(x,b)||nn(w,g)||Pl(e,n)),L=0,R=0;if(C){L=t?t.ee(b,g,x,w):L0(b,g,x,w);let O=si(t,e,0,L,0);C*nn(v,I)>0&&(L-=C,O=si(t,e,0,L,0)),R=Pl(O,n)}return{...Pe,months:L,days:R}}let{year:i,month:s,day:l}=a,{year:c,month:d,day:u}=o,m=c-i,p=d-s,f=u-l;if(m||p){let b=Math.sign(m||p),g=Aa(t,c,d),v=0;if(Math.sign(u-l)===-b){let x=g;({year:c,month:d}=Xm(t,c,d,-b)),m=c-i,p=d-s,g=Aa(t,c,d),v=b<0?-x:g}if(f=u-Math.min(l,g)+v,m){let[x,w]=er(t,i,s),[I,C]=er(t,c,d),L=t?t.l:void 0;if(p=L!==void 0&&w&&!C&&(L<0?b>0&&I===-L:b<0&&I===x)?0:I-x||Number(C)-Number(w),Math.sign(p)===-b){let R=b<0&&-Sa(t,c);c-=b,m=c-i,p=d-Fl(t,x,w,t?t.p(c):void 0,0)+(R||Sa(t,c))}else if(t){let R=Fl(t,x,w,t.p(c),0);p=t.ee(c,R,c,d)}}}return{...Pe,years:m,months:p,days:f}}function kc(t,e){return nn(t.year,e.year)||nn(t.month,e.month)||nn(t.day,e.day)}function Pl(t,e){return qt(e)-qt(t)}function cf(t,e,n){return Xa(t)?((r,a,o)=>{let{calendar:i,timeZone:s}=r,l=Za(r,a);return[wc(s,i,r,l,o),l.epochNanoseconds,Ec(i,s,r)]})(t,e,n):((r,a,o)=>{let{calendar:i}=r,s=or(Ce(r,Ot)),l=$a(i,s,a);return[sf(i,s,l,o),Fe(l),Cc(i,r)]})(t,e,n)}function Jp(t,e){return Xa(t)?Za(t,e).epochNanoseconds:Fe($a(t.calendar,Ce(t,Ot),e))}function Di(t,e){return Mc(e)?t.ke(e):t.ne}function Ec(t,e,n){let r=ze(n);return{ne:n.epochNanoseconds,ke:a=>_r(e,Ce(sn(t,r,a),r))}}function Cc(t,e){return{ne:rn(e),ke:n=>rn(sn(t,e,n))}}function Xa(t){return"timeZone"in t}function li(t,e){return t<=6-(e?1:0)}function Tc(t,e,n){let r={};for(let a=e;a>=0;a--){let o=mt[a];r[n[a]]=zr(t,o),t=Jl(t,o)}return r}var ey=2**53;function Sc(t,e,n){let r=Math.max(Tn(e),Tn(n));return r>6&&P("Cannot use large units"),((a,o,i,s)=>Pt(Mn(((l,c,d,u)=>{let m=an(l)+an(c)*BigInt(u?-1:1);return Number.isFinite(Number(m/Ee))||P(En),{...Pe,...Cn(m,d)}})(o,i,s,a))))(t,e,n,r)}function df(t,e,n){let r=Tn(e),[a,o,i,s,l]=Pp(n,r,t);if(!l&&Math.max(r,a)<=6)return Pt(Mn(((p,f,b,g,v)=>{let x=Si(an(p),Wa(b,g),v);return{...Pe,...Cn(x,f)}})(e,a,o,i,s)));l||P("Missing relativeTo");let c=Xa(l);if(!e.sign&&(!c||a<6))return e;let[d,u,m]=cf(l,e,a);return Pt(Ei(d,u,a,o,i,s,m,c))}function uf(t){return t.sign===-1?Ac(t):t}function Ac(t){return Pt(gt(t))}function gt(t){let e={};for(let n of ke)e[n]=-1*t[n]||0;return e}function Ja(t,e=ke){let n=0;for(let r of e){let a=Math.sign(t[r]);a&&(n&&n!==a&&P("Cannot mix duration signs"),n=a)}return n}function Mn(t){for(let n of _0)ty(n,t[n]);let e=an(t);return hf(Number(e/Qn)),t}function ty(t,e){return At(t,e,-4294967295,4294967295,1)}function hf(t){Number.isSafeInteger(t)||P("Out-of-bounds duration")}function an(t){return BigInt(t.days)*Ee+Hr(t)}function Hr(t){return BigInt(t.hours)*w0+BigInt(t.minutes)*y0+pf(t)}function pf(t){return BigInt(t.seconds)*Qn+BigInt(t.milliseconds)*Br+BigInt(t.microseconds)*x0+BigInt(t.nanoseconds)}function Cn(t,e=6){let n=Number(t/Ee),r=Number(t%Ee),a=mt[e],o=e<=3?Number(t/BigInt(a)):n*(Ht/a)+zr(r,a);Number.isFinite(o)||P(En),e<=3&&Math.abs(o)/(An/mt[e])>=ey&&P(En);let i=Tc(r,e,ke);return i[ke[e]]=o,i}function Oi(t,e=5){return Tc(t,e,ke)}function Mc(t){return!!Ja(t,Vm)}function Tn(t){let e=9;for(;e>0&&!t[ke[e]];e--);return e}function Qa(t,e){return at(t.epochNanoseconds,e.epochNanoseconds)}function mf(t,e,n,r){let a=t(pt(r).relativeTo),o=Math.max(Tn(e),Tn(n));return um(ke,e,n)?0:li(o,a&&Xa(a))?at(an(e),an(n)):(a||P("Missing relativeTo"),at(Jp(a,e),Jp(a,n)))}function Ic(t,e){return sr(t,e)||Pi(t,e)}function sr(t,e){return nn(qt(t),qt(e))}function Pi(t,e){return nn(it(t),it(e))}function ff(t,e){return!Qa(t,e)}function bf(t,e){return!Qa(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function gf(t,e){return!Ic(t,e)&&t.calendar===e.calendar}function vf(t,e){return!sr(t,e)&&t.calendar===e.calendar}function xf(t,e){return!sr(t,e)&&t.calendar===e.calendar}function yf(t,e){return!sr(t,e)&&t.calendar===e.calendar}function wf(t,e){return!Pi(t,e)}function eo(t){return t===0?g0:t?t.k:void 0}function Ye(t,e,n=e){return eo(t)?n:e}function kf(t,e){let n=e||void 0,r=eo(e),{era:a,eraYear:o,year:i}=t;if(i!==void 0&&(i=Me(i,"year")),o!==void 0&&(o=Me(o,"eraYear")),a!==void 0||o!==void 0){a!==void 0&&o!==void 0||ue("Mismatching era/eraYear"),r||P("Forbidden era/eraYear");let s=fm(a),l=r[s];l===void 0&&P((d=>`Invalid era: ${d}`)(a));let c=n?._?n._(o,s,l):ny(o,l);i!==void 0&&i!==c&&P("Mismatching year/eraYear"),i=c}else i===void 0&&ue(Ul(r));return i}function ci(t,e,n,r,a){let{month:o,monthCode:i}=t;if(i!==void 0){let s=((l,c,d,u,m=gm(c))=>{let p=l?l.p(d):void 0,[f,b]=m,g=Rl(f,b,p);if(b){let v=l?l.l:void 0;v===void 0&&P(Jn),v>0?(g>v&&P(Jn),p!==g&&(u===1&&P(Jn),g=Rl(f,0,p))):(g!==-v&&P(Jn),p===void 0&&u===1&&P(Jn))}return g})(e,i,n,a,r);o!==void 0&&o!==s&&P("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&ue("Missing month/monthCode");return At("month",o,1,Sa(e,n),a)}function Hl(t,e,n,r,a){return Ll(t,"day",1,Aa(e,n,r),a)}function ny(t,e){return(e+t)*(Math.sign(e)||1)||0}function Vr(t,e){return gi(jt(Ue,{...Ot,...t}),e)}var ry=Pr("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function zi(t){let e=Dc(t);return e===void 0&&P(cm(t)),e}function Dc(t,e){let n=ry.exec(t);if(n&&(r=>(a=>{a[0]!=="T"&&a[0]!=="t"||(a=a.slice(1));let o=a.search(/[.,]/),i=o<0?a:a.slice(0,o),s=i.split(":");return s.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(i):(s.length===2||s.length===3)&&s.every(l=>l.length===2&&/^\d{2}$/i.test(l))})(r.slice(1)))(n[0]))return((r,a)=>{let o=r[4]||r[5];return a&&o&&P(tn(o)),s=(Mr(r[2])*La+Mr(r[3])*Ba+Mr(r[4])*An+Gl(r[5]||""))*Kl(r[1]),Math.abs(s)>=Ht&&P("Out-of-bounds offset"),s;var s})(n,e)}var vt={era:Ca,month:Qo,monthCode(t,e){return He(pc(t),e)},day:Qo},Oc=Oa(Ue,Me),Ef=Oa(ke,Ya),Pc=Object.assign({},vt,Oc),zc={offset(t){return zi(He(pc(t)))},...Pc};function Se(t,e,n,r,a=!r){let o={},i=0;for(let s of e){let l=t[s];if(l!==void 0){i=1;let c=n[s];c&&(l=c(l,s)),o[s]=l}else r&&r.includes(s)&&ue(Ia(s))}return a&&!i&&ue(rm(e)),o}function xt(t,e,n){let r=eo(e);t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||ue(Ul(r)),t.monthCode===void 0&&t.month===void 0&&ue("Missing month/monthCode"),n||t.day!==void 0||ue(Ia("day"));let a=Cf(t);return[kf(t,e),a]}function Bi(t,e){let n=e===ot,r=eo(e);t.day===void 0&&ue(Ia("day")),n||t.month===void 0||t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||ue(Ul(r));let a=Cf(t);return[t.eraYear!==void 0||t.year!==void 0?kf(t,e):void 0,a]}function to(t,e=Ot,n){let r=Ce(t,e);return or(r),Ut(r,n)}function ln(t,e,n,r,a){let o=ci(t,e,n,r,a);return ye(st(ar(e,n,o,Hl(t,e,n,o,a))),e)}function Li(t,e,n,r,a){return ay(e,n,ci(t,e,n,r,a))}function Ri(t,e,n,r,a){let o=e===ot,i=n,s,l,c;if(i===void 0&&o&&(i=1972),i!==void 0){o||st(ar(e,i,1,1));let d=ci(t,e,i,r,a);s=Hl(t,e,i,d,a),[l,c]=er(e,i,d)}else{t.monthCode===void 0&&ue("Missing month/monthCode"),[l,c]=r;let d=e?e.re:1972;if(d!==void 0)s=Hl(t,e,d,ci(t,e,d,r,a),a);else{let u=a===0&&e?e.ge?.(l,c,t.day):void 0;s=u!==void 0?u:t.day}}return oy(e,l,c,s,t.day,a)}function ay(t,e,n){return ye(ki(ar(t,e,n,1)),t)}function oy(t,e,n,r,a,o){let i=n;i&&((t&&t.V?.[e])??1/0)<a&&(o===1&&P(Jn),i=0,r=Wl(a,1,(t&&t.U)??1/0));let s=t?t.u(e,!!i,r):_l(e,!!i);for(;!s&&o===0&&r>1;)r--,s=t?t.u(e,!!i,r):_l(e,!!i);s||P("Cannot guess year");let{year:l,month:c}=s;return ye(st(ar(t,l,c,r)),t)}function Cf(t){if(t.monthCode!==void 0)return gm(t.monthCode)}var Yt=Intl.DateTimeFormat;function iy(t,e){e<-864e13&&P(En);let n=t.formatToParts(e),r={};for(let a of n)r[a.type]=a.value;return r}var sy={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},zl=-388152e4;function Bc(t,e,n){let[r,a,o,i]=_p(n),s=r!==void 0;return((l,c,d,u,m,p)=>{d=Ai(d,BigInt(m),u);let f=c.B(d);return Vc(ja(d+BigInt(f)),p)+(l?no(ii(f)):"Z")})(s,Ge(s?t(r):"UTC"),e.epochNanoseconds,a,o,i)}function Lc(t,e){let n=Np(e);return((r,a,o,i,s,l,c,d,u,m)=>{i=Ai(i,BigInt(u),d);let p=o.B(i);return Vc(ja(i+BigInt(p)),m)+no(ii(p),c)+dy(a,l)+jc(r,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function Rc(t,e){let n=Rp(e);return((r,a,o,i,s,l)=>Vc(Ci(a,s,i),l)+jc(r,o))(t.calendar,t,...n)}function Nc(t,e){return n=t.calendar,r=t,a=ni(e),di(r)+jc(n,a);var n,r,a}function _c(t,e){return Tf(t.calendar,Sf,t,ni(e))}function Fc(t,e){return Tf(t.calendar,cy,t,ni(e))}function Tf(t,e,n,r){let a=r>1||r===0&&t!==ot;return r===1?t===ot?e(n):di(n):a?di(n)+Mf(Dt(t),r===2):e(n)}function Hc(t,e){return((n,r,a,o)=>Af(Ti(n,a,r)[0],o))(t,...Al(e))}function Ni(t,e){let[n,r,a]=Al(e,3);return r>1&&Mn(t={...t,...q0(t,r,n)}),ly(t,a)}function ly(t,e){let{sign:n}=t,r=n===-1?gt(t):t,{hours:a,minutes:o}=r,i=pf(r),s=Number(i/Qn),l=Number(i%Qn);hf(s);let c=qc(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+Qp({Y:Xn(r.years),M:Xn(r.months),W:Xn(r.weeks),D:Xn(r.days)})+(a||o||s||d?"T"+Qp({H:Xn(a),M:Xn(o),S:Xn(s,d)+c}):"")}function Qp(t){let e=[];for(let n in t){let r=t[n];r&&e.push(r,n)}return e.join("")}function Xn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function Vc(t,e){return di(t)+"T"+Af(t,e)}function di(t){return Sf(t)+"-"+Mt(t.day)}function Sf(t){let{year:e}=t;return(e<0||e>9999?If(e)+oi(6,Math.abs(e)):oi(4,e))+"-"+Mt(t.month)}function cy(t){return Mt(t.month)+"-"+Mt(t.day)}function Af(t,e){let n=[Mt(t.hour),Mt(t.minute)];return e!==-1&&n.push(Mt(t.second)+((r,a,o,i)=>qc(r*za+a*Pa+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function no(t,e=0){if(e===1)return"";let[n,r]=Vt(Math.abs(t),La),[a,o]=Vt(r,Ba),[i,s]=Vt(o,An);return If(t)+Mt(n)+":"+Mt(a)+(i||s?":"+Mt(i)+qc(s):"")}function dy(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function jc(t,e){return e>1||e===0&&t!==ot?Mf(Dt(t),e===2):""}function Mf(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var uy=/0+$/;function qc(t,e){let n=oi(9,t);return n=e===void 0?n.replace(uy,""):n.slice(0,e),n?"."+n:""}function If(t){return t<0?"-":"+"}var hy=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,py=/[^\w\/:+-]+/;function Df(t){return _i(He(t))}function _i(t){return Of(t).id}function Of(t){let e=t.toUpperCase(),n=(a=>{let o=Dc(a,1);if(o!==void 0)return{id:no(o),Z:o,m:o}})(e);if(n)return{kind:"fixed",...n};let r=e==="UTC"?"UTC":(a=>(py.test(a)&&P(Yl(a)),hy.test(a)&&P("Forbidden ICU TimeZone"),a.toLowerCase().split("/").map((o,i)=>(o.length<=3||/\d/.test(o))&&!/etc|yap/.test(o)?o.toUpperCase():o.replace(/baja|dumont|[a-z]+/g,(s,l)=>s.length<=2&&!i||s==="in"||s==="chat"?s.toUpperCase():s.length>2||!l?$p(s).replace(/island|noronha|murdo|rivadavia|urville/,$p):s)).join("/")))(t);return my(r)}var my=Ir(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=fy(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),fy=Ir(t=>new Yt("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Ge(t){let e=Of(t);return by(e.id,e)}var by=Ir((t,e)=>e.kind==="named"?new jl(t,e.m,e.format):new Vl(t,e.m,e.kind==="fixed"?e.Z:0)),Vl=class{constructor(e,n,r){this.id=e,this.m=n,this.Z=r}B(){return this.Z}R(e){return[bc(e,this.Z)]}C(){}},jl=class{constructor(e,n,r){this.id=e,this.m=n,this.oe=((a,o)=>{let i=Ir(a),s=Ir(gy),l=86400*o;function c(u){let[m,p]=tm(u,l),f=ai(m),b=ai(p),g=i(f),v=i(b);return g===v?g:d(s(f,b),g,v,u)}function d(u,m,p,f){let b,g;for(;(f===void 0||(b=f<u[0]?m:f>=u[1]?p:void 0)===void 0)&&(g=u[1]-u[0]);){let v=u[0]+Math.floor(g/2);a(v)===p?u[1]=v:u[0]=v+1}return b}return{Ae(u){let m=c(u-86400),p=c(u+86400),f=u-m,b=u-p;if(m===p)return[f];let g=c(f);return g===c(b)?[u-g]:m>p?[f,b]:[]},ze:c,C:function u(m,p){if(p>0&&m>=864e10)return;if(p<0){if(m<=zl)return;let I=em()+94867200;if(m>I)return u(I,-1)}let f=p>0?Math.max(m,zl):m,[b,g]=tm(f,l),v=l*p,x=p>0?Math.max(m,em())+94867200:zl,w=()=>p<0?g>x:b<x;for(;w();){let I=ai(b),C=ai(g),L=i(I),R=i(C);if(L!==R){let O=s(I,C);d(O,L,R);let A=O[0];if((nn(A,m)||1)===p)return A}b+=v,g+=v}}}})((a=>o=>{let i=iy(a,1e3*o);return 86400*Ta((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&fm(s.era)==="bce"?1-c:c})(i),parseInt(i.month),parseInt(i.day))+3600*parseInt(i.hour)+60*parseInt(i.minute)+parseInt(i.second)-o})(r),(a=>{let o=a.split("/").pop();return sy[o]||60})(e))}B(e){return this.oe.ze((n=>Gp(n)[0])(e))*An}R(e){let n=86400*qt(e)+rc(e),r=Mm(e);return this.oe.Ae(n).map(a=>zt(BigInt(a)*Qn+BigInt(r)))}C(e,n){let[r,a]=Gp(e),o=this.oe.C(r+(n>0||a?1:0),n);if(o!==void 0)return BigInt(o)*Qn}};function em(){return Math.floor(Date.now()/1e3)}function gy(t,e){return[t,e]}function tm(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function ai(t){return Wl(t,-1e10,864e10)}function Pf(t,e,n){let r=Se(n,Ye(e,Sm,Am),zc,[],0),a=r.timeZone!==void 0,[o,i]=xt(r,e),s=ln(r,e,o,i,0);if(a){let l=Vr(r),c=Ge(t(r.timeZone));return{epochNanoseconds:Nr(c,Ce(s,l),r.offset),timeZone:c,calendar:e}}return s}function zf(t,e,n,r){let a=Se(n,Ye(e,Sm,Am),zc,tc,0),o=t(a.timeZone),[i,s]=xt(a,e),[l,c,d]=kn(r),u=ln(a,e,i,s,l),m=Vr(a,l),p=Ge(o);return bt(Nr(p,Ce(u,m),a.offset,c,d),p,e)}function Bf(t,e,n){let r=Se(e,Ye(t,Cm,Tm),Pc,[],0),[a,o]=xt(r,t),i=Z(n);return to(ln(r,t,a,o,i),Vr(r,i),t)}function Lf(t,e,n,r=[]){let a=Se(e,Ye(t,nr,rr),vt,r),[o,i]=xt(a,t);return ln(a,t,o,i,Z(n))}function Rf(t,e,n,r){let a=Se(e,Ye(t,Na,wm),vt,r),[o,i]=xt(a,t,1);return Li(a,t,o,i,Z(n))}function Nf(t,e,n,r){let a=Se(n,Ye(t,nr,rr),vt,tr,0);e&&a.month!==void 0&&a.monthCode===void 0&&a.year===void 0&&(a.year=1972);let[o,i]=Bi(a,t);return Ri(a,t,o,i,Z(r))}function _f(t,e){return Vr(Se(t,Nl,Oc,[],1),Z(e))}function Ff(t){let e=Se(t,Hm,Ef);return Pt(Mn({...Pe,...e}))}function It(t){P(cm(t))}function Hf(t){let e=In(t=He(pc(t))),n;return e||It(t),e.F?n=0:e.offset?n=zi(e.offset):It(t),e.timeZoneId&&Dc(e.timeZoneId,1),qa(e),ft(bc(e,n))}function Vf(t,e){let n=In(He(t));return n||It(t),n.timeZoneId?Xf(n,e,void 0):(n.F&&It(t),ql(n,e))}function jf(t,e,n){let r=In(He(t));return r&&r.timeZoneId||It(t),Xf(r,e,n)}function qf(t,e){let n=In(He(t));return n&&!n.F||It(t),Jf(n,e)}function Uf(t,e){let n=Wc(Yc(He(t)),void 0,e);return ye(n,n.calendar)}function Yf(t,e){let n=Zc(He(t));if(n)return Uc(n),ye(ki(on(n)),e(n.calendarId));let r=Wc(Yc(t),vy,e),{calendar:a}=r;return ye(Ma(a,r),a)}function Uc(t){t.calendarId!=="iso8601"&&P(tn(t.calendarId))}function Wf(t,e){let n=$c(He(t));if(n)return Uc(n),ye(on(n),e(n.calendarId));let r=Wc(Yc(t),xy,e),{calendar:a}=r,{year:o,month:i,day:s}=xe(a,r),[l,c]=er(a,o,i),{year:d,month:u}=((m,p,f,b)=>{let g=m?m.u(p,f,b):_l(p,f);return g||P("Cannot guess year"),g})(a,l,c,s);return ye(st(ar(a,d,u,s)),a)}function Zf(t){let e=(r=>{let a=Qf(r);return a?(ro(a[13]),eb(a,1)):void 0})(t=He(t));if(!e){let r=In(t);r&&r.te||It(t),r.F&&P(tn("Z")),Uc(r),e=r}let n;return(n=Zc(t))&&Kp(n)&&It(t),(n=$c(t))&&Kp(n)&&It(t),ir(Fa(e))}function $f(t){let e=Sy.exec(He(t));return e||It(t),Pt(Mn((n=>{let r=0,a=0,o=0,i={years:s(n[2]),months:s(n[3]),weeks:s(n[4]),days:s(n[5]),hours:s(n[6],n[7],5),minutes:s(n[8],n[9],4),seconds:s(n[10],n[11],3),...Tc(o,2,ke)};return r||P(rm(ke)),Kl(n[1])<0&&(i=gt(i)),i;function s(l,c,d){let u=0,m=0;return d&&([u,o]=Vt(o,mt[d])),l!==void 0&&(a&&P(tn(l)),m=(p=>{let f=parseInt(p);return Number.isFinite(f)||P(tn(p)),f})(l),r=1,c&&(o=Gl(c)*(mt[d]/An),a=1)),u+m}})(e)))}function Gf(t){let e=In(t)||Zc(t)||$c(t);if(e)return e.calendarId;let n=Qf(t);return n?ro(n[13]).calendarId:t}function Kf(t){let e=In(t);return e&&(e.timeZoneId||e.F&&"UTC"||e.offset)||t}function Yc(t){let e=In(t);return e&&!e.F||It(t),e}function Wc(t,e,n){return e&&t.calendarId==="iso8601"?(on(t),t.te&&Fa(t),ql(e(t),n)):t.te?Jf(t,n):ql(t,n)}function vy(t){let e=12*t.year+t.month===qm?20:1;return{...t,day:e}}function xy(t){return{...t,year:1972}}function Xf(t,e,n){let r=Ge(_i(t.timeZoneId)),a;if(qa(t),t.te){let i=t.offset?zi(t.offset):void 0,[,s,l]=kn(n);a=Nr(r,t,i,s,l,!(r.Z||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.F)}else kn(n),a=Or(r,t);var o;return zt(a),bt(a,r,e(t.calendarId))}function Jf(t,e){return qa(t),or(t),{...Ce(t,t),calendar:e(t.calendarId)}}function ql(t,e){return on(t),st(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function ui(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var yy="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+ui(8)+"(Z|([+-])"+ui(15)+")?)?",wy=Pr("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),ky=Pr("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Ey=Pr(yy+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),Cy=Pr("T?"+ui(2)+`(([+-])${ui(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),Ty=new RegExp("\\[(!?)([^\\]]*)\\]","g"),Sy=Pr("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?!$)(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");function In(t){let e=Ey.exec(t);return e?(n=>{let r=n[12],a=(r||"").toUpperCase()==="Z";return{year:tb(n),month:parseInt(n[5]),day:parseInt(n[6]),...eb(n,7),...ro(n[19]),te:!!n[7],F:a,offset:a?void 0:r}})(e):void 0}function Zc(t){let e=wy.exec(t);if(e)return(n=>({year:tb(n),month:parseInt(n[4]),day:1,...ro(n[5])}))(e)}function $c(t){let e=ky.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...ro(n[3])}))(e):void 0}function Qf(t){let e=Cy.exec(t);if(e)return e[6]&&zi(e[6]),e}function eb(t,e){let n=Mr(t[e+3]);return{...ac(Gl(t[e+4]||""))[0],hour:Mr(t[e]),minute:Mr(t[e+2]),second:n===60?59:n}}function tb(t){let e=Kl(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&P(tn(-0)),e*n}function ro(t){let e,n,r=[];return t.replace(Ty,(a,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(r.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&P(tn(a)):(n&&P(tn(a)),n=l),""}),r.length>1&&e&&P(tn(t)),{timeZoneId:n,calendarId:r[0]||"iso8601"}}function jr(t,e,n){let r=Object.assign(Object.create(null),e);return Bl(r,n,ym),eo(t)&&(Bl(r,n,k0),t&&t.je&&Bl(r,n,E0,Lr)),r}function Bl(t,e,n,r){let a=0,o=[];for(let i of n)e[i]!==void 0?a=1:o.push(i);if(Object.assign(t,e),a)for(let i of r||o)delete t[i]}function nb(t,e,n){let r=Ye(t,T0,S0),a=ze(e),{year:o,month:i,day:s}=xe(t,a),l={year:o,monthCode:ao(t,o,i),day:s,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},c=Se(n,r,zc),d=jr(t,l,c);return[{...l,...c},d]}function rb(t,e,n){let r=Ye(t,Cm,Tm),{year:a,month:o,day:i}=xe(t,e),s={year:a,monthCode:ao(t,a,o),day:i,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},l=Se(n,r,Pc),c=jr(t,s,l);return[{...s,...l},c]}function ab(t,e,n){let r=Ye(t,nr,rr),{year:a,month:o,day:i}=xe(t,e);return jr(t,{year:a,monthCode:ao(t,a,o),day:i},Se(n,r,vt))}function ob(t,e,n){let r=Ye(t,Na,wm),{year:a,month:o}=xe(t,e);return jr(t,{year:a,monthCode:ao(t,a,o)},Se(n,r,vt))}function ib(t,e,n){let r=Ye(t,nr,rr),{year:a,month:o,day:i}=xe(t,e);return jr(t,{monthCode:ao(t,a,o),day:i},Se(n,r,vt))}function sb(t,e,n,r,a,o,i,s){let{calendar:l,timeZone:c}=t;return bt(Nr(c,Ce(ln(n,l,r,a,o),gi(e,o)),e.offset,i,s),c,l)}function lb(t,e,n,r,a,o){return to(ln(e,n,r,a,o),gi(t,o),n)}function cb(t,e){return{...jt(Nl,t),...Se(e,Nl,Oc)}}function db(t,e){return Pt((n=t,r=e,Mn({...n,...Se(r,Hm,Ef)})));var n,r}function ao(t,e,n){let[r,a]=er(t,e,n);return vm(r,a)}function ub(t,e,n){let[r,a]=zp(n,t),o=Tn(e),i=Math.max(r,o),s=a&&Xa(a);if(!a&&li(i,s))return nm(e,r);if(a||P("Missing relativeTo"),!e.sign&&(!s||r<6))return 0;let[l,c,d]=cf(a,e,r);return li(r,s)?nm(l,r):((u,m,p,f)=>{let b=ke[p],g=uc(p,u);return V0(u[b],Ja(u)||1,m,v=>(g[b]=v,Di(f,g)))})(l,c,r,d)}function nm(t,e){return xm(an(t),mt[e])}function hb(t,e,n){return bt(t.epochNanoseconds,e,n)}function pb(t){return ft(t.epochNanoseconds)}function Gc(t){return Ut(ze(t),t.calendar)}function Kc(t){return ye(ze(t),t.calendar)}function Xc(t){return ir(ze(t))}function mb(t,e,n){return bt(zt(_r(e,t,n)),e,t.calendar)}function fb(t,e,n){let r;return r=n?_r(e,Ce(t,n)):Or(e,Ce(t,Ot)),bt(r,e,t.calendar)}function bb(t,e,n){return yb(t,jt(Ye(t,_a,km),e),Se(yn(n),tr,vt,[]))}function gb(t,e,n){let r=Ye(t,fi,C0);return yb(t,jt(Em,e),Se(yn(n),r,vt,[]))}function vb(t,e){let n=Se(e,Em,vt),[r,a]=Bi(n,t);return Ri(n,t,r,a,0)}function xb(t,e){let n=Se(e,Ye(t,_a,km),vt),[r,a]=xt(n,t,1);return Li(n,t,r,a,0)}function yb(t,e,n){let r=Ye(t,A0,M0),a=jr(t,e,n);a=Se(a,r,vt,[]);let[o,i]=xt(a,t);return ln(a,t,o,i,0)}function wb(t){return ft(zt(BigInt(Ya(t))*Br))}function kb(t){return ft(zt(wi(t)))}function qr(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function Eb(t,e){return t.timeZone!==void 0&&ue("Cannot specify TimeZone"),t.timeZone=e,t}function Ur(t,e,n){let r=t.resolvedOptions().calendar;!n&&e.calendar===ot||Dt(e.calendar)===r||P("Mismatching Calendars")}function lr(t,e,n,r,a){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,m={},p={},f={},b=0,g=0;for(let A of Object.keys(l)){let N=l[A];N===void 0||s.has(A)||(o.has(A)?A==="dateStyle"?d=N:A==="timeStyle"?u=N:m[A]=N:A==="era"?p[A]=N:i.has(A)?A==="dateStyle"||A==="timeStyle"?g=1:b=1:f[A]=N)}let v=d!==void 0,x=u!==void 0,w=v||x,I=Object.keys(m).length>0,C=b||g,L=I||v||x,R=Object.keys(p).length>0;(!c&&C||c&&C&&!L||w&&(I||R||b))&&ue("Invalid formatting options");let O={};return w||L||Object.assign(O,r),Object.assign(O,m,p,f),v&&(a?Object.assign(O,a[d]):O.dateStyle=d),x&&(O.timeStyle=u),O}}var Cb={year:"numeric",month:"numeric",day:"numeric"},Tb={hour:"numeric",minute:"numeric",second:"numeric"},Jc=Object.assign({},Cb,Tb),Qc=["weekday","year","month","day","dateStyle"],oo=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],ed=Qc.concat(oo),Ay=["weekday","day"].concat(oo),My=["weekday","year"].concat(oo),Sb=lr(ed,[],[],Jc),Ab=lr(ed,[],[],{...Jc,timeZoneName:"short"}),Mb=lr(ed,[],["timeZoneName"],Jc),Ib=lr(Qc,oo,["timeZoneName"],Cb),Db=lr(oo,Qc,["timeZoneName","era"],Tb),Ob=lr(["year","month","dateStyle"],Ay,["timeZoneName"],{year:"numeric",month:"numeric"},{full:{year:"numeric",month:"long"},long:{year:"numeric",month:"long"},medium:{year:"numeric",month:"short"},short:{year:"2-digit",month:"numeric"}}),Pb=lr(["month","day","dateStyle"],My,["timeZoneName","era"],{month:"numeric",day:"numeric"},{full:{month:"long",day:"numeric"},long:{month:"long",day:"numeric"},medium:{month:"short",day:"numeric"},short:{month:"numeric",day:"numeric"}});function zb(t,e){let{timeZone:n}=t,r=ze(t),{offsetNanoseconds:a}=r,o=e||Ot,i;return i=e?Nr(n,Ce(r,o),a,2):Or(n,Ce(r,o)),bt(i,n,t.calendar)}function Fi(t){let e=Hi(),n=t.B(e);return ja(e+BigInt(n))}function Hi(){return BigInt(Date.now())*Br}function Yr(){return new Yt().resolvedOptions().timeZone}var td="PlainYearMonth",nd="PlainMonthDay",rd="PlainDate",ad="PlainDateTime",od="PlainTime",id="ZonedDateTime",sd="Instant",ld="Duration";function cn(t,e,n,...r){return Object.defineProperties(e,dm(t)),Object.defineProperties(e.prototype,Da("Temporal."+t)),Object.defineProperties(e.prototype,Sn(a=>({get(){return a(n(this))},configurable:1}),Object.assign({},...r))),e}var dn=$l.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:$l;function un(){ue(im)}function hn(){ue(om)}var Bb={era(t){return Ua(t.calendar,t).era},eraYear(t){return Ua(t.calendar,t).eraYear},year(t){return xe(t.calendar,t).year},month(t){return xe(t.calendar,t).month},monthCode(t){return yi(t.calendar,t)}},Vi={era(t){return Ua(t.calendar,t).era},eraYear(t){return Ua(t.calendar,t).eraYear},year(t){return xe(t.calendar,t).year},month(t){return xe(t.calendar,t).month},monthCode(t){return yi(t.calendar,t)},day(t){return xe(t.calendar,t).day}},Lb={monthCode(t){return yi(t.calendar,t)},day(t){return xe(t.calendar,t).day}},Rb={daysInMonth(t){return sc(t.calendar,t)},daysInYear(t){return lc(t.calendar,t)},monthsInYear(t){return ic(t.calendar,t)},inLeapYear(t){return oc(t.calendar,t)}},ji={dayOfWeek(t){return xi(t)},dayOfYear(t){return Nm(t.calendar,t)},weekOfYear(t){return _m(t.calendar,t)},yearOfWeek(t){return Fm(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return sc(t.calendar,t)},daysInYear(t){return lc(t.calendar,t)},monthsInYear(t){return ic(t.calendar,t)},inLeapYear(t){return oc(t.calendar,t)}};function cd(t,e,n,r){let[a,o,i,s]=Kn(t,r,3,5);return Wr(t,Ka(e.epochNanoseconds,n.epochNanoseconds,a,o,i,s))}function dd(t,e,n,r){let a=Ga(e.calendar,n.calendar),[o,i,s,l]=Kn(t,r,5);return Wr(t,ef(a,e,n,o,i,s,l))}function ud(t,e,n,r){let a=Ga(e.calendar,n.calendar),[o,i,s,l]=Kn(t,r,6);return Wr(t,tf(a,e,n,o,i,s,l))}function hd(t,e,n,r){let a=Ga(e.calendar,n.calendar),[o,i,s,l]=Kn(t,r,6,9,6);return Wr(t,rf(a,e,n,o,i,s,l))}function pd(t,e,n,r){let a=Ga(e.calendar,n.calendar),[o,i,s,l]=Kn(t,r,9,9,8);return Wr(t,nf(a,e,n,o,i,s,l))}function md(t,e,n,r){let[a,o,i,s]=Kn(t,r,5,5);return Wr(t,af(e,n,a,o,i,s))}function Wr(t,e){return Pt(t?gt(e):e)}function Nb(t,e,n){let{calendar:r}=t,a=ab(r,t,e),[o,i]=xt(a,r),s=Z(n);return ln(a,r,o,i,s)}function _b(t,e,n){let{calendar:r}=t,[a,o]=rb(r,t,e),[i,s]=xt(o,r),l=Z(n);return lb(a,o,r,i,s,l)}function Fb(t,e,n){let{calendar:r}=t,a=ob(r,t,e),[o,i]=xt(a,r,1),s=Z(n);return Li(a,r,o,i,s)}function Hb(t,e,n){let{calendar:r}=t,a=ib(r,t,e),[o,i]=Bi(a,r),s=Z(n);return Ri(a,r,o,i,s)}function Vb(t,e,n){let r=cb(t,e),a=Z(n);return Vr(r,a)}function jb(t,e,n){let{calendar:r}=t,[a,o]=nb(r,t,e),[i,s]=xt(o,r),[l,c,d]=kn(n,2);return sb(t,a,o,i,s,l,c,d)}function zn(t){let e=He(t).toLowerCase();return e===Ql?ot:e===mm?bm:void P(lm(t,"temporal-polyfill/full"))}function so(t=Ql){return zn(t)}var Ub=new WeakMap,Yb=cn(id,class{constructor(t,e,n=void 0){let r=zt(wi(t)),a=Ge(Df(e)),o=so(n);Wb(this,bt(r,a,o))}static from(t,e=void 0){return Ke(Zr(t,e))}static compare(t,e){return Qa(Zr(t),Zr(e))}get calendarId(){return Dt(de(this).calendar)}get timeZoneId(){return de(this).timeZone.id}get epochMilliseconds(){return Ha(de(this).epochNanoseconds)}get epochNanoseconds(){return de(this).epochNanoseconds}get offset(){return no(ze(de(this)).offsetNanoseconds)}get offsetNanoseconds(){return ze(de(this)).offsetNanoseconds}get hoursInDay(){return Zm(de(this))}with(t,e=void 0){return Ke(jb(de(this),Jr(t),e))}withCalendar(t){return Ke({...de(this),calendar:Yi(t)})}withTimeZone(t){return Ke({...de(this),timeZone:Ge(kt(t))})}withPlainTime(t=void 0){return Ke(zb(de(this),xd(t)))}add(t,e=void 0){let n=de(this);return Ke(Za(n,Ne(t),Z(e)))}subtract(t,e=void 0){let n=de(this);return Ke(Za(n,gt(Ne(t)),Z(e)))}until(t,e=void 0){let n=de(this),r=Zr(t);return Ie(dd(0,n,r,e))}since(t,e=void 0){let n=de(this),r=Zr(t);return Ie(dd(1,n,r,e))}round(t){let e=de(this),[n,r,a]=ka(t);return Ke(Wm(e,n,r,a))}startOfDay(){return Ke($m(de(this)))}equals(t){return bf(de(this),Zr(t))}toInstant(){return pn(pb(de(this)))}toPlainDateTime(){return Wt(Gc(de(this)))}toPlainDate(){return Zt(Kc(de(this)))}toPlainTime(){return Pn(Xc(de(this)))}toLocaleString(t=void 0,e={}){let n=de(this),r=new Yt(t,Eb(Ab(e),Qm(n)));return Ur(r,n),r.format(Ha(n.epochNanoseconds))}toString(t=void 0){return Lc(de(this),t)}toJSON(){return Lc(de(this))}getTimeZoneTransition(t){let e=de(this),n=e.timeZone.C(e.epochNanoseconds,Fp(t));return n!==void 0?Ke({...e,epochNanoseconds:n}):null}valueOf(){return hn()}},Iy,Vi,ji,Ra);function Ke(t){return Wb(Object.create(Yb.prototype),t)}function de(t){return $t(t)||un()}function Iy(t){let e=de(t);return{...ze(e),calendar:e.calendar}}function $t(t){return Ub.get(t)}function Zr(t,e){if($e(t)){let n=$t(t);if(n)return kn(e),n;let r=lo(t);return zf(kt,r,t,e)}return jf(t,zn,e)}function Wb(t,e){return Ub.set(t,e),dn(t),t}function kt(t){if($e(t)){let e=$t(t);return e||ue(Yl(t)),e.timeZone.id}return(e=>_i(Kf(He(e))))(t)}var Zb=new WeakMap,$b=cn(sd,class{constructor(t){let e=zt(wi(t));Kb(this,ft(e))}static from(t){return pn($r(t))}static fromEpochMilliseconds(t){return pn(wb(t))}static fromEpochNanoseconds(t){return pn(kb(t))}static compare(t,e){return Qa($r(t),$r(e))}get epochMilliseconds(){return Ha(yt(this).epochNanoseconds)}get epochNanoseconds(){return yt(this).epochNanoseconds}add(t){let e=yt(this);return pn(ft(yc(e.epochNanoseconds,Ne(t))))}subtract(t){let e=yt(this);return pn(ft(yc(e.epochNanoseconds,gt(Ne(t)))))}until(t,e=void 0){return Ie(cd(0,yt(this),$r(t),e))}since(t,e=void 0){return Ie(cd(1,yt(this),$r(t),e))}round(t){let e=yt(this),[n,r,a]=ka(t,5,1);return pn(ft(Ai(e.epochNanoseconds,Wa(n,r),a)))}equals(t){return ff(yt(this),$r(t))}toZonedDateTimeISO(t){return Ke(hb(yt(this),Ge(kt(t))))}toLocaleString(t=void 0,e={}){let n=yt(this);return new Yt(t,Sb(e)).format(Ha(n.epochNanoseconds))}toString(t=void 0){return Bc(kt,yt(this),t)}toJSON(){return Bc(kt,yt(this))}valueOf(){return hn()}});function pn(t){return Kb(Object.create($b.prototype),t)}function yt(t){return gd(t)||un()}function gd(t){return Zb.get(t)}function $r(t){if($e(t)){let e=gd(t);if(e)return e;let n=$t(t);if(n)return ft(n.epochNanoseconds)}return Hf(t)}var{toTemporalInstant:Gb}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return pn(ft(BigInt(hc(t))*Br))}};function Kb(t,e){return Zb.set(t,e),dn(t),t}var Xb=new WeakMap,Jb=cn(nd,class{constructor(t,e,n=void 0,r){let a=Me(t),o=Me(e),i=so(n),s=Me(r??Pm),l=st(on({year:s,month:a,day:o}));Qb(this,ye(l,i))}static from(t,e=void 0){return bd(qb(t,e))}get calendarId(){return Dt(Dn(this).calendar)}with(t,e=void 0){return bd(Hb(Dn(this),Jr(t),e))}equals(t){return yf(Dn(this),qb(t))}toPlainDate(t){let e=Dn(this);return Zt(gb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=Dn(this),r=new Yt(t,qr(Pb(e)));return Ur(r,n,1),r.format(Va(n))}toString(t=void 0){return Fc(Dn(this),t)}toJSON(){return Fc(Dn(this))}valueOf(){return hn()}},Dn,Lb);function bd(t){return Qb(Object.create(Jb.prototype),t)}function Dn(t){return qi(t)||un()}function qi(t){return Xb.get(t)}function qb(t,e){if($e(t)){let r=qi(t);if(r)return Z(e),r;let a=hg(t);return Nf(a===void 0?ot:a,a===void 0,t,e)}let n=Wf(t,zn);return Z(e),n}function Qb(t,e){return Xb.set(t,e),dn(t),t}var eg=new WeakMap,tg=cn(td,class{constructor(t,e,n=void 0,r){let a=Me(t),o=Me(e),i=so(n),s=Me(r??1),l=ki(on({year:a,month:o,day:s}));ng(this,ye(l,i))}static from(t,e=void 0){return io(Gr(t,e))}static compare(t,e){return sr(Gr(t),Gr(e))}get calendarId(){return Dt(wt(this).calendar)}with(t,e=void 0){return io(Fb(wt(this),Jr(t),e))}add(t,e=void 0){let n=wt(this);return io(ye(xc(n.calendar,n,Ne(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=wt(this);return io(ye(xc(n.calendar,n,gt(Ne(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=wt(this),r=Gr(t);return Ie(pd(0,n,r,e))}since(t,e=void 0){let n=wt(this),r=Gr(t);return Ie(pd(1,n,r,e))}equals(t){return xf(wt(this),Gr(t))}toPlainDate(t){let e=wt(this);return Zt(bb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=wt(this),r=new Yt(t,qr(Ob(e)));return Ur(r,n,1),r.format(Va(n))}toString(t=void 0){return _c(wt(this),t)}toJSON(){return _c(wt(this))}valueOf(){return hn()}},wt,Bb,Rb);function io(t){return ng(Object.create(tg.prototype),t)}function wt(t){return Ui(t)||un()}function Ui(t){return eg.get(t)}function Gr(t,e){if($e(t)){let r=Ui(t);if(r)return Z(e),r;let a=lo(t);return Rf(a,t,e)}let n=Yf(t,zn);return Z(e),n}function ng(t,e){return eg.set(t,e),dn(t),t}function Dy(t){if(!$e(t))return;let e=gd(t);return e?[sd,e]:(e=$t(t),e?[id,e]:(e=cr(t),e?[ad,e]:(e=Qr(t),e?[rd,e]:(e=vd(t),e?[od,e]:(e=Ui(t),e?[td,e]:(e=qi(t),e?[nd,e]:(e=yd(t),e?[ld,e]:void 0)))))))}function Jr(t){return(Dy(t)||t.calendar!==void 0||t.timeZone!==void 0)&&ue(am),t}var rg=new WeakMap,ag=cn(od,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0){let i=Fa(Sn(Me,{hour:t,minute:e,second:n,millisecond:r,microsecond:a,nanosecond:o}));og(this,ir(i))}static from(t,e=void 0){return Pn(On(t,e))}static compare(t,e){return Pi(On(t),On(e))}with(t,e=void 0){return Pn(Vb(Bt(this),Jr(t),e))}add(t){let e=Bt(this);return Pn(Mi(e,Ne(t))[0])}subtract(t){let e=Bt(this);return Pn(Mi(e,gt(Ne(t)))[0])}until(t,e=void 0){return Ie(md(0,Bt(this),On(t),e))}since(t,e=void 0){return Ie(md(1,Bt(this),On(t),e))}round(t){let e=Bt(this),[n,r,a]=ka(t,5);return Pn(Ti(e,Rr(n,r),a)[0])}equals(t){return wf(Bt(this),On(t))}toLocaleString(t=void 0,e={}){let n=Bt(this);return new Yt(t,qr(Db(e))).format(nc(n))}toString(t=void 0){return Hc(Bt(this),t)}toJSON(){return Hc(Bt(this))}valueOf(){return hn()}},Bt,Ra);function Pn(t){return og(Object.create(ag.prototype),t)}function Bt(t){return vd(t)||un()}function vd(t){return rg.get(t)}function On(t,e){if($e(t)){let r=vd(t);if(r)return Z(e),r;let a=cr(t);if(a)return Z(e),ir(a);let o=$t(t);return o?(Z(e),Xc(o)):_f(t,e)}let n=Zf(t);return Z(e),n}function xd(t){return t===void 0?void 0:On(t)}function og(t,e){return rg.set(t,e),dn(t),t}var ig=new WeakMap,sg=cn(ad,class{constructor(t,e,n,r=0,a=0,o=0,i=0,s=0,l=0,c=void 0){let d=or(qa(Sn(Me,{year:t,month:e,day:n,hour:r,minute:a,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=so(c);lg(this,Ut(d,u))}static from(t,e=void 0){return Wt(Kr(t,e))}static compare(t,e){let n=Kr(t),r=Kr(e);return Ic(n,r)}get calendarId(){return Dt(Re(this).calendar)}with(t,e=void 0){return Wt(_b(Re(this),Jr(t),e))}withCalendar(t){let e=Re(this);return Wt(Ut(e,Yi(t)))}withPlainTime(t=void 0){let e=Re(this);return Wt(to(e,xd(t),e.calendar))}add(t,e=void 0){let n=Re(this);return Wt(Ut($a(n.calendar,n,Ne(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=Re(this);return Wt(Ut($a(n.calendar,n,gt(Ne(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=Re(this),r=Kr(t);return Ie(ud(0,n,r,e))}since(t,e=void 0){let n=Re(this),r=Kr(t);return Ie(ud(1,n,r,e))}round(t){let e=Re(this),[n,r,a]=ka(t);return Wt(Ut(Ci(e,Rr(n,r),a),e.calendar))}equals(t){return gf(Re(this),Kr(t))}toZonedDateTime(t,e=void 0){return Ke(mb(Re(this),Ge(kt(t)),Bp(e)))}toPlainDate(){let t=Re(this);return Zt(ye(t,t.calendar))}toPlainTime(){return Pn(ir(Re(this)))}toLocaleString(t=void 0,e={}){let n=Re(this),r=new Yt(t,qr(Mb(e)));return Ur(r,n),r.format(Dm(n))}toString(t=void 0){return Rc(Re(this),t)}toJSON(){return Rc(Re(this))}valueOf(){return hn()}},Re,Vi,ji,Ra);function Wt(t){return lg(Object.create(sg.prototype),t)}function Re(t){return cr(t)||un()}function cr(t){return ig.get(t)}function Kr(t,e){if($e(t)){let r=cr(t);if(r)return Z(e),r;let a=Qr(t);if(a)return Z(e),Ut(Ce(a,Ot),a.calendar);let o=$t(t);if(o)return Z(e),Gc(o);let i=lo(t);return Bf(i,t,e)}let n=qf(t,zn);return Z(e),n}function lg(t,e){return ig.set(t,e),dn(t),t}var cg=new WeakMap,dg=cn(rd,class{constructor(t,e,n,r=void 0){let a=st(on(Sn(Me,{year:t,month:e,day:n}))),o=so(r);ug(this,ye(a,o))}static from(t,e=void 0){return Zt(Xr(t,e))}static compare(t,e){return sr(Xr(t),Xr(e))}get calendarId(){return Dt(Ve(this).calendar)}with(t,e=void 0){return Zt(Nb(Ve(this),Jr(t),e))}withCalendar(t){let e=Ve(this);return Zt(ye(e,Yi(t)))}add(t,e=void 0){let n=Ve(this);return Zt(ye(sn(n.calendar,n,Ne(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=Ve(this);return Zt(ye(sn(n.calendar,n,gt(Ne(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=Ve(this),r=Xr(t);return Ie(hd(0,n,r,e))}since(t,e=void 0){let n=Ve(this),r=Xr(t);return Ie(hd(1,n,r,e))}equals(t){return vf(Ve(this),Xr(t))}toZonedDateTime(t){let e=$e(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t},n=Ve(this),r=kt(e.timeZone),a=e.plainTime,o=a!==void 0?On(a):void 0;return Ke(fb(n,Ge(r),o))}toPlainDateTime(t=void 0){let e=Ve(this);return Wt(to(e,xd(t),e.calendar))}toPlainYearMonth(){let t=Ve(this);return io(xb(t.calendar,this))}toPlainMonthDay(){let t=Ve(this);return bd(vb(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=Ve(this),r=new Yt(t,qr(Ib(e)));return Ur(r,n),r.format(Va(n))}toString(t=void 0){return Nc(Ve(this),t)}toJSON(){return Nc(Ve(this))}valueOf(){return hn()}},Ve,Vi,ji);function Zt(t){return ug(Object.create(dg.prototype),t)}function Ve(t){return Qr(t)||un()}function Qr(t){return cg.get(t)}function Xr(t,e){if($e(t)){let r=Qr(t);if(r)return Z(e),r;let a=cr(t);if(a)return Z(e),ye(a,a.calendar);let o=$t(t);if(o)return Z(e),Kc(o);let i=lo(t);return Lf(i,t,e)}let n=Uf(t,zn);return Z(e),n}function ug(t,e){return cg.set(t,e),dn(t),t}function lo(t){let e=hg(t);return e===void 0?ot:e}function hg(t){let{calendar:e}=t;if(e!==void 0)return Yi(e)}function Yi(t){if($e(t)){let e=Qr(t)||cr(t)||$t(t)||qi(t)||Ui(t);return e||ue(sm(t)),e.calendar}return(e=>zn(Gf(He(e))))(t)}var pg=new WeakMap,mg=cn(ld,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0,i=0,s=0,l=0,c=0){let d=Mn(Sn(Ya,{years:t,months:e,weeks:n,days:r,hours:a,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));fg(this,Pt(d))}static from(t){return Ie(Ne(t))}static compare(t,e,n=void 0){return mf(fd,Ne(t),Ne(e),n)}get sign(){return lt(this).sign}get blank(){return!lt(this).sign}with(t){return Ie(db(lt(this),t))}negated(){return Ie(Ac(lt(this)))}abs(){return Ie(uf(lt(this)))}add(t){return Ie(Sc(0,lt(this),Ne(t)))}subtract(t){return Ie(Sc(1,lt(this),Ne(t)))}round(t){return Ie(df(fd,lt(this),t))}total(t){return ub(fd,lt(this),t)}toLocaleString(t=void 0,e){let n=lt(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):Ni(n,e)}toString(t=void 0){return Ni(lt(this),t)}toJSON(){return Ni(lt(this))}valueOf(){return hn()}},lt,cc);function Ie(t){return fg(Object.create(mg.prototype),t)}function lt(t){return yd(t)||un()}function yd(t){return pg.get(t)}function Ne(t){return $e(t)?yd(t)||Ff(t):$f(t)}function fd(t){if(t!==void 0){if($e(t)){let e=$t(t);if(e)return e;let n=Qr(t);if(n)return n;let r=cr(t);if(r)return ye(r,r.calendar);let a=lo(t);return Pf(kt,a,t)}return Vf(t,zn)}}function fg(t,e){return pg.set(t,e),dn(t),t}var Oy=Object.defineProperties({},{...Da("Temporal.Now"),...hi({timeZoneId(){return Yr()},instant(){return pn(ft(Hi()))},zonedDateTimeISO(t=Yr()){let e=Ge(kt(t));return Ke(bt(Hi(),e))},plainDateTimeISO(t=Yr()){let e=Fi(Ge(kt(t)));return Wt(Ut(e))},plainDateISO(t=Yr()){let e=Fi(Ge(kt(t)));return Zt(ye(e))},plainTimeISO(t=Yr()){let e=Fi(Ge(kt(t)));return Pn(ir(e))}})}),bg=Object.defineProperties({},{...Da("Temporal"),...hi({PlainYearMonth:tg,PlainMonthDay:Jb,PlainDate:dg,PlainTime:ag,PlainDateTime:sg,ZonedDateTime:Yb,Instant:$b,Duration:mg,Now:Oy})});var Ae=fl||bg;var z2=fl?Date.prototype.toTemporalInstant:Gb;var Wi=class extends B{static formAssociated=!0;static observedAttributes=["value","data-focus"];internals;selectedIso=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(e){console.warn("a-calendar: ElementInternals unavailable \u2014 form association disabled.",e)}this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown)}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.selectedIso=this.getAttribute("value")||this.getAttribute("defaultvalue")||null,this.applyFormValue(this.currentIso())}attributeChangedCallback(e,n,r){if(e==="value"){this.applyFormValue(r);return}e==="data-focus"&&this.focusCell(r)}get#e(){return this.hasAttribute("value")}currentIso(){return this.#e?this.getAttribute("value")||null:this.selectedIso}applyFormValue(e){this.internals?.setFormValue(e||null);try{e?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}catch{}}onClick=e=>{if(this.hasAttribute("disabled"))return;let n=e.target?.closest('[data-part="day-cell"]');if(!n||n.hasAttribute("disabled"))return;let r=n.dataset.date;r&&this.requestSelect(r)};requestSelect(e){let n=this.currentIso();if(e===n)return;let r=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!r||(this.selectedIso=e,this.applyFormValue(e),this.dispatchEvent(new Event("change",{bubbles:!0})))}get#t(){return Array.from(this.querySelectorAll('[data-part="day-cell"]'))}onKeydown=e=>{if(this.hasAttribute("disabled"))return;let n=e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.key==="PageUp"||e.key==="PageDown");if(qe(e)&&!n)return;let r=this.#t;if(r.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??r.find(s=>s.tabIndex===0)??null;if(!a?.dataset.date)return;let o=null;switch(e.key){case"Home":case"End":{let s=r.indexOf(a);if(s<0)return;let l=s-s%7;o=r[e.key==="Home"?l:l+6]?.dataset.date??null;break}default:{let s=Ae.PlainDate.from(a.dataset.date),l;switch(e.key){case"ArrowLeft":l=s.subtract({days:1});break;case"ArrowRight":l=s.add({days:1});break;case"ArrowUp":l=s.subtract({days:7});break;case"ArrowDown":l=s.add({days:7});break;case"PageUp":l=s.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":l=s.add({[e.shiftKey?"years":"months"]:1});break;default:return}o=l.toString()}}if(!o)return;e.preventDefault();let i=r.find(s=>s.dataset.date===o);i&&!i.hasAttribute("disabled")&&i.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:o}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,r){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:r}})),this.dispatchEvent(new Event("change",{bubbles:!0}))}get value(){return this.currentIso()??""}set value(e){this.selectedIso=e||null,this.applyFormValue(e||null)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){let e=this.getAttribute("defaultvalue")||null,n=this.currentIso();this.selectedIso=e,this.applyFormValue(e),this.emitState(e,n,"reset")}formStateRestoreCallback(e){let n=this.currentIso();this.selectedIso=e||null,this.applyFormValue(e||null),this.emitState(e||null,n,"restore")}};function gg(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Wi)}gg();var Zi=class extends fr{ariaProp="ariaChecked";accessibilityObserver;connectedCallback(){super.connectedCallback(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0})}disconnectedCallback(){this.accessibilityObserver?.disconnect()}syncAccessibilityRelations(){this.applyAccessibilityRelations(Array.from(this.querySelectorAll(":scope > a-radio-label")),Array.from(this.querySelectorAll(":scope > a-radio-hint")))}};function vg(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",Zi)}vg();var $i=class extends B{static formAssociated=!0;static observedAttributes=["state","disabled"];internals;uncontrolledValue=null;seeded=!1;observer;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-RADIO"||a.querySelector?.("a-radio")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect()}attributeChangedCallback(e,n,r){this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}formResetCallback(){let e=this.getAttribute("default-state");this.emitStateChange(e,this.#e,"reset",!1),this.uncontrolledValue=e,this.sync()}formStateRestoreCallback(e){this.emitStateChange(e,this.#e,"restore",!1),this.uncontrolledValue=e,this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return Array.from(this.querySelectorAll("a-radio"))}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#n,r=n.find(o=>o.value===e&&e!=null)??null,a=r?r.value:null;this.internals?.setFormValue(a,a);for(let o of n)o.selected=o===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r)};requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,r,a){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:a,detail:{next:e,prev:n,reason:r}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-radio");!n||n.hasAttribute("disabled")||(n.focus(),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t||qe(e))return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}let a=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function xg(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",$i)}xg();var Lt=class extends B{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals?.states?.add("active"):this.internals?.states?.delete("active"),this.internals.ariaSelected=this.getAttribute("role")==="option"?e?"true":"false":null)}get active(){return this.internals?.states?.has("active")??!1}connectedCallback(){wd(this.doc)}},Gi="a-menu-item, a[data-anta-menu-item]";function Ki(t){return t instanceof Lt||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function wd(t){t.hasKeyListenerForAMenuItem||(Fo(t,{keys:["Enter"," "],resolve:e=>{let n=e;return n?.closest?.('input, textarea, select, a-input, a-input-time, [contenteditable]:not([contenteditable="false"])')?null:n?.closest?.(Gi)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function yg(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",Lt)}yg();var ee=4,Xi=96,Py=130,zy=130,By=500,Ly='a-button, a-input[button], button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',Ry="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",Ny="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",q=[],Qi=!1,Bn=null,kd=null,Ln=null,Ed=0;function Cd(t){Ln=t.pointerType==="mouse"?t.clientX:null,Ln!==null&&(Ed=t.clientY)}function _y(t){return Ln!==null&&Ln>=t.left&&Ln<t.right&&Ed>=t.top&&Ed<t.bottom}function Fy(t,e){Qi||(t.addEventListener("pointerdown",Tg,!0),t.addEventListener("pointermove",Cd,{capture:!0,passive:!0}),t.addEventListener("pointerleave",Eg),t.addEventListener("keydown",Mg,!0),t.addEventListener("keyup",Ig,!0),t.addEventListener("contextmenu",Sg,!0),e.addEventListener("resize",Ag),Bn=t,kd=e,Qi=!0)}function kg(){Qi&&(Bn?.removeEventListener("pointerdown",Tg,!0),Bn?.removeEventListener("pointermove",Cd,!0),Bn?.removeEventListener("pointerleave",Eg),Bn?.removeEventListener("keydown",Mg,!0),Bn?.removeEventListener("keyup",Ig,!0),Bn?.removeEventListener("contextmenu",Sg,!0),kd?.removeEventListener("resize",Ag),Bn=null,kd=null,Qi=!1,Ln=null)}function Eg(){Ln=null}function Cg(t,e=!1){let n=t.composedPath();for(let r=q.length-1;r>=0;r--){let a=q[r];if(n.includes(a.surface))return r;let o=a.triggerAnchor;if(o&&!(e&&a.hasAttribute("context"))&&n.includes(o))return r}return-1}function Hy(t,e){for(let n of t.composedPath()){if(n===e)return!1;if(n instanceof HTMLDialogElement&&n.matches(":modal")||n instanceof HTMLElement&&n.matches(":popover-open"))return!0}return!1}function Vy(t){for(let e of q)if(e.contains(t)||e.surface.contains(t))return!0;return!1}eu({isOpen:()=>q.length>0,contains:Vy});function Tg(t){if(Cd(t),!q.length)return;let e=Cg(t,t.button===0);q[e+1]?.requestClose(t)}function Sg(t){q.length&&Cg(t)===-1&&Dg(t)}function Ag(){q.length&&Dg()}function Mg(t){let e=q[q.length-1];e&&e.handleKey(t)}function Ig(t){let e=q[q.length-1];e&&e.handleKeyUp(t)}function Dg(t){q[0]?.requestClose(t)}function jy(){for(let t=q.length-1;t>=0;t--){let e=q[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}q.length=0,kg()}var Ji=new WeakMap;function qy(t){for(let e of t){let n=Ji.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var wg=typeof IntersectionObserver<"u"?new IntersectionObserver(qy,{root:null,rootMargin:"0px",threshold:0}):null,es=class extends B{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation","role"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;#e=!1;typeBuffer="";typeTimer;activeItem=null;comboObserver;accessibilityObserver;#t=new Set;#n;#o;#r;#a;#s=new Set;#f=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.(),this.internals&&(this.internals.ariaHidden="true")}catch{}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
913
+ `,yp=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=ex;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let r=document.createElement("div");r.className="field",r.part.add("field");let a=document.createElement("slot");a.name="leading",a.part.add("leading");let o=document.createElement("div");o.className="segments",o.part.add("segments"),o.setAttribute("role","group");let i=document.createElement("slot");i.name="clear",i.part.add("clear");let s=document.createElement("slot");s.name="trailing",s.part.add("trailing"),r.append(a,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,r,document.createElement("slot"),l),t})(),wa=class extends z{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","required",...bl];#e;#t;#n;#o;#r;#a=!1;#l=!1;#u=!1;#i=new Map;#h=new Set;#f=!1;#b="";#p=null;#m=null;#c=null;#s=[];#A=[];#v;constructor(){super();try{this.#e=this.attachInternals?.()}catch(n){console.warn("a-input-time: ElementInternals unavailable \u2014 form association disabled.",n)}let e=this.attachShadow({mode:"open",delegatesFocus:!0});if(!yp)throw new Error("a-input-time requires a DOM document");e.append(yp.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#s[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#J),this.#o=e.querySelector(".hint"),this.#o.addEventListener("slotchange",this.#ae),this.#t=e.querySelector(".field"),this.#r=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#B),this.#r.addEventListener("input",this.#P),this.#r.addEventListener("keydown",this.#V),this.#r.addEventListener("focusin",this.#w),this.#r.addEventListener("focusout",this.#D),this.#r.addEventListener("paste",this.#k),this.addEventListener(X0,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#x(e)}else this.#u||this.#x(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#I(),this.#a=!0}#x(e){this.#Y(e),this.#b=this.value}attributeChangedCallback(e,n,r){if(fl.has(e)){if(this.#h.has(e))return;this.#S(e,r);return}if(this.#a){if(e==="value"){r!==null&&(this.value=r);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#I();return}if(e==="status"){this.#te();return}if(e==="disabled"){this.#ee();return}if(e==="min"||e==="max"){this.#ne();return}if(e==="required"){this.#re(),this.#ne();return}}}}#S(e,n){n==null?this.#i.delete(e):this.#i.set(e,n),this.hasAttribute(e)&&(this.#h.add(e),super.removeAttribute(e),this.#h.delete(e)),this.#y(e),this.#T()}removeAttribute(e){if(fl.has(e)&&!this.#h.has(e)&&!this.hasAttribute(e)){let n=e;this.#i.delete(n)&&(this.#y(n),this.#T());return}super.removeAttribute(e)}toggleAttribute(e,n){if(fl.has(e)){let r=e,a=n??!this.#i.has(r);return this.#S(r,a?"":null),a}return super.toggleAttribute(e,n)}[wp](e){return this.#i.get(e)??null}[kp](e,n){this.#S(e,n==null?null:String(n))}#y(e){let n=this.#i.get(e)??null;if(e==="aria-invalid"||e==="aria-errormessage"){for(let r of this.#s)Wn(this,r.el,e,n);e==="aria-invalid"&&n==null&&this.#te();return}Wn(this,this.#r,e,n),(e==="aria-label"||e==="aria-labelledby")&&this.#W(),(e==="aria-description"||e==="aria-describedby")&&this.#Q()}#T(){this.#f||(this.#f=!0,queueMicrotask(()=>{this.#f=!1;for(let e of this.#i.keys())this.#y(e)}))}get#d(){return this.getAttribute("locale")||(typeof navigator<"u"?navigator.language:"en-US")}get#g(){let e=this.getAttribute("hour12");if(e==="true")return!0;if(e==="false")return!1;try{let n=new Intl.DateTimeFormat(this.#d,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#I(){let e=this.#g,n=this.#d,r=this.#b,a=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});a=s.formatToParts(new Date(2e3,0,1,13,5));let l=s.formatToParts(new Date(2e3,0,1,1,5)).find(d=>d.type==="dayPeriod"),c=a.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{a=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#E=o,this.#O=i,this.#r.replaceChildren(),this.#s=[],this.#A=[];for(let s of a)if(s.type==="hour"||s.type==="minute"||s.type==="dayPeriod"){let l=document.createElement("input"),c=s.type==="dayPeriod"?"period":s.type;if(l.className=`seg seg--${c}`,l.type="text",l.spellcheck=!1,l.part.add("segment",c),l.autocomplete="off",l.autocorrect=!1,l.autocapitalize="off",l.setAttribute("aria-label",c==="hour"?"Hour":c==="minute"?"Minute":"AM/PM"),l.inputMode=c==="period"?"text":"numeric",c==="period"){let u=Math.max(2,vp(this.#E),vp(this.#O));l.maxLength=u,l.size=u}else l.maxLength=2,l.size=2;let d=c==="hour"?{kind:c,el:l,min:e?1:0,max:e?12:23}:c==="minute"?{kind:c,el:l,min:0,max:59}:{kind:c,el:l,min:0,max:1};this.#r.append(l),this.#s.push(d)}else{if(!s.value.trim())continue;let l=document.createElement("span");l.className="lit",l.part.add("literal"),l.setAttribute("aria-hidden","true"),l.textContent=s.value,this.#r.append(l),this.#A.push(s.value)}this.#Y(r);for(let s of this.#i.keys())this.#y(s);this.#T(),this.#W(),this.#Q(),this.#re(),this.#te(),this.#ee(),this.#z({dispatch:!1})}#E="AM";#O="PM";#M(e){if(e instanceof HTMLInputElement)return this.#s.find(n=>n.el===e)}#B=e=>{let n=this.#M(e.target);if(n){this.#v=n.el;return}(e.target===this.#t||e.target===this.#r)&&(e.preventDefault(),this.#F(this.#s[0]))};#w=e=>{let n=this.#M(e.target);if(!n)return;let r=this.#v===n.el;this.#v=void 0,r||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#D=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#s.some(r=>r.el===n)||(this.#U()&&this.#z(),this.#G("change"))})};#V=e=>{if(Ye(e))return;let n=this.#M(e.target);if(!n)return;let{el:r}=n,a=e.key;if(a==="ArrowUp"||a==="ArrowDown"){e.preventDefault(),this.#Z(n,a==="ArrowUp"?1:-1);return}if(a==="PageUp"||a==="PageDown"){e.preventDefault(),this.#Z(n,(a==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(a==="ArrowLeft"||a==="ArrowRight"){let o=r.selectionStart??0,i=r.selectionEnd??o;(a==="ArrowLeft"?o===0&&i===0:o===r.value.length&&i===r.value.length)&&(e.preventDefault(),this.#$(),this.#C(n,a==="ArrowRight"?1:-1));return}if(a==="Backspace"&&r.value===""){e.preventDefault(),this.#C(n,-1);return}n.kind!=="period"&&this.#A.some(o=>o.includes(a))&&(e.preventDefault(),this.#$(),this.#C(n,1,{numeric:!0}))};#k=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#Y(n),this.#z(),this.#G("change"))};#P=e=>{let n=this.#M(e.target);!n||e.isComposing||(n.kind==="period"?this.#N(e,n):this.#j(n))};#j(e){let{el:n}=e,r=n.value.replace(/\D/g,"");r!==n.value&&(n.value=r);let a=e.kind==="hour"&&this.#g,o=a?23:e.max;if(r===""){e.kind==="hour"?this.#p=null:this.#m=null,this.#z({dispatch:!1,preserve:n});return}let i=r.slice(0,2),s=Number(i),l=!1;s>o&&(i=i.at(-1),s=Number(i),l=!0);let c=i.length===2||+`${s}0`>o;a?s===0&&i.length===1?this.#p=null:s===0?(this.#p=12,this.#c="am"):s>12?(this.#p=s-12,this.#c="pm"):(this.#p=s,this.#c==null&&(this.#c="am")):this.#L(e,Math.max(e.min,s)),this.#z({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#C(e,1)}#N(e,n){let{el:r}=n,a=r.value.trim();if(!a){this.#c=null,this.#z({dispatch:!1,preserve:r});return}let o=a.toLowerCase(),i=this.#E.toLowerCase(),s=this.#O.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#c=l,this.#z({dispatch:!1}),this.#C(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#c=null,this.#z({dispatch:!1,preserve:r});return}e.stopPropagation(),r.value=this.#c==="pm"?this.#O:this.#c==="am"?this.#E:""}#Z(e,n){if(e.kind==="period"){this.#c=this.#c==null?"am":this.#c==="am"?"pm":"am",this.#U(),this.#z();return}let r=e.kind==="hour"?this.#p:this.#m,a=e.max-e.min+1,o;r==null?o=n>0?e.min:e.max:o=((r-e.min+n)%a+a)%a+e.min,this.#L(e,o),this.#U(),this.#z()}#L(e,n){e.kind==="hour"?this.#p=n:this.#m=n,e.kind==="hour"&&this.#g&&this.#c==null&&(this.#c="am")}#_(e){let n=xp(e);return n?n.h*60+n.min:null}get#R(){return this.#_(this.getAttribute("min"))}get#H(){return this.#_(this.getAttribute("max"))}#q(){let e=this.#K;return e==null||this.#m==null?null:e*60+this.#m}#U(){let e=this.#q();if(e==null)return!1;let n=this.#R,r=this.#H,a=e;return n!=null&&a<n&&(a=n),r!=null&&a>r&&(a=r),a===e?!1:(this.#Y(`${ya(Math.floor(a/60))}:${ya(a%60)}`),!0)}#F(e){e&&(e.el.focus(),e.el.select())}#C(e,n,r={}){let a=this.#s.indexOf(e);for(let o=a+n;o>=0&&o<this.#s.length;o+=n){let i=this.#s[o];if(!r.numeric||i.kind!=="period"){this.#F(i);return}}}get#K(){return this.#p==null?null:this.#g?this.#c==null?null:Q0(this.#p,this.#c):this.#p}#z({dispatch:e=!0,preserve:n}={}){this.#$(n),this.#b=this.value,this.#e?.setFormValue(this.value),this.#oe(),this.#ne(),e&&this.#G("input")}#$(e){for(let n of this.#s)this.#X(n,e===n.el)}#X(e,n){let r=e.el;if(e.kind==="period"){let o=this.#c==="pm"?this.#O:this.#c==="am"?this.#E:"";n||(r.value=o),r.placeholder=this.#E;return}let a=e.kind==="hour"?this.#p:this.#m;n||(r.value=a==null?"":ya(a)),r.placeholder="\u2013\u2013"}#Y(e){let n=xp(e);if(!n){this.#p=null,this.#m=null,this.#c=null;return}this.#m=n.min,this.#g?(this.#p=(n.h+11)%12+1,this.#c=n.h<12?"am":"pm"):(this.#p=n.h,this.#c=null)}#G(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#W(){if(this.#i.has("aria-label")||this.#i.has("aria-labelledby"))return;let e=this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-label",e):this.#r.removeAttribute("aria-label")}#J=()=>{this.#W()};#Q(){if(this.#i.has("aria-description")||this.#i.has("aria-describedby"))return;let e=this.#o.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-description",e):this.#r.removeAttribute("aria-description")}#ae=()=>{this.#Q()};#ee(){let e=this.hasAttribute("disabled")||this.#l;for(let n of this.#s)n.el.disabled=e}#te(){let e=this.getAttribute("status")==="critical",n=this.#i.get("aria-invalid");for(let r of this.#s)r.el.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.#e?.states?.add("invalid"):this.#e?.states?.delete("invalid")}catch{}}#re(){let e=this.hasAttribute("required");for(let n of this.#s)n.el.setAttribute("aria-required",e?"true":"false")}#oe(){this.value?this.#e?.states?.add("filled"):this.#e?.states?.delete("filled")}#ne(){if(!this.#e)return;let e=this.#s[0]?.el??this,n=this.hasAttribute("required"),r=this.#q(),a=this.#R,o=this.#H;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):r!=null&&a!=null&&r<a?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):r!=null&&o!=null&&r>o?this.#e.setValidity({rangeOverflow:!0},`Time must be ${this.getAttribute("max")} or earlier.`,e):this.getAttribute("status")==="critical"?this.#e.setValidity({customError:!0},"Invalid value.",e):this.#e.setValidity({})}get value(){let e=this.#K;return e==null||this.#m==null?"":`${ya(e)}:${ya(this.#m)}`}set value(e){this.#u=!0;let n=e??"";n!==this.value&&(this.#Y(n),this.#a?this.#z({dispatch:!1}):this.#b=this.value)}clear(){this.#p=null,this.#m=null,this.#c=null,this.#z(),this.#G("change"),this.dispatchEvent(new CustomEvent(J0,{bubbles:!0})),this.#s[0]?.el.focus()}focus(e){this.#s[0]?.el.focus(e)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get validity(){return this.#e?.validity}get validationMessage(){return this.#e?.validationMessage??""}get willValidate(){return this.#e?.willValidate??!1}checkValidity(){return this.#e?.checkValidity()??!0}reportValidity(){return this.#e?.reportValidity()??!0}formResetCallback(){this.#Y(this.getAttribute("defaultvalue")??""),this.#z(),this.#G("change")}formDisabledCallback(e){this.#l=e,this.#ee()}formStateRestoreCallback(e){this.value=e??""}};for(let t of bl)Object.defineProperty(wa.prototype,Xo(t),{configurable:!0,enumerable:!0,get(){return this[wp](t)},set(e){this[kp](t,e)}});function Ep(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",wa)}Ep();var gl=globalThis.Temporal;var Cp=(t,e)=>`Non-positive ${t}: ${e}`,Ap=(t,e)=>`Non-finite ${t}: ${e}`,Sp=t=>`Cannot convert bigint to ${t}`,Tp="Invalid object",ka=(t,e,n,r)=>Zn(t,e)+`; must be between ${n}-${r}`,Zn=(t,e)=>`Invalid ${t}: ${e}`;var vl=1e3,xl=1e6,yl=1e9,wl=6e10,kl=36e11;function ft(t){return t===void 0?Object.create(null):xn(t)}function Qo(t,e="number"){if(typeof t=="bigint")throw new TypeError(Sp(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Ap(e,t));return t}function Ie(t,e){return Math.trunc(Qo(t,e))||0}function ei(t,e){return Mp(Ie(t,e),e)}function Mp(t,e="number"){if(t<=0)throw new RangeError(Cp(e,t));return t}function El(t,e,n){return Math.min(Math.max(t,e),n)}function $n(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function xn(t){if(!$n(t))throw new TypeError(Tp);return t}function ni(t,e){return typeof t=="string"?((n,r)=>{let a=Object.create(null);return a[n]=r,a})(e,t):xn(t)}var Qt="smallestUnit",ox={constrain:0,reject:1},ix={compatible:0,reject:1,earlier:2,later:3},sx={reject:0,use:1,prefer:2,ignore:3},lx={auto:0,never:1,critical:2,always:3},cx={auto:0,never:1,critical:2},dx={auto:0,never:1},ux={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Ip=[Math.floor,Wp,Math.ceil,Zp,Math.trunc,$p,Up,Yp,Gp],hx={previous:-1,next:1};function Cl(t){let e=t.roundingIncrement;return e===void 0?1:Ie(e,"roundingIncrement")}function Al(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Aa(e)==="auto")return;P(Ca("fractionalSecondDigits",e))}e=Tt("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function Sl(t,e,n=0,r){let a=e[t];if(a===void 0)return r?n:void 0;if(a=Aa(a),a==="auto")return r?n:null;let o=ti[a];return o===void 0&&(o=Ee.indexOf(a)),o<0&&P(Ol(t,a,ti)),o}function yn(t,e,n,r=0){let a=n[t];if(a===void 0)return r;let o=Aa(a),i=e[o];return i===void 0&&P(Ol(t,o,e)),i}var Sr=Fe(Sl,Qt),Dp=Fe(Sl,"largestUnit"),px=Fe(Sl,"unit"),Op=Fe(yn,"overflow",ox),Pp=Fe(yn,"disambiguation",ix),mx=Fe(yn,"offset",sx),Tl=Fe(yn,"calendarName",lx),fx=Fe(yn,"timeZoneName",cx),bx=Fe(yn,"offset",dx),Tr=Fe(yn,"roundingMode",ux),gx=Fe(yn,"direction",hx);function Ml(t,e,n,r){let a=r?Ft:bt[e+1];if(a){let o=bt[e];a%((t=Tt("roundingIncrement",t,1,a/o-(r?0:1),1))*o)&&P(Ca("roundingIncrement",t))}else t=Tt("roundingIncrement",t,1,n?10**9:1,1);return t}function Ar(t,e,n,r){return e!=null&&Tt(t,e,n,r,1,ai),e}function zp(t,e){e>t&&P(qp)}function Gn(t,e,n,r=9,a=0,o=4){e=ft(e);let i=Dp(e,a),s=Cl(e),l=Tr(e,o),c=Sr(e,a,1);return i=Ar("largestUnit",i,a,r),c=Ar(Qt,c,a,r),i==null?i=Math.max(n,c):zp(i,c),s=Ml(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function Bp(t,e,n){t=ni(t,Qt);let r=Dp(t),a=n(t.relativeTo),o=Cl(t),i=Tr(t,7),s=Sr(t);return r===void 0&&s===void 0&&P(jp),s==null&&(s=0),r==null&&(r=Math.max(s,e)),zp(r,s),o=Ml(o,s,1),o>1&&s>5&&r!==s&&P("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[r,s,o,i,a]}function Ea(t,e=6,n){let r=Cl(t=ni(t,Qt)),a=Tr(t,7),o=Sr(t);return o=Pl(Qt,o),o=Ar(Qt,o,0,e),r=Ml(r,o,void 0,n),[o,r,a]}function Lp(t,e){let n=e((t=ni(t,"unit")).relativeTo),r=px(t);return r=Pl("unit",r),[r,n]}function Z(t){return t===void 0?0:Op(xn(t))}function wn(t,e=0){t=ft(t);let n=Pp(t),r=mx(t,e);return[Op(t),r,n]}function Rp(t){return Pp(ft(t))}function Np(t,e=4){let n=Al(t),r=Tr(t,4),a=Sr(t);return[r,...Dl(Ar(Qt,a,0,e),n)]}function _p(t){return t=ft(t),[Tl(t),...Np(t)]}function ri(t){return Tl(ft(t))}function Il(t,e){return Np(ft(t),e)}function Fp(t){t=ft(t);let e=Tl(t),n=Al(t),r=bx(t),a=Tr(t,4),o=Sr(t);return[e,fx(t),r,a,...Dl(Ar(Qt,o,0,4),n)]}function Vp(t){let e=Al(t=ft(t)),n=Tr(t,4),r=Sr(t);return[t.timeZone,n,...Dl(Ar(Qt,r,0,4),e)]}function Dl(t,e){return t!=null?[bt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function Hp(t){let e=ni(t,"direction"),n=gx(e,0);return n||P(Ca("direction",n)),n}var Ca=Zn;var Da=t=>`Missing ${t}`,om=t=>"No valid fields: "+t.join(),im="Invalid bag",Ol=(t,e,n)=>Zn(t,e)+"; must be "+Object.keys(n).join(),sm="Cannot use valueOf",lm="Invalid calling context",Wl=t=>"Missing year"+(t?"/era/eraYear":""),Xn="Invalid leap month",cm=t=>Zn("Calendar",t),dm=(t,e)=>`Unknown calendar ${t}; might need ${e}`,Zl=t=>Zn("TimeZone",t),kn="Out-of-bounds date";var jp="Required smallestUnit or largestUnit",qp="smallestUnit > largestUnit",um=t=>`Cannot parse: ${t}`,en=t=>`Invalid substring: ${t}`;var $l=El,Ke=$n;function P(t){throw new RangeError(t)}function he(t){throw new TypeError(t)}function Nl(t,e,n,r,a){return Tt(e,((o,i)=>{let s=o[i];return s===void 0&&he(Da(i)),s})(t,e),n,r,a)}function Tt(t,e,n,r,a,o){let i=$l(e,n,r);return a&&e!==i&&P(((s,l,c,d,u)=>u?ka(s,u[l],u[c],u[d]):ka(s,l,c,d))(t,e,n,r,o)),i}function Ir(t,e=Map){let n=new e;return(r,...a)=>{if(n.has(r))return n.get(r);let o=t(r,...a);return n.set(r,o),o}}var hm=t=>pi({name:t},1),pi=(t,e)=>An(n=>({value:n,configurable:1,writable:!e}),t),Oa=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function An(t,e){let n={};for(let r in e)n[r]=t(e[r],r);return n}function Pa(t,e){let n={};for(let r of t)n[r]=e;return n}function Gl(t){let e={};for(let n of t)e[n]=r=>r[n];return e}function Ht(t,e,n=Object.create(null)){for(let r of t)n[r]=e[r];return n}function pm(t,e,n){for(let r of t)if(e[r]!==n[r])return 0;return 1}function vx(t,e,n){let r={...n};for(let a=0;a<e;a++)r[t[a]]=0;return r}function Fe(t,...e){return(...n)=>t(...e,...n)}function Kl(){}function Kp(t){return t[0].toUpperCase()+t.substring(1)}function Le(...t){return[].concat(...t).sort()}function Pr(t){return new RegExp(`^${t}$`,"i")}function Xl(t){return parseInt(t.padEnd(9,"0"))}function Jl(t){return t&&t!=="+"?-1:1}function Mr(t){return t===void 0?0:parseInt(t)}function ii(t,e){return String(e).padStart(t,"0")}var Mt=Fe(ii,2);function tn(t,e){return Math.sign(t-e)}function ot(t,e){return t<e?-1:t>e?1:0}function mm(t,e){let n=t/e;return t%e<0n?n-1n:n}function Ql(t,e){let n=mm(t,e);return[n,t-n*e]}function Vt(t,e){return[Math.floor(t/e),mi(t,e)]}function mi(t,e){return(t%e+e)%e}function zr(t,e){return Math.trunc(t/e)||0}function ec(t,e){return t%e||0}function Up(t){return t<0?Math.floor(t):Math.ceil(t)}function fm(t,e=1){return e*(.5+t/5)}function Yp(t){return Math.sign(t)*Math.round(Math.abs(t))||0}function Wp(t){return fi(t)?Math.floor(t):Math.round(t)}function Zp(t){return fi(t)?Math.ceil(t):Math.round(t)}function $p(t){return fi(t)?Math.trunc(t)||0:Math.round(t)}function Gp(t){return fi(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)}function fi(t){return Math.abs(t%1)===.5}var tc="iso8601",bm="gregory",xx={bce:-1,ce:0};function gm(t){let e=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return e==="bc"||e==="b"?"bce":e==="ad"||e==="a"?"ce":e}var it=void 0,vm=0;function Dt(t){return t===it?"iso8601":t===0?"gregory":t.id}var yx=/^M(\d{2})(L?)$/;function xm(t){let e=yx.exec(t);return e||P((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function ym(t,e){return"M"+Mt(t)+(e?"L":"")}function _l(t,e,n){return t+(e||n&&t>=n?1:0)}var ti={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},ai=Object.keys(ti);var za=vl,Ba=xl,Sn=yl,La=wl,Ra=kl,Ft=864e11,bt=[1,za,Ba,Sn,La,Ra,Ft],wx=BigInt(za),Br=BigInt(Ba),Jn=BigInt(Sn),kx=BigInt(La),Ex=BigInt(Ra),Ce=BigInt(Ft);function wm(t,e){let n=Number(t/Ce),r=Number(t%Ce);return n*(Ft/e)+(Math.trunc(r/e)+r%e/e)}var We=ai.slice(0,6),Na=Gl(We),bi=["year"],er=["day"],nc=["day","month","year"],gi=["offset"],rc=["timeZone"],Lr=["era","eraYear"],Cx=["era","eraYear","year"],km=["month","monthCode"],Ax=["day","month","monthCode"],Fl=Le(We),Sx=Le(Lr,bi),_a=Le(km,bi),Em=Le(Lr,_a),Fa=Le(["monthCode"],bi),Cm=Le(Lr,Fa),Am=Le(er,["monthCode"]),tr=Le(er,_a),nr=Le(er,Lr,_a),Sm=Le(tr,We),Tm=Le(nr,We),Tx=Le(tr,We,gi),Mx=Le(nr,We,gi),Mm=Le(tr,We,gi,rc),Im=Le(nr,We,gi,rc),Ix=Le(er,Fa),Dx=Le(er,Lr,Fa),Ot=Pa(We,0);function Va(t){return vi(t,1),t}var Ox={hour:23,minute:59,second:59};function vi(t,e){let n={};for(let r of We)n[r]=Tt(r,t[r],0,Ox[r]||999,e);return n}function st(t){return oc(t)*Sn+Dm(t)}function ac(t){return 1e3*oc(t)+t.millisecond}function oc(t){return 3600*t.hour+60*t.minute+t.second}function Dm(t){return t.millisecond*Ba+t.microsecond*za+t.nanosecond}function ic(t){let[e,n]=Vt(t,Ft);return[Om(n),e]}function Om(t){let[e,n]=Vt(t,Ba),[r,a]=Vt(n,za);return Px(e,r,a)}function Px(t,e=0,n=0){let[r,a]=Vt(t,36e5),[o,i]=Vt(a,6e4),[s,l]=Vt(i,1e3);return{hour:r,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function Xp(t){let[e,n]=Ql(t,Jn);return[Number(e),Number(n)]}function Ha(t){return Number(mm(t,Br))}function Ve(t){return nn(t)+BigInt(st(t))}function Pm(t){return ja(t)+ac(t)}function nn(t){return BigInt(jt(t))*Ce}function ja(t){return 864e5*jt(t)}function jt(t){return Sa(t.year,t.month,t.day)}function Sa(t,e=1,n=1){let r=e-1;return t+=Math.floor(r/12),e=mi(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(zr(t,400)+1)+n}function qa(t){let[e,n]=Ql(t,Ce);return{...zm(Number(e)),...Om(Number(n))}}function zm(t){let e=new Date(864e5*mi(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var Bm=1972;function zx(t){return[t,0]}function Vl(t,e){if(!e)return{year:1972,month:t}}function Bx(t,e,n){return{year:t,month:e,day:n}}function Lm(t,e){switch(e){case 2:return xi(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Lx(t){return xi(t)?366:365}function xi(t){return t%4==0&&(t%100!=0||t%400==0)}function Rx(t,e,n){return t+=zr(n,12),(e+=ec(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function Nx(t,e,n,r){return 12*(n-t)+r-e}function yi(t){return mi(Sa(t.year,t.month,t.day)+4,7)||7}function Rm(t){return Sa(t.year,t.month,t.day)-Sa(t.year)+1}function Nm(t){let e=t.year,n=Math.floor((Rm(t)-yi(t)+10)/7),r=zl(e);return n<1?n=r=zl(--e):n>r&&(n=1,r=zl(++e)),{weekOfYear:n,yearOfWeek:e,De:r}}function zl(t){let e=yi({year:t,month:1,day:1});return e===4||e===3&&xi(t)?53:52}function _x({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function Ua(t){return an(t),Va(t)}function an(t){return _m(t,1),t}function Jp(t){return pm(nc,t,_m(t))}function _m(t,e){let{year:n}=t,r=Nl(t,"month",1,12,e);return{year:n,month:r,day:Nl(t,"day",1,Lm(n,r),e)}}function we(t,e){return t?t.de(e):e}function Qn(t,e,n){return t?t.N(e,n):zx(n)}function Ya(t,e){return t===0?_x(e):t&&t.h?.(e)||{}}function rr(t,e,n,r){return t?t.fe(e,n,r):Bx(e,n,r)}function Ta(t,e){return t?t.j(e):12}function Ma(t,e,n){return t?t.o(e,n):Lm(e,n)}function wi(t,e){let{year:n,month:r}=we(t,e),[a,o]=Qn(t,n,r);return ym(a,o)}function sc(t,e){let{year:n}=we(t,e);return t?t.q(n):xi(n)}function lc(t,e){let{year:n}=we(t,e);return Ta(t,n)}function cc(t,e){let{year:n,month:r}=we(t,e);return Ma(t,n,r)}function dc(t,e){let{year:n}=we(t,e);return t?t.i(n):Lx(n)}function Fm(t,e){if(!t)return Rm(e);let{year:n}=we(t,e),r=rr(t,n,1,1);return jt(e)-jt(r)+1}function Vm(t,e){return t===it?Nm(e).weekOfYear:void 0}function Hm(t,e){return t===it?Nm(e).yearOfWeek:void 0}var Ee=ai.map(t=>t+"s"),uc=Gl(Ee),jm=Le(Ee),Fx=Ee.slice(0,6),qm=Ee.slice(6),Vx=qm.slice(1),ze=Pa(Ee,0),hc=Pa(Fx,0),pc=Fe(vx,Ee);function Pl(t,e){return e==null&&P(Da(t)),e}var He=Fe(Hx,"string");function Hx(t,e,n=t){return typeof e!==t&&he(Ca(n,e)),e}function mc(t,e="number"){return Number.isInteger(t)||P(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function Aa(t){return typeof t=="symbol"&&he("Cannot convert Symbol to string"),String(t)}function fc(t){if(!$n(t))return t;let e=t[Symbol.toPrimitive];if(e!=null){typeof e!="function"&&he();let n=Reflect.apply(e,t,["string"]);return $n(n)&&he(),n}return Date.prototype[Symbol.toPrimitive].call(t,"string")}function ki(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&he(`Invalid bigint: ${t}`),t)}function Wa(t,e){return mc(Qo(t,e),e)}function Ae(t,e){return Ht(nc,t,Ht(We,e))}var bc=BigInt(1e8)*Ce,gc=BigInt(-1e8)*Ce,Um=gc-Ce,Ym=-3261848;function Ei(t){let e=12*t.year+t.month;return(e<Ym||e>3309129)&&P(kn),t}function lt(t,e=1){let n=nn(t);return(n<(e?Um:gc)||n>bc)&&P(kn),t}function ar(t){return jx(Ve(t)),t}function jx(t){return(t<=Um||t>=bc+Ce)&&P(kn),t}function zt(t){return(t<gc||t>bc)&&P(kn),t}function vc(t,e){return zt(nn(t)+BigInt(st(t)-e))}function Dr(t,e,n){return xc(t/e,n)*e}function xc(t,e){return Ip[e](t)}function qx(t,e,n,r){let a=yc(t,e,r,n);return Wm(a,Number(n-a.I)/Number(a.O-a.I))}function Ux(t,e,n,r){return Dr(Wm(t,Zm(e,t.I,t.O)),n,r)}function yc(t,e,n,r){let a=Qp(t,e,n);return((o,i,s,l)=>l>0?i<=o&&o<=s:s<=o&&o<=i)(r,a.I,a.O,Math.sign(e))||(a=Qp(t+e,e,n)),a}function Qp(t,e,n){let r=t+e;return{ve:t,qe:r,I:n(t),O:n(r)}}function Wm(t,e){return t.ve+e*(t.qe-t.ve)}function Zm(t,e,n){let r=n-e,a=t-e;if(!a)return 0;let o=a<0n?-a:a,i=r<0n?-r:r,s=ot(a,0n)===ot(r,0n)?1:-1;return ot(o,i)<=0?o===i?s:fm(ot(2n*o,i),s):Number(a)/Number(r)}function gt(t){return{epochNanoseconds:t}}function vt(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function qt(t,e){return Ht(We,t,ke(t,e))}function ke(t,e){return Ht(nc,t,{calendar:e})}function or(t){return Ht(We,t)}function Pt(t){return Ht(Ee,t,{sign:Qa(t)})}function $m(t,e,n,r){return vt(e===6?Wx(t,r):Zx(t,e,n,r),t.timeZone,t.calendar)}function Gm(t){let[e,n]=Xm(t);return wm(n-e,Ra)}function Km(t){let{timeZone:e,calendar:n}=t;return vt(Or(e,Ae(Be(t),Ot)),e,n)}function Ci(t,e,n,r,a,o,i,s){if(r===0&&a===1)return t;let l=Qa(t)||1,c=ci(r,s)?s&&r<6&&n>=6?Gx:Kx:$x,[d,u,m]=c(l,t,e,n,r,a,o,i);return m&&r!==7&&(d=((p,f,b,g,v,x)=>{for(let w=g+1;w<=b;w++){if(w===7&&b!==7)continue;let I=pc(w,p);I[Ee[w]]+=v;let C=ot(f,Oi(x,I));if(C&&C!==v)break;p=I}return p})(d,u,n,Math.max(6,r),l,i)),d}function Yx(t,e,n){let r=Math.min(Cn(t),6);return En(Ti(rn(t),BigInt(e),n),r)}function Wx(t,e){let[n,r]=Xm(t);return Xx(t.epochNanoseconds,n,r,e)}function Zx(t,e,n,r){if(e===0&&n===1)return t.epochNanoseconds;let a=Be(t);return Nr(t.timeZone,Ai(a,Rr(e,n),r),a.offsetNanoseconds,2,0,1)}function Ai(t,e,n){let[r,a]=Si(t,e,n),o=Ae(Fr(t,a),r);return ar(o),o}function Si(t,e,n){return ic(Dr(st(t),e,n))}function $x(t,e,n,r,a,o,i,s){let l=Ee[a],c=pc(a,e);a===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=zr(e[l],o)*o,u=yc(d,o*t,p=>(c[l]=p,Oi(s,c)),n),m=Ux(u,n,o,i);return c[l]=m,[c,m===u.qe?u.O:u.I,m!==d]}function Gx(t,e,n,r,a,o,i,s){let l=Number(Vr(e)),c=Rr(a,o),d=Dr(l,c,i),u={...e,...hc},m=yc(u.days,t,x=>(u.days=x,Oi(s,u)),n),p=m.I,f=m.O,b=d-Number(f-p),g=0;b&&Math.sign(b)!==t?n=p+BigInt(d):(g+=t,d=Dr(b,c,i),n=f+BigInt(d));let v=Pi(d);return[{...e,...v,days:e.days+g},n,!!g]}function Kx(t,e,n,r,a,o,i){let s=rn(e),l=Ti(s,Za(a,o),i),c=l-s,d=Math.sign(Number(l/Ce)-Number(s/Ce))===t,u=En(l,Math.min(r,6));return[{...e,...u},n+c,d]}function Xm(t){let{timeZone:e}=t,n=Ae(Be(t),Ot),r=Ae(Fr(n,1),Ot);return[Or(e,n),Or(e,r)]}function Xx(t,e,n,r){return xc(Zm(t<n?t:n-1n,e,n),r)?n:e}function si(t){return Dr(t,La,7)}function Ti(t,e,n){return Jm(t,e,n,t/e%2n)}function Mi(t,e,n){let[r,a]=Ql(t,Ce),o=r*Ce;return o+Jm(a,e,n,(o/e+a/e)%2n)}function Jm(t,e,n,r){let a=t/e,o=t%e,i=0;o&&(i=fm(ot(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=xc(Number(r)+i,n);return(a-r+BigInt(s))*e}function Rr(t,e){return bt[t]*e}function Za(t,e){return BigInt(bt[t])*BigInt(e)}var Be=Ir(Jx,WeakMap);function Jx(t){let{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{...qa(e+BigInt(r)),offsetNanoseconds:r}}function Nr(t,e,n,r=0,a=0,o,i){if(n!==void 0&&r===1&&(r===1||i))return vc(e,n);r!==2&&r!==0||lt(e,0);let s=t.R(e);if(n!==void 0&&r!==3){let l=((c,d,u,m)=>{let p=Ve(d);m&&(u=si(u));for(let f of c){let b=Number(p-f);if(m&&(b=si(b)),b===u)return f}})(s,e,n,o);if(l!==void 0)return l;r===0&&P("Invalid TimeZone offset")}return i?Ve(e):_r(t,e,a,s)}function _r(t,e,n=0,r=t.R(e)){if(r.length===1)return r[0];if(n===1&&P("Ambiguous offset"),r.length)return r[n===3?1:0];let a=Ve(e),o=((s,l)=>{let c=s.B(l-Ce);return(d=>(d>Ft&&P("Out-of-bounds TimeZone gap"),d))(s.B(l+Ce)-c)})(t,a),i=qa(a+BigInt(o*(n===2?-1:1)));return(r=t.R(i))[n===2?0:r.length-1]}function Or(t,e){let n=t.R(e);if(n.length)return n[0];let r=Ve(e)-Ce;return t.C(r,1)}function wc(t,e,n,r=0){Qa(n)&&Cn(n)<8&&P("Cannot use small units");let a=lt(Ia(t,e));return Ia(t,on(t,a,n,r))}function $a(t,e,n=0){let{calendar:r,epochNanoseconds:a,timeZone:o}=t,i=Vr(e),s=a;if(Dc(e)){let l=Be(t);s=_r(o,Ae(on(r,l,{...e,...hc},n),l))+i}else s+=i;return{...t,epochNanoseconds:zt(s)}}function Ga(t,e,n,r=0){let[a,o]=Ii(e,n);return ar(Ae(on(t,e,{...n,...hc,days:n.days+o},r),a))}function Ii(t,e){return Qx(t,Vr(e))}function kc(t,e){return ey(t,(Dc(n=e)&&P("Cannot use large units"),Vr(n)));var n}function on(t,e,n,r=0){let{years:a,months:o,weeks:i,days:s}=n,l;if(s+=Number(Vr(n)/Ce),a||o)l=li(t,e,a,o,r);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=Fr(l,7*i+s)),lt(l)}function Ia(t,e){return Fr(e,1-we(t,e).day)}function li(t,e,n,r,a){let o=we(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=Qn(t,i,s);i+=n,s=Hl(t,c,d,t?t.p(i):void 0,a),s=Tt("month",s,1,Ta(t,i),a)}return r&&({year:i,month:s}=Qm(t,i,s,r)),l=Tt("day",l,1,Ma(t,i,s),a),rr(t,i,s,l)}function Qm(t,e,n,r){return t?t.ae(e,n,r):Rx(e,n,r)}function Hl(t,e,n,r,a){if(n){let o=t?t.l:void 0;return r!==void 0&&(o<0||r===e+1)?r:(a===1&&P(Xn),o<0?-o:e)}return _l(e,0,r)}function Qx(t,e){let n=Number(e/Ce),r=Number(e%Ce),[a,o]=ic(st(t)+r);return[a,n+o]}function ey(t,e){return zt(t+e)}function Fr(t,e){return e?zm(jt(t)+e):t}function Ka(t,e){return Dt(t)!==Dt(e)&&P("Mismatching Calendars"),t}function ef(t,e){return t.m!==e.m&&P("Mismatching TimeZones"),t}function tf(t){return t.timeZone.id}function nf(t,e,n,r,a,o,i){return r<6?Xa(e.epochNanoseconds,n.epochNanoseconds,r,a,o,i):((s,l,c,d,u,m,p)=>{let f=c.epochNanoseconds;if(f===l.epochNanoseconds)return ze;let b,g=ef(l.timeZone,c.timeZone);return b=Ec(g,s,l,c,d),b=Ci(b,f,d,u,m,p,Ac(s,g,l),1),b})(t,e,n,r,a,o,i)}function rf(t,e,n,r,a,o,i){return r<=6?Xa(Ve(e),Ve(n),r,a,o,i):((s,l,c,d,u,m,p)=>{let f=Ve(c),b=ot(f,Ve(l));if(!b)return ze;let g;return g=df(s,l,c,b,d),g=Ci(g,f,d,u,m,p,((v,x)=>({ne:Ve(x),ke:w=>Ve(Ae(on(v,x,w),x))}))(s,l)),g})(t,e,n,r,a,o,i)}function af(t,e,n,r,a,o,i){let s=Ia(t,e),l=Ia(t,n);return Cc(s,l)?lf(t,lt(s),lt(l),r,a,o,i,8):ze}function of(t,e,n,r,a,o,i,s=6){return r===6?Xa(nn(e),nn(n),r,a,o,i):lf(t,e,n,r,a,o,i,s)}function sf(t,e,n,r,a,o){let i=Dr(st(e)-st(t),Rr(r,a),o);return{...ze,...Pi(i,n)}}function lf(t,e,n,r,a,o,i,s=6){let l=nn(n);if(!Cc(e,n))return ze;let c;return c=Di(t,e,n,r),a===s&&o===1||(c=Ci(c,l,r,a,o,i,Sc(t,e))),c}function Xa(t,e,n,r,a,o){return{...ze,...En(Ti(e-t,Za(r,a),o),n)}}function Ec(t,e,n,r,a){return a<6?{...ze,...En(r.epochNanoseconds-n.epochNanoseconds,a)}:((o,i,s)=>{let l=ot(s.epochNanoseconds,i.epochNanoseconds);if(!l)return ze;if(!Cc(Be(i),Be(s)))return{...ze,...En(s.epochNanoseconds-i.epochNanoseconds,5)};let[c,d,u]=ty(o,i,s,l);return{...(m=c,p=d,Di(e,m,p,a)),...Pi(u)};var m,p})(t,n,r)}function cf(t,e,n,r){let a=Ve(e),o=Ve(n),i=ot(o,a);return i?r<=6?{...ze,...En(o-a,r)}:df(t,e,n,i,r):ze}function df(t,e,n,r,a){let o=n,i=st(n)-st(e);return Math.sign(i)===-r&&(o=Fr(n,-r),i+=Ft*r),{...Di(t,e,o,a),...Pi(i)}}function ty(t,e,n,r){let a=Be(e),o=Be(n),i=n.epochNanoseconds,s=0,l=st(o)-st(a);Math.sign(l)===-r&&s++;let c=s+(r>0?1:0);for(;;s++){let d=Fr(o,s*-r),u=_r(t,Ae(d,a));if(s===c||ot(i,u)!==-r)return[a,d,Number(i-u)]}}function Di(t,e,n,r){if(r<=7)return((b,g,v)=>{let x=Bl(g,v);return b?{...ze,weeks:zr(x,7),days:ec(x,7)}:{...ze,days:x}})(r===7,e,n);let a=we(t,e),o=we(t,n);if(r===8){let{year:b,month:g,day:v}=a,{year:x,month:w,day:I}=o,C=Math.sign(tn(x,b)||tn(w,g)||Bl(e,n)),B=0,L=0;if(C){B=t?t.ee(b,g,x,w):Nx(b,g,x,w);let D=li(t,e,0,B,0);C*tn(v,I)>0&&(B-=C,D=li(t,e,0,B,0)),L=Bl(D,n)}return{...ze,months:B,days:L}}let{year:i,month:s,day:l}=a,{year:c,month:d,day:u}=o,m=c-i,p=d-s,f=u-l;if(m||p){let b=Math.sign(m||p),g=Ma(t,c,d),v=0;if(Math.sign(u-l)===-b){let x=g;({year:c,month:d}=Qm(t,c,d,-b)),m=c-i,p=d-s,g=Ma(t,c,d),v=b<0?-x:g}if(f=u-Math.min(l,g)+v,m){let[x,w]=Qn(t,i,s),[I,C]=Qn(t,c,d),B=t?t.l:void 0;if(p=B!==void 0&&w&&!C&&(B<0?b>0&&I===-B:b<0&&I===x)?0:I-x||Number(C)-Number(w),Math.sign(p)===-b){let L=b<0&&-Ta(t,c);c-=b,m=c-i,p=d-Hl(t,x,w,t?t.p(c):void 0,0)+(L||Ta(t,c))}else if(t){let L=Hl(t,x,w,t.p(c),0);p=t.ee(c,L,c,d)}}}return{...ze,years:m,months:p,days:f}}function Cc(t,e){return tn(t.year,e.year)||tn(t.month,e.month)||tn(t.day,e.day)}function Bl(t,e){return jt(e)-jt(t)}function uf(t,e,n){return Ja(t)?((r,a,o)=>{let{calendar:i,timeZone:s}=r,l=$a(r,a);return[Ec(s,i,r,l,o),l.epochNanoseconds,Ac(i,s,r)]})(t,e,n):((r,a,o)=>{let{calendar:i}=r,s=ar(Ae(r,Ot)),l=Ga(i,s,a);return[cf(i,s,l,o),Ve(l),Sc(i,r)]})(t,e,n)}function em(t,e){return Ja(t)?$a(t,e).epochNanoseconds:Ve(Ga(t.calendar,Ae(t,Ot),e))}function Oi(t,e){return Dc(e)?t.ke(e):t.ne}function Ac(t,e,n){let r=Be(n);return{ne:n.epochNanoseconds,ke:a=>_r(e,Ae(on(t,r,a),r))}}function Sc(t,e){return{ne:nn(e),ke:n=>nn(on(t,e,n))}}function Ja(t){return"timeZone"in t}function ci(t,e){return t<=6-(e?1:0)}function Tc(t,e,n){let r={};for(let a=e;a>=0;a--){let o=bt[a];r[n[a]]=zr(t,o),t=ec(t,o)}return r}var ny=2**53;function Mc(t,e,n){let r=Math.max(Cn(e),Cn(n));return r>6&&P("Cannot use large units"),((a,o,i,s)=>Pt(Tn(((l,c,d,u)=>{let m=rn(l)+rn(c)*BigInt(u?-1:1);return Number.isFinite(Number(m/Ce))||P(kn),{...ze,...En(m,d)}})(o,i,s,a))))(t,e,n,r)}function hf(t,e,n){let r=Cn(e),[a,o,i,s,l]=Bp(n,r,t);if(!l&&Math.max(r,a)<=6)return Pt(Tn(((p,f,b,g,v)=>{let x=Ti(rn(p),Za(b,g),v);return{...ze,...En(x,f)}})(e,a,o,i,s)));l||P("Missing relativeTo");let c=Ja(l);if(!e.sign&&(!c||a<6))return e;let[d,u,m]=uf(l,e,a);return Pt(Ci(d,u,a,o,i,s,m,c))}function pf(t){return t.sign===-1?Ic(t):t}function Ic(t){return Pt(xt(t))}function xt(t){let e={};for(let n of Ee)e[n]=-1*t[n]||0;return e}function Qa(t,e=Ee){let n=0;for(let r of e){let a=Math.sign(t[r]);a&&(n&&n!==a&&P("Cannot mix duration signs"),n=a)}return n}function Tn(t){for(let n of Vx)ry(n,t[n]);let e=rn(t);return mf(Number(e/Jn)),t}function ry(t,e){return Tt(t,e,-4294967295,4294967295,1)}function mf(t){Number.isSafeInteger(t)||P("Out-of-bounds duration")}function rn(t){return BigInt(t.days)*Ce+Vr(t)}function Vr(t){return BigInt(t.hours)*Ex+BigInt(t.minutes)*kx+ff(t)}function ff(t){return BigInt(t.seconds)*Jn+BigInt(t.milliseconds)*Br+BigInt(t.microseconds)*wx+BigInt(t.nanoseconds)}function En(t,e=6){let n=Number(t/Ce),r=Number(t%Ce),a=bt[e],o=e<=3?Number(t/BigInt(a)):n*(Ft/a)+zr(r,a);Number.isFinite(o)||P(kn),e<=3&&Math.abs(o)/(Sn/bt[e])>=ny&&P(kn);let i=Tc(r,e,Ee);return i[Ee[e]]=o,i}function Pi(t,e=5){return Tc(t,e,Ee)}function Dc(t){return!!Qa(t,qm)}function Cn(t){let e=9;for(;e>0&&!t[Ee[e]];e--);return e}function eo(t,e){return ot(t.epochNanoseconds,e.epochNanoseconds)}function bf(t,e,n,r){let a=t(ft(r).relativeTo),o=Math.max(Cn(e),Cn(n));return pm(Ee,e,n)?0:ci(o,a&&Ja(a))?ot(rn(e),rn(n)):(a||P("Missing relativeTo"),ot(em(a,e),em(a,n)))}function Oc(t,e){return ir(t,e)||zi(t,e)}function ir(t,e){return tn(jt(t),jt(e))}function zi(t,e){return tn(st(t),st(e))}function gf(t,e){return!eo(t,e)}function vf(t,e){return!eo(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function xf(t,e){return!Oc(t,e)&&t.calendar===e.calendar}function yf(t,e){return!ir(t,e)&&t.calendar===e.calendar}function wf(t,e){return!ir(t,e)&&t.calendar===e.calendar}function kf(t,e){return!ir(t,e)&&t.calendar===e.calendar}function Ef(t,e){return!zi(t,e)}function to(t){return t===0?xx:t?t.k:void 0}function Ze(t,e,n=e){return to(t)?n:e}function Cf(t,e){let n=e||void 0,r=to(e),{era:a,eraYear:o,year:i}=t;if(i!==void 0&&(i=Ie(i,"year")),o!==void 0&&(o=Ie(o,"eraYear")),a!==void 0||o!==void 0){a!==void 0&&o!==void 0||he("Mismatching era/eraYear"),r||P("Forbidden era/eraYear");let s=gm(a),l=r[s];l===void 0&&P((d=>`Invalid era: ${d}`)(a));let c=n?._?n._(o,s,l):ay(o,l);i!==void 0&&i!==c&&P("Mismatching year/eraYear"),i=c}else i===void 0&&he(Wl(r));return i}function di(t,e,n,r,a){let{month:o,monthCode:i}=t;if(i!==void 0){let s=((l,c,d,u,m=xm(c))=>{let p=l?l.p(d):void 0,[f,b]=m,g=_l(f,b,p);if(b){let v=l?l.l:void 0;v===void 0&&P(Xn),v>0?(g>v&&P(Xn),p!==g&&(u===1&&P(Xn),g=_l(f,0,p))):(g!==-v&&P(Xn),p===void 0&&u===1&&P(Xn))}return g})(e,i,n,a,r);o!==void 0&&o!==s&&P("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&he("Missing month/monthCode");return Tt("month",o,1,Ta(e,n),a)}function jl(t,e,n,r,a){return Nl(t,"day",1,Ma(e,n,r),a)}function ay(t,e){return(e+t)*(Math.sign(e)||1)||0}function Hr(t,e){return vi(Ht(We,{...Ot,...t}),e)}var oy=Pr("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Bi(t){let e=Pc(t);return e===void 0&&P(um(t)),e}function Pc(t,e){let n=oy.exec(t);if(n&&(r=>(a=>{a[0]!=="T"&&a[0]!=="t"||(a=a.slice(1));let o=a.search(/[.,]/),i=o<0?a:a.slice(0,o),s=i.split(":");return s.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(i):(s.length===2||s.length===3)&&s.every(l=>l.length===2&&/^\d{2}$/i.test(l))})(r.slice(1)))(n[0]))return((r,a)=>{let o=r[4]||r[5];return a&&o&&P(en(o)),s=(Mr(r[2])*Ra+Mr(r[3])*La+Mr(r[4])*Sn+Xl(r[5]||""))*Jl(r[1]),Math.abs(s)>=Ft&&P("Out-of-bounds offset"),s;var s})(n,e)}var yt={era:Aa,month:ei,monthCode(t,e){return He(fc(t),e)},day:ei},zc=Pa(We,Ie),Af=Pa(Ee,Wa),Bc=Object.assign({},yt,zc),Lc={offset(t){return Bi(He(fc(t)))},...Bc};function Te(t,e,n,r,a=!r){let o={},i=0;for(let s of e){let l=t[s];if(l!==void 0){i=1;let c=n[s];c&&(l=c(l,s)),o[s]=l}else r&&r.includes(s)&&he(Da(s))}return a&&!i&&he(om(e)),o}function wt(t,e,n){let r=to(e);t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||he(Wl(r)),t.monthCode===void 0&&t.month===void 0&&he("Missing month/monthCode"),n||t.day!==void 0||he(Da("day"));let a=Sf(t);return[Cf(t,e),a]}function Li(t,e){let n=e===it,r=to(e);t.day===void 0&&he(Da("day")),n||t.month===void 0||t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||he(Wl(r));let a=Sf(t);return[t.eraYear!==void 0||t.year!==void 0?Cf(t,e):void 0,a]}function no(t,e=Ot,n){let r=Ae(t,e);return ar(r),qt(r,n)}function sn(t,e,n,r,a){let o=di(t,e,n,r,a);return ke(lt(rr(e,n,o,jl(t,e,n,o,a))),e)}function Ri(t,e,n,r,a){return iy(e,n,di(t,e,n,r,a))}function Ni(t,e,n,r,a){let o=e===it,i=n,s,l,c;if(i===void 0&&o&&(i=1972),i!==void 0){o||lt(rr(e,i,1,1));let d=di(t,e,i,r,a);s=jl(t,e,i,d,a),[l,c]=Qn(e,i,d)}else{t.monthCode===void 0&&he("Missing month/monthCode"),[l,c]=r;let d=e?e.re:1972;if(d!==void 0)s=jl(t,e,d,di(t,e,d,r,a),a);else{let u=a===0&&e?e.ge?.(l,c,t.day):void 0;s=u!==void 0?u:t.day}}return sy(e,l,c,s,t.day,a)}function iy(t,e,n){return ke(Ei(rr(t,e,n,1)),t)}function sy(t,e,n,r,a,o){let i=n;i&&((t&&t.V?.[e])??1/0)<a&&(o===1&&P(Xn),i=0,r=$l(a,1,(t&&t.U)??1/0));let s=t?t.u(e,!!i,r):Vl(e,!!i);for(;!s&&o===0&&r>1;)r--,s=t?t.u(e,!!i,r):Vl(e,!!i);s||P("Cannot guess year");let{year:l,month:c}=s;return ke(lt(rr(t,l,c,r)),t)}function Sf(t){if(t.monthCode!==void 0)return xm(t.monthCode)}var Ut=Intl.DateTimeFormat;function ly(t,e){e<-864e13&&P(kn);let n=t.formatToParts(e),r={};for(let a of n)r[a.type]=a.value;return r}var cy={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},Ll=-388152e4;function Rc(t,e,n){let[r,a,o,i]=Vp(n),s=r!==void 0;return((l,c,d,u,m,p)=>{d=Mi(d,BigInt(m),u);let f=c.B(d);return qc(qa(d+BigInt(f)),p)+(l?ro(si(f)):"Z")})(s,Xe(s?t(r):"UTC"),e.epochNanoseconds,a,o,i)}function Nc(t,e){let n=Fp(e);return((r,a,o,i,s,l,c,d,u,m)=>{i=Mi(i,BigInt(u),d);let p=o.B(i);return qc(qa(i+BigInt(p)),m)+ro(si(p),c)+hy(a,l)+Uc(r,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function _c(t,e){let n=_p(e);return((r,a,o,i,s,l)=>qc(Ai(a,s,i),l)+Uc(r,o))(t.calendar,t,...n)}function Fc(t,e){return n=t.calendar,r=t,a=ri(e),ui(r)+Uc(n,a);var n,r,a}function Vc(t,e){return Tf(t.calendar,Mf,t,ri(e))}function Hc(t,e){return Tf(t.calendar,uy,t,ri(e))}function Tf(t,e,n,r){let a=r>1||r===0&&t!==it;return r===1?t===it?e(n):ui(n):a?ui(n)+Df(Dt(t),r===2):e(n)}function jc(t,e){return((n,r,a,o)=>If(Si(n,a,r)[0],o))(t,...Il(e))}function _i(t,e){let[n,r,a]=Il(e,3);return r>1&&Tn(t={...t,...Yx(t,r,n)}),dy(t,a)}function dy(t,e){let{sign:n}=t,r=n===-1?xt(t):t,{hours:a,minutes:o}=r,i=ff(r),s=Number(i/Jn),l=Number(i%Jn);mf(s);let c=Yc(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+tm({Y:Kn(r.years),M:Kn(r.months),W:Kn(r.weeks),D:Kn(r.days)})+(a||o||s||d?"T"+tm({H:Kn(a),M:Kn(o),S:Kn(s,d)+c}):"")}function tm(t){let e=[];for(let n in t){let r=t[n];r&&e.push(r,n)}return e.join("")}function Kn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function qc(t,e){return ui(t)+"T"+If(t,e)}function ui(t){return Mf(t)+"-"+Mt(t.day)}function Mf(t){let{year:e}=t;return(e<0||e>9999?Of(e)+ii(6,Math.abs(e)):ii(4,e))+"-"+Mt(t.month)}function uy(t){return Mt(t.month)+"-"+Mt(t.day)}function If(t,e){let n=[Mt(t.hour),Mt(t.minute)];return e!==-1&&n.push(Mt(t.second)+((r,a,o,i)=>Yc(r*Ba+a*za+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function ro(t,e=0){if(e===1)return"";let[n,r]=Vt(Math.abs(t),Ra),[a,o]=Vt(r,La),[i,s]=Vt(o,Sn);return Of(t)+Mt(n)+":"+Mt(a)+(i||s?":"+Mt(i)+Yc(s):"")}function hy(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Uc(t,e){return e>1||e===0&&t!==it?Df(Dt(t),e===2):""}function Df(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var py=/0+$/;function Yc(t,e){let n=ii(9,t);return n=e===void 0?n.replace(py,""):n.slice(0,e),n?"."+n:""}function Of(t){return t<0?"-":"+"}var my=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,fy=/[^\w\/:+-]+/;function Pf(t){return Fi(He(t))}function Fi(t){return zf(t).id}function zf(t){let e=t.toUpperCase(),n=(a=>{let o=Pc(a,1);if(o!==void 0)return{id:ro(o),Z:o,m:o}})(e);if(n)return{kind:"fixed",...n};let r=e==="UTC"?"UTC":(a=>(fy.test(a)&&P(Zl(a)),my.test(a)&&P("Forbidden ICU TimeZone"),a.toLowerCase().split("/").map((o,i)=>(o.length<=3||/\d/.test(o))&&!/etc|yap/.test(o)?o.toUpperCase():o.replace(/baja|dumont|[a-z]+/g,(s,l)=>s.length<=2&&!i||s==="in"||s==="chat"?s.toUpperCase():s.length>2||!l?Kp(s).replace(/island|noronha|murdo|rivadavia|urville/,Kp):s)).join("/")))(t);return by(r)}var by=Ir(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=gy(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),gy=Ir(t=>new Ut("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Xe(t){let e=zf(t);return vy(e.id,e)}var vy=Ir((t,e)=>e.kind==="named"?new Ul(t,e.m,e.format):new ql(t,e.m,e.kind==="fixed"?e.Z:0)),ql=class{constructor(e,n,r){this.id=e,this.m=n,this.Z=r}B(){return this.Z}R(e){return[vc(e,this.Z)]}C(){}},Ul=class{constructor(e,n,r){this.id=e,this.m=n,this.oe=((a,o)=>{let i=Ir(a),s=Ir(xy),l=86400*o;function c(u){let[m,p]=rm(u,l),f=oi(m),b=oi(p),g=i(f),v=i(b);return g===v?g:d(s(f,b),g,v,u)}function d(u,m,p,f){let b,g;for(;(f===void 0||(b=f<u[0]?m:f>=u[1]?p:void 0)===void 0)&&(g=u[1]-u[0]);){let v=u[0]+Math.floor(g/2);a(v)===p?u[1]=v:u[0]=v+1}return b}return{Ae(u){let m=c(u-86400),p=c(u+86400),f=u-m,b=u-p;if(m===p)return[f];let g=c(f);return g===c(b)?[u-g]:m>p?[f,b]:[]},ze:c,C:function u(m,p){if(p>0&&m>=864e10)return;if(p<0){if(m<=Ll)return;let I=nm()+94867200;if(m>I)return u(I,-1)}let f=p>0?Math.max(m,Ll):m,[b,g]=rm(f,l),v=l*p,x=p>0?Math.max(m,nm())+94867200:Ll,w=()=>p<0?g>x:b<x;for(;w();){let I=oi(b),C=oi(g),B=i(I),L=i(C);if(B!==L){let D=s(I,C);d(D,B,L);let T=D[0];if((tn(T,m)||1)===p)return T}b+=v,g+=v}}}})((a=>o=>{let i=ly(a,1e3*o);return 86400*Sa((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&gm(s.era)==="bce"?1-c:c})(i),parseInt(i.month),parseInt(i.day))+3600*parseInt(i.hour)+60*parseInt(i.minute)+parseInt(i.second)-o})(r),(a=>{let o=a.split("/").pop();return cy[o]||60})(e))}B(e){return this.oe.ze((n=>Xp(n)[0])(e))*Sn}R(e){let n=86400*jt(e)+oc(e),r=Dm(e);return this.oe.Ae(n).map(a=>zt(BigInt(a)*Jn+BigInt(r)))}C(e,n){let[r,a]=Xp(e),o=this.oe.C(r+(n>0||a?1:0),n);if(o!==void 0)return BigInt(o)*Jn}};function nm(){return Math.floor(Date.now()/1e3)}function xy(t,e){return[t,e]}function rm(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function oi(t){return $l(t,-1e10,864e10)}function Bf(t,e,n){let r=Te(n,Ze(e,Mm,Im),Lc,[],0),a=r.timeZone!==void 0,[o,i]=wt(r,e),s=sn(r,e,o,i,0);if(a){let l=Hr(r),c=Xe(t(r.timeZone));return{epochNanoseconds:Nr(c,Ae(s,l),r.offset),timeZone:c,calendar:e}}return s}function Lf(t,e,n,r){let a=Te(n,Ze(e,Mm,Im),Lc,rc,0),o=t(a.timeZone),[i,s]=wt(a,e),[l,c,d]=wn(r),u=sn(a,e,i,s,l),m=Hr(a,l),p=Xe(o);return vt(Nr(p,Ae(u,m),a.offset,c,d),p,e)}function Rf(t,e,n){let r=Te(e,Ze(t,Sm,Tm),Bc,[],0),[a,o]=wt(r,t),i=Z(n);return no(sn(r,t,a,o,i),Hr(r,i),t)}function Nf(t,e,n,r=[]){let a=Te(e,Ze(t,tr,nr),yt,r),[o,i]=wt(a,t);return sn(a,t,o,i,Z(n))}function _f(t,e,n,r){let a=Te(e,Ze(t,_a,Em),yt,r),[o,i]=wt(a,t,1);return Ri(a,t,o,i,Z(n))}function Ff(t,e,n,r){let a=Te(n,Ze(t,tr,nr),yt,er,0);e&&a.month!==void 0&&a.monthCode===void 0&&a.year===void 0&&(a.year=1972);let[o,i]=Li(a,t);return Ni(a,t,o,i,Z(r))}function Vf(t,e){return Hr(Te(t,Fl,zc,[],1),Z(e))}function Hf(t){let e=Te(t,jm,Af);return Pt(Tn({...ze,...e}))}function It(t){P(um(t))}function jf(t){let e=Mn(t=He(fc(t))),n;return e||It(t),e.F?n=0:e.offset?n=Bi(e.offset):It(t),e.timeZoneId&&Pc(e.timeZoneId,1),Ua(e),gt(vc(e,n))}function qf(t,e){let n=Mn(He(t));return n||It(t),n.timeZoneId?Qf(n,e,void 0):(n.F&&It(t),Yl(n,e))}function Uf(t,e,n){let r=Mn(He(t));return r&&r.timeZoneId||It(t),Qf(r,e,n)}function Yf(t,e){let n=Mn(He(t));return n&&!n.F||It(t),eb(n,e)}function Wf(t,e){let n=$c(Zc(He(t)),void 0,e);return ke(n,n.calendar)}function Zf(t,e){let n=Gc(He(t));if(n)return Wc(n),ke(Ei(an(n)),e(n.calendarId));let r=$c(Zc(t),yy,e),{calendar:a}=r;return ke(Ia(a,r),a)}function Wc(t){t.calendarId!=="iso8601"&&P(en(t.calendarId))}function $f(t,e){let n=Kc(He(t));if(n)return Wc(n),ke(an(n),e(n.calendarId));let r=$c(Zc(t),wy,e),{calendar:a}=r,{year:o,month:i,day:s}=we(a,r),[l,c]=Qn(a,o,i),{year:d,month:u}=((m,p,f,b)=>{let g=m?m.u(p,f,b):Vl(p,f);return g||P("Cannot guess year"),g})(a,l,c,s);return ke(lt(rr(a,d,u,s)),a)}function Gf(t){let e=(r=>{let a=tb(r);return a?(ao(a[13]),nb(a,1)):void 0})(t=He(t));if(!e){let r=Mn(t);r&&r.te||It(t),r.F&&P(en("Z")),Wc(r),e=r}let n;return(n=Gc(t))&&Jp(n)&&It(t),(n=Kc(t))&&Jp(n)&&It(t),or(Va(e))}function Kf(t){let e=My.exec(He(t));return e||It(t),Pt(Tn((n=>{let r=0,a=0,o=0,i={years:s(n[2]),months:s(n[3]),weeks:s(n[4]),days:s(n[5]),hours:s(n[6],n[7],5),minutes:s(n[8],n[9],4),seconds:s(n[10],n[11],3),...Tc(o,2,Ee)};return r||P(om(Ee)),Jl(n[1])<0&&(i=xt(i)),i;function s(l,c,d){let u=0,m=0;return d&&([u,o]=Vt(o,bt[d])),l!==void 0&&(a&&P(en(l)),m=(p=>{let f=parseInt(p);return Number.isFinite(f)||P(en(p)),f})(l),r=1,c&&(o=Xl(c)*(bt[d]/Sn),a=1)),u+m}})(e)))}function Xf(t){let e=Mn(t)||Gc(t)||Kc(t);if(e)return e.calendarId;let n=tb(t);return n?ao(n[13]).calendarId:t}function Jf(t){let e=Mn(t);return e&&(e.timeZoneId||e.F&&"UTC"||e.offset)||t}function Zc(t){let e=Mn(t);return e&&!e.F||It(t),e}function $c(t,e,n){return e&&t.calendarId==="iso8601"?(an(t),t.te&&Va(t),Yl(e(t),n)):t.te?eb(t,n):Yl(t,n)}function yy(t){let e=12*t.year+t.month===Ym?20:1;return{...t,day:e}}function wy(t){return{...t,year:1972}}function Qf(t,e,n){let r=Xe(Fi(t.timeZoneId)),a;if(Ua(t),t.te){let i=t.offset?Bi(t.offset):void 0,[,s,l]=wn(n);a=Nr(r,t,i,s,l,!(r.Z||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.F)}else wn(n),a=Or(r,t);var o;return zt(a),vt(a,r,e(t.calendarId))}function eb(t,e){return Ua(t),ar(t),{...Ae(t,t),calendar:e(t.calendarId)}}function Yl(t,e){return an(t),lt(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function hi(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var ky="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+hi(8)+"(Z|([+-])"+hi(15)+")?)?",Ey=Pr("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Cy=Pr("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Ay=Pr(ky+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),Sy=Pr("T?"+hi(2)+`(([+-])${hi(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),Ty=new RegExp("\\[(!?)([^\\]]*)\\]","g"),My=Pr("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?!$)(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");function Mn(t){let e=Ay.exec(t);return e?(n=>{let r=n[12],a=(r||"").toUpperCase()==="Z";return{year:rb(n),month:parseInt(n[5]),day:parseInt(n[6]),...nb(n,7),...ao(n[19]),te:!!n[7],F:a,offset:a?void 0:r}})(e):void 0}function Gc(t){let e=Ey.exec(t);if(e)return(n=>({year:rb(n),month:parseInt(n[4]),day:1,...ao(n[5])}))(e)}function Kc(t){let e=Cy.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...ao(n[3])}))(e):void 0}function tb(t){let e=Sy.exec(t);if(e)return e[6]&&Bi(e[6]),e}function nb(t,e){let n=Mr(t[e+3]);return{...ic(Xl(t[e+4]||""))[0],hour:Mr(t[e]),minute:Mr(t[e+2]),second:n===60?59:n}}function rb(t){let e=Jl(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&P(en(-0)),e*n}function ao(t){let e,n,r=[];return t.replace(Ty,(a,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(r.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&P(en(a)):(n&&P(en(a)),n=l),""}),r.length>1&&e&&P(en(t)),{timeZoneId:n,calendarId:r[0]||"iso8601"}}function jr(t,e,n){let r=Object.assign(Object.create(null),e);return Rl(r,n,km),to(t)&&(Rl(r,n,Cx),t&&t.je&&Rl(r,n,Ax,Lr)),r}function Rl(t,e,n,r){let a=0,o=[];for(let i of n)e[i]!==void 0?a=1:o.push(i);if(Object.assign(t,e),a)for(let i of r||o)delete t[i]}function ab(t,e,n){let r=Ze(t,Tx,Mx),a=Be(e),{year:o,month:i,day:s}=we(t,a),l={year:o,monthCode:oo(t,o,i),day:s,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},c=Te(n,r,Lc),d=jr(t,l,c);return[{...l,...c},d]}function ob(t,e,n){let r=Ze(t,Sm,Tm),{year:a,month:o,day:i}=we(t,e),s={year:a,monthCode:oo(t,a,o),day:i,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},l=Te(n,r,Bc),c=jr(t,s,l);return[{...s,...l},c]}function ib(t,e,n){let r=Ze(t,tr,nr),{year:a,month:o,day:i}=we(t,e);return jr(t,{year:a,monthCode:oo(t,a,o),day:i},Te(n,r,yt))}function sb(t,e,n){let r=Ze(t,_a,Em),{year:a,month:o}=we(t,e);return jr(t,{year:a,monthCode:oo(t,a,o)},Te(n,r,yt))}function lb(t,e,n){let r=Ze(t,tr,nr),{year:a,month:o,day:i}=we(t,e);return jr(t,{monthCode:oo(t,a,o),day:i},Te(n,r,yt))}function cb(t,e,n,r,a,o,i,s){let{calendar:l,timeZone:c}=t;return vt(Nr(c,Ae(sn(n,l,r,a,o),vi(e,o)),e.offset,i,s),c,l)}function db(t,e,n,r,a,o){return no(sn(e,n,r,a,o),vi(t,o),n)}function ub(t,e){return{...Ht(Fl,t),...Te(e,Fl,zc)}}function hb(t,e){return Pt((n=t,r=e,Tn({...n,...Te(r,jm,Af)})));var n,r}function oo(t,e,n){let[r,a]=Qn(t,e,n);return ym(r,a)}function pb(t,e,n){let[r,a]=Lp(n,t),o=Cn(e),i=Math.max(r,o),s=a&&Ja(a);if(!a&&ci(i,s))return am(e,r);if(a||P("Missing relativeTo"),!e.sign&&(!s||r<6))return 0;let[l,c,d]=uf(a,e,r);return ci(r,s)?am(l,r):((u,m,p,f)=>{let b=Ee[p],g=pc(p,u);return qx(u[b],Qa(u)||1,m,v=>(g[b]=v,Oi(f,g)))})(l,c,r,d)}function am(t,e){return wm(rn(t),bt[e])}function mb(t,e,n){return vt(t.epochNanoseconds,e,n)}function fb(t){return gt(t.epochNanoseconds)}function Xc(t){return qt(Be(t),t.calendar)}function Jc(t){return ke(Be(t),t.calendar)}function Qc(t){return or(Be(t))}function bb(t,e,n){return vt(zt(_r(e,t,n)),e,t.calendar)}function gb(t,e,n){let r;return r=n?_r(e,Ae(t,n)):Or(e,Ae(t,Ot)),vt(r,e,t.calendar)}function vb(t,e,n){return kb(t,Ht(Ze(t,Fa,Cm),e),Te(xn(n),er,yt,[]))}function xb(t,e,n){let r=Ze(t,bi,Sx);return kb(t,Ht(Am,e),Te(xn(n),r,yt,[]))}function yb(t,e){let n=Te(e,Am,yt),[r,a]=Li(n,t);return Ni(n,t,r,a,0)}function wb(t,e){let n=Te(e,Ze(t,Fa,Cm),yt),[r,a]=wt(n,t,1);return Ri(n,t,r,a,0)}function kb(t,e,n){let r=Ze(t,Ix,Dx),a=jr(t,e,n);a=Te(a,r,yt,[]);let[o,i]=wt(a,t);return sn(a,t,o,i,0)}function Eb(t){return gt(zt(BigInt(Wa(t))*Br))}function Cb(t){return gt(zt(ki(t)))}function qr(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function Ab(t,e){return t.timeZone!==void 0&&he("Cannot specify TimeZone"),t.timeZone=e,t}function Ur(t,e,n){let r=t.resolvedOptions().calendar;!n&&e.calendar===it||Dt(e.calendar)===r||P("Mismatching Calendars")}function sr(t,e,n,r,a){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,m={},p={},f={},b=0,g=0;for(let T of Object.keys(l)){let N=l[T];N===void 0||s.has(T)||(o.has(T)?T==="dateStyle"?d=N:T==="timeStyle"?u=N:m[T]=N:T==="era"?p[T]=N:i.has(T)?T==="dateStyle"||T==="timeStyle"?g=1:b=1:f[T]=N)}let v=d!==void 0,x=u!==void 0,w=v||x,I=Object.keys(m).length>0,C=b||g,B=I||v||x,L=Object.keys(p).length>0;(!c&&C||c&&C&&!B||w&&(I||L||b))&&he("Invalid formatting options");let D={};return w||B||Object.assign(D,r),Object.assign(D,m,p,f),v&&(a?Object.assign(D,a[d]):D.dateStyle=d),x&&(D.timeStyle=u),D}}var Sb={year:"numeric",month:"numeric",day:"numeric"},Tb={hour:"numeric",minute:"numeric",second:"numeric"},ed=Object.assign({},Sb,Tb),td=["weekday","year","month","day","dateStyle"],io=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],nd=td.concat(io),Iy=["weekday","day"].concat(io),Dy=["weekday","year"].concat(io),Mb=sr(nd,[],[],ed),Ib=sr(nd,[],[],{...ed,timeZoneName:"short"}),Db=sr(nd,[],["timeZoneName"],ed),Ob=sr(td,io,["timeZoneName"],Sb),Pb=sr(io,td,["timeZoneName","era"],Tb),zb=sr(["year","month","dateStyle"],Iy,["timeZoneName"],{year:"numeric",month:"numeric"},{full:{year:"numeric",month:"long"},long:{year:"numeric",month:"long"},medium:{year:"numeric",month:"short"},short:{year:"2-digit",month:"numeric"}}),Bb=sr(["month","day","dateStyle"],Dy,["timeZoneName","era"],{month:"numeric",day:"numeric"},{full:{month:"long",day:"numeric"},long:{month:"long",day:"numeric"},medium:{month:"short",day:"numeric"},short:{month:"numeric",day:"numeric"}});function Lb(t,e){let{timeZone:n}=t,r=Be(t),{offsetNanoseconds:a}=r,o=e||Ot,i;return i=e?Nr(n,Ae(r,o),a,2):Or(n,Ae(r,o)),vt(i,n,t.calendar)}function Vi(t){let e=Hi(),n=t.B(e);return qa(e+BigInt(n))}function Hi(){return BigInt(Date.now())*Br}function Yr(){return new Ut().resolvedOptions().timeZone}var rd="PlainYearMonth",ad="PlainMonthDay",od="PlainDate",id="PlainDateTime",sd="PlainTime",ld="ZonedDateTime",cd="Instant",dd="Duration";function ln(t,e,n,...r){return Object.defineProperties(e,hm(t)),Object.defineProperties(e.prototype,Oa("Temporal."+t)),Object.defineProperties(e.prototype,An(a=>({get(){return a(n(this))},configurable:1}),Object.assign({},...r))),e}var cn=Kl.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:Kl;function dn(){he(lm)}function un(){he(sm)}var Rb={era(t){return Ya(t.calendar,t).era},eraYear(t){return Ya(t.calendar,t).eraYear},year(t){return we(t.calendar,t).year},month(t){return we(t.calendar,t).month},monthCode(t){return wi(t.calendar,t)}},ji={era(t){return Ya(t.calendar,t).era},eraYear(t){return Ya(t.calendar,t).eraYear},year(t){return we(t.calendar,t).year},month(t){return we(t.calendar,t).month},monthCode(t){return wi(t.calendar,t)},day(t){return we(t.calendar,t).day}},Nb={monthCode(t){return wi(t.calendar,t)},day(t){return we(t.calendar,t).day}},_b={daysInMonth(t){return cc(t.calendar,t)},daysInYear(t){return dc(t.calendar,t)},monthsInYear(t){return lc(t.calendar,t)},inLeapYear(t){return sc(t.calendar,t)}},qi={dayOfWeek(t){return yi(t)},dayOfYear(t){return Fm(t.calendar,t)},weekOfYear(t){return Vm(t.calendar,t)},yearOfWeek(t){return Hm(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return cc(t.calendar,t)},daysInYear(t){return dc(t.calendar,t)},monthsInYear(t){return lc(t.calendar,t)},inLeapYear(t){return sc(t.calendar,t)}};function ud(t,e,n,r){let[a,o,i,s]=Gn(t,r,3,5);return Wr(t,Xa(e.epochNanoseconds,n.epochNanoseconds,a,o,i,s))}function hd(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,5);return Wr(t,nf(a,e,n,o,i,s,l))}function pd(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,6);return Wr(t,rf(a,e,n,o,i,s,l))}function md(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,6,9,6);return Wr(t,of(a,e,n,o,i,s,l))}function fd(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,9,9,8);return Wr(t,af(a,e,n,o,i,s,l))}function bd(t,e,n,r){let[a,o,i,s]=Gn(t,r,5,5);return Wr(t,sf(e,n,a,o,i,s))}function Wr(t,e){return Pt(t?xt(e):e)}function Fb(t,e,n){let{calendar:r}=t,a=ib(r,t,e),[o,i]=wt(a,r),s=Z(n);return sn(a,r,o,i,s)}function Vb(t,e,n){let{calendar:r}=t,[a,o]=ob(r,t,e),[i,s]=wt(o,r),l=Z(n);return db(a,o,r,i,s,l)}function Hb(t,e,n){let{calendar:r}=t,a=sb(r,t,e),[o,i]=wt(a,r,1),s=Z(n);return Ri(a,r,o,i,s)}function jb(t,e,n){let{calendar:r}=t,a=lb(r,t,e),[o,i]=Li(a,r),s=Z(n);return Ni(a,r,o,i,s)}function qb(t,e,n){let r=ub(t,e),a=Z(n);return Hr(r,a)}function Ub(t,e,n){let{calendar:r}=t,[a,o]=ab(r,t,e),[i,s]=wt(o,r),[l,c,d]=wn(n,2);return cb(t,a,o,i,s,l,c,d)}function Pn(t){let e=He(t).toLowerCase();return e===tc?it:e===bm?vm:void P(dm(t,"temporal-polyfill/full"))}function lo(t=tc){return Pn(t)}var Wb=new WeakMap,Zb=ln(ld,class{constructor(t,e,n=void 0){let r=zt(ki(t)),a=Xe(Pf(e)),o=lo(n);$b(this,vt(r,a,o))}static from(t,e=void 0){return Je(Zr(t,e))}static compare(t,e){return eo(Zr(t),Zr(e))}get calendarId(){return Dt(ce(this).calendar)}get timeZoneId(){return ce(this).timeZone.id}get epochMilliseconds(){return Ha(ce(this).epochNanoseconds)}get epochNanoseconds(){return ce(this).epochNanoseconds}get offset(){return ro(Be(ce(this)).offsetNanoseconds)}get offsetNanoseconds(){return Be(ce(this)).offsetNanoseconds}get hoursInDay(){return Gm(ce(this))}with(t,e=void 0){return Je(Ub(ce(this),Jr(t),e))}withCalendar(t){return Je({...ce(this),calendar:Wi(t)})}withTimeZone(t){return Je({...ce(this),timeZone:Xe(Ct(t))})}withPlainTime(t=void 0){return Je(Lb(ce(this),wd(t)))}add(t,e=void 0){let n=ce(this);return Je($a(n,_e(t),Z(e)))}subtract(t,e=void 0){let n=ce(this);return Je($a(n,xt(_e(t)),Z(e)))}until(t,e=void 0){let n=ce(this),r=Zr(t);return De(hd(0,n,r,e))}since(t,e=void 0){let n=ce(this),r=Zr(t);return De(hd(1,n,r,e))}round(t){let e=ce(this),[n,r,a]=Ea(t);return Je($m(e,n,r,a))}startOfDay(){return Je(Km(ce(this)))}equals(t){return vf(ce(this),Zr(t))}toInstant(){return hn(fb(ce(this)))}toPlainDateTime(){return Yt(Xc(ce(this)))}toPlainDate(){return Wt(Jc(ce(this)))}toPlainTime(){return On(Qc(ce(this)))}toLocaleString(t=void 0,e={}){let n=ce(this),r=new Ut(t,Ab(Ib(e),tf(n)));return Ur(r,n),r.format(Ha(n.epochNanoseconds))}toString(t=void 0){return Nc(ce(this),t)}toJSON(){return Nc(ce(this))}getTimeZoneTransition(t){let e=ce(this),n=e.timeZone.C(e.epochNanoseconds,Hp(t));return n!==void 0?Je({...e,epochNanoseconds:n}):null}valueOf(){return un()}},Oy,ji,qi,Na);function Je(t){return $b(Object.create(Zb.prototype),t)}function ce(t){return Zt(t)||dn()}function Oy(t){let e=ce(t);return{...Be(e),calendar:e.calendar}}function Zt(t){return Wb.get(t)}function Zr(t,e){if(Ke(t)){let n=Zt(t);if(n)return wn(e),n;let r=co(t);return Lf(Ct,r,t,e)}return Uf(t,Pn,e)}function $b(t,e){return Wb.set(t,e),cn(t),t}function Ct(t){if(Ke(t)){let e=Zt(t);return e||he(Zl(t)),e.timeZone.id}return(e=>Fi(Jf(He(e))))(t)}var Gb=new WeakMap,Kb=ln(cd,class{constructor(t){let e=zt(ki(t));Jb(this,gt(e))}static from(t){return hn($r(t))}static fromEpochMilliseconds(t){return hn(Eb(t))}static fromEpochNanoseconds(t){return hn(Cb(t))}static compare(t,e){return eo($r(t),$r(e))}get epochMilliseconds(){return Ha(kt(this).epochNanoseconds)}get epochNanoseconds(){return kt(this).epochNanoseconds}add(t){let e=kt(this);return hn(gt(kc(e.epochNanoseconds,_e(t))))}subtract(t){let e=kt(this);return hn(gt(kc(e.epochNanoseconds,xt(_e(t)))))}until(t,e=void 0){return De(ud(0,kt(this),$r(t),e))}since(t,e=void 0){return De(ud(1,kt(this),$r(t),e))}round(t){let e=kt(this),[n,r,a]=Ea(t,5,1);return hn(gt(Mi(e.epochNanoseconds,Za(n,r),a)))}equals(t){return gf(kt(this),$r(t))}toZonedDateTimeISO(t){return Je(mb(kt(this),Xe(Ct(t))))}toLocaleString(t=void 0,e={}){let n=kt(this);return new Ut(t,Mb(e)).format(Ha(n.epochNanoseconds))}toString(t=void 0){return Rc(Ct,kt(this),t)}toJSON(){return Rc(Ct,kt(this))}valueOf(){return un()}});function hn(t){return Jb(Object.create(Kb.prototype),t)}function kt(t){return xd(t)||dn()}function xd(t){return Gb.get(t)}function $r(t){if(Ke(t)){let e=xd(t);if(e)return e;let n=Zt(t);if(n)return gt(n.epochNanoseconds)}return jf(t)}var{toTemporalInstant:Xb}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return hn(gt(BigInt(mc(t))*Br))}};function Jb(t,e){return Gb.set(t,e),cn(t),t}var Qb=new WeakMap,eg=ln(ad,class{constructor(t,e,n=void 0,r){let a=Ie(t),o=Ie(e),i=lo(n),s=Ie(r??Bm),l=lt(an({year:s,month:a,day:o}));tg(this,ke(l,i))}static from(t,e=void 0){return vd(Yb(t,e))}get calendarId(){return Dt(In(this).calendar)}with(t,e=void 0){return vd(jb(In(this),Jr(t),e))}equals(t){return kf(In(this),Yb(t))}toPlainDate(t){let e=In(this);return Wt(xb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=In(this),r=new Ut(t,qr(Bb(e)));return Ur(r,n,1),r.format(ja(n))}toString(t=void 0){return Hc(In(this),t)}toJSON(){return Hc(In(this))}valueOf(){return un()}},In,Nb);function vd(t){return tg(Object.create(eg.prototype),t)}function In(t){return Ui(t)||dn()}function Ui(t){return Qb.get(t)}function Yb(t,e){if(Ke(t)){let r=Ui(t);if(r)return Z(e),r;let a=mg(t);return Ff(a===void 0?it:a,a===void 0,t,e)}let n=$f(t,Pn);return Z(e),n}function tg(t,e){return Qb.set(t,e),cn(t),t}var ng=new WeakMap,rg=ln(rd,class{constructor(t,e,n=void 0,r){let a=Ie(t),o=Ie(e),i=lo(n),s=Ie(r??1),l=Ei(an({year:a,month:o,day:s}));ag(this,ke(l,i))}static from(t,e=void 0){return so(Gr(t,e))}static compare(t,e){return ir(Gr(t),Gr(e))}get calendarId(){return Dt(Et(this).calendar)}with(t,e=void 0){return so(Hb(Et(this),Jr(t),e))}add(t,e=void 0){let n=Et(this);return so(ke(wc(n.calendar,n,_e(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=Et(this);return so(ke(wc(n.calendar,n,xt(_e(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=Et(this),r=Gr(t);return De(fd(0,n,r,e))}since(t,e=void 0){let n=Et(this),r=Gr(t);return De(fd(1,n,r,e))}equals(t){return wf(Et(this),Gr(t))}toPlainDate(t){let e=Et(this);return Wt(vb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=Et(this),r=new Ut(t,qr(zb(e)));return Ur(r,n,1),r.format(ja(n))}toString(t=void 0){return Vc(Et(this),t)}toJSON(){return Vc(Et(this))}valueOf(){return un()}},Et,Rb,_b);function so(t){return ag(Object.create(rg.prototype),t)}function Et(t){return Yi(t)||dn()}function Yi(t){return ng.get(t)}function Gr(t,e){if(Ke(t)){let r=Yi(t);if(r)return Z(e),r;let a=co(t);return _f(a,t,e)}let n=Zf(t,Pn);return Z(e),n}function ag(t,e){return ng.set(t,e),cn(t),t}function Py(t){if(!Ke(t))return;let e=xd(t);return e?[cd,e]:(e=Zt(t),e?[ld,e]:(e=lr(t),e?[id,e]:(e=Qr(t),e?[od,e]:(e=yd(t),e?[sd,e]:(e=Yi(t),e?[rd,e]:(e=Ui(t),e?[ad,e]:(e=kd(t),e?[dd,e]:void 0)))))))}function Jr(t){return(Py(t)||t.calendar!==void 0||t.timeZone!==void 0)&&he(im),t}var og=new WeakMap,ig=ln(sd,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0){let i=Va(An(Ie,{hour:t,minute:e,second:n,millisecond:r,microsecond:a,nanosecond:o}));sg(this,or(i))}static from(t,e=void 0){return On(Dn(t,e))}static compare(t,e){return zi(Dn(t),Dn(e))}with(t,e=void 0){return On(qb(Bt(this),Jr(t),e))}add(t){let e=Bt(this);return On(Ii(e,_e(t))[0])}subtract(t){let e=Bt(this);return On(Ii(e,xt(_e(t)))[0])}until(t,e=void 0){return De(bd(0,Bt(this),Dn(t),e))}since(t,e=void 0){return De(bd(1,Bt(this),Dn(t),e))}round(t){let e=Bt(this),[n,r,a]=Ea(t,5);return On(Si(e,Rr(n,r),a)[0])}equals(t){return Ef(Bt(this),Dn(t))}toLocaleString(t=void 0,e={}){let n=Bt(this);return new Ut(t,qr(Pb(e))).format(ac(n))}toString(t=void 0){return jc(Bt(this),t)}toJSON(){return jc(Bt(this))}valueOf(){return un()}},Bt,Na);function On(t){return sg(Object.create(ig.prototype),t)}function Bt(t){return yd(t)||dn()}function yd(t){return og.get(t)}function Dn(t,e){if(Ke(t)){let r=yd(t);if(r)return Z(e),r;let a=lr(t);if(a)return Z(e),or(a);let o=Zt(t);return o?(Z(e),Qc(o)):Vf(t,e)}let n=Gf(t);return Z(e),n}function wd(t){return t===void 0?void 0:Dn(t)}function sg(t,e){return og.set(t,e),cn(t),t}var lg=new WeakMap,cg=ln(id,class{constructor(t,e,n,r=0,a=0,o=0,i=0,s=0,l=0,c=void 0){let d=ar(Ua(An(Ie,{year:t,month:e,day:n,hour:r,minute:a,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=lo(c);dg(this,qt(d,u))}static from(t,e=void 0){return Yt(Kr(t,e))}static compare(t,e){let n=Kr(t),r=Kr(e);return Oc(n,r)}get calendarId(){return Dt(Ne(this).calendar)}with(t,e=void 0){return Yt(Vb(Ne(this),Jr(t),e))}withCalendar(t){let e=Ne(this);return Yt(qt(e,Wi(t)))}withPlainTime(t=void 0){let e=Ne(this);return Yt(no(e,wd(t),e.calendar))}add(t,e=void 0){let n=Ne(this);return Yt(qt(Ga(n.calendar,n,_e(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=Ne(this);return Yt(qt(Ga(n.calendar,n,xt(_e(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=Ne(this),r=Kr(t);return De(pd(0,n,r,e))}since(t,e=void 0){let n=Ne(this),r=Kr(t);return De(pd(1,n,r,e))}round(t){let e=Ne(this),[n,r,a]=Ea(t);return Yt(qt(Ai(e,Rr(n,r),a),e.calendar))}equals(t){return xf(Ne(this),Kr(t))}toZonedDateTime(t,e=void 0){return Je(bb(Ne(this),Xe(Ct(t)),Rp(e)))}toPlainDate(){let t=Ne(this);return Wt(ke(t,t.calendar))}toPlainTime(){return On(or(Ne(this)))}toLocaleString(t=void 0,e={}){let n=Ne(this),r=new Ut(t,qr(Db(e)));return Ur(r,n),r.format(Pm(n))}toString(t=void 0){return _c(Ne(this),t)}toJSON(){return _c(Ne(this))}valueOf(){return un()}},Ne,ji,qi,Na);function Yt(t){return dg(Object.create(cg.prototype),t)}function Ne(t){return lr(t)||dn()}function lr(t){return lg.get(t)}function Kr(t,e){if(Ke(t)){let r=lr(t);if(r)return Z(e),r;let a=Qr(t);if(a)return Z(e),qt(Ae(a,Ot),a.calendar);let o=Zt(t);if(o)return Z(e),Xc(o);let i=co(t);return Rf(i,t,e)}let n=Yf(t,Pn);return Z(e),n}function dg(t,e){return lg.set(t,e),cn(t),t}var ug=new WeakMap,hg=ln(od,class{constructor(t,e,n,r=void 0){let a=lt(an(An(Ie,{year:t,month:e,day:n}))),o=lo(r);pg(this,ke(a,o))}static from(t,e=void 0){return Wt(Xr(t,e))}static compare(t,e){return ir(Xr(t),Xr(e))}get calendarId(){return Dt(je(this).calendar)}with(t,e=void 0){return Wt(Fb(je(this),Jr(t),e))}withCalendar(t){let e=je(this);return Wt(ke(e,Wi(t)))}add(t,e=void 0){let n=je(this);return Wt(ke(on(n.calendar,n,_e(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=je(this);return Wt(ke(on(n.calendar,n,xt(_e(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=je(this),r=Xr(t);return De(md(0,n,r,e))}since(t,e=void 0){let n=je(this),r=Xr(t);return De(md(1,n,r,e))}equals(t){return yf(je(this),Xr(t))}toZonedDateTime(t){let e=Ke(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t},n=je(this),r=Ct(e.timeZone),a=e.plainTime,o=a!==void 0?Dn(a):void 0;return Je(gb(n,Xe(r),o))}toPlainDateTime(t=void 0){let e=je(this);return Yt(no(e,wd(t),e.calendar))}toPlainYearMonth(){let t=je(this);return so(wb(t.calendar,this))}toPlainMonthDay(){let t=je(this);return vd(yb(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=je(this),r=new Ut(t,qr(Ob(e)));return Ur(r,n),r.format(ja(n))}toString(t=void 0){return Fc(je(this),t)}toJSON(){return Fc(je(this))}valueOf(){return un()}},je,ji,qi);function Wt(t){return pg(Object.create(hg.prototype),t)}function je(t){return Qr(t)||dn()}function Qr(t){return ug.get(t)}function Xr(t,e){if(Ke(t)){let r=Qr(t);if(r)return Z(e),r;let a=lr(t);if(a)return Z(e),ke(a,a.calendar);let o=Zt(t);if(o)return Z(e),Jc(o);let i=co(t);return Nf(i,t,e)}let n=Wf(t,Pn);return Z(e),n}function pg(t,e){return ug.set(t,e),cn(t),t}function co(t){let e=mg(t);return e===void 0?it:e}function mg(t){let{calendar:e}=t;if(e!==void 0)return Wi(e)}function Wi(t){if(Ke(t)){let e=Qr(t)||lr(t)||Zt(t)||Ui(t)||Yi(t);return e||he(cm(t)),e.calendar}return(e=>Pn(Xf(He(e))))(t)}var fg=new WeakMap,bg=ln(dd,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0,i=0,s=0,l=0,c=0){let d=Tn(An(Wa,{years:t,months:e,weeks:n,days:r,hours:a,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));gg(this,Pt(d))}static from(t){return De(_e(t))}static compare(t,e,n=void 0){return bf(gd,_e(t),_e(e),n)}get sign(){return ct(this).sign}get blank(){return!ct(this).sign}with(t){return De(hb(ct(this),t))}negated(){return De(Ic(ct(this)))}abs(){return De(pf(ct(this)))}add(t){return De(Mc(0,ct(this),_e(t)))}subtract(t){return De(Mc(1,ct(this),_e(t)))}round(t){return De(hf(gd,ct(this),t))}total(t){return pb(gd,ct(this),t)}toLocaleString(t=void 0,e){let n=ct(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):_i(n,e)}toString(t=void 0){return _i(ct(this),t)}toJSON(){return _i(ct(this))}valueOf(){return un()}},ct,uc);function De(t){return gg(Object.create(bg.prototype),t)}function ct(t){return kd(t)||dn()}function kd(t){return fg.get(t)}function _e(t){return Ke(t)?kd(t)||Hf(t):Kf(t)}function gd(t){if(t!==void 0){if(Ke(t)){let e=Zt(t);if(e)return e;let n=Qr(t);if(n)return n;let r=lr(t);if(r)return ke(r,r.calendar);let a=co(t);return Bf(Ct,a,t)}return qf(t,Pn)}}function gg(t,e){return fg.set(t,e),cn(t),t}var zy=Object.defineProperties({},{...Oa("Temporal.Now"),...pi({timeZoneId(){return Yr()},instant(){return hn(gt(Hi()))},zonedDateTimeISO(t=Yr()){let e=Xe(Ct(t));return Je(vt(Hi(),e))},plainDateTimeISO(t=Yr()){let e=Vi(Xe(Ct(t)));return Yt(qt(e))},plainDateISO(t=Yr()){let e=Vi(Xe(Ct(t)));return Wt(ke(e))},plainTimeISO(t=Yr()){let e=Vi(Xe(Ct(t)));return On(or(e))}})}),vg=Object.defineProperties({},{...Oa("Temporal"),...pi({PlainYearMonth:rg,PlainMonthDay:eg,PlainDate:hg,PlainTime:ig,PlainDateTime:cg,ZonedDateTime:Zb,Instant:Kb,Duration:bg,Now:zy})});var Me=gl||vg;var L2=gl?Date.prototype.toTemporalInstant:Xb;var Zi=class extends z{static formAssociated=!0;static observedAttributes=["value","data-focus"];internals;selectedIso=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(e){console.warn("a-calendar: ElementInternals unavailable \u2014 form association disabled.",e)}this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown)}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.selectedIso=this.getAttribute("value")||this.getAttribute("defaultvalue")||null,this.applyFormValue(this.currentIso())}attributeChangedCallback(e,n,r){if(e==="value"){this.applyFormValue(r);return}e==="data-focus"&&this.focusCell(r)}get#e(){return this.hasAttribute("value")}currentIso(){return this.#e?this.getAttribute("value")||null:this.selectedIso}applyFormValue(e){this.internals?.setFormValue(e||null);try{e?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}catch{}}onClick=e=>{if(this.hasAttribute("disabled"))return;let n=e.target?.closest('[data-part="day-cell"]');if(!n||n.hasAttribute("disabled"))return;let r=n.dataset.date;r&&this.requestSelect(r)};requestSelect(e){let n=this.currentIso();if(e===n)return;let r=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!r||(this.selectedIso=e,this.applyFormValue(e),this.dispatchEvent(new Event("change",{bubbles:!0})))}get#t(){return Array.from(this.querySelectorAll('[data-part="day-cell"]'))}onKeydown=e=>{if(this.hasAttribute("disabled"))return;let n=e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.key==="PageUp"||e.key==="PageDown");if(Ye(e)&&!n)return;let r=this.#t;if(r.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??r.find(s=>s.tabIndex===0)??null;if(!a?.dataset.date)return;let o=null;switch(e.key){case"Home":case"End":{let s=r.indexOf(a);if(s<0)return;let l=s-s%7;o=r[e.key==="Home"?l:l+6]?.dataset.date??null;break}default:{let s=Me.PlainDate.from(a.dataset.date),l;switch(e.key){case"ArrowLeft":l=s.subtract({days:1});break;case"ArrowRight":l=s.add({days:1});break;case"ArrowUp":l=s.subtract({days:7});break;case"ArrowDown":l=s.add({days:7});break;case"PageUp":l=s.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":l=s.add({[e.shiftKey?"years":"months"]:1});break;default:return}o=l.toString()}}if(!o)return;e.preventDefault();let i=r.find(s=>s.dataset.date===o);i&&!i.hasAttribute("disabled")&&i.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:o}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,r){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:r}})),this.dispatchEvent(new Event("change",{bubbles:!0}))}get value(){return this.currentIso()??""}set value(e){this.selectedIso=e||null,this.applyFormValue(e||null)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){let e=this.getAttribute("defaultvalue")||null,n=this.currentIso();this.selectedIso=e,this.applyFormValue(e),this.emitState(e,n,"reset")}formStateRestoreCallback(e){let n=this.currentIso();this.selectedIso=e||null,this.applyFormValue(e||null),this.emitState(e||null,n,"restore")}};function xg(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Zi)}xg();var $i=class extends mr{ariaProp="ariaChecked";accessibilityObserver;connectedCallback(){super.connectedCallback(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0})}disconnectedCallback(){this.accessibilityObserver?.disconnect()}syncAccessibilityRelations(){this.applyAccessibilityRelations(Array.from(this.querySelectorAll(":scope > a-radio-label")),Array.from(this.querySelectorAll(":scope > a-radio-hint")))}};function yg(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",$i)}yg();var Gi=class extends z{static formAssociated=!0;static observedAttributes=["state","disabled"];internals;uncontrolledValue=null;seeded=!1;observer;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-RADIO"||a.querySelector?.("a-radio")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect()}attributeChangedCallback(e,n,r){this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}formResetCallback(){let e=this.getAttribute("default-state");this.emitStateChange(e,this.#e,"reset",!1),this.uncontrolledValue=e,this.sync()}formStateRestoreCallback(e){this.emitStateChange(e,this.#e,"restore",!1),this.uncontrolledValue=e,this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return Array.from(this.querySelectorAll("a-radio"))}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#n,r=n.find(o=>o.value===e&&e!=null)??null,a=r?r.value:null;this.internals?.setFormValue(a,a);for(let o of n)o.selected=o===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r)};requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,r,a){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:a,detail:{next:e,prev:n,reason:r}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-radio");!n||n.hasAttribute("disabled")||(n.focus(),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t||Ye(e))return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}let a=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function wg(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",Gi)}wg();var Lt=class extends z{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals?.states?.add("active"):this.internals?.states?.delete("active"),this.internals.ariaSelected=this.getAttribute("role")==="option"?e?"true":"false":null)}get active(){return this.internals?.states?.has("active")??!1}connectedCallback(){Ed(this.doc)}},Ki="a-menu-item, a[data-anta-menu-item]";function Xi(t){return t instanceof Lt||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function Ed(t){t.hasKeyListenerForAMenuItem||(Vo(t,{keys:["Enter"," "],resolve:e=>{let n=e;return n?.closest?.('input, textarea, select, a-input, a-input-time, [contenteditable]:not([contenteditable="false"])')?null:n?.closest?.(Ki)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function kg(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",Lt)}kg();var ee=4,Ji=96,By=130,Ly=130,Ry=500,Ny='a-button, a-input[button], button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',_y="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",Fy="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",j=[],es=!1,zn=null,Cd=null,Bn=null,Ad=0;function Sd(t){Bn=t.pointerType==="mouse"?t.clientX:null,Bn!==null&&(Ad=t.clientY)}function Vy(t){return Bn!==null&&Bn>=t.left&&Bn<t.right&&Ad>=t.top&&Ad<t.bottom}function Hy(t,e){es||(t.addEventListener("pointerdown",Tg,!0),t.addEventListener("pointermove",Sd,{capture:!0,passive:!0}),t.addEventListener("pointerleave",Ag),t.addEventListener("keydown",Dg,!0),t.addEventListener("keyup",Og,!0),t.addEventListener("contextmenu",Mg,!0),e.addEventListener("resize",Ig),zn=t,Cd=e,es=!0)}function Cg(){es&&(zn?.removeEventListener("pointerdown",Tg,!0),zn?.removeEventListener("pointermove",Sd,!0),zn?.removeEventListener("pointerleave",Ag),zn?.removeEventListener("keydown",Dg,!0),zn?.removeEventListener("keyup",Og,!0),zn?.removeEventListener("contextmenu",Mg,!0),Cd?.removeEventListener("resize",Ig),zn=null,Cd=null,es=!1,Bn=null)}function Ag(){Bn=null}function Sg(t,e=!1){let n=t.composedPath();for(let r=j.length-1;r>=0;r--){let a=j[r];if(n.includes(a.surface))return r;let o=a.triggerAnchor;if(o&&!(e&&a.hasAttribute("context"))&&n.includes(o))return r}return-1}function jy(t,e){for(let n of t.composedPath()){if(n===e)return!1;if(n instanceof HTMLDialogElement&&n.matches(":modal")||n instanceof HTMLElement&&n.matches(":popover-open"))return!0}return!1}function qy(t){for(let e of j)if(e.contains(t)||e.surface.contains(t))return!0;return!1}nu({isOpen:()=>j.length>0,contains:qy});function Tg(t){if(Sd(t),!j.length)return;let e=Sg(t,t.button===0);j[e+1]?.requestClose(t)}function Mg(t){j.length&&Sg(t)===-1&&Pg(t)}function Ig(){j.length&&Pg()}function Dg(t){let e=j[j.length-1];e&&e.handleKey(t)}function Og(t){let e=j[j.length-1];e&&e.handleKeyUp(t)}function Pg(t){j[0]?.requestClose(t)}function Uy(){for(let t=j.length-1;t>=0;t--){let e=j[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}j.length=0,Cg()}var Qi=new WeakMap;function Yy(t){for(let e of t){let n=Qi.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var Eg=typeof IntersectionObserver<"u"?new IntersectionObserver(Yy,{root:null,rootMargin:"0px",threshold:0}):null,ts=class t extends z{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation","role"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;#e=!1;typeBuffer="";typeTimer;activeItem=null;comboObserver;accessibilityObserver;#t=new Set;#n;#o;#r;#a;#l=new Set;#u=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.(),this.internals&&(this.internals.ariaHidden="true")}catch{}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
924
914
  :host { display: contents; }
925
915
 
926
916
  .container {
@@ -1016,11 +1006,11 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1016
1006
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
1017
1007
  mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
1018
1008
  }
1019
- `,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let r=document.createElement("slot");r.setAttribute("name","header");let a=document.createElement("div");a.className="scroll",a.setAttribute("part","scroll"),a.append(document.createElement("slot")),a.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=a;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(r,a,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&(this.#e=!1,this.cancelCloseTimer())}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#m&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){wd(this.doc),this.#I(),this.#c();let e=this.triggerAnchor;e&&(Ji.set(e,this),wg?.observe(e)),this.#v(),queueMicrotask(()=>{this.isConnected&&this.#v()}),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(!1),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer(),this.accessibilityObserver?.disconnect(),this.accessibilityObserver=void 0,this.#y();let e=this.triggerAnchor;e&&Ji.get(e)===this&&(Ji.delete(e),wg?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#I();return}if(e==="role"){this.#c();return}this.listening&&(this.teardownListeners(),this.setupListeners())}syncState(){if(!this.isConnected)return;let e=this.getAttribute("state");e==="open"&&!this._shown?this.show():e==="closed"&&this._shown&&this.hide()}get isControlled(){return this.hasAttribute("state")}get isSubmenu(){return!!this.parentElement&&Ki(this.parentElement)}get#l(){return this.hasAttribute("context")}get#u(){return this.hasAttribute("coord")}get#m(){return!this.hasAttribute("nohover")}get#b(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:ee}get#h(){let e=this.getAttribute("placement");return e==="bottom-end"||e==="top-start"||e==="top-end"||e==="bottom"||e==="top"||e==="right-start"||e==="right-end"||e==="left-start"||e==="left-end"||e==="right"||e==="left"?e:"bottom-start"}get triggerAnchor(){let e=this.parentElement;return e&&Ki(e)?e:this.previousElementSibling}get#p(){let e=this.triggerAnchor;if(!e)return null;let n='a-input, a-button, button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';return e.matches(n)?e:e.querySelector(n)}focusTrigger(){let e=this.#p;e?e.focus():this.triggerAnchor&&console.warn("[a-menu] trigger has no focusable element \u2014 a menu trigger (or `Select` renderTrigger) must be a single focusable element.")}get#d(){return this.isSubmenu?this.triggerAnchor?.closest("a-menu")??null:null}get isOpen(){return this._shown}isVisible(e){let n=e.checkVisibility;return typeof n=="function"?n.call(e,{visibilityProperty:!0,contentVisibilityAuto:!0}):e.getClientRects().length>0}focusableItems(){return this.navigableItems().filter(e=>e instanceof Lt)}navigableItems(){return[...this.querySelectorAll(Gi)].filter(e=>e.closest("a-menu")===this&&!e.hasAttribute("disabled")&&this.isVisible(e))}focusables(){return ga(this.surface).filter(e=>{if(e.hasAttribute("disabled"))return!1;let n=e;for(;n;){if(n.nodeType===1&&n.localName==="a-menu")return n===this;n=nl(n)}return!1})}seatInitialFocus(e){let n=this.navigableItems(),r=n.find(a=>a.hasAttribute("selected")||a.getAttribute("aria-checked")==="true"||a.getAttribute("aria-selected")==="true");r&&this.scrollItemIntoView(r),e&&(r??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let r=4,a=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<a.top+r?n.scrollTop-=a.top+r-o.top:o.bottom>a.bottom-r&&(n.scrollTop+=o.bottom-a.bottom+r)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,r=e.scrollTop+e.clientHeight<e.scrollHeight-1;e.style.setProperty("--fade-top",n?"16px":"0px"),e.style.setProperty("--gap-top",n?"3px":"0px"),e.style.setProperty("--fade-bottom",r?"14px":"0px")}get#i(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#x(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#i}#c(){if(!this.scrollEl)return;let e=this.getAttribute("role")==="dialog";e&&this.isConnected&&!this.accessibilityObserver?(this.accessibilityObserver=new this.view.MutationObserver(()=>this.#c()),this.accessibilityObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-menu-search","slot"]})):!e&&this.accessibilityObserver&&(this.accessibilityObserver.disconnect(),this.accessibilityObserver=void 0),e&&[...this.querySelectorAll(Gi)].some(r=>{if(r.closest("a-menu")!==this)return!1;let a=r;for(;a.parentElement&&a.parentElement!==this;)a=a.parentElement;let o=a.getAttribute("slot");return o!=="header"&&o!=="footer"})?(this.scrollEl.setAttribute("role","menu"),this.scrollEl.setAttribute("aria-label","Options"),this.scrollEl.setAttribute("aria-orientation","vertical")):(this.scrollEl.removeAttribute("role"),this.scrollEl.removeAttribute("aria-label"),this.scrollEl.removeAttribute("aria-orientation")),this.#v()}#v(){if(!this.isConnected)return;let e=new Map,n=this.triggerAnchor,r=this.#x;As(n)&&e.set(n,{controls:this,activeDescendant:r===n?this.activeItem:null}),r!==n&&As(r)&&e.set(r,{controls:this,activeDescendant:this.activeItem});for(let a of this.#t)e.has(a)||a[Jt]({source:this,clear:!0});for(let[a,o]of e)a[Jt]({source:this,...o});this.#t=new Set(e.keys())}#y(){for(let e of this.#t)e[Jt]({source:this,clear:!0});this.#t.clear()}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.#v(),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#x?.value;if(!e||!e.trim())return this.setActive(null);if(this.#i)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(r=>!r.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),r=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[r<0?0:(r+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[r<=0?n.length-1:r-1]??null),!0;case"PageUp":return e.preventDefault(),this.setActive(n[0]??null),!0;case"PageDown":return e.preventDefault(),this.setActive(n[n.length-1]??null),!0;case"Enter":if(this.activeItem){e.preventDefault();let a=this.activeItem.querySelector(":scope > a-copy");a&&Vo(a),this.#w=this.activeItem}return!0;default:return!1}}#w=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#w;this.#w=null,n?.click()}open(e){this.requestOpen(e)}close(e){this.requestClose(e)}toggle(e){this._shown?this.requestClose(e?.originEvent):this.requestOpen(e)}emitChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this._shown?"open":"closed",coord:n?.coord,originEvent:n?.originEvent}}))}requestOpen(e){if(this._shown){this.show(e?.coord,e?.viaKeyboard,e?.originEvent);return}let n=this.emitChange("open",e);this.isControlled||n&&this.show(e?.coord,e?.viaKeyboard,e?.originEvent)}requestClose(e){if(!this._shown)return;let n=q.indexOf(this);if(n!==-1){for(let a=q.length-1;a>n;a--){let o=q[a];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}q.length=n+1}let r=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}r&&this.hide()}show(e,n=!1,r){if(this.isSubmenu){let i=this.#d;if(i){let s=q.indexOf(i);if(s!==-1){for(let l=q.length-1;l>s;l--)q[l]._doHide();q.length=s+1}}}else if(!q.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=q.length-1;l>=0;l--)if(q[l]!==this&&q[l].contains(i)){s=q[l];break}}if(s){let l=q.indexOf(s);for(let c=q.length-1;c>l;c--){let d=q[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}q.length=l+1}else jy()}if(q.includes(this)){this.position(e);return}let a=q.length===0;this._doShow(e,!a),q.push(this),a&&Fy(this.doc,this.view);let o=this.#x;o?(o.focus({preventScroll:!0}),this.resetActive(),this.startComboObserver()):this.seatInitialFocus(n)}startComboObserver(){this.comboObserver?.disconnect(),this.comboObserver=new this.view.MutationObserver(()=>{!this._shown||!this.#x||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(e=!0){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let n=q.indexOf(this);if(n===-1){this._shown&&this._doHide();return}for(let r=q.length-1;r>=n;r--){let a=q[r];e&&r>n&&a.isOpen&&!a._dismissNotified&&a.emitChange("closed"),a._doHide()}q.length=n,q.length===0&&kg()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,this.#e=!1,this._dismissNotified=!1,this.reflectOpen(!0),this.hideAnchorTooltip(),this.position(e,n),this.#g(e)}hideAnchorTooltip(){this.triggerAnchor?.querySelectorAll("a-tooltip").forEach(e=>e.hide?.())}_doHide(){let e=this.parentElement?.closest("a-menu");if(this._shown&&e&&Ln!==null&&_y(this.surface.getBoundingClientRect()))for(let n=e;n;n=n.parentElement?.closest("a-menu"))!n.isSubmenu||!n.#m||!n._shown||n.surface.matches(":hover")||(n.#e=!0,n.cancelCloseTimer());this.#T(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.#e=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states?.add("open"):this.internals?.states?.delete("open"),this.internals&&(this.internals.ariaHidden=e?"false":"true")}catch{}}#g(e){if(this.#T(),e||this.#u)return;let n=this.triggerAnchor;if(!n)return;this.#o=this.#D(n);let r=()=>{if(!this._shown){this.#n=void 0;return}let a=this.triggerAnchor;if(!a){this.#n=void 0;return}let o=this.#D(a);this.#A(o)||(this.#o=o,this.#E(a)),this.#n=this.view.requestAnimationFrame(r)};this.#n=this.view.requestAnimationFrame(r)}#E(e){if(this.#a===void 0||this.#r===void 0)return;let n=this.surface.getBoundingClientRect(),r=Ft(e).top+this.#a;r=Math.min(r,this.view.innerHeight-n.height-ee),r=Math.max(ee,r),this.surface.style.transform=`translate(${this.#r}px, ${Math.round(r)}px)`,this.updateScrollFade()}#T(){this.#n!==void 0&&(this.view.cancelAnimationFrame(this.#n),this.#n=void 0),this.#o=void 0,this.#r=void 0,this.#a=void 0}#D(e){let{left:n,top:r,right:a,bottom:o,width:i,height:s}=Ft(e);return[n,r,a,o,i,s]}#A(e){let n=this.#o;return!!n&&n.length===e.length&&n.every((r,a)=>r===e[a])}position(e,n=!1,r=!1){let a=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=ee,d=ee;if(e){l.style.maxHeight=`${Math.max(Xi,s-2*ee)}px`;let p=l.getBoundingClientRect();c=e[0],c+p.width>i-ee&&(c=i-p.width-ee),c=Math.max(ee,c),d=e[1],d+p.height>s-ee&&(d=d-p.height),d=Math.max(ee,d)}else if(this.isSubmenu){let p=this.triggerAnchor?Ft(this.triggerAnchor):null;if(!p)return;l.style.maxHeight=`${Math.max(Xi,s-2*ee)}px`;let f=l.getBoundingClientRect();c=p.right+this.#b,c+f.width>i-ee&&(c=p.left-f.width-this.#b),c=Math.max(ee,c);let b=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),v=parseFloat(b.borderTopWidth)+parseFloat(b.paddingTop)+parseFloat(g.paddingTop);d=p.top-v,d+f.height>s-ee&&(d=s-f.height-ee),d=Math.max(ee,d)}else{let p=this.triggerAnchor?Ft(this.triggerAnchor):null;if(!p)return;this.hasAttribute("autowidth")?l.style.removeProperty("--_anchor-width"):l.style.setProperty("--_anchor-width",`${Math.ceil(p.width)}px`);let f=this.#h;if(f.startsWith("right")||f.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(Xi,s-2*ee)}px`;let b=l.getBoundingClientRect(),g=i-p.right-2*ee,v=p.left-2*ee,x=f.startsWith("left");r&&this._flippedSide!==null?x=this._flippedSide:x&&v<b.width&&g>v?x=!1:!x&&g<b.width&&v>g&&(x=!0),this._flippedSide=x,c=x?p.left-b.width-this.#b:p.right+this.#b,c=Math.max(ee,Math.min(c,i-b.width-ee));let w=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";d=w==="center"?p.top+p.height/2-b.height/2:w==="end"?p.bottom-b.height:p.top,d+b.height>s-ee&&(d=s-b.height-ee),d=Math.max(ee,d)}else{let b=s-p.bottom-2*ee,g=p.top-2*ee,v=f.startsWith("top");l.style.maxHeight="";let x=l.scrollHeight;r&&this._flippedTop!==null?v=this._flippedTop:v&&g<x&&b>g?v=!1:!v&&b<x&&g>b&&(v=!0),this._flippedTop=v;let w=v?g:b;l.style.maxHeight=`${Math.max(Xi,Math.floor(w))}px`;let I=l.getBoundingClientRect(),C=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";c=C==="center"?p.left+p.width/2-I.width/2:C==="end"?p.right-I.width:p.left,c+I.width>i-ee&&(c=i-I.width-ee),c=Math.max(ee,c),d=v?p.top-I.height-this.#b:p.bottom+this.#b,d=Math.max(ee,d)}}let u=Math.round(c),m=Math.round(d);l.style.transform=`translate(${u}px, ${m}px)`,this.updateScrollFade(),!e&&!this.#u&&this.triggerAnchor&&(this.#r=u,this.#a=m-Ft(this.triggerAnchor).top)};n?a():requestAnimationFrame(a)}onSurfaceClick=e=>{let n=!1,r=!1;for(let a of e.composedPath()){if(a===this.surface)break;a instanceof Element&&(a.matches(Ny)&&(r=!0),(a instanceof Lt||a.hasAttribute("data-menu-close"))&&(n=!0))}n&&!r&&e.stopPropagation();for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Lt){!a.hasAttribute("disabled")&&!a.querySelector(":scope > a-menu")&&a.closest("a-menu")===this&&a.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Element){if(a.hasAttribute("data-menu-open"))return;if(a instanceof Lt){if(a.hasAttribute("disabled")){e.preventDefault();return}return a.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(a.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(a.hasAttribute("data-menu-close"))return this.closeSystem(e)}}};closeSystem(e){(q[0]??this).requestClose(e)}#C(){if(!this.hasAttribute("stop-propagation"))return new Set;let e=(this.getAttribute("stop-propagation")??"").trim();return new Set(e?e.split(/[\s,]+/):["click"])}#I(){let e=this.#C();for(let n of this.#s)e.has(n)||this.surface.removeEventListener(n,this.#f);for(let n of e)this.#s.has(n)||this.surface.addEventListener(n,this.#f);this.#s=e}handleKey(e){if(qe(e))return;let n=this.doc.activeElement;if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.requestClose(e),this.focusTrigger();return}if(e.key==="Tab"){if(this.#i){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault(),Lo(s,Qt(this.doc),e.shiftKey);return}let r=this.#x;if(r&&(n===r||r.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!Ki(n))return;let o=this.navigableItems(),i=n?o.indexOf(n):-1;switch(e.key){case"ArrowDown":e.preventDefault(),o[i<0?0:(i+1)%o.length]?.focus({preventScroll:!0});break;case"ArrowUp":e.preventDefault(),o[i<=0?o.length-1:i-1]?.focus({preventScroll:!0});break;case"Home":e.preventDefault(),o[0]?.focus({preventScroll:!0});break;case"End":e.preventDefault(),o[o.length-1]?.focus({preventScroll:!0});break;case"ArrowRight":{let s=this.submenuOf(n);s&&(e.preventDefault(),s.requestOpen({viaKeyboard:!0}));break}case"ArrowLeft":if(this.isSubmenu){e.preventDefault();let s=this.triggerAnchor;this.requestClose(e),s?.focus()}break;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeahead(e.key,o)}}submenuOf(e){return!e||!(e instanceof Lt)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",By),n.find(a=>this.itemLabel(a).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#M(e){let n=Ft(e);return[n.left,n.bottom]}setupListeners(){if(this.listening)return;let e=this.triggerAnchor;if(!e){this.listening=!0;return}if(this.isSubmenu){let n=o=>{o.composedPath().includes(this.surface)||this.requestOpen({originEvent:o})};e.addEventListener("click",n);let r,a;this.#m&&(r=o=>{o.pointerType==="mouse"&&(this.#e=!1,this.scheduleOpen())},a=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",a)),this.teardown=()=>{e.removeEventListener("click",n),r&&e.removeEventListener("pointerenter",r),a&&e.removeEventListener("pointerleave",a),this.listening=!1}}else if(this.#l){let n=r=>{Hy(r,e)||(r.preventDefault(),this.requestOpen({coord:[r.clientX,r.clientY],originEvent:r}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#i){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=a=>{let o=a.detail===0,i=this.#u?o?this.#M(e):[a.clientX,a.clientY]:void 0;this._shown?this.requestClose(a):this.requestOpen({coord:i,viaKeyboard:o,originEvent:a})},r=a=>{if(qe(a)||this._shown||e.hasAttribute("disabled")||e.hasAttribute("loading")||!(a.key==="ArrowDown"||a.key==="ArrowUp")&&e.matches(Ly))return;let i=e.matches(Ry);if(!(a.key==="ArrowDown"||a.key==="ArrowUp"||!i&&(a.key==="Enter"||a.key===" ")))return;a.preventDefault();let l=this.#u?this.#M(e):void 0;this.requestOpen({coord:l,viaKeyboard:!0,originEvent:a})};e.addEventListener("click",n),e.addEventListener("keydown",r),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",r),this.listening=!1}}this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}scheduleOpen(){this.cancelCloseTimer(),!this._shown&&(this.cancelOpenTimer(),this.openTimer=setTimeout(()=>{this.openTimer=void 0,this.requestOpen()},Py))}scheduleClose(){if(this.cancelOpenTimer(),!!this._shown&&!this.#e&&!this.#F){if(q.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))){this.cancelCloseTimer();return}this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},zy)}}get#F(){let e=this.doc.activeElement;return!!e&&this.contains(e)&&e.matches(":focus-visible")}cancelOpenTimer(){this.openTimer!==void 0&&(clearTimeout(this.openTimer),this.openTimer=void 0)}cancelCloseTimer(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}};function Og(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",es)}Og();var ts=class extends B{};function Pg(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",ts)}Pg();var ns=class extends B{};function zg(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",ns)}zg();var rs=class extends fr{ariaProp="ariaSelected"};function Bg(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",rs)}Bg();var as=class extends B{static observedAttributes=["state","disabled","orientation","noslide"];internals;uncontrolledValue=null;seeded=!1;observer;resizeObserver;resizeTimer;resizeFrame;lastSelected=null;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-TAB"||a.querySelector?.("a-tab")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),this.#r(),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect(),this.resizeObserver?.disconnect(),this.#s()}attributeChangedCallback(e,n,r){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return this.getAttribute("orientation")==="vertical"}get#o(){return Array.from(this.querySelectorAll("a-tab"))}#r(){if(!(!this.hasAttribute("noslide")&&typeof this.view.ResizeObserver=="function"&&this.view.CSS.supports("anchor-scope: all"))){this.resizeObserver?.disconnect(),this.#s();return}this.resizeObserver??=new this.view.ResizeObserver(this.#a),this.resizeObserver.observe(this)}#a=()=>{this.internals?.states?.add("resizing"),this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeFrame=void 0,this.resizeTimer=this.view.setTimeout(()=>{this.resizeTimer=void 0,this.resizeFrame=this.view.requestAnimationFrame(()=>{this.resizeFrame=void 0,this.internals?.states?.delete("resizing")})},120)};#s(){this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeTimer=void 0,this.resizeFrame=void 0,this.internals?.states?.delete("resizing")}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#o,r=n.find(a=>a.value===e&&e!=null)??null;for(let a of n)a.selected=a===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r),this.alive&&r&&r!==this.lastSelected&&this.#f(r),this.lastSelected=r};#f(e){let n=this.getBoundingClientRect(),r=e.getBoundingClientRect();this.#n?r.top<n.top?this.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(this.scrollTop+=r.bottom-n.bottom):r.left<n.left?this.scrollLeft-=n.left-r.left:r.right>n.right&&(this.scrollLeft+=r.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-tab");!n||n.hasAttribute("disabled")||(n.focus({preventScroll:!0}),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t||qe(e))return;let n=this.#o.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}if(e.key==="Home"||e.key==="End"){e.preventDefault();let l=e.key==="Home"?n[0]:n[n.length-1];l.focus({preventScroll:!0}),this.requestSelect(l.value);return}let a=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function Lg(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",as)}Lg();var os=class extends B{static observedAttributes=["value"];internals;tabs=null;onTabsChange=()=>this.sync();constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){this.bindTabs(),this.sync(),requestAnimationFrame(()=>{this.tabs||this.bindTabs(),this.sync()})}disconnectedCallback(){this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=null}attributeChangedCallback(){this.sync()}bindTabs(){let e=this.parentElement?.querySelector(":scope > a-tabs")??null;e!==this.tabs&&(this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=e,this.tabs?.addEventListener("change",this.onTabsChange))}sync(){let e=this.getAttribute("value"),n=!!this.tabs&&e===(this.tabs.value??null);try{n?this.internals?.states?.add("active"):this.internals?.states?.delete("active")}catch{}if(this.internals&&"ariaLabelledByElements"in this.internals){let r=e!=null?this.tabs?.querySelector(`a-tab[value="${Uy(e)}"]`):null;this.internals.ariaLabelledByElements=r?[r]:[]}}};function Uy(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function Rg(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",os)}Rg();var Yy="closerequest",Wy=200,Zy=`
1009
+ `,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let r=document.createElement("slot");r.setAttribute("name","header");let a=document.createElement("div");a.className="scroll",a.setAttribute("part","scroll"),a.append(document.createElement("slot")),a.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=a;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(r,a,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&(this.#e=!1,this.cancelCloseTimer())}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#f&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){Ed(this.doc),this.#M(),this.#v();let e=this.triggerAnchor;e&&(Qi.set(e,this),Eg?.observe(e)),this.#x(),queueMicrotask(()=>{this.isConnected&&this.#x()}),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(!1),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer(),this.accessibilityObserver?.disconnect(),this.accessibilityObserver=void 0,this.#S();let e=this.triggerAnchor;e&&Qi.get(e)===this&&(Qi.delete(e),Eg?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#M();return}if(e==="role"){this.#v();return}this.listening&&(this.teardownListeners(),this.setupListeners())}syncState(){if(!this.isConnected)return;let e=this.getAttribute("state");e==="open"&&!this._shown?this.show():e==="closed"&&this._shown&&this.hide()}get isControlled(){return this.hasAttribute("state")}get isSubmenu(){return!!this.parentElement&&Xi(this.parentElement)}get#i(){return this.hasAttribute("context")}get#h(){return this.hasAttribute("coord")}get#f(){return!this.hasAttribute("nohover")}get#b(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:ee}get#p(){let e=this.getAttribute("placement");return e==="bottom-end"||e==="top-start"||e==="top-end"||e==="bottom"||e==="top"||e==="right-start"||e==="right-end"||e==="left-start"||e==="left-end"||e==="right"||e==="left"?e:"bottom-start"}get triggerAnchor(){let e=this.parentElement;return e&&Xi(e)?e:this.previousElementSibling}get#m(){let e=this.triggerAnchor;if(!e)return null;let n='a-input, a-button, button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';return e.matches(n)?e:e.querySelector(n)}focusTrigger(){let e=this.#m;e?e.focus():this.triggerAnchor&&console.warn("[a-menu] trigger has no focusable element \u2014 a menu trigger (or `Select` renderTrigger) must be a single focusable element.")}get#c(){return this.isSubmenu?this.triggerAnchor?.closest("a-menu")??null:null}get isOpen(){return this._shown}isVisible(e){let n=e.checkVisibility;return typeof n=="function"?n.call(e,{visibilityProperty:!0,contentVisibilityAuto:!0}):e.getClientRects().length>0}focusableItems(){return this.navigableItems().filter(e=>e instanceof Lt)}navigableItems(){return[...this.querySelectorAll(Ki)].filter(e=>e.closest("a-menu")===this&&!e.hasAttribute("disabled")&&this.isVisible(e))}focusables(){return ga(this.surface).filter(e=>{if(e.hasAttribute("disabled"))return!1;let n=e;for(;n;){if(n.nodeType===1&&n.localName==="a-menu")return n===this;n=rl(n)}return!1})}seatInitialFocus(e){let n=this.navigableItems(),r=n.find(a=>a.hasAttribute("selected")||a.getAttribute("aria-checked")==="true"||a.getAttribute("aria-selected")==="true");r&&this.scrollItemIntoView(r),e&&(r??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let r=4,a=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<a.top+r?n.scrollTop-=a.top+r-o.top:o.bottom>a.bottom-r&&(n.scrollTop+=o.bottom-a.bottom+r)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,r=e.scrollTop+e.clientHeight<e.scrollHeight-1;e.style.setProperty("--fade-top",n?"16px":"0px"),e.style.setProperty("--gap-top",n?"3px":"0px"),e.style.setProperty("--fade-bottom",r?"14px":"0px")}get#s(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#A(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#s}#v(){if(!this.scrollEl)return;let e=this.getAttribute("role")==="dialog";e&&this.isConnected&&!this.accessibilityObserver?(this.accessibilityObserver=new this.view.MutationObserver(()=>this.#v()),this.accessibilityObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-menu-search","slot"]})):!e&&this.accessibilityObserver&&(this.accessibilityObserver.disconnect(),this.accessibilityObserver=void 0),e&&[...this.querySelectorAll(Ki)].some(r=>{if(r.closest("a-menu")!==this)return!1;let a=r;for(;a.parentElement&&a.parentElement!==this;)a=a.parentElement;let o=a.getAttribute("slot");return o!=="header"&&o!=="footer"})?(this.scrollEl.setAttribute("role","menu"),this.scrollEl.setAttribute("aria-label","Options"),this.scrollEl.setAttribute("aria-orientation","vertical")):(this.scrollEl.removeAttribute("role"),this.scrollEl.removeAttribute("aria-label"),this.scrollEl.removeAttribute("aria-orientation")),this.#x()}#x(){if(!this.isConnected)return;let e=new Map,n=this.triggerAnchor,r=this.#A;Ms(n)&&e.set(n,{controls:this,activeDescendant:r===n?this.activeItem:null}),r!==n&&Ms(r)&&e.set(r,{controls:this,activeDescendant:this.activeItem});for(let a of this.#t)e.has(a)||a[Xt]({source:this,clear:!0});for(let[a,o]of e)a[Xt]({source:this,...o});this.#t=new Set(e.keys())}#S(){for(let e of this.#t)e[Xt]({source:this,clear:!0});this.#t.clear()}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.#x(),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#A?.value;if(!e||!e.trim())return this.setActive(null);if(this.#s)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(r=>!r.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),r=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[r<0?0:(r+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[r<=0?n.length-1:r-1]??null),!0;case"PageUp":return e.preventDefault(),this.setActive(n[0]??null),!0;case"PageDown":return e.preventDefault(),this.setActive(n[n.length-1]??null),!0;case"Enter":if(this.activeItem){e.preventDefault();let a=this.activeItem.querySelector(":scope > a-copy");a&&jo(a),this.#y=this.activeItem}return!0;default:return!1}}#y=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#y;this.#y=null,n?.click()}open(e){this.requestOpen(e)}close(e){this.requestClose(e)}toggle(e){this._shown?this.requestClose(e?.originEvent):this.requestOpen(e)}emitChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this._shown?"open":"closed",coord:n?.coord,originEvent:n?.originEvent}}))}requestOpen(e){if(this._shown){this.show(e?.coord,e?.viaKeyboard,e?.originEvent);return}let n=this.emitChange("open",e);this.isControlled||n&&this.show(e?.coord,e?.viaKeyboard,e?.originEvent)}requestClose(e){if(!this._shown)return;let n=j.indexOf(this);if(n!==-1){for(let a=j.length-1;a>n;a--){let o=j[a];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}j.length=n+1}let r=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}r&&this.hide()}show(e,n=!1,r){if(this.isSubmenu){let i=this.#c;if(i){let s=j.indexOf(i);if(s!==-1){for(let l=j.length-1;l>s;l--){let c=j[l];c!==this&&c.isOpen&&!c._dismissNotified&&c.emitChange("closed"),c._doHide()}j.length=s+1}}}else if(!j.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=j.length-1;l>=0;l--)if(j[l]!==this&&j[l].contains(i)){s=j[l];break}}if(s){let l=j.indexOf(s);for(let c=j.length-1;c>l;c--){let d=j[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}j.length=l+1}else Uy()}if(j.includes(this)){this.position(e);return}let a=j.length===0;this._doShow(e,!a),j.push(this),a&&Hy(this.doc,this.view);let o=this.#A;o?(o.focus({preventScroll:!0}),this.resetActive(),this.startComboObserver()):this.seatInitialFocus(n)}startComboObserver(){this.comboObserver?.disconnect(),this.comboObserver=new this.view.MutationObserver(()=>{!this._shown||!this.#A||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(e=!0){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let n=j.indexOf(this);if(n===-1){this._shown&&this._doHide();return}for(let r=j.length-1;r>=n;r--){let a=j[r];e&&r>n&&a.isOpen&&!a._dismissNotified&&a.emitChange("closed"),a._doHide()}j.length=n,j.length===0&&Cg()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,this.#e=!1,this._dismissNotified=!1,this.reflectOpen(!0),this.hideAnchorTooltip(),this.position(e,n),this.#T(e)}hideAnchorTooltip(){this.triggerAnchor?.querySelectorAll("a-tooltip").forEach(e=>e.hide?.())}_doHide(){let e=this.parentElement?.closest("a-menu");if(this._shown&&e&&Bn!==null&&Vy(this.surface.getBoundingClientRect()))for(let n=e;n;n=n.parentElement?.closest("a-menu"))!n.isSubmenu||!n.#f||!n._shown||n.surface.matches(":hover")||(n.#e=!0,n.cancelCloseTimer());this.#g(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.#e=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states?.add("open"):this.internals?.states?.delete("open"),this.internals&&(this.internals.ariaHidden=e?"false":"true")}catch{}}#T(e){if(this.#g(),e||this.#h)return;let n=this.triggerAnchor;if(!n)return;this.#o=this.#I(n);let r=()=>{if(!this._shown){this.#n=void 0;return}let a=this.triggerAnchor;if(!a){this.#n=void 0;return}let o=this.#I(a);this.#E(o)||(this.#o=o,this.#d(a)),this.#n=this.view.requestAnimationFrame(r)};this.#n=this.view.requestAnimationFrame(r)}#d(e){if(this.#a===void 0||this.#r===void 0)return;let n=this.surface.getBoundingClientRect(),r=_t(e).top+this.#a;r=Math.min(r,this.view.innerHeight-n.height-ee),r=Math.max(ee,r),this.surface.style.transform=`translate(${this.#r}px, ${Math.round(r)}px)`,this.updateScrollFade()}#g(){this.#n!==void 0&&(this.view.cancelAnimationFrame(this.#n),this.#n=void 0),this.#o=void 0,this.#r=void 0,this.#a=void 0}#I(e){let{left:n,top:r,right:a,bottom:o,width:i,height:s}=_t(e);return[n,r,a,o,i,s]}#E(e){let n=this.#o;return!!n&&n.length===e.length&&n.every((r,a)=>r===e[a])}position(e,n=!1,r=!1){let a=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=ee,d=ee;if(e){l.style.maxHeight=`${Math.max(Ji,s-2*ee)}px`;let p=l.getBoundingClientRect();c=e[0],c+p.width>i-ee&&(c=i-p.width-ee),c=Math.max(ee,c),d=e[1],d+p.height>s-ee&&(d=d-p.height),d=Math.max(ee,d)}else if(this.isSubmenu){let p=this.triggerAnchor?_t(this.triggerAnchor):null;if(!p)return;l.style.maxHeight=`${Math.max(Ji,s-2*ee)}px`;let f=l.getBoundingClientRect();c=p.right+this.#b,c+f.width>i-ee&&(c=p.left-f.width-this.#b),c=Math.max(ee,c);let b=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),v=parseFloat(b.borderTopWidth)+parseFloat(b.paddingTop)+parseFloat(g.paddingTop);d=p.top-v,d+f.height>s-ee&&(d=s-f.height-ee),d=Math.max(ee,d)}else{let p=this.triggerAnchor?_t(this.triggerAnchor):null;if(!p)return;this.hasAttribute("autowidth")?l.style.removeProperty("--_anchor-width"):l.style.setProperty("--_anchor-width",`${Math.ceil(p.width)}px`);let f=this.#p;if(f.startsWith("right")||f.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(Ji,s-2*ee)}px`;let b=l.getBoundingClientRect(),g=i-p.right-2*ee,v=p.left-2*ee,x=f.startsWith("left");r&&this._flippedSide!==null?x=this._flippedSide:x&&v<b.width&&g>v?x=!1:!x&&g<b.width&&v>g&&(x=!0),this._flippedSide=x,c=x?p.left-b.width-this.#b:p.right+this.#b,c=Math.max(ee,Math.min(c,i-b.width-ee));let w=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";d=w==="center"?p.top+p.height/2-b.height/2:w==="end"?p.bottom-b.height:p.top,d+b.height>s-ee&&(d=s-b.height-ee),d=Math.max(ee,d)}else{let b=s-p.bottom-2*ee,g=p.top-2*ee,v=f.startsWith("top");l.style.maxHeight="";let x=l.scrollHeight;r&&this._flippedTop!==null?v=this._flippedTop:v&&g<x&&b>g?v=!1:!v&&b<x&&g>b&&(v=!0),this._flippedTop=v;let w=v?g:b;l.style.maxHeight=`${Math.max(Ji,Math.floor(w))}px`;let I=l.getBoundingClientRect(),C=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";c=C==="center"?p.left+p.width/2-I.width/2:C==="end"?p.right-I.width:p.left,c+I.width>i-ee&&(c=i-I.width-ee),c=Math.max(ee,c),d=v?p.top-I.height-this.#b:p.bottom+this.#b,d=Math.max(ee,d)}}let u=Math.round(c),m=Math.round(d);l.style.transform=`translate(${u}px, ${m}px)`,this.updateScrollFade(),!e&&!this.#h&&this.triggerAnchor&&(this.#r=u,this.#a=m-_t(this.triggerAnchor).top)};n?a():requestAnimationFrame(a)}onSurfaceClick=e=>{for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof t&&a!==this)return}let n=!1,r=!1;for(let a of e.composedPath()){if(a===this.surface)break;a instanceof Element&&(a.matches(Fy)&&(r=!0),(a instanceof Lt||a.hasAttribute("data-menu-close"))&&(n=!0))}n&&!r&&e.stopPropagation();for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Lt){!a.hasAttribute("disabled")&&!a.querySelector(":scope > a-menu")&&a.closest("a-menu")===this&&a.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Element){if(a.hasAttribute("data-menu-open"))return;if(a instanceof Lt){if(a.hasAttribute("disabled")){e.preventDefault();return}return a.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(a.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(a.hasAttribute("data-menu-close"))return this.closeSystem(e,!0)}}};closeSystem(e,n=!1){if(!n&&this.closest("[data-menu-open]")){this.requestClose(e);return}(j[0]??this).requestClose(e)}#O(){if(!this.hasAttribute("stop-propagation"))return new Set;let e=(this.getAttribute("stop-propagation")??"").trim();return new Set(e?e.split(/[\s,]+/):["click"])}#M(){let e=this.#O();for(let n of this.#l)e.has(n)||this.surface.removeEventListener(n,this.#u);for(let n of e)this.#l.has(n)||this.surface.addEventListener(n,this.#u);this.#l=e}handleKey(e){if(Ye(e))return;let n=this.doc.activeElement;if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.requestClose(e),this.focusTrigger();return}if(e.key==="Tab"){if(this.#s){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault(),Ro(s,Jt(this.doc),e.shiftKey);return}let r=this.#A;if(r&&(n===r||r.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!Xi(n))return;let o=this.navigableItems(),i=n?o.indexOf(n):-1;switch(e.key){case"ArrowDown":e.preventDefault(),o[i<0?0:(i+1)%o.length]?.focus({preventScroll:!0});break;case"ArrowUp":e.preventDefault(),o[i<=0?o.length-1:i-1]?.focus({preventScroll:!0});break;case"Home":e.preventDefault(),o[0]?.focus({preventScroll:!0});break;case"End":e.preventDefault(),o[o.length-1]?.focus({preventScroll:!0});break;case"ArrowRight":{let s=this.submenuOf(n);s&&(e.preventDefault(),s.requestOpen({viaKeyboard:!0}));break}case"ArrowLeft":if(this.isSubmenu){e.preventDefault();let s=this.triggerAnchor;this.requestClose(e),s?.focus()}break;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeahead(e.key,o)}}submenuOf(e){return!e||!(e instanceof Lt)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",Ry),n.find(a=>this.itemLabel(a).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#B(e){let n=_t(e);return[n.left,n.bottom]}setupListeners(){if(this.listening)return;let e=this.triggerAnchor;if(!e){this.listening=!0;return}if(this.isSubmenu){let n=o=>{o.composedPath().includes(this.surface)||this.requestOpen({originEvent:o})};e.addEventListener("click",n);let r,a;this.#f&&(r=o=>{o.pointerType==="mouse"&&(this.#e=!1,this.scheduleOpen())},a=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",a)),this.teardown=()=>{e.removeEventListener("click",n),r&&e.removeEventListener("pointerenter",r),a&&e.removeEventListener("pointerleave",a),this.listening=!1}}else if(this.#i){let n=r=>{jy(r,e)||(r.preventDefault(),this.requestOpen({coord:[r.clientX,r.clientY],originEvent:r}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#s){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=a=>{if(e.matches("a-input")&&a.composedPath().some(s=>s instanceof Element&&s.getAttribute("slot")==="clear"))return;let o=a.detail===0,i=this.#h?o?this.#B(e):[a.clientX,a.clientY]:void 0;this._shown?this.requestClose(a):this.requestOpen({coord:i,viaKeyboard:o,originEvent:a})},r=a=>{if(Ye(a)||this._shown||e.hasAttribute("disabled")||e.hasAttribute("loading")||!(a.key==="ArrowDown"||a.key==="ArrowUp")&&e.matches(Ny))return;let i=e.matches(_y);if(!(a.key==="ArrowDown"||a.key==="ArrowUp"||!i&&(a.key==="Enter"||a.key===" ")))return;a.preventDefault();let l=this.#h?this.#B(e):void 0;this.requestOpen({coord:l,viaKeyboard:!0,originEvent:a})};e.addEventListener("click",n),e.addEventListener("keydown",r),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",r),this.listening=!1}}this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}scheduleOpen(){this.cancelCloseTimer(),!this._shown&&(this.cancelOpenTimer(),this.openTimer=setTimeout(()=>{this.openTimer=void 0,this.requestOpen()},By))}scheduleClose(){if(this.cancelOpenTimer(),!!this._shown&&!this.#e&&!this.#w){if(j.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))){this.cancelCloseTimer();return}this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},Ly)}}get#w(){let e=this.doc.activeElement;return!!e&&this.contains(e)&&e.matches(":focus-visible")}cancelOpenTimer(){this.openTimer!==void 0&&(clearTimeout(this.openTimer),this.openTimer=void 0)}cancelCloseTimer(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}};function zg(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",ts)}zg();var ns=class extends z{};function Bg(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",ns)}Bg();var rs=class extends z{};function Lg(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",rs)}Lg();var as=class extends mr{ariaProp="ariaSelected"};function Rg(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",as)}Rg();var os=class extends z{static observedAttributes=["state","disabled","orientation","noslide"];internals;uncontrolledValue=null;seeded=!1;observer;resizeObserver;resizeTimer;resizeFrame;lastSelected=null;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-TAB"||a.querySelector?.("a-tab")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),this.#r(),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect(),this.resizeObserver?.disconnect(),this.#l()}attributeChangedCallback(e,n,r){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return this.getAttribute("orientation")==="vertical"}get#o(){return Array.from(this.querySelectorAll("a-tab"))}#r(){if(!(!this.hasAttribute("noslide")&&typeof this.view.ResizeObserver=="function"&&this.view.CSS.supports("anchor-scope: all"))){this.resizeObserver?.disconnect(),this.#l();return}this.resizeObserver??=new this.view.ResizeObserver(this.#a),this.resizeObserver.observe(this)}#a=()=>{this.internals?.states?.add("resizing"),this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeFrame=void 0,this.resizeTimer=this.view.setTimeout(()=>{this.resizeTimer=void 0,this.resizeFrame=this.view.requestAnimationFrame(()=>{this.resizeFrame=void 0,this.internals?.states?.delete("resizing")})},120)};#l(){this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeTimer=void 0,this.resizeFrame=void 0,this.internals?.states?.delete("resizing")}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#o,r=n.find(a=>a.value===e&&e!=null)??null;for(let a of n)a.selected=a===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r),this.alive&&r&&r!==this.lastSelected&&this.#u(r),this.lastSelected=r};#u(e){let n=this.getBoundingClientRect(),r=e.getBoundingClientRect();this.#n?r.top<n.top?this.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(this.scrollTop+=r.bottom-n.bottom):r.left<n.left?this.scrollLeft-=n.left-r.left:r.right>n.right&&(this.scrollLeft+=r.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-tab");!n||n.hasAttribute("disabled")||(n.focus({preventScroll:!0}),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t||Ye(e))return;let n=this.#o.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}if(e.key==="Home"||e.key==="End"){e.preventDefault();let l=e.key==="Home"?n[0]:n[n.length-1];l.focus({preventScroll:!0}),this.requestSelect(l.value);return}let a=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function Ng(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",os)}Ng();var is=class extends z{static observedAttributes=["value"];internals;tabs=null;onTabsChange=()=>this.sync();constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){this.bindTabs(),this.sync(),requestAnimationFrame(()=>{this.tabs||this.bindTabs(),this.sync()})}disconnectedCallback(){this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=null}attributeChangedCallback(){this.sync()}bindTabs(){let e=this.previousElementSibling,n=0;for(;e;){if(e.localName==="template"&&e.hasAttribute("data-anta-tabs-end"))n++;else if(e.localName==="a-tabs"){if(n===0)break;n--}e=e.previousElementSibling}let r=e;r!==this.tabs&&(this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=r,this.tabs?.addEventListener("change",this.onTabsChange))}sync(){let e=this.getAttribute("value"),n=!!this.tabs&&e===(this.tabs.value??null);try{n?this.internals?.states?.add("active"):this.internals?.states?.delete("active")}catch{}if(this.internals&&"ariaLabelledByElements"in this.internals){let r=e!=null?this.tabs?.querySelector(`a-tab[value="${Wy(e)}"]`):null;this.internals.ariaLabelledByElements=r?[r]:[]}}};function Wy(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function _g(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",is)}_g();var Zy="closerequest",$y=200,Gy=`
1020
1010
  :host { display: contents; }
1021
1011
 
1022
1012
  dialog {
1023
- --_dur: ${Wy}ms;
1013
+ --_dur: ${$y}ms;
1024
1014
  --_r: var(--dialog-round, var(--dialog-radius, 10px));
1025
1015
 
1026
1016
  position: fixed;
@@ -1171,7 +1161,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1171
1161
  inset-inline-end: 10px;
1172
1162
  z-index: 1;
1173
1163
  }
1174
- `,is=class extends B{static observedAttributes=["state","name"];dialog;headerSlot;footerSlot;closeSlot;#e=0;#t=!1;#n=!1;#o=!1;#r;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Zy,this.dialog=document.createElement("dialog"),this.dialog.setAttribute("part","dialog"),this.dialog.tabIndex=-1,this.closeSlot=document.createElement("slot"),this.closeSlot.name="close",this.closeSlot.setAttribute("part","close"),this.headerSlot=document.createElement("slot"),this.headerSlot.name="header",this.headerSlot.setAttribute("part","header");let r=document.createElement("slot");r.setAttribute("part","body"),this.footerSlot=document.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer");for(let a of[this.headerSlot,this.footerSlot,this.closeSlot])a.addEventListener("slotchange",()=>{let o=a.assignedNodes().length>0;a.classList.toggle("has-content",o),a===this.closeSlot&&this.dialog.classList.toggle("has-close",o)});this.headerSlot.addEventListener("slotchange",()=>this.#h()),this.dialog.append(this.headerSlot,r,this.footerSlot,this.closeSlot),e.append(n,this.dialog),this.dialog.addEventListener("cancel",a=>{a.preventDefault(),this.#s||this.requestClose()}),this.dialog.addEventListener("pointerdown",a=>{this.#o=a.target===this.dialog}),this.dialog.addEventListener("click",a=>{this.#s||this.#o&&a.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#a?this.#u(Xt(this.getAttribute("state"))):this.#t=!1}),this.addEventListener(Yy,()=>this.requestClose())}connectedCallback(){this.#a?this.#u(Xt(this.getAttribute("state"))):(this.#n||(Xt(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#m()),this.#p(),this.#h()}disconnectedCallback(){this.#i(),this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#a&&this.#u(Xt(this.getAttribute("state"))),this.#p()):e==="name"&&this.#p()}get#a(){return this.hasAttribute("state")}get#s(){return this.hasAttribute("persistent")}get#f(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#f==="open")return;let e=this.#l("open");this.#a||e&&this.#m()}requestClose(){if(this.#f==="closed")return;let e=this.#l("closed");this.#a||e&&this.#b()}#l(e){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#f}}))}#u(e){e==="open"?this.#m():this.#b()}#m(){if(this.#t=!0,this.dialog.open||!this.isConnected)return;this.dialog.showModal();let e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.dialog.focus()}#b(){this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#h(){let e=this.headerSlot.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.dialog.setAttribute("aria-label",e):this.dialog.removeAttribute("aria-label")}#p(){let e=!this.#a&&!!this.getAttribute("name");e&&!this.#r?this.#d():!e&&this.#r&&this.#i()}#d(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let r=e.target;r instanceof Element&&(r.closest(`[data-dialog-open="${CSS.escape(n)}"]`)?this.requestOpen():r.closest(`[data-dialog-close="${CSS.escape(n)}"]`)&&this.requestClose())},this.doc.addEventListener("click",this.#r)}#i(){this.#r&&(this.doc.removeEventListener("click",this.#r),this.#r=void 0)}};function Ng(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",is)}Ng();var $y=`
1164
+ `,ss=class extends z{static observedAttributes=["state","name"];dialog;headerSlot;footerSlot;closeSlot;#e=0;#t=!1;#n=!1;#o=!1;#r;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Gy,this.dialog=document.createElement("dialog"),this.dialog.setAttribute("part","dialog"),this.dialog.tabIndex=-1,this.closeSlot=document.createElement("slot"),this.closeSlot.name="close",this.closeSlot.setAttribute("part","close"),this.headerSlot=document.createElement("slot"),this.headerSlot.name="header",this.headerSlot.setAttribute("part","header");let r=document.createElement("slot");r.setAttribute("part","body"),this.footerSlot=document.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer");for(let a of[this.headerSlot,this.footerSlot,this.closeSlot])a.addEventListener("slotchange",()=>{let o=a.assignedNodes().length>0;a.classList.toggle("has-content",o),a===this.closeSlot&&this.dialog.classList.toggle("has-close",o)});this.headerSlot.addEventListener("slotchange",()=>this.#p()),this.dialog.append(this.headerSlot,r,this.footerSlot,this.closeSlot),e.append(n,this.dialog),this.dialog.addEventListener("cancel",a=>{a.preventDefault(),this.#l||this.requestClose()}),this.dialog.addEventListener("pointerdown",a=>{this.#o=a.target===this.dialog}),this.dialog.addEventListener("click",a=>{this.#l||this.#o&&a.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#a?this.#h(Kt(this.getAttribute("state"))):this.#t=!1}),this.addEventListener(Zy,a=>{a.target.closest("a-dialog")===this&&this.requestClose()})}connectedCallback(){this.#a?this.#h(Kt(this.getAttribute("state"))):(this.#n||(Kt(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#f()),this.#m(),this.#p()}disconnectedCallback(){this.#s(),this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#a&&this.#h(Kt(this.getAttribute("state"))),this.#m()):e==="name"&&this.#m()}get#a(){return this.hasAttribute("state")}get#l(){return this.hasAttribute("persistent")}get#u(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#u==="open")return;let e=this.#i("open");this.#a||e&&this.#f()}requestClose(){if(this.#u==="closed")return;let e=this.#i("closed");this.#a||e&&this.#b()}#i(e){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#u}}))}#h(e){e==="open"?this.#f():this.#b()}#f(){if(this.#t=!0,this.dialog.open||!this.isConnected)return;this.dialog.showModal();let e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.dialog.focus()}#b(){this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#p(){let e=this.headerSlot.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.dialog.setAttribute("aria-label",e):this.dialog.removeAttribute("aria-label")}#m(){let e=!this.#a&&!!this.getAttribute("name");e&&!this.#r?this.#c():!e&&this.#r&&this.#s()}#c(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let r=e.target;r instanceof Element&&(r.closest(`[data-dialog-open="${CSS.escape(n)}"]`)?this.requestOpen():r.closest(`[data-dialog-close="${CSS.escape(n)}"]`)&&this.requestClose())},this.doc.addEventListener("click",this.#r)}#s(){this.#r&&(this.doc.removeEventListener("click",this.#r),this.#r=void 0)}};function Fg(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",ss)}Fg();var Ky=`
1175
1165
  .container {
1176
1166
  display: flex;
1177
1167
  flex-direction: column;
@@ -1260,7 +1250,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1260
1250
  :host([loading]) [part="content"] { animation: card-pulse 1.4s ease-in-out infinite; }
1261
1251
  }
1262
1252
  @keyframes card-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
1263
- `,ss=class extends B{static observedAttributes=["href","target","rel","ping","loading","aria-label"];#e;#t;#n;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=$y,this.#e=document.createElement("a"),this.#e.className="container",this.#e.setAttribute("part","container");let r=document.createElement("slot");r.name="media",r.setAttribute("part","media");let a=document.createElement("div");a.className="content",a.setAttribute("part","content");let o=document.createElement("div");o.className="header",o.setAttribute("part","header");let i=document.createElement("slot");i.name="icon",i.setAttribute("part","icon"),this.#t=document.createElement("slot"),this.#t.name="header",this.#t.setAttribute("part","title"),o.append(i,this.#t),this.#n=document.createElement("slot"),this.#n.setAttribute("part","body");let s=document.createElement("slot");s.name="footer",s.setAttribute("part","footer"),a.append(o,this.#n,s),this.#e.append(r,a),e.append(n,this.#e),this.#t.addEventListener("slotchange",()=>this.#r()),this.#n.addEventListener("slotchange",()=>this.#r())}connectedCallback(){this.#o()}attributeChangedCallback(){this.#o()}#o(){let e=this.getAttribute("href"),n=this.hasAttribute("loading");if(e!=null&&!n){this.#e.setAttribute("href",e);for(let r of["target","rel","ping"]){let a=this.getAttribute(r);a!=null?this.#e.setAttribute(r,a):this.#e.removeAttribute(r)}}else for(let r of["href","target","rel","ping"])this.#e.removeAttribute(r);n?this.#e.setAttribute("aria-busy","true"):this.#e.removeAttribute("aria-busy"),this.#r()}#r(){if(!this.#e.hasAttribute("href")){this.#e.removeAttribute("aria-label");return}let n=this.getAttribute("aria-label")?.trim()||this.#a(this.#t)||this.#a(this.#n)||this.getAttribute("href")||"";n?this.#e.setAttribute("aria-label",n):this.#e.removeAttribute("aria-label")}#a(e){return e.assignedNodes().map(n=>n.textContent??"").join(" ").replace(/\s+/g," ").trim()}};function _g(){typeof customElements>"u"||customElements.get("a-card")||customElements.define("a-card",ss)}_g();var Gy="dismissrequest",Ky="data-banner-dismiss",Xy=`
1253
+ `,ls=class extends z{static observedAttributes=["href","target","rel","ping","loading","aria-label"];#e;#t;#n;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Ky,this.#e=document.createElement("a"),this.#e.className="container",this.#e.setAttribute("part","container");let r=document.createElement("slot");r.name="media",r.setAttribute("part","media");let a=document.createElement("div");a.className="content",a.setAttribute("part","content");let o=document.createElement("div");o.className="header",o.setAttribute("part","header");let i=document.createElement("slot");i.name="icon",i.setAttribute("part","icon"),this.#t=document.createElement("slot"),this.#t.name="header",this.#t.setAttribute("part","title"),o.append(i,this.#t),this.#n=document.createElement("slot"),this.#n.setAttribute("part","body");let s=document.createElement("slot");s.name="footer",s.setAttribute("part","footer"),a.append(o,this.#n,s),this.#e.append(r,a),e.append(n,this.#e),this.#t.addEventListener("slotchange",()=>this.#r()),this.#n.addEventListener("slotchange",()=>this.#r())}connectedCallback(){this.#o()}attributeChangedCallback(){this.#o()}#o(){let e=this.getAttribute("href"),n=this.hasAttribute("loading");if(e!=null&&!n){this.#e.setAttribute("href",e);for(let r of["target","rel","ping"]){let a=this.getAttribute(r);a!=null?this.#e.setAttribute(r,a):this.#e.removeAttribute(r)}}else for(let r of["href","target","rel","ping"])this.#e.removeAttribute(r);n?this.#e.setAttribute("aria-busy","true"):this.#e.removeAttribute("aria-busy"),this.#r()}#r(){if(!this.#e.hasAttribute("href")){this.#e.removeAttribute("aria-label");return}let n=this.getAttribute("aria-label")?.trim()||this.#a(this.#t)||this.#a(this.#n)||this.getAttribute("href")||"";n?this.#e.setAttribute("aria-label",n):this.#e.removeAttribute("aria-label")}#a(e){return e.assignedNodes().map(n=>n.textContent??"").join(" ").replace(/\s+/g," ").trim()}};function Vg(){typeof customElements>"u"||customElements.get("a-card")||customElements.define("a-card",ls)}Vg();var Xy="dismissrequest",Jy="data-banner-dismiss",Qy=`
1264
1254
  slot[name="message"], slot:not([name]) { display: contents; }
1265
1255
 
1266
1256
  slot[name="actions"] {
@@ -1284,7 +1274,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1284
1274
  slot[name="close"]:focus-within {
1285
1275
  opacity: 1;
1286
1276
  }
1287
- `,Fg=Xt,ls=class extends B{static observedAttributes=["state"];#e;#t=!1;constructor(){super(),this.#e=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Xy;let r=document.createElement("slot");r.name="message",r.setAttribute("part","message");let a=document.createElement("slot");a.setAttribute("part","content");let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions");let i=()=>{o.hidden=!o.assignedNodes({flatten:!0}).some(l=>{if(l.nodeType===Node.TEXT_NODE)return l.textContent?.trim()!=="";if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return!c.hasAttribute("data-anta-banner-actions-wrapper")||!c.matches(":empty")})};o.hidden=!0,o.addEventListener("slotchange",i);let s=document.createElement("slot");s.name="close",s.setAttribute("part","close"),e.append(n,r,a,o,s),i(),this.addEventListener(Gy,l=>{l.stopPropagation(),this.#s()}),vo(this,Ky,()=>this.#s())}get#n(){return this.hasAttribute("state")}get#o(){return this.#e?.states?.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#a(Fg(this.getAttribute("state"))):this.#t||(this.#a(this.#r()),this.#t=!0)}#r(){return this.getAttribute("default-state")==="closed"?"closed":"open"}attributeChangedCallback(e){e==="state"&&this.#n&&this.#a(Fg(this.getAttribute("state")))}#a(e){if(this.#e)try{e==="closed"?(this.#e?.states?.add("closed"),this.#e?.states?.delete("open")):(this.#e?.states?.add("open"),this.#e?.states?.delete("closed"))}catch{}}#s(){if(this.#o==="closed")return;let e=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));this.#n||e&&this.#a("closed")}};function Hg(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",ls)}Hg();var jg=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],Jy="bottom-right",Vg=Object.freeze([]),Qy=0;function cs(){let t=Vg,e=new Set,n=()=>e.forEach(l=>l());function r(l,c={}){let d=c.id??`t${++Qy}`,u=t.findIndex(f=>f.id===d),m=u===-1?void 0:t[u],p={id:d,render:l,placement:c.placement??m?.placement??Jy,duration:"duration"in c?c.duration:m?.duration,politeness:c.politeness??m?.politeness,leaving:!1,rev:m?m.rev+1:0};return t=m?t.map((f,b)=>b===u?p:f):[...t,p],n(),d}function a(l){let c=!1;t=t.map(d=>d.id===l&&!d.leaving?(c=!0,{...d,leaving:!0}):d),c&&n()}function o(l,c){let d=!1;t=t.map(u=>u.id===l&&!u.leaving?(d=!0,{...u,render:c,rev:u.rev+1}):u),d&&n()}function i(l){let c=t.filter(d=>d.id!==l);c.length!==t.length&&(t=c,n())}function s(){let l=!1;t=t.map(c=>c.leaving?c:(l=!0,{...c,leaving:!0})),l&&n()}return{add:r,dismiss:a,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return Vg}}}var e1=jg,ds=class extends B{#e;#t=!1;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=t1,this.#e=document.createElement("div"),this.#e.className="region",this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let r of e1){let a=document.createElement("slot");a.name=r,this.#e.append(a)}this.#e.addEventListener("slotchange",this.#n),e.append(n,this.#e)}connectedCallback(){this.#n()}disconnectedCallback(){this.#t=!1}#n=()=>{let e=this.#e;if(typeof e.showPopover!="function")return;let n=this.childElementCount>0;if(n&&!this.#t){if(!this.isConnected)return;try{e.showPopover(),this.#t=!0}catch{}}else if(!n&&this.#t){try{e.matches(":popover-open")&&e.hidePopover()}catch{}this.#t=!1}}},t1=`
1277
+ `,Hg=Kt,cs=class extends z{static observedAttributes=["state"];#e;#t=!1;constructor(){super(),this.#e=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Qy;let r=document.createElement("slot");r.name="message",r.setAttribute("part","message");let a=document.createElement("slot");a.setAttribute("part","content");let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions");let i=()=>{o.hidden=!o.assignedNodes({flatten:!0}).some(l=>{if(l.nodeType===Node.TEXT_NODE)return l.textContent?.trim()!=="";if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return!c.hasAttribute("data-anta-banner-actions-wrapper")||!c.matches(":empty")})};o.hidden=!0,o.addEventListener("slotchange",i);let s=document.createElement("slot");s.name="close",s.setAttribute("part","close"),e.append(n,r,a,o,s),i(),this.addEventListener(Xy,l=>{l.stopPropagation(),this.#l()}),xo(this,Jy,()=>this.#l())}get#n(){return this.hasAttribute("state")}get#o(){return this.#e?.states?.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#a(Hg(this.getAttribute("state"))):this.#t||(this.#a(this.#r()),this.#t=!0)}#r(){return this.getAttribute("default-state")==="closed"?"closed":"open"}attributeChangedCallback(e){e==="state"&&this.#n&&this.#a(Hg(this.getAttribute("state")))}#a(e){if(this.#e)try{e==="closed"?(this.#e?.states?.add("closed"),this.#e?.states?.delete("open")):(this.#e?.states?.add("open"),this.#e?.states?.delete("closed"))}catch{}}#l(){if(this.#o==="closed")return;let e=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));this.#n||e&&this.#a("closed")}};function jg(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",cs)}jg();var Ug=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],e1="bottom-right",qg=Object.freeze([]),t1=0;function ds(){let t=qg,e=new Set,n=()=>e.forEach(l=>l());function r(l,c={}){let d=c.id??`t${++t1}`,u=t.findIndex(f=>f.id===d),m=u===-1?void 0:t[u],p={id:d,render:l,placement:c.placement??m?.placement??e1,duration:"duration"in c?c.duration:m?.duration,politeness:c.politeness??m?.politeness,leaving:!1,rev:m?m.rev+1:0};return t=m?t.map((f,b)=>b===u?p:f):[...t,p],n(),d}function a(l){let c=!1;t=t.map(d=>d.id===l&&!d.leaving?(c=!0,{...d,leaving:!0}):d),c&&n()}function o(l,c){let d=!1;t=t.map(u=>u.id===l&&!u.leaving?(d=!0,{...u,render:c,rev:u.rev+1}):u),d&&n()}function i(l){let c=t.filter(d=>d.id!==l);c.length!==t.length&&(t=c,n())}function s(){let l=!1;t=t.map(c=>c.leaving?c:(l=!0,{...c,leaving:!0})),l&&n()}return{add:r,dismiss:a,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return qg}}}var n1=Ug,us=class extends z{#e;#t=!1;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=r1,this.#e=document.createElement("div"),this.#e.className="region",this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let r of n1){let a=document.createElement("slot");a.name=r,this.#e.append(a)}this.#e.addEventListener("slotchange",this.#n),e.append(n,this.#e)}connectedCallback(){this.#n()}disconnectedCallback(){this.#t=!1}#n=()=>{let e=this.#e;if(typeof e.showPopover!="function")return;let n=this.childElementCount>0;if(n&&!this.#t){if(!this.isConnected)return;try{e.showPopover(),this.#t=!0}catch{}}else if(!n&&this.#t){try{e.matches(":popover-open")&&e.hidePopover()}catch{}this.#t=!1}}},r1=`
1288
1278
  :host { display: contents; }
1289
1279
 
1290
1280
  .region {
@@ -1318,7 +1308,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1318
1308
  slot[name$="-left"] { left: var(--toaster-inset, 16px); }
1319
1309
  slot[name$="-right"] { right: var(--toaster-inset, 16px); }
1320
1310
  slot[name$="-center"] { left: 50%; transform: translateX(-50%); }
1321
- `;function qg(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",ds)}qg();var n1=220,Ug=5e3,r1="data-toast-dismiss",us=class extends B{static observedAttributes=["leaving","rev"];#e;#t;#n;#o;#r;#a;#s=0;#f=0;#l=!1;#u=!1;#m=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(r){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",r)}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=a1,this.#t=document.createElement("slot"),e.append(n,this.#t),vo(this,r1,()=>this.dismiss())}connectedCallback(){if(this.#h(),this.addEventListener("pointerenter",this.#T),this.addEventListener("pointerleave",this.#D),this.addEventListener("focusin",this.#A),this.addEventListener("focusout",this.#C),this.hasAttribute("leaving")){this.dismiss();return}this.#i()}disconnectedCallback(){this.#g(),this.#a!=null&&(this.view.clearTimeout(this.#a),this.#a=void 0),this.removeEventListener("pointerenter",this.#T),this.removeEventListener("pointerleave",this.#D),this.removeEventListener("focusin",this.#A),this.removeEventListener("focusout",this.#C)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#l&&this.#b():e==="rev"&&this.isConnected&&this.restart()}#b(){this.#a!=null&&(this.view.clearTimeout(this.#a),this.#a=void 0),this.#l=!1,this.#e?.states?.delete("leaving"),this.#i()}get content(){return this.#n??null}set content(e){this.#n=e??void 0,this.#h()}#h(){this.#n!==this.#o&&(this.#o?.parentNode===this&&this.removeChild(this.#o),this.#o=this.#n,this.#n&&this.append(this.#n))}get#p(){let e=this.getAttribute("duration");if(e==null)return Ug;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:Ug}get#d(){return this.#u||this.#m}#i(){this.#s=this.#p,this.#x(),this.#w()}#x(){Number.isFinite(this.#p)?(this.#t.style.animation=`toast-remaining ${this.#p}ms linear forwards`,this.#c(e=>{e.currentTime=0}),(this.#d||this.#l)&&this.#v()):this.#t.style.animation=""}#c(e){try{for(let n of this.#t.getAnimations?.()??[])n.animationName==="toast-remaining"&&e(n)}catch{}}#v(){this.#c(e=>e.pause())}#y(){this.#c(e=>e.play())}#w(){if(!(this.#r!=null||this.#l||this.#d||!Number.isFinite(this.#p))){if(this.#s<=0){this.dismiss();return}this.#f=Date.now(),this.#r=this.view.setTimeout(()=>{this.#r=void 0,this.dismiss()},this.#s),this.#y()}}#g(){this.#r!=null&&(this.view.clearTimeout(this.#r),this.#r=void 0)}#E(){this.#r!=null&&(this.#s-=Date.now()-this.#f,this.#g(),this.#v())}#T=()=>{this.#u=!0,this.#E()};#D=()=>{this.#u=!1,this.#w()};#A=()=>{this.#m=!0,this.#E()};#C=()=>{this.#m=!1,this.#w()};#I(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#M(){if(this.#I())return 0;let e=this.view.getComputedStyle?.(this).getPropertyValue("--toast-dur").trim();if(e){let n=parseFloat(e);if(Number.isFinite(n))return e.endsWith("ms")?n:n*1e3}return n1}restart(){this.#l||(this.#g(),this.#i())}dismiss(){if(this.#l)return;this.#l=!0,this.#g(),this.#v(),this.#e?.states?.add("leaving");let e=this.#M();this.#a=this.view.setTimeout(()=>{this.#a=void 0,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}},a1=`
1311
+ `;function Yg(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",us)}Yg();var a1=220,Wg=5e3,o1="data-toast-dismiss",hs=class extends z{static observedAttributes=["leaving","rev"];#e;#t;#n;#o;#r;#a;#l=0;#u=0;#i=!1;#h=!1;#f=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(r){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",r)}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=i1,this.#t=document.createElement("slot"),e.append(n,this.#t),xo(this,o1,()=>this.dismiss())}connectedCallback(){if(this.#p(),this.addEventListener("pointerenter",this.#g),this.addEventListener("pointerleave",this.#I),this.addEventListener("focusin",this.#E),this.addEventListener("focusout",this.#O),this.hasAttribute("leaving")){this.dismiss();return}this.#s()}disconnectedCallback(){this.#T(),this.#a!=null&&(this.view.clearTimeout(this.#a),this.#a=void 0),this.removeEventListener("pointerenter",this.#g),this.removeEventListener("pointerleave",this.#I),this.removeEventListener("focusin",this.#E),this.removeEventListener("focusout",this.#O)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#i&&this.#b():e==="rev"&&this.isConnected&&this.restart()}#b(){this.#a!=null&&(this.view.clearTimeout(this.#a),this.#a=void 0),this.#i=!1,this.#e?.states?.delete("leaving"),this.#s()}get content(){return this.#n??null}set content(e){this.#n=e??void 0,this.#p()}#p(){this.#n!==this.#o&&(this.#o?.parentNode===this&&this.removeChild(this.#o),this.#o=this.#n,this.#n&&this.append(this.#n))}get#m(){let e=this.getAttribute("duration");if(e==null)return Wg;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:Wg}get#c(){return this.#h||this.#f}#s(){this.#l=this.#m,this.#A(),this.#y()}#A(){Number.isFinite(this.#m)?(this.#t.style.animation=`toast-remaining ${this.#m}ms linear forwards`,this.#v(e=>{e.currentTime=0}),(this.#c||this.#i)&&this.#x()):this.#t.style.animation=""}#v(e){try{for(let n of this.#t.getAnimations?.()??[])n.animationName==="toast-remaining"&&e(n)}catch{}}#x(){this.#v(e=>e.pause())}#S(){this.#v(e=>e.play())}#y(){if(!(this.#r!=null||this.#i||this.#c||!Number.isFinite(this.#m))){if(this.#l<=0){this.dismiss();return}this.#u=Date.now(),this.#r=this.view.setTimeout(()=>{this.#r=void 0,this.dismiss()},this.#l),this.#S()}}#T(){this.#r!=null&&(this.view.clearTimeout(this.#r),this.#r=void 0)}#d(){this.#r!=null&&(this.#l-=Date.now()-this.#u,this.#T(),this.#x())}#g=()=>{this.#h=!0,this.#d()};#I=()=>{this.#h=!1,this.#y()};#E=()=>{this.#f=!0,this.#d()};#O=()=>{this.#f=!1,this.#y()};#M(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#B(){if(this.#M())return 0;let e=this.view.getComputedStyle?.(this).getPropertyValue("--toast-dur").trim();if(e){let n=parseFloat(e);if(Number.isFinite(n))return e.endsWith("ms")?n:n*1e3}return a1}restart(){this.#i||(this.#T(),this.#s())}dismiss(){if(this.#i)return;this.#i=!0,this.#T(),this.#x(),this.#e?.states?.add("leaving");let e=this.#B();this.#a=this.view.setTimeout(()=>{this.#a=void 0,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}},i1=`
1322
1312
  :host { display: block; opacity: 1; translate: 0 0; }
1323
1313
  :host(:state(leaving)) { opacity: 0; }
1324
1314
 
@@ -1340,7 +1330,7 @@ ${e}`:e}function kx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1340
1330
  from { --toast-remaining: 1; }
1341
1331
  to { --toast-remaining: 0; }
1342
1332
  }
1343
- `;function Yg(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",us)}Yg();var o1=({seed:t,name:e,src:n,size:r,badge:a,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof r=="number",u=d?tt(r,"--avatar-size",l):l,m=ne(o,"--avatar-radius",u),p=_(a,"--avatar-badge-tone-source",m);return h("a-avatar",{seed:t,name:e,src:n,size:!d&&r&&r!=="medium"?r:void 0,badge:a,round:X(o),config:i?JSON.stringify(i):void 0,role:e?"img":void 0,"aria-label":e||void 0,"aria-hidden":e?void 0:"true",class:s,style:p,...c})};var i1=({value:t,max:e=100,tone:n,size:r,round:a,label:o,hint:i,className:s,style:l,children:c,...d})=>{let u=t==null||t===!1,m=typeof t=="number"?t:0,p=e>0?Math.round(Math.min(100,Math.max(0,m/e*100))):0,f=e>0?Math.min(e,Math.max(0,m)):0,b=[o,!u&&`${p}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return h("a-progress",{value:u?!1:m,max:e,tone:Q(n),size:r&&r!=="medium"?r:void 0,round:X(a),role:"progressbar","aria-valuenow":u?void 0:f,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":b,class:s,style:ne(a,"--progress-round",_(n,"--progress-tone-source",l)),...d,children:Qd(c)?c:S("a-progress-label",{children:[!u&&S("a-progress-number",{children:[p,"%"]}),o!=null&&h("a-progress-text",{children:o}),i!=null&&h("a-progress-hint",{children:i})]})})};var Td=({tone:t,value:e,max:n=100,size:r,speed:a,label:o,className:i,style:s,...l})=>{let c=typeof e=="number"&&Number.isFinite(e),d=Number.isFinite(n)&&n>0?n:100,u=c?Math.min(d,Math.max(0,e)):void 0,m=u!=null?u/d*100:void 0,p={...s,...r!=null?{"--loader-size":`${r}px`}:{},...!c&&a!=null&&Number.isFinite(a)&&a>0?{"--loader-speed":`${a}s`}:{},...m!=null?{"--loader-value":`${m}%`}:{}},f=o!=null?{role:"progressbar","aria-label":o,"aria-valuenow":c?u:void 0,"aria-valuemin":c?0:void 0,"aria-valuemax":c?d:void 0}:{"aria-hidden":"true"};return h("a-loader",{tone:Q(t),...c?{value:u}:{},class:i,style:p,...f,...l})};var ct=({delay:t,placement:e,round:n,follow:r,interactive:a,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>h("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"||e==="left"?e:void 0,round:X(n),follow:r?"":void 0,interactive:a?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:ne(n,"--tooltip-round",l),...d,children:c});var hs=({priority:t,tone:e,size:n,inline:r,truncate:a,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=fo(a),m=Q(e),p=_(m,"--text-tone-source",u!=null?{...l,"--line-clamp":u}:l),f=o&&u!=null;return S("a-text",{priority:t,tone:m,size:n,inline:r?"":void 0,truncate:u!=null?String(u):void 0,expandable:f?"":void 0,collapsible:f&&i?"":void 0,class:s,style:p,...d,children:[c,u!=null&&!f&&h(ct,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};function s1(t,e,n){let r=[...new Set(t==null?[]:typeof t=="string"?[t]:t)],{fields:a,context:o}=Ao(r.join(" ")||null);return e!=null&&a.size===0&&r.push("size"),n!=null&&!o&&r.push("context"),r.join(" ")||void 0}var l1=({display:t,round:e,gap:n,includeRectsFor:r,padding:a,margin:o,observe:i,observeOffscreen:s,throttle:l,fade:c,fadeSize:d,onMeasureChange:u,onContextChange:m,className:p,style:f,children:b,...g})=>{let v=ne(e,"--box-round",f);return v=tt(n,"--box-gap",v),v=tt(a,"--box-padding",v),v=tt(o,"--box-margin",v),v=tt(c?d:void 0,"--box-fade-size",v),h("a-box",{display:t==="block"?void 0:t,round:X(e),gap:n!=null?"":void 0,"include-rects-for":r,padding:a!=null?"":void 0,margin:o!=null?"":void 0,observe:s1(i,u,m),"observe-offscreen":s?"":void 0,throttle:l,fade:c?"":void 0,"fade-size":c&&d!=null?br(d):void 0,onmeasurechange:Vn(u),oncontextchange:Vn(m),class:p,style:v,...g,children:b})};function Sd(t){if(!(t===void 0||t===!1))return t===!0?"":["up","down","left","right"].filter(e=>t[e]).join(" ")||"none"}function Wg(t){if(t)return{"wheel-delay":t.delay,"wheel-tolerance":t.tolerance,"wheel-reset-on-move":t.resetOnMove?"":void 0}}function Zg(t){if(t)return t===!0?{"pointer-capture":""}:{"pointer-capture":t.pointerTypes?.join(" ")||(t.pointerTypes?"none":""),"pointer-buttons":t.buttons?.join(" ")||(t.buttons?"none":void 0),"pointer-threshold":t.threshold,"pointer-modifier":t.modifier,"pointer-include-interactive":t.includeInteractive?"":void 0}}function $g(t){if(!t)return;let e=t===!0?{}:t,n=typeof e.inertia=="object"?e.inertia:void 0;return{pan:e.axis??"both","pan-pointer-types":e.pointerTypes?.join(" ")||(e.pointerTypes?"none":void 0),"pan-threshold":e.threshold,"pan-directions":e.directions===!1?"none":Sd(e.directions),"pan-inertia":e.inertia?"":void 0,"pan-time-constant":n?.timeConstant,"pan-min-velocity":n?.minVelocity}}var c1=({wheelCapture:t,wheelActivation:e,wheelModifier:n,wheelSettle:r,onWheelInput:a,pointerCapture:o,onPointerInput:i,pan:s,onPanInput:l,className:c,children:d,...u})=>h("a-capture",{"wheel-capture":Sd(t),"wheel-activation":t?e:void 0,"wheel-modifier":t?n:void 0,...Wg(t?r:void 0),...Zg(o),...$g(s),onwheelinput:Vn(a),onpointerinput:Vn(i),onpaninput:Vn(l),class:c,...u,children:d});var d1=({maximized:t,defaultMaximized:e,onStateChange:n,className:r,children:a,...o})=>h("a-panel",{state:t===void 0?void 0:t?"maximized":"normal","default-state":t===void 0&&e?"maximized":void 0,onstatechange:n?i=>{let{event:s,detail:l,isOwn:c}=ie(i);c&&l&&n(s,{next:l.next==="maximized",prev:l.prev==="maximized"})}:void 0,class:r,...o,children:a});var Ad=({level:t=2,priority:e,tone:n,truncate:r,className:a,style:o,children:i,...s})=>{let l=fo(r),c=Q(n),d=_(c,"--title-tone-source",l!=null?{...o,"--line-clamp":l}:o);return S("a-title",{level:String(t),priority:e,tone:c,truncate:l!=null?String(l):void 0,role:"heading","aria-level":t,class:a,style:d,...s,children:[i,l!=null&&h(ct,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var be=({shape:t,size:e,label:n,className:r,style:a,...o})=>{let i=e!=null?{...a,"--icon-size":`${e}px`}:a,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return h("a-icon",{shape:t,class:r,style:i,...s,...o})};var ps=({icon:t,iconTrailing:e,label:n,value:r,tone:a,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let m=Q(a),p=_(m,"--tag-tone-source",c),f=r!=null,b=t!=null&&n==null&&r==null&&d==null&&e==null;return S("a-tag",{tone:m,"aria-label":b?`${t} tag`:void 0,priority:o&&o!=="secondary"?o:void 0,size:i&&i!=="medium"?i:void 0,allcaps:s?"":void 0,class:l,style:p,...u,children:[t&&h(be,{shape:t}),n!=null&&(f?h("a-tag-label",{children:n}):h("a-tag-value",{children:n})),f&&h("a-tag-value",{children:r}),d,e&&h(be,{shape:e})]})};var pe=({priority:t,tone:e,underline:n,underlineOnHover:r,icon:a,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:m,onClick:p,href:f,target:b,rel:g,download:v,ping:x,type:w,form:I,className:C,style:L,children:R,...O})=>{let A=Q(e),N=d||c,U=ne(m,"--button-round",_(A,"--button-tone-source",L)),Y=a!=null&&s==null&&R==null&&o==null,K={role:"button",priority:t,tone:A,underline:n,"underline-on-hover":r?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:X(m),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:N?-1:0,"aria-disabled":N?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":Y?a:void 0,class:C,style:U,onClick:N?void 0:p},z=S(he,{children:[a&&h("a-icon",{shape:a,"aria-hidden":"true"}),s!=null&&h("a-button-label",{children:s}),mo(R,"a-button-label"),o&&h("a-icon",{shape:o,"aria-hidden":"true"})]});if(f!=null){let se={...K,disabled:N||void 0};return h("a",{href:N?void 0:f,"data-anta":"",target:b,rel:g,download:v,ping:x,...se,...O,children:z})}return h("a-button",{type:w,form:I,...K,...O,children:z})};function ms(t){let{copy:e,copyNode:n,copyUrl:r,copyWithUrl:a,onCopyRequest:o,onCopied:i,toast:s,copiedLabel:l}=t;return{copy:e??void 0,"copy-node":n===!0?"":typeof n=="string"?n:void 0,"copy-url":r?"":void 0,"copy-with-url":a?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(ie(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function fs(t){return t.copyNode!=null&&t.copyNode!==!1}var Md=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:r,onCopied:a,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":m,...p})=>{let f=e==="none"?void 0:t??"copy",{shownIcon:b,shownTone:g,handleCopied:v}=xo(f,r,a),x=e==="trailing"?{iconTrailing:b}:e==="none"?{}:{icon:b},w=d!=null||u!=null,I=ms({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:v,toast:e==="none",copiedLabel:n});return S(pe,{...x,label:d,tone:e==="none"?r:g,"aria-label":m??(w?void 0:"Copy"),"data-copy-node-button":fs({copyNode:s})?"":void 0,...p,children:[u,h("a-copy",{...I})]})};var je=({placement:t,context:e,coord:n,nohover:r,offset:a,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:m,style:p,children:f,...b})=>h("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:r?"":void 0,offset:a!=null?String(a):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:v,detail:x,isOwn:w}=ie(g);w&&x&&l(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,round:X(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":u==="menu"||u==="listbox"?"vertical":void 0,class:m,style:tt(i,"--menu-padding",ne(c,"--menu-round",p)),...b,children:f});var Id={"\u2318":"Meta",cmd:"Meta",command:"Meta",win:"Meta",super:"Meta","\u2303":"Control",ctrl:"Control",control:"Control","\u2325":"Alt",alt:"Alt",opt:"Alt",option:"Alt","\u21E7":"Shift",shift:"Shift","\u21B5":"Enter","\u23CE":"Enter",enter:"Enter",return:"Enter","\u232B":"Backspace",backspace:"Backspace","\u2326":"Delete",del:"Delete",delete:"Delete","\u238B":"Escape",esc:"Escape",escape:"Escape","\u21E5":"Tab",tab:"Tab","\u2423":"Space",space:"Space","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight","\u21DE":"PageUp","\u21DF":"PageDown","\u2196":"Home","\u2198":"End"};function u1(t){let e=[],n="",r=()=>{n&&(e.push(Id[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)),n="")};for(let a of t)Id[a]?(r(),e.push(Id[a])):a==="+"?r():n+=a;return r(),e.length?e.join("+"):void 0}function h1(t){let e=t.trim().replace(/\s*\+\s*/g,"+").split(/\s+/).map(u1).filter(n=>n!==void 0);return e.length?e.join(" "):void 0}var Te=({icon:t,label:e,hint:n,kbd:r,iconTrailing:a,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneScope:u,submenu:m,value:p,onSelect:f,href:b,target:g,rel:v,download:x,ping:w,role:I,className:C,style:L,children:R,...O})=>{let A=t,N=s==="checkbox"||s==="radio"||s==="check"||s==="switch",U=s==="checkbox"||s==="switch"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",Y=N?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,K=i&&(s===void 0||s==="check"),z=u==="selected"&&!i?void 0:d,se=Q(z),re=s==="switch"?{"data-menu-open":""}:{},E=O["aria-keyshortcuts"],G=r?h1(r):void 0,$=r?h("kbd",{"aria-hidden":E??G?"true":void 0,children:r}):null,me=e!=null&&(n!=null?S("a-menu-item-text",{children:[h("a-menu-item-label",{children:e}),h("a-menu-item-hint",{children:n})]}):h("a-menu-item-label",{children:e}));if(b!=null){let J={"data-anta-menu-item":"",role:I??"menuitem",href:o?void 0:b,target:g,rel:v,download:x===!0?"":x||void 0,ping:w,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,"aria-keyshortcuts":G,tone:se,style:_(z,"--menu-item-tone-source",L),onClick:f&&!o?ge=>f(ge,{value:p,label:e}):void 0,class:C};return S("a",{...J,...O,children:[t&&h("a-icon",{shape:t,"aria-hidden":"true"}),me,R,$,a&&h("a-icon",{shape:a,"aria-hidden":"true"})]})}return S("a-menu-item",{role:I??U,tabIndex:0,disabled:o?"":void 0,selected:K?"":void 0,"aria-checked":Y,tone:se,style:_(z,"--menu-item-tone-source",L),submenu:m?"":void 0,"aria-haspopup":m?"menu":void 0,"aria-disabled":o?"true":void 0,"aria-keyshortcuts":G,onmenuselect:f?J=>f(J,{value:p,label:e}):void 0,class:C,...O,...re,children:[c!=null?h("span",{"aria-hidden":"true","data-indicator":"",style:{flex:"none",display:"inline-flex",alignItems:"center",minHeight:"1lh",pointerEvents:"none"},children:c}):s==="checkbox"?h("a-checkbox",{"aria-hidden":"true",state:l?"indeterminate":i?"checked":"unchecked",tone:se,style:_(z,"--checkbox-tone-source")}):s==="radio"?h("a-radio",{"aria-hidden":"true",selected:!!i,tone:se,style:_(z,"--radio-tone-source")}):null,A&&h("a-icon",{shape:A,"aria-hidden":"true"}),me,R,$,s==="switch"&&c==null&&h("a-switch",{"data-menu-item-switch":"","aria-hidden":"true",tabIndex:-1,state:i?"checked":"unchecked",disabled:o?"":void 0,size:"small",tone:se,style:_(z,"--switch-tone-source",_(z,"--switch-off-tone-source"))}),(()=>{let J=m?a??"chevron-right":a;return!m&&!a&&s==="check"&&c==null&&(J=i?"check":"blank"),J?h("a-icon",{shape:J,"aria-hidden":"true"}):null})()]})};var Dd=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:r,tone:a,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...m})=>{let p=n==="none"?void 0:e,{shownIcon:f,shownTone:b,handleCopied:g}=xo(p,a,o),v=n==="trailing"?{iconTrailing:f}:n==="none"?{}:{icon:f},x=ms({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:g,toast:n==="none",copiedLabel:r});return S(Te,{label:t,tone:b,...v,"data-menu-open":"","data-copy-node-button":fs({copyNode:l})?"":void 0,...m,children:[u,h("a-copy",{...x})]})};var p1=new Set(["\u2192","/","\u2022","\u25B8"]);function Gg(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function m1(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let r=Math.max(1,Math.floor(e));if(t.length<=r)return t.map(s=>({kind:"item",item:s}));let a=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),r-1),o=r-a,i=t.slice(a,t.length-o);return[...t.slice(0,a).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function Kg(t){return t.current?{"aria-current":"page"}:{}}function f1(t,e,n,r,a,o,i){let{label:s,current:l,...c}=t,d=Kg(t);if(Gg(t)){let m={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(Md,{...m,children:s},i)}let u={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(pe,{...u,children:s},i)}function b1(t,e){let{label:n,current:r,onClick:a,...o}=t,i=Kg(t);return Gg(t)?h(Dd,{...o,label:n,onSelect:a,...i},e):h(Te,{...o,label:n,onSelect:a,...i},e)}var g1=({items:t,priority:e="quaternary",size:n="medium",separator:r="chevron-right",maxItems:a,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":m,...p})=>{let f=m1(t,a,o),b=p1.has(r),g=b?r:h(be,{shape:r});return h("a-breadcrumbs",{role:"navigation","aria-label":m??"Breadcrumb","data-size":n==="medium"?void 0:n,"data-paddingless":c?"":void 0,"data-separator-icon":b?void 0:"",class:d,style:u,...p,children:f.flatMap((v,x)=>{let w=v.kind==="overflow"?[h(pe,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${x}`),h(je,{autoWidth:!0,children:v.items.map((I,C)=>b1(I,C))},`menu-${x}`)]:[f1(v.item,e,n,s,l,c,x)];return x<f.length-1&&w.push(h("a-breadcrumb-separator",{"aria-hidden":"true",children:g},`separator-${x}`)),w})})};var v1=["arrow-left-to-line","arrow-left","arrow-narrow-down","arrow-narrow-up-down","arrow-narrow-up","arrow-right","arrow-top-right","asterisk","blank","book-open","braces","bug","calendar-days","calendar","case-sensitive","chat","check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-right","circle-check","circle-dot","circle-large","circle-small-solid","circle-user","circle","click","clock","cloud-upload","columns-3-cog","copy","corner-down-right","cube","dollar-sign","dots-vertical","download","edit","external-link","eye-closed","eye","file-down","file","filter-x","filter","folder-close","folder-open","folder-tree","hat-glasses","heart-handshake","heart","history-tree","history","home","hourglass","info","link","list-collapse","maximize","megaphone","menu","minimize","minus","moon","more","move-horizontal","not-equal","play","plus","pointer","presentation","refresh-ccw-dot","refresh","regex","repeat","rotate-ccw","rss","runs-history","scroll-text","search-check","search","send","settings","share","sparkles","square-check-big","square-menu","sun","swatch-book","table-2","tag","text-cursor-input","text-initial","timer","toggle-right","trash","view","warning-diamond","warning-triangle","webhook","workflow","x"],x1={"columns-3-cog":["columns","table","settings","configure","fields","visibility"],blank:["spacer","empty","placeholder","space","none"],"warning-diamond":["error","invalid","alert","danger"],"swatch-book":["palette","color","swatch","paint","design"],"hat-glasses":["accessibility","vision","disguise","person"],"heart-handshake":["credits","thanks","agreement","deal","partnership"],heart:["like","favorite","love","wishlist"],hourglass:["progress","time","wait","loading","timer"],"text-initial":["text","typography","letter","a"],"chevron-down":["arrow","expand","open","down"],"chevron-up":["arrow","collapse","close","up"],"chevron-left":["arrow","back","previous"],"chevron-right":["arrow","forward","next"],"chevrons-right":["skip","fast forward"],"arrow-narrow-down":["download","fall","down"],"arrow-narrow-up":["upload","rise","up"],"arrow-left":["back","previous","prev"],"arrow-right":["forward","next"],"arrow-narrow-up-down":["sort","swap","transfer","reorder"],"arrow-top-right":["external","open","leave"],"arrow-left-to-line":["dock","snap","align"],"move-horizontal":["resize","swap","horizontal"],"external-link":["open","link","share","outbound"],check:["tick","ok","done","confirm","approve"],"dollar-sign":["currency","money","payment"],"circle-check":["success","ok","done"],"circle-user":["avatar","person","account","contact","profile"],x:["close","cancel","dismiss","remove","no"],plus:["add","new","create"],minus:["remove","subtract"],menu:["hamburger","list","more"],"dots-vertical":["more","kebab","options"],search:["find","magnify","lookup"],"search-check":["found","validated"],copy:["duplicate","clone"],trash:["delete","remove","bin"],edit:["pencil","modify","rename"],view:["show","display","preview"],click:["tap","press","touch"],send:["submit","share","deliver"],play:["start","run","execute"],refresh:["reload","sync","update"],regex:["pattern","match"],repeat:["loop","retry","rerun"],info:["information","about","i"],"warning-triangle":["alert","danger","caution"],bug:["defect","issue","error"],asterisk:["star","wildcard"],braces:["code","brackets","json"],"case-sensitive":["aA","capitalize","case"],"list-collapse":["list","collapse","expand","items"],"table-2":["table","grid","data","spreadsheet","rows","columns"],"folder-open":["directory","browse"],"folder-close":["directory"],"folder-tree":["hierarchy","structure","tree"],file:["document","page"],"file-down":["download","save"],calendar:["date","schedule"],clock:["time"],timer:["stopwatch","countdown","time"],"toggle-right":["toggle","switch","on","off","boolean"],history:["log","past"],"history-tree":["log","past"],"runs-history":["log","past"],chat:["message","comment","discuss"],presentation:["slides","deck"],"book-open":["read","docs","documentation"],sparkles:["ai","magic","generate"],cube:["box","package"],circle:["dot","point"],"circle-large":["dot","marker"],"not-equal":["neq","different"],"corner-down-right":["branch","indent","return"],rss:["feed","subscribe"],"scroll-text":["log","output","console"],workflow:["pipeline","process","flow"],webhook:["integration","hook"],megaphone:["announcement","broadcast"],maximize:["fullscreen","expand"],minimize:["collapse","shrink"],filter:["sort","narrow"],"filter-x":["clear filter","reset filter","remove filter"],download:["save","import"],"cloud-upload":["save","sync","upload","send","export"],link:["url","href","anchor"],more:["options","extra"],tag:["label","badge","chip"]};var Xg=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",Jg=t=>t==="indeterminate"?"indeterminate":t==="checked",y1=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),w1=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:m,style:p,children:f,tabIndex:b,...g})=>{let v=ne(i,"--checkbox-round",_(r,"--checkbox-tone-source",_(r,"--checkbox-off-tone-source",p))),x=g["aria-label"],w=(typeof x=="string"?x:void 0)??d??(typeof f=="string"?f:void 0),I=s?A=>{let{event:N,detail:U}=ie(A);U&&s(N,{next:Jg(U.next),prev:Jg(U.prev)})}:void 0,C=l||c?A=>{l?.(A),c?.(A,y1(A.currentTarget))}:void 0,L=t!==void 0?Xg(t):void 0,R=t===void 0&&e!==void 0?Xg(e):void 0,O=d!=null||f!=null;return S("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":w,...g,state:L,"default-state":R,disabled:n?"":void 0,tone:Q(r),"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),tabIndex:n?-1:b??0,onstatechange:I,onchange:C,class:m,style:v,children:[O&&S("a-checkbox-label",{children:[d,f]}),u!=null&&h("a-checkbox-hint",{children:u})]})};var k1=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),E1=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:m,className:p,style:f,children:b,tabIndex:g,...v})=>{let x=ne(i,"--switch-round",_(r,"--switch-tone-source",_(r,"--switch-off-tone-source",f))),w=v["aria-label"],I=(typeof w=="string"?w:void 0)??u??(typeof b=="string"?b:void 0),C=l?N=>{let{event:U,detail:Y}=ie(N);Y&&l(U,{next:Y.next==="checked",prev:Y.prev==="checked"})}:void 0,L=c||d?N=>{c?.(N),d?.(N,k1(N.currentTarget))}:void 0,R=t===void 0?void 0:t?"checked":"unchecked",O=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,A=u!=null||b!=null;return S("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":I,...v,state:R,"default-state":O,disabled:n?"":void 0,tone:r,"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:C,onchange:L,class:p,style:x,children:[A&&S("a-switch-label",{children:[u,b]}),m!=null&&h("a-switch-hint",{children:m})]})};var Rn=({className:t,children:e,...n})=>{let r=!!e&&!(typeof e=="string"&&e.trim()==="");return h("a-menu-separator",{role:r?"status":"separator","aria-live":r?"polite":void 0,class:t,...n,children:r?e:null})};var ea=({label:t,className:e,children:n,...r})=>S("a-menu-group",{role:"group","aria-label":t,class:e,...r,children:[t!=null&&h("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var C1=({title:t,level:e,tone:n,priority:r,outdent:a,actions:o,indicator:i,indicatorPlacement:s,disabled:l,round:c,open:d,defaultOpen:u,onStateChange:m,className:p,style:f,children:b,...g})=>{let v=d!==void 0,x=typeof i=="string"&&(i==="chevron"||i==="triangle"||i==="plus")?i:void 0,w=i!=null&&typeof i=="object"&&"closed"in i&&"open"in i?i:void 0,I=i!=null&&!x&&!w,C=typeof i=="object"?i:null,L=ne(c,"--expander-round",_(n,"--expander-tone-source",f)),R=typeof t=="object"&&t!==null?h("span",{slot:"title",style:{display:"contents"},children:t}):h("a-expander-summary",{slot:"title",children:t});return S("a-expander",{state:v?d?"open":"closed":void 0,"default-state":!v&&u?"open":void 0,level:e!=null?String(e):void 0,tone:Q(n),priority:r&&r!=="secondary"?r:void 0,outdent:a?"":void 0,round:X(c),disabled:l?"":void 0,indicator:x,"indicator-placement":s&&s!=="start"?s:void 0,onstatechange:m?O=>{let{event:A,detail:N,isOwn:U}=ie(O);U&&N&&m(A,{next:N.next==="open",prev:N.prev==="open"})}:void 0,class:p,style:L,...g,children:[R,o!=null&&h("span",{slot:"actions",children:o}),w&&S(he,{children:[h("span",{slot:"indicator","data-when":"closed","aria-hidden":"true",inert:!0,children:w.closed}),h("span",{slot:"indicator","data-when":"open","aria-hidden":"true",inert:!0,children:w.open})]}),I&&h("span",{slot:"indicator","aria-hidden":"true",inert:!0,children:C}),h("a-expander-details",{children:b})]})};var dr=t=>t?"":void 0,T1=t=>typeof t=="string"||typeof t=="number",Qg=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},S1={email:"email",tel:"tel",url:"url"},A1={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},M1={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Rt=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,multiline:c,rows:d,maxRows:u,clearable:m,leading:p,trailing:f,type:b,autoComplete:g,inputMode:v,autoFocus:x,name:w,placeholder:I,truncate:C=!0,disabled:L,readOnly:R,button:O,required:A,dimActions:N,spellCheck:U,maxLength:Y,minLength:K,pattern:z,min:se,max:re,step:E,role:G,onInput:$,onChange:me,onValueChange:J,onClearClick:ge,onClearInput:te,children:we,className:Le,style:De,...H})=>{let ve=n&&n!=="neutral"?n:void 0,Xe=r===void 0?ve?M1[ve]:void 0:r,Je=b==="search",Nt=Je?void 0:b,Qe=p??(Je?h(be,{shape:"search"}):void 0),Et=Je?m??!0:m;return S("a-input",{size:o&&o!=="medium"?o:void 0,round:X(i),value:s,defaultvalue:l,multiline:dr(c||d!=null),rows:d!=null?String(d):void 0,maxrows:u!=null?String(u):void 0,status:ve,tone:Q(a),type:!c&&d==null?Nt:void 0,name:w,placeholder:I,truncate:dr(C),disabled:dr(L),readonly:dr(R),button:dr(O),required:dr(A),"dim-actions":dr(N),autocomplete:g??(!c&&d==null&&b?S1[b]:void 0),inputmode:v??(!c&&d==null&&b?A1[b]:void 0),autofocus:x?!0:void 0,spellcheck:U!=null?U?"true":"false":void 0,maxlength:Y!=null?String(Y):void 0,minlength:K!=null?String(K):void 0,pattern:z,min:se,max:re,step:E,"aria-invalid":n==="critical"?"true":void 0,role:G??(Je?"searchbox":void 0),oninput:$||J?D=>{$?.(D),J?.(D,Qg(D))}:void 0,onchange:me||J?D=>{me?.(D),J?.(D,Qg(D))}:void 0,onclearclick:ge?D=>ge(ie(D).event):void 0,onclearinput:te?D=>te(ie(D).event):void 0,class:Le,style:ne(i,"--input-round",_(a,"--input-tone-source",De)),...H,children:[t!=null&&(T1(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),Qe!=null&&h("span",{slot:"leading",style:{display:"contents"},children:Qe}),Et&&h("span",{slot:"clear",style:{display:"contents"},children:h(pe,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),f!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:f}),e!=null&&S("span",{slot:"hint",style:{display:"contents"},children:[Xe&&h(be,{shape:Xe,"aria-hidden":"true"}),h("span",{children:e})]}),we]})};var bs=(t,e)=>Number.isFinite(t)?t:e,I1=t=>typeof t=="string"||typeof t=="number",D1=(t,e)=>{let n=bs(t,0);return{min:n,max:Math.max(n,bs(e,100))}},ev=t=>{let e=t?.target??{};return{value:Number(e.value??0),min:Number(e.getAttribute?.("min")??0),max:Number(e.getAttribute?.("max")??100),step:Number(e.getAttribute?.("step")??1),name:e.getAttribute?.("name")??void 0}},O1=({label:t,value:e,defaultValue:n,min:r,max:a,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:m,thumbFill:p,round:f,valueDisplay:b="end",valuePrefix:g,valueSuffix:v,markers:x,trackClick:w="drag-only",onInput:I,onChange:C,onValueChange:L,onValueCommit:R,className:O,style:A,children:N,tabIndex:U,...Y})=>{let K=br(u),z=br(m),se=tt(m,"--anta-slider-thumb-size",tt(u,"--anta-slider-track-size",ne(f,"--slider-round",_(c,"--slider-thumb-tone-source",_(l,"--slider-tone-source",A))))),{min:re,max:E}=D1(r,a),G=bs(o,1)>0?bs(o,1):1,$=Y["aria-label"],me=(typeof $=="string"?$:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),J=b==="inline"&&t==null?"end":b,ge=H=>H.value<=re?"0%":H.value>=E?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(H.value-re)/(E-re)} + var(--anta-slider-thumb-size) / 2)`,te=H=>H.value<=re?"start":H.value>=E?"end":void 0,we=H=>{let ve={};return Object.assign(ve,{"--slider-marker-position":ge(H)}),ve},Le=I||L?H=>{let ve=ev(H);I?.(H),L?.(H,ve)}:void 0,De=C||R?H=>{let ve=ev(H);C?.(H),R?.(H,ve)}:void 0;return S("a-slider",{value:e,defaultvalue:n,min:re,max:E,step:G,name:i,disabled:s?"":void 0,tone:Q(l),"thumb-tone":Q(c),size:d&&d!=="medium"?d:void 0,"track-size":K,"thumb-size":z,"thumb-fill":p?"":void 0,round:X(f),"track-click":w==="jump"?"jump":void 0,"value-display":J==="end"?void 0:J,"value-prefix":g,"value-suffix":v,role:"slider","aria-label":me,tabIndex:s?-1:U??0,oninput:Le,onchange:De,class:O,style:se,...Y,children:[t!=null&&(I1(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),x?.map((H,ve)=>{let Xe=te(H);return h("span",{slot:"markers",style:we(H),"data-slider-marker-start":Xe==="start"?"":void 0,"data-slider-marker-end":Xe==="end"?"":void 0,children:H.label},`${H.value}-${ve}`)}),N]})};function tv(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=tv(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function P1(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=tv(t))&&(r&&(r+=" "),r+=e);return r}var nv=P1;var ta=Ae.PlainDate.compare,rv=new Map;function Gt(t,e){let n=`${t}|${JSON.stringify(e)}`,r=rv.get(n);return r||(r=new Intl.DateTimeFormat(t,e),rv.set(n,r)),r}var co=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function We(t){if(!t)return null;try{return Ae.PlainDate.from(t)}catch{return null}}function Od(t){try{let e=new Intl.Locale(t),r=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof r=="number"&&r>=1&&r<=7)return r}catch{}return 1}function Nn(t,e,n){return e&&ta(t,e)<0?e:n&&ta(t,n)>0?n:t}function Pd(t,e,n){return e!=null&&ta(t,e)<0||n!=null&&ta(t,n)>0}var z1=t=>Array.from(t).slice(0,2).join("");function av(t,e=Od(t)){let n=Ae.PlainDate.from("2021-02-01"),r=n.add({days:(e-n.dayOfWeek+7)%7}),a=Gt(t,{weekday:"short",timeZone:"UTC"}),o=Gt(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=r.add({days:s}),c=a.format(co(l));i.push({short:c,narrow:z1(c),long:o.format(co(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function zd(t){let{anchor:e,locale:n="en-US",min:r=null,max:a=null,selected:o=null,today:i=Ae.Now.plainDateISO(),weeks:s=6}=t,l=Od(n),c=e.year,d=e.month,u=e.with({day:1}),m=(u.dayOfWeek-l+7)%7,p=u.subtract({days:m}),f=Gt(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),b=[];for(let g=0;g<s;g++){let v=[];for(let x=0;x<7;x++){let w=p.add({days:g*7+x});v.push({date:w,iso:w.toString(),day:w.day,weekday:w.dayOfWeek,outside:w.month!==d||w.year!==c,disabled:Pd(w,r,a),today:i!=null&&ta(w,i)===0,selected:o!=null&&ta(w,o)===0,label:f.format(co(w))})}b.push(v)}return{year:c,month:d,heading:Gt(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(co(e)),weekdays:av(n,l),weeks:b}}var ov=new Date(Date.UTC(2026,5,15)),Bd={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function B1(t){try{return Gt(t,Bd).formatToParts(ov).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function gs(t){try{return Gt(t,Bd).formatToParts(ov).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function vs(t,e){return Gt(e,Bd).format(co(t))}function L1(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let r=Gt(e,{month:"long",timeZone:"UTC"}),a=Gt(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=r.format(i).toLowerCase(),l=a.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function uo(t,e,n={}){let r=u=>Pd(u,n.min??null,n.max??null)?null:u,a=(t??"").trim();if(!a)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let u=We(a);return u?r(u):null}let o=B1(e),i=L1(a,e),s=(a.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=Ae.Now.plainDateISO().year;else if(s.length>=2){let[u,m]=s;u>31?[l,d]=[u,m]:m>31?[l,d]=[m,u]:[d,l]=[u,m]}else return null;else if(s.length===1){let u=a.replace(/\D/g,"");if(u.length!==8)return null;let m=0,p={};for(let f of o){let b=f==="year"?4:2;p[f]=Number(u.slice(m,m+b)),m+=b}({year:l,month:c,day:d}=p)}else if(s.length===2){let u=o.filter(p=>p!=="year"),m={};u.forEach((p,f)=>m[p]=s[f]),c=m.month,d=m.day,l=Ae.Now.plainDateISO().year}else if(s.length>=3){let u={};o.forEach((m,p)=>u[m]=s[p]),l=u.year,c=u.month,d=u.day}else return null;l!=null&&l<100&&(l=l<70?2e3+l:1900+l);try{return r(Ae.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function iv(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,r=e.match(/([ap])\.?m?\.?$/);r&&(n=r[1]==="p"?"pm":"am",e=e.slice(0,r.index).trim());let a,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);a=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)a=Number(i),o=0;else{let s=i.length-2;a=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&a<12&&(a+=12),n==="am"&&a===12&&(a=0);try{return Ae.PlainTime.from({hour:a,minute:o},{overflow:"reject"})}catch{return null}}function xs(t,e,n={}){let r=(t??"").trim();if(!r)return null;let a=r.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=r,i=null;a&&(i=iv(a[1]),i&&(o=r.slice(0,a.index).trim()));let s=uo(o,e,n);return s?s.toPlainDateTime(i??Ae.PlainTime.from("00:00")):null}function ho(t){try{let e=Gt(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function Ld(t,e,n=ho(e)){let r=vs(t.toPlainDate(),e),a=String(t.minute).padStart(2,"0");if(!n)return`${r} ${String(t.hour).padStart(2,"0")}:${a}`;let o=(t.hour+11)%12+1;return`${r} ${String(o).padStart(2,"0")}:${a} ${t.hour<12?"AM":"PM"}`}function Rd(t,e=ho(t)){return`${gs(t)} HH:MM${e?" AM":""}`}var Nd=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:m,style:p,"aria-label":f,...b})=>{let g=t!==void 0,v=a||(typeof navigator<"u"?navigator.language:"en-US"),x=We(n),w=We(r),I=Ae.Now.plainDateISO(),[C,L]=W(()=>We(e)),R=g?We(t):C,[O,A]=W(()=>Nn(We(t??e)??I,x,w)),[N,U]=W(t),Y=O;if(t!==N){U(t);let D=We(t);D&&(Y=Nn(D,x,w),A(Y))}let[K,z]=W(null),[se,re]=W(!1),E=zd({anchor:Y,locale:v,min:x,max:w,selected:R,today:I}),G=Y.toString(),[$,me]=W(l);l!==$&&(me(l),l!==void 0&&z({iso:G,n:l}));let J=x?x.year:I.year-3,ge=w?w.year:I.year+3,te=[];for(let D=J;D<=ge;D++)te.push(D);let we=Ze(()=>Array.from({length:12},(D,V)=>Ae.PlainDate.from({year:2e3,month:V+1,day:1}).toLocaleString(v,{month:"long"})),[v]),Le=(D,V)=>x!=null&&(D<x.year||D===x.year&&V<x.month)||w!=null&&(D>w.year||D===w.year&&V>w.month),De=D=>{s||A(V=>Nn(V.add({months:D}),x,w))},H=(D,V)=>{s||A(y=>Nn(y.with({year:D,month:V}),x,w))},ve=Ze(()=>{let D=(V,y)=>{let k=y+1,F=V===O.year&&k===O.month;return h(Te,{label:we[y],selected:F,disabled:Le(V,k)||void 0,"data-menu-open":"",onSelect:()=>{H(V,k),re(!1)},children:F&&h("span",{className:"jump-dot","aria-hidden":"true"})},`${V}-${k}`)};return te.length===1?we.map((V,y)=>D(te[0],y)):te.map(V=>S(Te,{submenu:!0,label:String(V),selected:V===O.year,children:[V===O.year&&h("span",{className:"jump-dot","aria-hidden":"true"}),h(je,{children:we.map((y,k)=>D(V,k))})]},V))},[we,O.year,O.month,J,ge,n,r,s]),Xe=D=>{let{event:V,detail:y}=ie(D);if(!y||(c?.(V,y),y.reason==="user"&&(g||V.defaultPrevented)))return;let k=We(y.next);g||L(k),A(Nn(k??O,x,w))},Je=D=>{let V="nativeEvent"in D?D.nativeEvent:D;d?.(V),u?.(V,{value:V?.target?.value||null,name:o})},Nt=D=>{if(s)return;let{detail:V}=ie(D),y=We(V?.date??null);if(!y)return;let k=Nn(y,x,w);A(k),z(F=>({iso:k.toString(),n:(F?.n??0)+1}))},Qe=s||x!=null&&Ae.PlainDate.compare(O.with({day:1}).subtract({days:1}),x)<0,Et=s||w!=null&&Ae.PlainDate.compare(O.with({day:1}).add({months:1}),w)>0;return S("div",{className:nv("anta-calendar",m),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:p,...b,children:[S("div",{"data-part":"header",children:[h(pe,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:Qe,onClick:()=>De(-1)}),h(pe,{"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${E.heading} \u2014 choose month and year`,disabled:s||Qe&&Et,children:E.heading}),h(je,{placement:"bottom",open:se,onStateChange:(D,{next:V})=>re(V),children:ve}),h(pe,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:Et,onClick:()=>De(1)})]}),S("a-calendar",{role:"group","aria-label":f??E.heading,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":K?`${K.iso}#${K.n}`:void 0,onstatechange:Xe,onchange:Je,onnavigate:Nt,children:[E.weekdays.map((D,V)=>h("span",{"data-part":"weekday","data-weekend":D.weekend?"":void 0,"aria-hidden":"true",children:D.narrow},`wd${V}`)),E.weeks.flat().map(D=>{let V=D.today&&!D.selected?{priority:"secondary"}:{priority:"tertiary",selected:D.selected,tone:D.selected?"brand":void 0};return S(pe,{...V,size:i,disabled:s||D.disabled,tabIndex:D.iso===G?0:-1,"aria-label":D.label,"aria-hidden":D.outside?"true":void 0,"aria-current":D.today?"date":void 0,"data-part":"day-cell","data-date":D.iso,"data-today":D.today?"":void 0,"data-outside":D.outside?"":void 0,children:[D.day,D.today&&h(ct,{children:"Today"})]},D.iso)})]})]})};var _d=t=>t?"":void 0,R1=t=>typeof t=="string"||typeof t=="number",sv=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},N1={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Fd=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:m,name:p,disabled:f,required:b,icon:g,clearable:v,dimActions:x,trailing:w,autoFocus:I,onValueChange:C,onClearInput:L,children:R,className:O,style:A,...N})=>{let U=n&&n!=="neutral"?n:void 0,Y=r===void 0?U?N1[U]:void 0:r;return S("a-input-time",{size:o&&o!=="medium"?o:void 0,round:X(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:m,status:U,tone:Q(a),name:p,disabled:_d(f),required:_d(b),"dim-actions":_d(x),autofocus:I?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,oninput:C?K=>C(K,sv(K)):void 0,onchange:C?K=>C(K,sv(K)):void 0,onclearinput:L?K=>L(ie(K).event):void 0,class:O,style:ne(i,"--input-time-round",_(a,"--input-time-tone-source",A)),...N,children:[t!=null&&(R1(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),g!==!1&&h("span",{slot:"leading",style:{display:"contents"},children:h(be,{shape:g??"clock"})}),v&&h("span",{slot:"clear",style:{display:"contents"},children:h(pe,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),w!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:w}),e!=null&&S("span",{slot:"hint",style:{display:"contents"},children:[Y&&h(be,{shape:Y,"aria-hidden":"true"}),h("span",{children:e})]}),R]})};var _1=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:m,placement:p,offset:f,clearable:b,icon:g,time:v,hour12:x,onValueChange:w,className:I,style:C,...L})=>{let R=a||(typeof navigator<"u"?navigator.language:"en-US"),O=We(n),A=We(r),N=v?x??ho(R):!1,U=Ze(()=>d??(v?Rd(R,N):gs(R)),[d,v,R,N]),Y=M=>{if(!M)return"";let j=We(M.slice(0,10));if(!j)return"";if(!v)return vs(j,R);let Oe=M.length>=16&&M[10]==="T",ae=j.toPlainDateTime(Ae.PlainTime.from(Oe?M.slice(11,16):"00:00"));return Ld(ae,R,N)},K=M=>!M||!v?M:M.length<=10?`${M}T00:00`:M.slice(0,16),z=t!==void 0,[se,re]=W(()=>K(e)),E=z?t:se,G=E?E.slice(0,10):"",$=!!E&&E.length>=16&&E[10]==="T",me=$&&parseInt(E.slice(11,13),10)||0,J=$?E.slice(14,16):"00",[ge,te]=W(()=>Y(E)),[we,Le]=W(!1),[De,H]=W(!1),[ve,Xe]=W(0),[Je,Nt]=W(E);E!==Je&&(Nt(E),te(Y(E)),H(!1));let Qe=M=>{z||re(M||void 0),w?.(M,{value:M,name:o})},Et=M=>`${M}T${String(me).padStart(2,"0")}:${J}`,D=M=>{H(!1),M===(E??"")?te(Y(M)):Qe(M)},V=M=>{let j=M.trim();if(!j)return H(!1),E?Qe(""):te(""),!0;let Oe=v?xs(j,R,{min:O,max:A}):uo(j,R,{min:O,max:A});if(!Oe)return H(!0),!1;let ae=v?Oe.toString({smallestUnit:"minute"}):Oe.toString();return D(ae),!0},y=Ze(()=>{let M=ge.trim();if(!M)return G;let j=v?xs(M,R,{min:O,max:A}):uo(M,R,{min:O,max:A});return j?j.toString().slice(0,10):null},[ge,v,R,G,n,r]),[k,F]=W(G);return y!==null&&y!==k&&F(y),S(he,{children:[h(Rt,{label:l,hint:De?`Unrecognized date. Try ${U}.`:c,status:De?"critical":u,size:i,round:m,disabled:s,clearable:b,leading:g===!1?void 0:h(be,{shape:g??"calendar-days"}),value:ge,placeholder:U,inputMode:v?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":we?"true":"false",onInput:M=>{te(M.currentTarget.value),De&&H(!1)},onChange:M=>V(M.currentTarget.value),onKeyDown:M=>{qe(M)||((M.key==="ArrowDown"||M.key==="ArrowUp")&&!s&&(M.preventDefault(),Xe(j=>j+1)),M.key==="Enter"&&!s&&(M.preventDefault(),V(M.currentTarget.value)&&Le(!1)))},truncate:!0,className:I,style:C,...L}),h(je,{role:"dialog","aria-label":v?"Choose date and time":"Choose date",open:we,placement:p??"bottom-start",offset:f,autoWidth:!0,inset:8,onStateChange:(M,{next:j})=>Le(j),children:S("div",{"data-menu-open":"",children:[h(Nd,{value:k,min:n,max:r,locale:a,size:i,disabled:s,focusSignal:ve,onStateChange:(M,{next:j,reason:Oe})=>{if(Oe!=="user")return;let ae=j??"";D(v&&ae?Et(ae):ae),v||Le(!1)}}),v&&S("a-input-date-time-container",{children:[h(Fd,{size:i,locale:a,hour12:x,disabled:s,"aria-label":"Time",value:$?`${String(me).padStart(2,"0")}:${J}`:"",onValueChange:(M,{value:j})=>{if(("nativeEvent"in M?M.nativeEvent:M)?.type!=="change")return;let ae=G||Ae.Now.plainDateISO().toString();Qe(j?`${ae}T${j}`:ae)}}),h(pe,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>Le(!1)})]})]})}),o?h("input",{type:"hidden",name:o,value:E??""}):null]})};var _n=t=>typeof t=="string"?{value:t,label:t}:t;function na(t){let e=t.trim();if(!e)return null;let n=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var ra=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),aa=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),r=[],a=0,o;for(;(o=n.exec(t))!==null;)o.index>a&&r.push(t.slice(a,o.index)),r.push(h("b",{children:o[0]},r.length)),a=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return r.length===0?t:(a<t.length&&r.push(t.slice(a)),r)};var F1=t=>{let{suggestions:e,value:n,defaultValue:r,onValueChange:a,onSelect:o,filter:i=!0,...s}=t,l=n!==void 0,[c,d]=W(r??""),u=l?n:c,[m,p]=W(!1),f=Ze(()=>e.map(_n),[e]),b=typeof i=="function",g=i!==!1&&!b?na(u):null,v=b?f.filter(C=>i(C,u)):f.filter(C=>ra(C,g)),x=m&&v.length>0,w=C=>{l||d(C),a?.(C)},I=C=>{w(C.value),o?.(C),p(!1)};return S(he,{children:[h(Rt,{...s,value:u,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-expanded":x?"true":"false","aria-autocomplete":"list",onFocus:()=>p(!0),onInput:C=>{w(C.currentTarget.value),p(!0)},onKeyDown:C=>{C.key==="Enter"&&!C.defaultPrevented&&p(!1)}}),h(je,{role:"listbox",open:x,onStateChange:(C,{next:L})=>{p(L)},children:v.map((C,L)=>{let{className:R,style:O,...A}=dt(C,!0);return h(Te,{...A,role:"option",icon:C.icon,label:aa(C.label??C.value,g),hint:C.hint?aa(C.hint,g):C.hint,tone:C.tone,disabled:C.disabled,value:C.value,onMouseDown:N=>N.preventDefault(),onSelect:()=>I(C),className:R,style:O},`${C.value}-${L}`)})})]})};var H1=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),V1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:m,toneScope:p,size:f,disabled:b,orientation:g,className:v,style:x,...w})=>{let I=e!==void 0,[C,L]=W(n),R=I?e:C,O=new Set;for(let z of t)O.has(z.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(z.value)} \u2014 values must be unique.`),O.add(z.value);let A=Ts(),N=Ts(),U=b?void 0:t.find(z=>z.value===R)?.value??t.find(z=>!z.disabled)?.value,Y=z=>{let{event:se,detail:re}=ie(z);re&&(r?.(se,re),!I&&(re.reason==="user"&&se.defaultPrevented||L(re.next??void 0)))},K=a||o?z=>{a?.(z),o?.(z,H1(z.currentTarget))}:void 0;return S("a-radio-group",{role:"radiogroup","aria-disabled":b?"true":void 0,"aria-labelledby":c?A:void 0,"aria-describedby":d?N:void 0,...w,state:I?e:void 0,"default-state":I?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:Q(m),"tone-scope":p&&p!=="all"?p:void 0,size:f&&f!=="medium"?f:void 0,disabled:b?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:Y,onchange:K,onfocusin:i,onfocusout:s,class:v,style:_(m,"--radio-tone-source",_(m,"--radio-off-tone-source",x)),children:[c&&h("a-radio-group-label",{id:A,children:c}),d&&h("a-radio-group-hint",{id:N,children:d}),h("a-radio-list",{children:t.map(z=>{let se=b||z.disabled,{className:re,style:E,...G}=dt(z);return S("a-radio",{...G,role:"radio",value:z.value,"aria-disabled":se?"true":void 0,tabIndex:z.value===U?0:-1,tone:z.tone||void 0,"tone-scope":z.toneScope??(z.tone?p:void 0),size:z.size&&z.size!=="medium"?z.size:void 0,disabled:z.disabled?"":void 0,class:re,style:_(z.tone,"--radio-tone-source",_(z.tone,"--radio-off-tone-source",E)),children:[h("a-radio-label",{children:z.label}),z.hint!=null&&h("a-radio-hint",{children:z.hint})]},z.value)})})]})};function j1(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),r=(o,i)=>o===0?"none":o===i?"all":"some",a=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=a(c.submenu),u=d.reduce((p,f)=>p+f.on,0),m=d.reduce((p,f)=>p+f.total,0);return{node:{...c,submenu:d.map(p=>p.node),selectionState:r(u,m)},on:u,total:m}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=a(c.options),u=d.reduce((p,f)=>p+f.on,0),m=d.reduce((p,f)=>p+f.total,0);return{node:{...c,options:d.map(p=>p.node),selectionState:r(u,m)},on:u,total:m}}let s=_n(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return a(t).map(o=>o.node)}var q1=t=>{let{options:e,placement:n,offset:r,selection:a,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:m,hint:p,size:f,status:b,statusIcon:g,round:v,disabled:x,tone:w,toneScope:I,filter:C,selectAll:L=!0,selectAllLabel:R="Select all",clearable:O,clearLabel:A="Clear",renderOption:N,renderIndicator:U,verbose:Y,renderSummary:K,renderTrigger:z,renderEmpty:se,className:re,style:E,...G}=t,$=a==="multiple",me=b&&b!=="neutral"?`var(--text-2-${b})`:void 0,J=$?"checkbox":o??"none",ge=J==="none"?void 0:J,te=l,we=i!==void 0,[Le,De]=W(s),H=we?i:Le,[ve,Xe]=W(!1),[Je,Nt]=W(""),Qe=`${m??G["aria-label"]??"Select"} options`,Et=T=>typeof T=="object"&&Array.isArray(T.submenu),D=T=>typeof T=="object"&&Array.isArray(T.options),V=(T,ce,oe,le)=>{for(let fe of T)if(typeof fe!="string"&&Et(fe))V(fe.submenu,fe.label,oe||!!fe.disabled,le);else if(typeof fe!="string"&&D(fe))V(fe.options,fe.label,oe||!!fe.disabled,le);else{let Ct=_n(fe);le.push({opt:Ct,disabled:oe||!!Ct.disabled,group:ce})}},y=[];V(e,void 0,!1,y);let k=new Set;for(let T of y){let ce=String(T.opt.value);k.has(ce)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(T.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),k.add(ce)}let F=new Map(y.map(T=>[T.opt.value,T.opt])),M=C!==void 0&&C!==!1,j=Je.trim(),Oe=M&&typeof C!="function"?na(j):null,ae=T=>typeof C=="function"?C(T,j):ra(T,Oe),hr=typeof C=="function"||M&&!!j?y.filter(T=>ae(T.opt)):y,oa=M&&!!j,et=Array.isArray(H)?H:H!=null?[H]:[],pr=T=>et.includes(T),_t=et.map(T=>F.get(T)).filter(Boolean),mr=y.filter(T=>!T.disabled).map(T=>T.opt.value),ws=$&&mr.length>1&&mr.every(T=>et.includes(T)),ks=T=>T.label??String(T.value),Fn="";if($){let T=_t.length>0?K?.(_t):void 0;if(T!=null&&T!=="")Fn=T;else if(ws)Fn="All";else if(_t.length===1)Fn=ks(_t[0]);else if(_t.length>1){let ce=`${_t.length} selected`;Fn=Y?`${ce}: ${_t.map(ks).join(", ")}`:ce}}else if(H!=null){let T=F.get(H);Fn=T?ks(T):""}let hv=(T,ce)=>{if($){if(L&&ce?.altKey){let fe=[T.value];we||De(fe),te?.(fe,{value:T.value,option:T,selected:!0});return}let oe=et.includes(T.value),le=oe?et.filter(fe=>fe!==T.value):[...et,T.value];we||De(le),te?.(le,{value:T.value,option:T,selected:!oe})}else we||De(T.value),te?.(T.value,{value:T.value,option:T})},ia=$?hr.filter(T=>!T.disabled).map(T=>T.opt.value):[],qd=ia.filter(T=>et.includes(T)),po=ia.length>0&&qd.length===ia.length,pv=qd.length>0&&!po,mv=()=>{let T=et.filter(oe=>!ia.includes(oe)),ce=po?T:[...T,...ia];we||De(ce),te?.(ce,{all:!0,selected:!po})},fv=()=>{let T=$?[]:void 0;we||De(T),te?.(T,{all:!0,selected:!1})},Es=(T,ce)=>{let{className:oe,style:le,...fe}=dt(T,!0),Ct={value:T.value,selected:pr(T.value),disabled:ce},Kt=N?.(T,Ct),Hn=U?.(Ct),gv=!$&&J==="none"?{role:"menuitemradio","aria-checked":pr(T.value)?"true":"false"}:void 0,Wd=$&&L&&!ce?bo:void 0,Zd=T.tooltip??Wd,vv=T.tooltip==null&&Wd!=null;return S(Te,{...fe,selectionIndicator:ge,...gv,indicator:Hn??void 0,label:Kt?void 0:aa(T.label??String(T.value),Oe),hint:Kt?void 0:T.hint?aa(T.hint,Oe):T.hint,icon:Kt?void 0:T.icon,tone:T.tone??w,toneScope:T.toneScope??I,selected:pr(T.value),disabled:ce||void 0,"data-menu-open":$?"":void 0,onSelect:xv=>hv(T,xv),className:oe,style:le,children:[Kt,Zd&&h(ct,{...vv?{delay:go,placement:"left"}:{follow:!0},children:Zd})]},String(T.value))},Cs=(T,ce)=>{let oe=[];return T.forEach((le,fe)=>{if(typeof le!="string"&&Et(le)){let Kt=ce||!!le.disabled,Hn=Cs(le.submenu,Kt);Hn.length&&oe.push(h(Te,{submenu:!0,label:le.label,icon:le.icon,disabled:Kt||void 0,"data-menu-open":$?"":void 0,children:h(je,{children:Hn})},`sub-${fe}-${le.label}`));return}if(typeof le!="string"&&D(le)){let Kt=ce||!!le.disabled,Hn=Cs(le.options,Kt);Hn.length&&oe.push(h(ea,{label:le.label,children:Hn},`grp-${fe}-${le.label}`));return}let Ct=_n(le);typeof C=="function"&&!ae(Ct)||oe.push(Es(Ct,ce||!!Ct.disabled))}),oe},bv=()=>{let T=y.filter(oe=>ae(oe.opt)),ce=[];for(let oe=0;oe<T.length;){let le=T[oe].group;if(le===void 0){ce.push(Es(T[oe].opt,T[oe].disabled)),oe++;continue}let fe=[],Ct=oe;for(;oe<T.length&&T[oe].group===le;)fe.push(Es(T[oe].opt,T[oe].disabled)),oe++;ce.push(h(ea,{label:le,children:fe},`flat-${Ct}-${le}`))}return ce},Ud=S(he,{children:[z?z({open:ve,value:H,selected:_t,disabled:!!x,icon:d}):S(pe,{disabled:x,size:f,round:v,"aria-label":typeof m=="string"||typeof m=="number"?String(m):void 0,"aria-invalid":b==="critical"?"true":void 0,"aria-haspopup":M?"dialog":"menu","aria-expanded":ve?"true":"false",...G,children:[(u??d)&&h("a-select-leading",{"aria-hidden":"true",children:u??h(be,{shape:d})}),h("a-button-label",{"data-placeholder":Fn?void 0:"",children:Fn||c}),h("a-select-chevron",{open:ve?"":void 0,"aria-hidden":"true",style:me?{color:me}:void 0,children:h(be,{shape:"chevron-down"})})]}),S(je,{role:M?"dialog":void 0,"aria-label":M?Qe:void 0,placement:n,offset:r,onStateChange:(T,{next:ce})=>{Xe(ce),ce||Nt("")},children:[M&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:Je,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list",onInput:T=>Nt(T.currentTarget.value)})}),$&&L&&hr.length>0&&S(he,{children:[h(Te,{selectionIndicator:"checkbox",selected:po,indeterminate:pv,label:R,"data-menu-open":"","data-menu-skip-active":"",onSelect:mv}),h(Rn,{})]}),hr.length===0?se?.({query:j}):oa?bv():Cs(e,!1),O&&et.length>0&&S(he,{children:[h(Rn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Te,{icon:"x",label:A,role:M?"button":void 0,"data-menu-open":"",onSelect:fv})})]})]})]});if(z)return Ud;let Yd=g===void 0?b?{brand:"circle-small-solid",info:"info",success:"circle-check",warning:"warning-triangle",critical:"warning-diamond"}[b]:void 0:g;return S("a-select-field",{size:f,status:b,disabled:x?"":void 0,class:re,style:E,children:[m!=null&&h("a-select-label",{children:m}),Ud,p!=null&&S("a-select-hint",{children:[Yd&&h(be,{shape:Yd,"aria-hidden":"true"}),p]})]})};var Hd=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...Hd(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...Hd(n.options)):e.push(_n(n));return e},ys=t=>t==null||t===""||Array.isArray(t)&&t.length===0,lv=(t,e)=>ra(t,na(e)),U1=t=>{let{facets:e,placement:n,offset:r,value:a,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,tone:m,toneScope:p,searchable:f,searchPlaceholder:b="Filter\u2026",clearable:g=!0,clearAllLabel:v="Clear all",renderTrigger:x,className:w,style:I,...C}=t,L=a!==void 0,[R,O]=W(o??{}),A=L?a:R,[N,U]=W(!1),[Y,K]=W({}),[z,se]=W({});{let y=null,k=Y;for(let F of e)F.kind==="text"&&z[F.key]!==A[F.key]&&(y={...y??z,[F.key]:A[F.key]},k={...k,[F.key]:A[F.key]??""});y&&(se(y),K(k))}let[re,E]=W({}),[G,$]=W(""),me=e.reduce((y,k)=>y+(ys(A[k.key])?0:1),0),J=Ze(()=>new Map(e.map(y=>[y.key,y.kind==="single"||y.kind==="multiple"?Hd(y.options):[]])),[e]),ge=(y,k)=>{L||O(y),i?.(y,k)},te=(y,k)=>{let F=ys(k),M={...A};F?delete M[y.key]:M[y.key]=k,ge(M,{facet:y.key,kind:y.kind,value:F?void 0:k})},we=()=>ge({},{all:!0}),Le=y=>{let k=J.get(y.key)??[];if(!y.filter)return k;let F=re[y.key]??"",M=typeof y.filter=="function"?y.filter:lv;return k.filter(j=>M(j,F))},De=y=>y.filter?h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:re[y.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${y.label}`,"aria-autocomplete":"list",onInput:k=>E(F=>({...F,[y.key]:k.currentTarget.value}))})}):null,H=(y,k,F="")=>{let{className:M,style:j,...Oe}=dt(k,!0),ae=y.kind==="single"?A[y.key]===k.value:(A[y.key]??[]).includes(k.value),ur=y.renderOption?.(k,{value:k.value,selected:ae,disabled:!!k.disabled}),hr={...Oe,icon:ur?void 0:k.icon,label:ur?void 0:k.label??String(k.value),hint:ur?void 0:k.hint,tone:k.tone??m,toneScope:k.toneScope??p,disabled:k.disabled,className:M,style:j,"data-menu-open":""};if(y.kind==="single"){let mr=A[y.key];return h(Te,{...hr,selectionIndicator:"check",selected:ae,onSelect:()=>te(y,mr===k.value?void 0:k.value),children:ur},`${F}${k.value}`)}let oa=A[y.key]??[],et=y.selectAll!==!1&&!k.disabled,pr=k.tooltip??(et?bo:void 0),_t=k.tooltip==null&&et;return S(Te,{...hr,selectionIndicator:"checkbox",selected:ae,onSelect:mr=>et&&mr?.altKey?te(y,[k.value]):te(y,oa.includes(k.value)?oa.filter(ws=>ws!==k.value):[...oa,k.value]),children:[ur,pr&&h(ct,{..._t?{delay:go,placement:"left"}:{follow:!0},children:pr})]},`${F}${k.value}`)},ve=y=>Le(y).map(k=>H(y,k)),Xe=y=>{let k=A[y.key]??[],F=Le(y),M=F.filter(ae=>!ae.disabled).map(ae=>ae.value),j=M.length>0&&M.every(ae=>k.includes(ae)),Oe=M.some(ae=>k.includes(ae));return S(he,{children:[y.selectAll!==!1&&F.length>0&&S(he,{children:[h(Te,{selectionIndicator:"checkbox",selected:j,indeterminate:Oe&&!j,label:y.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>te(y,j?k.filter(ae=>!M.includes(ae)):[...new Set([...k,...M])])}),h(Rn,{})]}),F.map(ae=>H(y,ae))]})},Je=()=>e.filter(k=>k.kind==="single"||k.kind==="multiple").map(k=>{let F=typeof k.filter=="function"?k.filter:lv;return{facet:k,matched:(J.get(k.key)??[]).filter(M=>F(M,G))}}).filter(k=>k.matched.length>0).map(({facet:k,matched:F})=>h(ea,{label:k.label,children:F.map(M=>H(k,M,`${k.key}:`))},k.key)),Nt=y=>{let k=A[y.key]??"",F=Y[y.key]??k,M=()=>{let j=F.trim()===""?void 0:F;j!==(k||void 0)&&te(y,j)};return h("div",{"data-menu-open":"",style:{padding:"4px"},children:h(Rt,{size:"small",value:F,placeholder:y.placeholder,"aria-label":y.label,onInput:j=>K(Oe=>({...Oe,[y.key]:j.currentTarget.value})),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),M())},onBlur:M})})},Qe=y=>h("div",{"data-menu-open":"",children:y.render({value:A[y.key],onChange:k=>te(y,k),close:()=>U(!1)})}),Et=y=>{let k=y.kind==="single"||y.kind==="multiple",F=!k||!!y.filter,M=y.kind==="single"?ve(y):y.kind==="multiple"?Xe(y):y.kind==="text"?Nt(y):Qe(y),j=!ys(A[y.key]);return S(je,{role:F?"dialog":void 0,"aria-label":F?`${y.label} ${k?"options":"editor"}`:void 0,children:[k&&De(y),M,g&&j&&S(he,{children:[h(Rn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Te,{icon:"x",label:"Clear",role:F?"button":void 0,"data-menu-open":"",onSelect:()=>te(y,void 0)})})]})]})},D=y=>{let k=A[y.key];if(ys(k))return null;switch(y.kind){case"single":return(J.get(y.key)??[]).find(M=>M.value===k)?.label??String(k);case"multiple":return String(k.length);case"text":return String(k);case"custom":return y.summary(k)}};return S(he,{children:[x?x({open:N,value:A,count:me,disabled:!!u}):h(pe,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":f?"dialog":"menu","aria-expanded":N?"true":"false",className:w,style:I,...C,children:me>0&&h(ps,{size:"small",priority:"primary",tone:"brand",children:String(me)})}),S(je,{role:f?"dialog":void 0,"aria-label":f?`${s} options`:void 0,placement:n,offset:r,open:N,onStateChange:(y,{next:k})=>{U(k),k||$("")},children:[f&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:G,placeholder:b,"aria-label":"Filter all facets","aria-autocomplete":"list",onInput:y=>$(y.currentTarget.value)})}),f&&G.trim()?Je():e.map(y=>S(Te,{submenu:!0,icon:y.icon,label:y.label,"aria-haspopup":y.kind==="text"||y.kind==="custom"||y.filter?"dialog":"menu",children:[(()=>{let k=D(y);return k!=null?h(ps,{size:"small",tone:"brand",children:h("a-select-faceted-summary",{children:k})}):null})(),Et(y)]},y.key)),g&&S(he,{children:[h(Rn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Te,{icon:"filter-x",label:v,role:f?"button":void 0,disabled:me===0,"data-menu-open":"",onSelect:we})})]})]})]})};var Vd=({children:t,options:e,value:n,defaultValue:r,onStateChange:a,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:m,orientation:p,fill:f,noslide:b,round:g,disabled:v,className:x,style:w,id:I,...C})=>{let L=n!==void 0,[R,O]=W(r),A=L?n:R,N=e??[],U=new Set;for(let E of N)U.has(E.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(E.value)} \u2014 values must be unique.`),U.add(E.value);let Y=E=>{let{event:G,detail:$}=ie(E);$&&(a?.(G,$),!L&&(G.defaultPrevented||O($.next??void 0)))},K=o||i?E=>{o?.(E),i?.(E,{value:E.currentTarget?.value??null})}:void 0,z=p==="vertical",se=A!=null&&N.some(E=>E.value===A)?A:N.find(E=>!v&&!E.disabled)?.value,re=h("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":z?"vertical":void 0,"aria-disabled":v?"true":void 0,state:L?n:void 0,"default-state":L?void 0:r,priority:d&&d!=="primary"?d:void 0,tone:Q(u),size:m&&m!=="medium"?m:void 0,orientation:z?"vertical":void 0,fill:f?"":void 0,noslide:b?"":void 0,round:X(g),disabled:v?"":void 0,onstatechange:Y,onchange:K,onfocusin:s,onfocusout:l,class:x,id:I,style:ne(g,"--tabs-round",_(u,"--tabs-tone-source",w)),...C,children:N.map(E=>{let G=v||E.disabled,$=E.value===A,{className:me,style:J,...ge}=dt(E);return S("a-tab",{...ge,role:"tab",value:E.value,tone:E.tone||void 0,"aria-disabled":G?"true":void 0,tabIndex:E.value===se?0:-1,disabled:G?"":void 0,round:X(g)??X(E.round),class:me,style:_(E.tone,"--tabs-tone-source",J),children:[E.icon&&h("a-icon",{shape:E.icon,"aria-hidden":"true"}),mo(E.label!=null?E.label:E.children,"a-tab-label"),E.iconTrailing&&h("a-icon",{shape:E.iconTrailing,"aria-hidden":"true"}),E.tooltip!=null&&E.tooltip!==""?h(ct,{truncatedOnly:!0,children:E.tooltip}):null]},E.value)})});return S(he,{children:[re,t]})};var cv={incomplete:"circle-large",completed:"check",error:"x"},Y1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:m,orientation:p,fill:f,disabled:b,children:g,className:v,style:x,id:w,...I})=>{let C=e!==void 0,[L,R]=W(n),O=C?e:L??t[0]?.value,A=(E,G)=>{r?.(E,G),!(C||E.defaultPrevented)&&R(G.next??void 0)},N=t.map(E=>{let{className:G,style:$,...me}=dt(E),J=E.tone||void 0,ge=E.disabled?"neutral":E.state==="error"?"critical":J||d||"neutral",te=u?.(E,{state:E.state,selected:E.value===O,disabled:!!E.disabled}),we=E.disabled?h(be,{shape:cv.incomplete}):E.state==="loading"?h(Td,{tone:ge}):h(be,{shape:cv[E.state]}),Le=te!==void 0?te:E.marker!==void 0?typeof E.marker=="number"?E.marker:h(be,{shape:E.marker}):we;return{...me,value:E.value,disabled:E.disabled,"data-step-state":E.state,tone:ge,tooltip:S(he,{children:[E.label,E.hint!=null&&S(he,{children:[" \u2014 ",E.hint]})]}),className:G,style:$,children:S(he,{children:[h("a-step-marker",{"aria-hidden":"true",children:Le}),S("a-step-desc",{children:[h("a-tab-label",{children:E.label}),E.hint!=null&&h("a-step-hint",{children:E.hint})]})]})}}),U=t.findIndex(E=>E.value===O),Y=p==="vertical",K=g!=null&&g!==!1,z=Y&&K,se=(U>=0?U:t.length-1)+2,re=z?{...x,"--steps-panel-row":se}:x;return h("a-steps",{class:v,style:re,id:w,...I,"data-orientation":Y?"vertical":void 0,children:h(Vd,{options:N,value:O,onStateChange:A,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,size:m,orientation:p,fill:f,priority:c,noslide:!0,disabled:b,"data-steps":"",children:g})})};var W1=({value:t,children:e,hideMode:n,className:r,style:a,...o})=>h("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:r,style:a,...o,children:e});var Z1=new Set(["top","right","bottom","left"]),$1=({header:t,footer:e,position:n,closable:r,persistent:a,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:m,...p})=>{let f=i!==void 0,b=typeof o=="string"&&Z1.has(o)?o:void 0;return S("a-dialog",{state:f?i?"open":"closed":void 0,"default-state":!f&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:a?"":void 0,round:b??X(o),name:f?void 0:l,onstatechange:c?g=>{let{event:v,detail:x,isOwn:w}=ie(g);w&&x&&c(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,class:d,style:ne(b?void 0:o,"--dialog-round",u),...p,children:[r!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(pe,{priority:"tertiary",size:"large",icon:"x","aria-label":"Close","data-custom-event":"closerequest"})}),t!=null&&h("div",{slot:"header",children:t}),m,e!=null&&h("span",{slot:"footer",style:{display:"contents"},children:e})]})};var G1=({header:t,subtitle:e,icon:n,footer:r,media:a,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:m,target:p,rel:f,ping:b,className:g,style:v,children:x,...w})=>{let I=Q(i),C=ne(u,"--card-round",_(I,"--card-tone-source",v)),L=l==="small"?5:l==="large"?3:4;return S("a-card",{tone:I,priority:s&&s!=="primary"?s:void 0,size:l&&l!=="medium"?l:void 0,"media-position":o&&o!=="top"?o:void 0,selected:c?"":void 0,loading:d?"":void 0,round:X(u),href:m,target:m?p:void 0,rel:m?f:void 0,ping:m?b:void 0,class:g,style:C,...w,children:[a!=null&&h("div",{slot:"media",children:a}),n!=null&&(typeof n=="string"?h("a-card-icon-chip",{slot:"icon",children:h(be,{shape:n})}):h("div",{slot:"icon",children:n})),t!=null&&(typeof t=="string"||typeof t=="number"?h(Ad,{slot:"header",level:L,tone:I,children:t}):h("div",{slot:"header",children:t})),e!=null&&h(hs,{slot:"header",size:"small",priority:"tertiary",tone:I,children:e}),typeof x=="string"||typeof x=="number"?h(hs,{priority:"secondary",tone:I,size:l,children:x}):x,r!=null&&h("span",{slot:"footer",style:{display:"contents"},children:r})]})};var jd=({message:t,actions:e,tone:n,align:r,round:a,closable:o,role:i="status",dismissed:s,defaultDismissed:l,onDismiss:c,className:d,style:u,children:m,...p})=>{let f=s!=null,b=ne(a,"--banner-round",_(n,"--banner-tone-source",u)),g=t==null?null:typeof t=="string"||typeof t=="number"?h("a-banner-message",{slot:"message",children:t}):h("span",{slot:"message",style:{display:"contents"},children:t});return S("a-banner",{state:f?s?"closed":"open":void 0,"default-state":f?void 0:l?"closed":"open",tone:Q(n),align:r==="center"?"center":void 0,round:X(a),role:i,onstatechange:c?v=>{let{detail:x,isOwn:w}=ie(v);w&&x?.next==="closed"&&c()}:void 0,class:d,style:b,...p,children:[g,m,e!=null&&h("span",{"data-anta-banner-actions-wrapper":"",slot:"actions",style:{display:"contents"},children:e}),o!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(pe,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var K1=({entry:t,store:e})=>{let n=Ze(()=>t.render(t.id),[t.id,t.rev]),r=typeof Node<"u"&&n instanceof Node,a=typeof n=="string"||typeof n=="number",o={slot:t.placement,duration:t.duration,leaving:t.leaving?"":void 0,rev:t.rev,role:t.politeness==="assertive"?"alert":t.politeness==="polite"?"status":void 0,ondismiss:()=>e.remove(t.id)};return r?h("a-toast",{...o,content:n}):a?h("a-toast",{...o,children:h(jd,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):h("a-toast",{...o,children:n})},X1=({toaster:t,label:e="Notifications",className:n,style:r,children:a,...o})=>{let i=t??dv(),s=Jd(i.subscribe,i.getSnapshot,i.getServerSnapshot);return h("a-toaster",{role:"region","aria-label":e,class:n,style:r,...o,children:s.map(l=>h(K1,{entry:l,store:i},l.id))})},J1,dv=()=>J1??=cs(),uv=X1;Object.defineProperty(uv,"manager",{get:dv,enumerable:!0});export{o1 as Avatar,jd as Banner,l1 as Box,g1 as Breadcrumbs,pe as Button,Md as ButtonCopy,Nd as Calendar,c1 as Capture,G1 as Card,w1 as Checkbox,qn as DEFAULT_CONFIG,$1 as Dialog,C1 as Expander,v1 as ICON_SHAPES,x1 as ICON_SYNONYMS,be as Icon,Rt as Input,F1 as InputAutocomplete,_1 as InputDate,Fd as InputTime,Td as Loader,je as Menu,ea as MenuGroup,Te as MenuItem,Dd as MenuItemCopy,Rn as MenuSeparator,d1 as Panel,i1 as Progress,V1 as RadioGroup,q1 as Select,U1 as SelectFaceted,O1 as Slider,Y1 as Steps,E1 as Switch,W1 as TabPanel,Vd as Tabs,ps as Tag,hs as Text,Ad as Title,uv as Toaster,ct as Tooltip,Rs as avatarToSvg,zd as buildMonth,Nn as clampDate,Os as colorLightness,kv as configure,cs as createToaster,gs as dateFormatPattern,Rd as dateTimeFormatPattern,Od as firstDayOfWeek,vs as formatDateInput,Ld as formatDateTimeInput,zs as getInitials,av as getWeekdays,cu as hasFigure,ou as hashSeed,Pd as isOutOfRange,lu as maxChroma,iu as mulberry32,yo as oklchString,j1 as optionsWithSelection,uo as parseDateInput,xs as parseDateTimeInput,We as parseISODate,iv as parseTimeInput,Ls as resolveAvatar,su as rngFromSeed,ho as usesHour12};
1333
+ `;function Zg(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",hs)}Zg();var s1=({seed:t,name:e,src:n,size:r,badge:a,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof r=="number",u=d?nt(r,"--avatar-size",l):l,m=te(o,"--avatar-radius",u),p=F(a,"--avatar-badge-tone-source",m);return h("a-avatar",{seed:t,name:e,src:n,size:!d&&r&&r!=="medium"?r:void 0,badge:a,round:X(o),config:i?JSON.stringify(i):void 0,role:e?"img":void 0,"aria-label":e||void 0,"aria-hidden":e?void 0:"true",class:s,style:p,...c})};var l1=({value:t,max:e=100,tone:n,size:r,round:a,label:o,hint:i,className:s,style:l,children:c,...d})=>{let u=t==null||t===!1,m=typeof t=="number"?t:0,p=e>0?Math.round(Math.min(100,Math.max(0,m/e*100))):0,f=e>0?Math.min(e,Math.max(0,m)):0,b=[o,!u&&`${p}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return h("a-progress",{value:u?!1:m,max:e,tone:Q(n),size:r&&r!=="medium"?r:void 0,round:X(a),role:"progressbar","aria-valuenow":u?void 0:f,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":b,class:s,style:te(a,"--progress-round",F(n,"--progress-tone-source",l)),...d,children:tu(c)?c:S("a-progress-label",{children:[!u&&S("a-progress-number",{children:[p,"%"]}),o!=null&&h("a-progress-text",{children:o}),i!=null&&h("a-progress-hint",{children:i})]})})};var Td=({tone:t,value:e,max:n=100,size:r,speed:a,label:o,className:i,style:s,...l})=>{let c=typeof e=="number"&&Number.isFinite(e),d=Number.isFinite(n)&&n>0?n:100,u=c?Math.min(d,Math.max(0,e)):void 0,m=u!=null?u/d*100:void 0,p={...s,...r!=null?{"--loader-size":`${r}px`}:{},...!c&&a!=null&&Number.isFinite(a)&&a>0?{"--loader-speed":`${a}s`}:{},...m!=null?{"--loader-value":`${m}%`}:{}},f=o!=null?{role:"progressbar","aria-label":o,"aria-valuenow":c?u:void 0,"aria-valuemin":c?0:void 0,"aria-valuemax":c?d:void 0}:{"aria-hidden":"true"};return h("a-loader",{tone:Q(t),...c?{value:u}:{},class:i,style:p,...f,...l})};var dt=({delay:t,placement:e,round:n,follow:r,interactive:a,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>h("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"||e==="left"?e:void 0,round:X(n),follow:r?"":void 0,interactive:a?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:te(n,"--tooltip-round",l),...d,children:c});var ps=({priority:t,tone:e,size:n,inline:r,truncate:a,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=bo(a),m=Q(e),p=F(m,"--text-tone-source",u!=null?{...l,"--line-clamp":u}:l),f=o&&u!=null;return S("a-text",{priority:t,tone:m,size:n,inline:r?"":void 0,truncate:u!=null?String(u):void 0,expandable:f?"":void 0,collapsible:f&&i?"":void 0,class:s,style:p,...d,children:[c,u!=null&&!f&&h(dt,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};function c1(t,e,n){let r=[...new Set(t==null?[]:typeof t=="string"?[t]:t)],{fields:a,context:o}=Mo(r.join(" ")||null);return e!=null&&a.size===0&&r.push("size"),n!=null&&!o&&r.push("context"),r.join(" ")||void 0}var d1=({display:t,round:e,gap:n,includeRectsFor:r,padding:a,margin:o,observe:i,observeOffscreen:s,throttle:l,fade:c,fadeSize:d,onMeasureChange:u,onContextChange:m,className:p,style:f,children:b,...g})=>{let v=te(e,"--box-round",f);return v=nt(n,"--box-gap",v),v=nt(a,"--box-padding",v),v=nt(o,"--box-margin",v),v=nt(c?d:void 0,"--box-fade-size",v),h("a-box",{display:t==="block"?void 0:t,round:X(e),gap:n!=null?"":void 0,"include-rects-for":r,padding:a!=null?"":void 0,margin:o!=null?"":void 0,observe:c1(i,u,m),"observe-offscreen":s?"":void 0,throttle:l,fade:c?"":void 0,"fade-size":c&&d!=null?br(d):void 0,onmeasurechange:Vn(u),oncontextchange:Vn(m),class:p,style:v,...g,children:b})};function Md(t){if(!(t===void 0||t===!1))return t===!0?"":["up","down","left","right"].filter(e=>t[e]).join(" ")||"none"}function $g(t){if(t)return{"wheel-delay":t.delay,"wheel-tolerance":t.tolerance,"wheel-reset-on-move":t.resetOnMove?"":void 0}}function Gg(t){if(t)return t===!0?{"pointer-capture":""}:{"pointer-capture":t.pointerTypes?.join(" ")||(t.pointerTypes?"none":""),"pointer-buttons":t.buttons?.join(" ")||(t.buttons?"none":void 0),"pointer-threshold":t.threshold,"pointer-modifier":t.modifier,"pointer-include-interactive":t.includeInteractive?"":void 0}}function Kg(t){if(!t)return;let e=t===!0?{}:t,n=typeof e.inertia=="object"?e.inertia:void 0;return{pan:e.axis??"both","pan-pointer-types":e.pointerTypes?.join(" ")||(e.pointerTypes?"none":void 0),"pan-threshold":e.threshold,"pan-directions":e.directions===!1?"none":Md(e.directions),"pan-inertia":e.inertia?"":void 0,"pan-time-constant":n?.timeConstant,"pan-min-velocity":n?.minVelocity}}var u1=({wheelCapture:t,wheelActivation:e,wheelModifier:n,wheelSettle:r,onWheelInput:a,pointerCapture:o,onPointerInput:i,pan:s,onPanInput:l,className:c,children:d,...u})=>h("a-capture",{"wheel-capture":Md(t),"wheel-activation":t?e:void 0,"wheel-modifier":t?n:void 0,...$g(t?r:void 0),...Gg(o),...Kg(s),onwheelinput:Vn(a),onpointerinput:Vn(i),onpaninput:Vn(l),class:c,...u,children:d});var h1=({maximized:t,defaultMaximized:e,onStateChange:n,className:r,children:a,...o})=>h("a-panel",{state:t===void 0?void 0:t?"maximized":"normal","default-state":t===void 0&&e?"maximized":void 0,onstatechange:n?i=>{let{event:s,detail:l,isOwn:c}=oe(i);c&&l&&n(s,{next:l.next==="maximized",prev:l.prev==="maximized"})}:void 0,class:r,...o,children:a});var Id=({level:t=2,priority:e,tone:n,truncate:r,className:a,style:o,children:i,...s})=>{let l=bo(r),c=Q(n),d=F(c,"--title-tone-source",l!=null?{...o,"--line-clamp":l}:o);return S("a-title",{level:String(t),priority:e,tone:c,truncate:l!=null?String(l):void 0,role:"heading","aria-level":t,class:a,style:d,...s,children:[i,l!=null&&h(dt,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var ve=({shape:t,size:e,label:n,className:r,style:a,...o})=>{let i=e!=null?{...a,"--icon-size":`${e}px`}:a,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return h("a-icon",{shape:t,class:r,style:i,...s,...o})};var ms=({icon:t,iconTrailing:e,label:n,value:r,tone:a,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let m=Q(a),p=F(m,"--tag-tone-source",c),f=r!=null,b=t!=null&&n==null&&r==null&&d==null&&e==null;return S("a-tag",{tone:m,"aria-label":b?`${t} tag`:void 0,priority:o&&o!=="secondary"?o:void 0,size:i&&i!=="medium"?i:void 0,allcaps:s?"":void 0,class:l,style:p,...u,children:[t&&h(ve,{shape:t}),n!=null&&(f?h("a-tag-label",{children:n}):h("a-tag-value",{children:n})),f&&h("a-tag-value",{children:r}),d,e&&h(ve,{shape:e})]})};var fe=({priority:t,tone:e,underline:n,underlineOnHover:r,icon:a,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:m,onClick:p,href:f,target:b,rel:g,download:v,ping:x,type:w,form:I,className:C,style:B,children:L,...D})=>{let T=Q(e),N=d||c,Y=te(m,"--button-round",F(T,"--button-tone-source",B)),$=a!=null&&s==null&&L==null&&o==null,G={role:"button",priority:t,tone:T,underline:n,"underline-on-hover":r?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:X(m),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:N?-1:0,"aria-disabled":N?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":$?a:void 0,class:C,style:Y,onClick:N?void 0:p},O=S(me,{children:[a&&h("a-icon",{shape:a,"aria-hidden":"true"}),s!=null&&h("a-button-label",{children:s}),fo(L,"a-button-label"),o&&h("a-icon",{shape:o,"aria-hidden":"true"})]});if(f!=null){let ie={...G,disabled:N||void 0};return h("a",{href:N?void 0:f,"data-anta":"",target:b,rel:g,download:v,ping:x,...ie,...D,children:O})}return h("a-button",{type:w,form:I,...G,...D,children:O})};function fs(t){let{copy:e,copyNode:n,copyUrl:r,copyWithUrl:a,onCopyRequest:o,onCopied:i,toast:s,copiedLabel:l}=t;return{copy:e??void 0,"copy-node":n===!0?"":typeof n=="string"?n:void 0,"copy-url":r?"":void 0,"copy-with-url":a?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(oe(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function bs(t){return t.copyNode!=null&&t.copyNode!==!1}var Dd=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:r,onCopied:a,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":m,...p})=>{let f=e==="none"?void 0:t??"copy",{shownIcon:b,shownTone:g,handleCopied:v}=yo(f,r,a),x=e==="trailing"?{iconTrailing:b}:e==="none"?{}:{icon:b},w=d!=null||u!=null,I=fs({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:v,toast:e==="none",copiedLabel:n});return S(fe,{...x,label:d,tone:e==="none"?r:g,"aria-label":m??(w?void 0:"Copy"),"data-copy-node-button":bs({copyNode:s})?"":void 0,...p,children:[u,h("a-copy",{...I})]})};var qe=({placement:t,context:e,coord:n,nohover:r,offset:a,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:m,style:p,children:f,...b})=>h("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:r?"":void 0,offset:a!=null?String(a):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:v,detail:x,isOwn:w}=oe(g);w&&x&&l(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,round:X(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":u==="menu"||u==="listbox"?"vertical":void 0,class:m,style:nt(i,"--menu-padding",te(c,"--menu-round",p)),...b,children:f});var Od={"\u2318":"Meta",cmd:"Meta",command:"Meta",win:"Meta",super:"Meta","\u2303":"Control",ctrl:"Control",control:"Control","\u2325":"Alt",alt:"Alt",opt:"Alt",option:"Alt","\u21E7":"Shift",shift:"Shift","\u21B5":"Enter","\u23CE":"Enter",enter:"Enter",return:"Enter","\u232B":"Backspace",backspace:"Backspace","\u2326":"Delete",del:"Delete",delete:"Delete","\u238B":"Escape",esc:"Escape",escape:"Escape","\u21E5":"Tab",tab:"Tab","\u2423":"Space",space:"Space","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight","\u21DE":"PageUp","\u21DF":"PageDown","\u2196":"Home","\u2198":"End"};function p1(t){let e=[],n="",r=()=>{n&&(e.push(Od[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)),n="")};for(let a of t)Od[a]?(r(),e.push(Od[a])):a==="+"?r():n+=a;return r(),e.length?e.join("+"):void 0}function m1(t){let e=t.trim().replace(/\s*\+\s*/g,"+").split(/\s+/).map(p1).filter(n=>n!==void 0);return e.length?e.join(" "):void 0}var Se=({icon:t,label:e,hint:n,kbd:r,iconTrailing:a,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneScope:u,submenu:m,value:p,onSelect:f,href:b,target:g,rel:v,download:x,ping:w,role:I,className:C,style:B,children:L,...D})=>{let T=t,N=s==="checkbox"||s==="radio"||s==="check"||s==="switch",Y=s==="checkbox"||s==="switch"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",$=N?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,G=i&&(s===void 0||s==="check"),O=u==="selected"&&!i?void 0:d,ie=Q(O),de=s==="switch"?{"data-menu-open":""}:{},E=D["aria-keyshortcuts"],U=r?m1(r):void 0,K=r?h("kbd",{"aria-hidden":E??U?"true":void 0,children:r}):null,pe=e!=null&&(n!=null?S("a-menu-item-text",{children:[h("a-menu-item-label",{children:e}),h("a-menu-item-hint",{children:n})]}):h("a-menu-item-label",{children:e}));if(b!=null){let ne={"data-anta-menu-item":"",role:I??"menuitem",href:o?void 0:b,target:g,rel:v,download:x===!0?"":x||void 0,ping:w,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,"aria-keyshortcuts":U,tone:ie,style:F(O,"--menu-item-tone-source",B),onClick:f&&!o?ue=>f(ue,{value:p,label:e}):void 0,class:C};return S("a",{...ne,...D,children:[t&&h("a-icon",{shape:t,"aria-hidden":"true"}),pe,L,K,a&&h("a-icon",{shape:a,"aria-hidden":"true"})]})}return S("a-menu-item",{role:I??Y,tabIndex:0,disabled:o?"":void 0,selected:G?"":void 0,"aria-checked":$,tone:ie,style:F(O,"--menu-item-tone-source",B),submenu:m?"":void 0,"aria-haspopup":m?"menu":void 0,"aria-disabled":o?"true":void 0,"aria-keyshortcuts":U,onmenuselect:f?ne=>f(ne,{value:p,label:e}):void 0,class:C,...D,...de,children:[c!=null?h("span",{"aria-hidden":"true","data-indicator":"",style:{flex:"none",display:"inline-flex",alignItems:"center",minHeight:"1lh",pointerEvents:"none"},children:c}):s==="checkbox"?h("a-checkbox",{"aria-hidden":"true",state:l?"indeterminate":i?"checked":"unchecked",tone:ie,style:F(O,"--checkbox-tone-source")}):s==="radio"?h("a-radio",{"aria-hidden":"true",selected:!!i,tone:ie,style:F(O,"--radio-tone-source")}):null,T&&h("a-icon",{shape:T,"aria-hidden":"true"}),pe,L,K,s==="switch"&&c==null&&h("a-switch",{"data-menu-item-switch":"","aria-hidden":"true",tabIndex:-1,state:i?"checked":"unchecked",disabled:o?"":void 0,size:"small",tone:ie,style:F(O,"--switch-tone-source",F(O,"--switch-off-tone-source"))}),(()=>{let ne=m?a??"chevron-right":a;return!m&&!a&&s==="check"&&c==null&&(ne=i?"check":"blank"),ne?h("a-icon",{shape:ne,"aria-hidden":"true"}):null})()]})};var Pd=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:r,tone:a,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...m})=>{let p=n==="none"?void 0:e,{shownIcon:f,shownTone:b,handleCopied:g}=yo(p,a,o),v=n==="trailing"?{iconTrailing:f}:n==="none"?{}:{icon:f},x=fs({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:g,toast:n==="none",copiedLabel:r});return S(Se,{label:t,tone:b,...v,"data-menu-open":"","data-copy-node-button":bs({copyNode:l})?"":void 0,...m,children:[u,h("a-copy",{...x})]})};var f1=new Set(["\u2192","/","\u2022","\u25B8"]);function Xg(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function b1(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let r=Math.max(1,Math.floor(e));if(t.length<=r)return t.map(s=>({kind:"item",item:s}));let a=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),r-1),o=r-a,i=t.slice(a,t.length-o);return[...t.slice(0,a).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function Jg(t){return t.current?{"aria-current":"page"}:{}}function g1(t,e,n,r,a,o,i){let{label:s,current:l,...c}=t,d=Jg(t);if(Xg(t)){let m={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(Dd,{...m,children:s},i)}let u={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(fe,{...u,children:s},i)}function v1(t,e){let{label:n,current:r,onClick:a,...o}=t,i=Jg(t);return Xg(t)?h(Pd,{...o,label:n,onSelect:a,...i},e):h(Se,{...o,label:n,onSelect:a,...i},e)}var x1=({items:t,priority:e="quaternary",size:n="medium",separator:r="chevron-right",maxItems:a,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":m,...p})=>{let f=b1(t,a,o),b=f1.has(r),g=b?r:h(ve,{shape:r});return h("a-breadcrumbs",{role:"navigation","aria-label":m??"Breadcrumb","data-size":n==="medium"?void 0:n,"data-paddingless":c?"":void 0,"data-separator-icon":b?void 0:"",class:d,style:u,...p,children:f.flatMap((v,x)=>{let w=v.kind==="overflow"?[h(fe,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${x}`),h(qe,{autoWidth:!0,children:v.items.map((I,C)=>v1(I,C))},`menu-${x}`)]:[g1(v.item,e,n,s,l,c,x)];return x<f.length-1&&w.push(h("a-breadcrumb-separator",{"aria-hidden":"true",children:g},`separator-${x}`)),w})})};var y1=["arrow-left-to-line","arrow-left","arrow-narrow-down","arrow-narrow-up-down","arrow-narrow-up","arrow-right","arrow-top-right","asterisk","blank","book-open","braces","bug","calendar-days","calendar","case-sensitive","chat","check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-right","circle-check","circle-dot","circle-large","circle-small-solid","circle-user","circle","click","clock","cloud-upload","columns-3-cog","copy","corner-down-right","cube","dollar-sign","dots-vertical","download","edit","external-link","eye-closed","eye","file-down","file","filter-x","filter","folder-close","folder-open","folder-tree","hat-glasses","heart-handshake","heart","history-tree","history","home","hourglass","info","link","list-collapse","maximize","megaphone","menu","minimize","minus","moon","more","move-horizontal","not-equal","play","plus","pointer","presentation","refresh-ccw-dot","refresh","regex","repeat","rotate-ccw","rss","runs-history","scroll-text","search-check","search","send","settings","share","sparkles","square-check-big","square-menu","sun","swatch-book","table-2","tag","text-cursor-input","text-initial","timer","toggle-right","trash","view","warning-diamond","warning-triangle","webhook","workflow","x"],w1={"columns-3-cog":["columns","table","settings","configure","fields","visibility"],blank:["spacer","empty","placeholder","space","none"],"warning-diamond":["error","invalid","alert","danger"],"swatch-book":["palette","color","swatch","paint","design"],"hat-glasses":["accessibility","vision","disguise","person"],"heart-handshake":["credits","thanks","agreement","deal","partnership"],heart:["like","favorite","love","wishlist"],hourglass:["progress","time","wait","loading","timer"],"text-initial":["text","typography","letter","a"],"chevron-down":["arrow","expand","open","down"],"chevron-up":["arrow","collapse","close","up"],"chevron-left":["arrow","back","previous"],"chevron-right":["arrow","forward","next"],"chevrons-right":["skip","fast forward"],"arrow-narrow-down":["download","fall","down"],"arrow-narrow-up":["upload","rise","up"],"arrow-left":["back","previous","prev"],"arrow-right":["forward","next"],"arrow-narrow-up-down":["sort","swap","transfer","reorder"],"arrow-top-right":["external","open","leave"],"arrow-left-to-line":["dock","snap","align"],"move-horizontal":["resize","swap","horizontal"],"external-link":["open","link","share","outbound"],check:["tick","ok","done","confirm","approve"],"dollar-sign":["currency","money","payment"],"circle-check":["success","ok","done"],"circle-user":["avatar","person","account","contact","profile"],x:["close","cancel","dismiss","remove","no"],plus:["add","new","create"],minus:["remove","subtract"],menu:["hamburger","list","more"],"dots-vertical":["more","kebab","options"],search:["find","magnify","lookup"],"search-check":["found","validated"],copy:["duplicate","clone"],trash:["delete","remove","bin"],edit:["pencil","modify","rename"],view:["show","display","preview"],click:["tap","press","touch"],send:["submit","share","deliver"],play:["start","run","execute"],refresh:["reload","sync","update"],regex:["pattern","match"],repeat:["loop","retry","rerun"],info:["information","about","i"],"warning-triangle":["alert","danger","caution"],bug:["defect","issue","error"],asterisk:["star","wildcard"],braces:["code","brackets","json"],"case-sensitive":["aA","capitalize","case"],"list-collapse":["list","collapse","expand","items"],"table-2":["table","grid","data","spreadsheet","rows","columns"],"folder-open":["directory","browse"],"folder-close":["directory"],"folder-tree":["hierarchy","structure","tree"],file:["document","page"],"file-down":["download","save"],calendar:["date","schedule"],clock:["time"],timer:["stopwatch","countdown","time"],"toggle-right":["toggle","switch","on","off","boolean"],history:["log","past"],"history-tree":["log","past"],"runs-history":["log","past"],chat:["message","comment","discuss"],presentation:["slides","deck"],"book-open":["read","docs","documentation"],sparkles:["ai","magic","generate"],cube:["box","package"],circle:["dot","point"],"circle-large":["dot","marker"],"not-equal":["neq","different"],"corner-down-right":["branch","indent","return"],rss:["feed","subscribe"],"scroll-text":["log","output","console"],workflow:["pipeline","process","flow"],webhook:["integration","hook"],megaphone:["announcement","broadcast"],maximize:["fullscreen","expand"],minimize:["collapse","shrink"],filter:["sort","narrow"],"filter-x":["clear filter","reset filter","remove filter"],download:["save","import"],"cloud-upload":["save","sync","upload","send","export"],link:["url","href","anchor"],more:["options","extra"],tag:["label","badge","chip"]};var Qg=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",ev=t=>t==="indeterminate"?"indeterminate":t==="checked",k1=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),E1=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:m,style:p,children:f,tabIndex:b,...g})=>{let v=te(i,"--checkbox-round",F(r,"--checkbox-tone-source",F(r,"--checkbox-off-tone-source",p))),x=g["aria-label"],w=(typeof x=="string"?x:void 0)??d??(typeof f=="string"?f:void 0),I=s?T=>{let{event:N,detail:Y}=oe(T);Y&&s(N,{next:ev(Y.next),prev:ev(Y.prev)})}:void 0,C=l||c?T=>{l?.(T),c?.(T,k1(T.currentTarget))}:void 0,B=t!==void 0?Qg(t):void 0,L=t===void 0&&e!==void 0?Qg(e):void 0,D=d!=null||f!=null;return S("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":w,...g,state:B,"default-state":L,disabled:n?"":void 0,tone:Q(r),"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),tabIndex:n?-1:b??0,onstatechange:I,onchange:C,class:m,style:v,children:[D&&S("a-checkbox-label",{children:[d,f]}),u!=null&&h("a-checkbox-hint",{children:u})]})};var C1=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),A1=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:m,className:p,style:f,children:b,tabIndex:g,...v})=>{let x=te(i,"--switch-round",F(r,"--switch-tone-source",F(r,"--switch-off-tone-source",f))),w=v["aria-label"],I=(typeof w=="string"?w:void 0)??u??(typeof b=="string"?b:void 0),C=l?N=>{let{event:Y,detail:$}=oe(N);$&&l(Y,{next:$.next==="checked",prev:$.prev==="checked"})}:void 0,B=c||d?N=>{c?.(N),d?.(N,C1(N.currentTarget))}:void 0,L=t===void 0?void 0:t?"checked":"unchecked",D=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,T=u!=null||b!=null;return S("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":I,...v,state:L,"default-state":D,disabled:n?"":void 0,tone:r,"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:C,onchange:B,class:p,style:x,children:[T&&S("a-switch-label",{children:[u,b]}),m!=null&&h("a-switch-hint",{children:m})]})};var Ln=({className:t,children:e,...n})=>{let r=!!e&&!(typeof e=="string"&&e.trim()==="");return h("a-menu-separator",{role:r?"status":"separator","aria-live":r?"polite":void 0,class:t,...n,children:r?e:null})};var ea=({label:t,className:e,children:n,...r})=>S("a-menu-group",{role:"group","aria-label":t,class:e,...r,children:[t!=null&&h("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var S1=({title:t,level:e,tone:n,priority:r,outdent:a,actions:o,indicator:i,indicatorPlacement:s,disabled:l,round:c,open:d,defaultOpen:u,onStateChange:m,className:p,style:f,children:b,...g})=>{let v=d!==void 0,x=typeof i=="string"&&(i==="chevron"||i==="triangle"||i==="plus")?i:void 0,w=i!=null&&typeof i=="object"&&"closed"in i&&"open"in i?i:void 0,I=i!=null&&!x&&!w,C=typeof i=="object"?i:null,B=te(c,"--expander-round",F(n,"--expander-tone-source",f)),L=typeof t=="object"&&t!==null?h("span",{slot:"title",style:{display:"contents"},children:t}):h("a-expander-summary",{slot:"title",children:t});return S("a-expander",{state:v?d?"open":"closed":void 0,"default-state":!v&&u?"open":void 0,level:e!=null?String(e):void 0,tone:Q(n),priority:r&&r!=="secondary"?r:void 0,outdent:a?"":void 0,round:X(c),disabled:l?"":void 0,indicator:x,"indicator-placement":s&&s!=="start"?s:void 0,onstatechange:m?D=>{let{event:T,detail:N,isOwn:Y}=oe(D);Y&&N&&m(T,{next:N.next==="open",prev:N.prev==="open"})}:void 0,class:p,style:B,...g,children:[L,o!=null&&h("span",{slot:"actions",children:o}),w&&S(me,{children:[h("span",{slot:"indicator","data-when":"closed","aria-hidden":"true",inert:!0,children:w.closed}),h("span",{slot:"indicator","data-when":"open","aria-hidden":"true",inert:!0,children:w.open})]}),I&&h("span",{slot:"indicator","aria-hidden":"true",inert:!0,children:C}),h("a-expander-details",{children:b})]})};var cr=t=>t?"":void 0,T1=t=>typeof t=="string"||typeof t=="number",tv=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},M1={email:"email",tel:"tel",url:"url"},I1={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},D1={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Rt=({label:t,hint:e,status:n,statusIcon:r,tone:a,priority:o,size:i,round:s,value:l,defaultValue:c,multiline:d,rows:u,maxRows:m,clearable:p,leading:f,trailing:b,type:g,autoComplete:v,inputMode:x,autoFocus:w,name:I,placeholder:C,truncate:B=!0,disabled:L,readOnly:D,button:T,required:N,dimActions:Y,spellCheck:$,maxLength:G,minLength:O,pattern:ie,min:de,max:E,step:U,role:K,onInput:pe,onChange:ne,onValueChange:ue,onClearClick:J,onClearInput:be,children:Re,className:Oe,style:xe,...Qe})=>{let et=n&&n!=="neutral"?n:void 0,q=r===void 0?et?D1[et]:void 0:r,ye=g==="search",Ue=ye?void 0:g,ut=f??(ye?h(ve,{shape:"search"}):void 0),R=ye?p??!0:p;return S("a-input",{priority:o&&o!=="primary"?o:void 0,size:i&&i!=="medium"?i:void 0,round:X(s),value:l,defaultvalue:c,multiline:cr(d||u!=null),rows:u!=null?String(u):void 0,maxrows:m!=null?String(m):void 0,status:et,tone:Q(a),type:!d&&u==null?Ue:void 0,name:I,placeholder:C,truncate:cr(B),disabled:cr(L),readonly:cr(D),button:cr(T),required:cr(N),"dim-actions":cr(Y),autocomplete:v??(!d&&u==null&&g?M1[g]:void 0),inputmode:x??(!d&&u==null&&g?I1[g]:void 0),autofocus:w?!0:void 0,spellcheck:$!=null?$?"true":"false":void 0,maxlength:G!=null?String(G):void 0,minlength:O!=null?String(O):void 0,pattern:ie,min:de,max:E,step:U,"aria-invalid":n==="critical"?"true":void 0,role:K??(ye?"searchbox":void 0),oninput:pe||ue?_=>{pe?.(_),ue?.(_,tv(_))}:void 0,onchange:ne||ue?_=>{ne?.(_),ue?.(_,tv(_))}:void 0,onclearclick:J?_=>J(oe(_).event):void 0,onclearinput:be?_=>be(oe(_).event):void 0,class:Oe,style:te(s,"--input-round",F(a,"--input-tone-source",xe)),...Qe,children:[t!=null&&(T1(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),ut!=null&&h("span",{slot:"leading",style:{display:"contents"},children:ut}),R&&h("span",{slot:"clear",style:{display:"contents"},children:h(fe,{priority:"tertiary",size:i,round:!!s,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),b!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:b}),e!=null&&S("span",{slot:"hint",style:{display:"contents"},children:[q&&h(ve,{shape:q,"aria-hidden":"true"}),h("span",{children:e})]}),Re]})};var gs=(t,e)=>Number.isFinite(t)?t:e,O1=t=>typeof t=="string"||typeof t=="number",P1=(t,e)=>{let n=gs(t,0);return{min:n,max:Math.max(n,gs(e,100))}},nv=t=>{let e=t?.target??{};return{value:e.value,min:Number(e.getAttribute?.("min")??0),max:Number(e.getAttribute?.("max")??100),step:Number(e.getAttribute?.("step")??1),name:e.getAttribute?.("name")??void 0}},z1=({label:t,value:e,defaultValue:n,min:r,max:a,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:m,thumbFill:p,round:f,valueDisplay:b="end",valuePrefix:g,valueSuffix:v,markers:x,trackClick:w="drag-only",inverted:I,onInput:C,onChange:B,onValueChange:L,onValueCommit:D,className:T,style:N,children:Y,tabIndex:$,...G})=>{let O=br(u),ie=br(m),de=nt(m,"--anta-slider-thumb-size",nt(u,"--anta-slider-track-size",te(f,"--slider-round",F(c,"--slider-thumb-tone-source",F(l,"--slider-tone-source",N))))),{min:E,max:U}=P1(r,a),K=gs(o,1)>0?gs(o,1):1,pe=G["aria-label"],ne=(typeof pe=="string"?pe:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),ue=Array.isArray(e)||Array.isArray(n),J=q=>Array.isArray(q)?`${q[0]} ${q[1]}`:typeof q=="number"?q:void 0,be=b==="inline"&&t==null?"end":b,Re=q=>q.value<=E?"0%":q.value>=U?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(q.value-E)/(U-E)} + var(--anta-slider-thumb-size) / 2)`,Oe=q=>q.value<=E?"start":q.value>=U?"end":void 0,xe=q=>{let ye={};return Object.assign(ye,{"--slider-marker-position":Re(q)}),ye},Qe=C||L?q=>{let ye=nv(q);C?.(q),L?.(q,ye)}:void 0,et=B||D?q=>{let ye=nv(q);B?.(q),D?.(q,ye)}:void 0;return S("a-slider",{value:J(e),defaultvalue:J(n),min:E,max:U,step:K,name:i,disabled:s?"":void 0,tone:Q(l),"thumb-tone":Q(c),size:d&&d!=="medium"?d:void 0,"track-size":O,"thumb-size":ie,"thumb-fill":p?"":void 0,round:X(f),"track-click":w==="jump"?"jump":void 0,inverted:I?"":void 0,"value-display":be==="end"?void 0:be,"value-prefix":g,"value-suffix":v,role:ue?"group":"slider","aria-label":ne,tabIndex:s||ue?-1:$??0,oninput:Qe,onchange:et,class:T,style:de,...G,children:[t!=null&&(O1(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),x?.map((q,ye)=>{let Ue=Oe(q);return h("span",{slot:"markers",style:xe(q),"data-slider-marker-start":Ue==="start"?"":void 0,"data-slider-marker-end":Ue==="end"?"":void 0,children:q.label},`${q.value}-${ye}`)}),Y]})};function rv(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=rv(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function B1(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=rv(t))&&(r&&(r+=" "),r+=e);return r}var av=B1;var ta=Me.PlainDate.compare,ov=new Map;function $t(t,e){let n=`${t}|${JSON.stringify(e)}`,r=ov.get(n);return r||(r=new Intl.DateTimeFormat(t,e),ov.set(n,r)),r}var uo=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function $e(t){if(!t)return null;try{return Me.PlainDate.from(t)}catch{return null}}function zd(t){try{let e=new Intl.Locale(t),r=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof r=="number"&&r>=1&&r<=7)return r}catch{}return 1}function Rn(t,e,n){return e&&ta(t,e)<0?e:n&&ta(t,n)>0?n:t}function Bd(t,e,n){return e!=null&&ta(t,e)<0||n!=null&&ta(t,n)>0}var L1=t=>Array.from(t).slice(0,2).join("");function iv(t,e=zd(t)){let n=Me.PlainDate.from("2021-02-01"),r=n.add({days:(e-n.dayOfWeek+7)%7}),a=$t(t,{weekday:"short",timeZone:"UTC"}),o=$t(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=r.add({days:s}),c=a.format(uo(l));i.push({short:c,narrow:L1(c),long:o.format(uo(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function Ld(t){let{anchor:e,locale:n="en-US",min:r=null,max:a=null,selected:o=null,today:i=Me.Now.plainDateISO(),weeks:s=6}=t,l=zd(n),c=e.year,d=e.month,u=e.with({day:1}),m=(u.dayOfWeek-l+7)%7,p=u.subtract({days:m}),f=$t(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),b=[];for(let g=0;g<s;g++){let v=[];for(let x=0;x<7;x++){let w=p.add({days:g*7+x});v.push({date:w,iso:w.toString(),day:w.day,weekday:w.dayOfWeek,outside:w.month!==d||w.year!==c,disabled:Bd(w,r,a),today:i!=null&&ta(w,i)===0,selected:o!=null&&ta(w,o)===0,label:f.format(uo(w))})}b.push(v)}return{year:c,month:d,heading:$t(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(uo(e)),weekdays:iv(n,l),weeks:b}}var sv=new Date(Date.UTC(2026,5,15)),Rd={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function R1(t){try{return $t(t,Rd).formatToParts(sv).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function vs(t){try{return $t(t,Rd).formatToParts(sv).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function xs(t,e){return $t(e,Rd).format(uo(t))}function N1(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let r=$t(e,{month:"long",timeZone:"UTC"}),a=$t(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=r.format(i).toLowerCase(),l=a.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function ho(t,e,n={}){let r=u=>Bd(u,n.min??null,n.max??null)?null:u,a=(t??"").trim();if(!a)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let u=$e(a);return u?r(u):null}let o=R1(e),i=N1(a,e),s=(a.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=Me.Now.plainDateISO().year;else if(s.length>=2){let[u,m]=s;u>31?[l,d]=[u,m]:m>31?[l,d]=[m,u]:[d,l]=[u,m]}else return null;else if(s.length===1){let u=a.replace(/\D/g,"");if(u.length!==8)return null;let m=0,p={};for(let f of o){let b=f==="year"?4:2;p[f]=Number(u.slice(m,m+b)),m+=b}({year:l,month:c,day:d}=p)}else if(s.length===2){let u=o.filter(p=>p!=="year"),m={};u.forEach((p,f)=>m[p]=s[f]),c=m.month,d=m.day,l=Me.Now.plainDateISO().year}else if(s.length>=3){let u={};o.forEach((m,p)=>u[m]=s[p]),l=u.year,c=u.month,d=u.day}else return null;l!=null&&l<100&&(l=l<70?2e3+l:1900+l);try{return r(Me.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function lv(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,r=e.match(/([ap])\.?m?\.?$/);r&&(n=r[1]==="p"?"pm":"am",e=e.slice(0,r.index).trim());let a,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);a=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)a=Number(i),o=0;else{let s=i.length-2;a=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&a<12&&(a+=12),n==="am"&&a===12&&(a=0);try{return Me.PlainTime.from({hour:a,minute:o},{overflow:"reject"})}catch{return null}}function ys(t,e,n={}){let r=(t??"").trim();if(!r)return null;let a=r.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=r,i=null;a&&(i=lv(a[1]),i&&(o=r.slice(0,a.index).trim()));let s=ho(o,e,n);return s?s.toPlainDateTime(i??Me.PlainTime.from("00:00")):null}function po(t){try{let e=$t(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function Nd(t,e,n=po(e)){let r=xs(t.toPlainDate(),e),a=String(t.minute).padStart(2,"0");if(!n)return`${r} ${String(t.hour).padStart(2,"0")}:${a}`;let o=(t.hour+11)%12+1;return`${r} ${String(o).padStart(2,"0")}:${a} ${t.hour<12?"AM":"PM"}`}function _d(t,e=po(t)){return`${vs(t)} HH:MM${e?" AM":""}`}var Fd=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:m,style:p,"aria-label":f,...b})=>{let g=t!==void 0,v=a||(typeof navigator<"u"?navigator.language:"en-US"),x=$e(n),w=$e(r),I=Me.Now.plainDateISO(),[C,B]=W(()=>$e(e)),L=g?$e(t):C,[D,T]=W(()=>Rn($e(t??e)??I,x,w)),[N,Y]=W(t),$=D;if(t!==N){Y(t);let R=$e(t);R&&($=Rn(R,x,w),T($))}let[G,O]=W(null),[ie,de]=W(!1),E=Ld({anchor:$,locale:v,min:x,max:w,selected:L,today:I}),U=$.toString(),[K,pe]=W(l);l!==K&&(pe(l),l!==void 0&&O({iso:U,n:l}));let ne=x?x.year:I.year-3,ue=w?w.year:I.year+3,J=[];for(let R=ne;R<=ue;R++)J.push(R);let be=Ge(()=>Array.from({length:12},(R,_)=>Me.PlainDate.from({year:2e3,month:_+1,day:1}).toLocaleString(v,{month:"long"})),[v]),Re=(R,_)=>x!=null&&(R<x.year||R===x.year&&_<x.month)||w!=null&&(R>w.year||R===w.year&&_>w.month),Oe=R=>{s||T(_=>Rn(_.add({months:R}),x,w))},xe=(R,_)=>{s||T(y=>Rn(y.with({year:R,month:_}),x,w))},Qe=Ge(()=>{let R=(_,y)=>{let k=y+1,V=_===D.year&&k===D.month;return h(Se,{label:be[y],selected:V,disabled:Re(_,k)||void 0,"data-menu-open":"",onSelect:()=>{xe(_,k),de(!1)},children:V&&h("span",{className:"jump-dot","aria-hidden":"true"})},`${_}-${k}`)};return J.length===1?be.map((_,y)=>R(J[0],y)):J.map(_=>S(Se,{submenu:!0,label:String(_),selected:_===D.year,children:[_===D.year&&h("span",{className:"jump-dot","aria-hidden":"true"}),h(qe,{children:be.map((y,k)=>R(_,k))})]},_))},[be,D.year,D.month,ne,ue,n,r,s]),et=R=>{let{event:_,detail:y}=oe(R);if(!y||(c?.(_,y),y.reason==="user"&&(g||_.defaultPrevented)))return;let k=$e(y.next);g||B(k),T(Rn(k??D,x,w))},q=R=>{let _="nativeEvent"in R?R.nativeEvent:R;d?.(_),u?.(_,{value:_?.target?.value||null,name:o})},ye=R=>{if(s)return;let{detail:_}=oe(R),y=$e(_?.date??null);if(!y)return;let k=Rn(y,x,w);T(k),O(V=>({iso:k.toString(),n:(V?.n??0)+1}))},Ue=s||x!=null&&Me.PlainDate.compare(D.with({day:1}).subtract({days:1}),x)<0,ut=s||w!=null&&Me.PlainDate.compare(D.with({day:1}).add({months:1}),w)>0;return S("div",{className:av("anta-calendar",m),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:p,...b,children:[S("div",{"data-part":"header",children:[h(fe,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:Ue,onClick:()=>Oe(-1)}),h(fe,{"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${E.heading} \u2014 choose month and year`,disabled:s||Ue&&ut,children:E.heading}),h(qe,{placement:"bottom",open:ie,onStateChange:(R,{next:_})=>de(_),children:Qe}),h(fe,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:ut,onClick:()=>Oe(1)})]}),S("a-calendar",{role:"group","aria-label":f??E.heading,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":G?`${G.iso}#${G.n}`:void 0,onstatechange:et,onchange:q,onnavigate:ye,children:[E.weekdays.map((R,_)=>h("span",{"data-part":"weekday","data-weekend":R.weekend?"":void 0,"aria-hidden":"true",children:R.narrow},`wd${_}`)),E.weeks.flat().map(R=>{let _=R.today&&!R.selected?{priority:"secondary"}:{priority:"tertiary",selected:R.selected,tone:R.selected?"brand":void 0};return S(fe,{..._,size:i,disabled:s||R.disabled,tabIndex:R.iso===U?0:-1,"aria-label":R.label,"aria-hidden":R.outside?"true":void 0,"aria-current":R.today?"date":void 0,"data-part":"day-cell","data-date":R.iso,"data-today":R.today?"":void 0,"data-outside":R.outside?"":void 0,children:[R.day,R.today&&h(dt,{children:"Today"})]},R.iso)})]})]})};var Vd=t=>t?"":void 0,_1=t=>typeof t=="string"||typeof t=="number",cv=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},F1={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Hd=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:m,name:p,disabled:f,required:b,icon:g,clearable:v,dimActions:x,trailing:w,autoFocus:I,onValueChange:C,onClearInput:B,children:L,className:D,style:T,...N})=>{let Y=n&&n!=="neutral"?n:void 0,$=r===void 0?Y?F1[Y]:void 0:r;return S("a-input-time",{size:o&&o!=="medium"?o:void 0,round:X(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:m,status:Y,tone:Q(a),name:p,disabled:Vd(f),required:Vd(b),"dim-actions":Vd(x),autofocus:I?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,oninput:C?G=>C(G,cv(G)):void 0,onchange:C?G=>C(G,cv(G)):void 0,onclearinput:B?G=>B(oe(G).event):void 0,class:D,style:te(i,"--input-time-round",F(a,"--input-time-tone-source",T)),...N,children:[t!=null&&(_1(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),g!==!1&&h("span",{slot:"leading",style:{display:"contents"},children:h(ve,{shape:g??"clock"})}),v&&h("span",{slot:"clear",style:{display:"contents"},children:h(fe,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),w!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:w}),e!=null&&S("span",{slot:"hint",style:{display:"contents"},children:[$&&h(ve,{shape:$,"aria-hidden":"true"}),h("span",{children:e})]}),L]})};var V1=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:m,placement:p,offset:f,clearable:b,icon:g,time:v,hour12:x,onValueChange:w,className:I,style:C,...B})=>{let L=a||(typeof navigator<"u"?navigator.language:"en-US"),D=$e(n),T=$e(r),N=v?x??po(L):!1,Y=Ge(()=>d??(v?_d(L,N):vs(L)),[d,v,L,N]),$=M=>{if(!M)return"";let H=$e(M.slice(0,10));if(!H)return"";if(!v)return xs(H,L);let Pe=M.length>=16&&M[10]==="T",re=H.toPlainDateTime(Me.PlainTime.from(Pe?M.slice(11,16):"00:00"));return Nd(re,L,N)},G=M=>!M||!v?M:M.length<=10?`${M}T00:00`:M.slice(0,16),O=t!==void 0,[ie,de]=W(()=>G(e)),E=O?t:ie,U=E?E.slice(0,10):"",K=!!E&&E.length>=16&&E[10]==="T",pe=K&&parseInt(E.slice(11,13),10)||0,ne=K?E.slice(14,16):"00",[ue,J]=W(()=>$(E)),[be,Re]=W(!1),[Oe,xe]=W(!1),[Qe,et]=W(0),[q,ye]=W(E);E!==q&&(ye(E),J($(E)),xe(!1));let Ue=M=>{O||de(M||void 0),w?.(M,{value:M,name:o})},ut=M=>`${M}T${String(pe).padStart(2,"0")}:${ne}`,R=M=>{xe(!1),M===(E??"")?J($(M)):Ue(M)},_=M=>{let H=M.trim();if(!H)return xe(!1),E?Ue(""):J(""),!0;let Pe=v?ys(H,L,{min:D,max:T}):ho(H,L,{min:D,max:T});if(!Pe)return xe(!0),!1;let re=v?Pe.toString({smallestUnit:"minute"}):Pe.toString();return R(re),!0},y=Ge(()=>{let M=ue.trim();if(!M)return U;let H=v?ys(M,L,{min:D,max:T}):ho(M,L,{min:D,max:T});return H?H.toString().slice(0,10):null},[ue,v,L,U,n,r]),[k,V]=W(U);return y!==null&&y!==k&&V(y),S(me,{children:[h(Rt,{label:l,hint:Oe?`Unrecognized date. Try ${Y}.`:c,status:Oe?"critical":u,size:i,round:m,disabled:s,clearable:b,leading:g===!1?void 0:h(ve,{shape:g??"calendar-days"}),value:ue,placeholder:Y,inputMode:v?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":be?"true":"false",onInput:M=>{J(M.currentTarget.value),Oe&&xe(!1)},onChange:M=>_(M.currentTarget.value),onKeyDown:M=>{Ye(M)||((M.key==="ArrowDown"||M.key==="ArrowUp")&&!s&&(M.preventDefault(),et(H=>H+1)),M.key==="Enter"&&!s&&(M.preventDefault(),_(M.currentTarget.value)&&Re(!1)))},truncate:!0,className:I,style:C,...B}),h(qe,{role:"dialog","aria-label":v?"Choose date and time":"Choose date",open:be,placement:p??"bottom-start",offset:f,autoWidth:!0,inset:8,onStateChange:(M,{next:H})=>Re(H),children:S("div",{"data-menu-open":"",children:[h(Fd,{value:k,min:n,max:r,locale:a,size:i,disabled:s,focusSignal:Qe,onStateChange:(M,{next:H,reason:Pe})=>{if(Pe!=="user")return;let re=H??"";R(v&&re?ut(re):re),v||Re(!1)}}),v&&S("a-input-date-time-container",{children:[h(Hd,{size:i,locale:a,hour12:x,disabled:s,"aria-label":"Time",value:K?`${String(pe).padStart(2,"0")}:${ne}`:"",onValueChange:(M,{value:H})=>{if(("nativeEvent"in M?M.nativeEvent:M)?.type!=="change")return;let re=U||Me.Now.plainDateISO().toString();Ue(H?`${re}T${H}`:re)}}),h(fe,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>Re(!1)})]})]})}),o?h("input",{type:"hidden",name:o,value:E??""}):null]})};var Nn=t=>typeof t=="string"?{value:t,label:t}:t;function na(t){let e=t.trim();if(!e)return null;let n=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var ra=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),aa=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),r=[],a=0,o;for(;(o=n.exec(t))!==null;)o.index>a&&r.push(t.slice(a,o.index)),r.push(h("b",{children:o[0]},r.length)),a=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return r.length===0?t:(a<t.length&&r.push(t.slice(a)),r)};var H1=t=>{let{suggestions:e,value:n,defaultValue:r,onValueChange:a,onSelect:o,filter:i=!0,...s}=t,l=n!==void 0,[c,d]=W(r??""),u=l?n:c,[m,p]=W(!1),f=Ge(()=>e.map(Nn),[e]),b=typeof i=="function",g=i!==!1&&!b?na(u):null,v=b?f.filter(C=>i(C,u)):f.filter(C=>ra(C,g)),x=m&&v.length>0,w=C=>{l||d(C),a?.(C)},I=C=>{w(C.value),o?.(C),p(!1)};return S(me,{children:[h(Rt,{...s,value:u,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-expanded":x?"true":"false","aria-autocomplete":"list",onFocus:()=>p(!0),onInput:C=>{w(C.currentTarget.value),p(!0)},onKeyDown:C=>{C.key==="Enter"&&!C.defaultPrevented&&p(!1)}}),h(qe,{role:"listbox",open:x,onStateChange:(C,{next:B})=>{p(B)},children:v.map((C,B)=>{let{className:L,style:D,...T}=ht(C,!0);return h(Se,{...T,role:"option",icon:C.icon,label:aa(C.label??C.value,g),hint:C.hint?aa(C.hint,g):C.hint,tone:C.tone,disabled:C.disabled,value:C.value,onMouseDown:N=>N.preventDefault(),onSelect:()=>I(C),className:L,style:D},`${C.value}-${B}`)})})]})};var j1=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),q1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:m,toneScope:p,size:f,disabled:b,orientation:g,className:v,style:x,...w})=>{let I=e!==void 0,[C,B]=W(n),L=I?e:C,D=new Set;for(let O of t)D.has(O.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(O.value)} \u2014 values must be unique.`),D.add(O.value);let T=Ss(),N=Ss(),Y=b?void 0:t.find(O=>O.value===L)?.value??t.find(O=>!O.disabled)?.value,$=O=>{let{event:ie,detail:de}=oe(O);de&&(r?.(ie,de),!I&&(de.reason==="user"&&ie.defaultPrevented||B(de.next??void 0)))},G=a||o?O=>{a?.(O),o?.(O,j1(O.currentTarget))}:void 0;return S("a-radio-group",{role:"radiogroup","aria-disabled":b?"true":void 0,"aria-labelledby":c?T:void 0,"aria-describedby":d?N:void 0,...w,state:I?e:void 0,"default-state":I?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:Q(m),"tone-scope":p&&p!=="all"?p:void 0,size:f&&f!=="medium"?f:void 0,disabled:b?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:$,onchange:G,onfocusin:i,onfocusout:s,class:v,style:F(m,"--radio-tone-source",F(m,"--radio-off-tone-source",x)),children:[c&&h("a-radio-group-label",{id:T,children:c}),d&&h("a-radio-group-hint",{id:N,children:d}),h("a-radio-list",{children:t.map(O=>{let ie=b||O.disabled,{className:de,style:E,...U}=ht(O);return S("a-radio",{...U,role:"radio",value:O.value,"aria-disabled":ie?"true":void 0,tabIndex:O.value===Y?0:-1,tone:O.tone||void 0,"tone-scope":O.toneScope??(O.tone?p:void 0),size:O.size&&O.size!=="medium"?O.size:void 0,disabled:O.disabled?"":void 0,class:de,style:F(O.tone,"--radio-tone-source",F(O.tone,"--radio-off-tone-source",E)),children:[h("a-radio-label",{children:O.label}),O.hint!=null&&h("a-radio-hint",{children:O.hint})]},O.value)})})]})};function U1(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),r=(o,i)=>o===0?"none":o===i?"all":"some",a=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=a(c.submenu),u=d.reduce((p,f)=>p+f.on,0),m=d.reduce((p,f)=>p+f.total,0);return{node:{...c,submenu:d.map(p=>p.node),selectionState:r(u,m)},on:u,total:m}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=a(c.options),u=d.reduce((p,f)=>p+f.on,0),m=d.reduce((p,f)=>p+f.total,0);return{node:{...c,options:d.map(p=>p.node),selectionState:r(u,m)},on:u,total:m}}let s=Nn(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return a(t).map(o=>o.node)}var Y1=t=>{let{options:e,placement:n,offset:r,selection:a,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:m,hint:p,size:f,status:b,statusIcon:g,round:v,disabled:x,tone:w,toneScope:I,filter:C,selectAll:B=!0,selectAllLabel:L="Select all",clearable:D,clearLabel:T="Clear",renderOption:N,renderIndicator:Y,verbose:$,renderSummary:G,renderTrigger:O,renderEmpty:ie,className:de,style:E,...U}=t,K=a==="multiple",pe=b&&b!=="neutral"?`var(--text-2-${b})`:void 0,ne=K?"checkbox":o??"none",ue=ne==="none"?void 0:ne,J=l,be=i!==void 0,[Re,Oe]=W(s),xe=be?i:Re,[Qe,et]=W(!1),[q,ye]=W(""),Ue=`${m??U["aria-label"]??"Select"} options`,ut=A=>typeof A=="object"&&Array.isArray(A.submenu),R=A=>typeof A=="object"&&Array.isArray(A.options),_=(A,le,ae,se)=>{for(let ge of A)if(typeof ge!="string"&&ut(ge))_(ge.submenu,ge.label,ae||!!ge.disabled,se);else if(typeof ge!="string"&&R(ge))_(ge.options,ge.label,ae||!!ge.disabled,se);else{let At=Nn(ge);se.push({opt:At,disabled:ae||!!At.disabled,group:le})}},y=[];_(e,void 0,!1,y);let k=new Set;for(let A of y){let le=String(A.opt.value);k.has(le)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(A.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),k.add(le)}let V=new Map(y.map(A=>[A.opt.value,A.opt])),M=C!==void 0&&C!==!1,H=q.trim(),Pe=M&&typeof C!="function"?na(H):null,re=A=>typeof C=="function"?C(A,H):ra(A,Pe),ur=typeof C=="function"||M&&!!H?y.filter(A=>re(A.opt)):y,oa=M&&!!H,tt=Array.isArray(xe)?xe:xe!=null?[xe]:[],hr=A=>tt.includes(A),Nt=tt.map(A=>V.get(A)).filter(Boolean),pr=y.filter(A=>!A.disabled).map(A=>A.opt.value),ks=K&&pr.length>1&&pr.every(A=>tt.includes(A)),Es=A=>A.label??String(A.value),_n="";if(K){let A=Nt.length>0?G?.(Nt):void 0;if(A!=null&&A!=="")_n=A;else if(ks)_n="All";else if(Nt.length===1)_n=Es(Nt[0]);else if(Nt.length>1){let le=`${Nt.length} selected`;_n=$?`${le}: ${Nt.map(Es).join(", ")}`:le}}else if(xe!=null){let A=V.get(xe);_n=A?Es(A):""}let mv=(A,le)=>{if(K){if(B&&le?.altKey){let ge=[A.value];be||Oe(ge),J?.(ge,{value:A.value,option:A,selected:!0});return}let ae=tt.includes(A.value),se=ae?tt.filter(ge=>ge!==A.value):[...tt,A.value];be||Oe(se),J?.(se,{value:A.value,option:A,selected:!ae})}else be||Oe(A.value),J?.(A.value,{value:A.value,option:A})},ia=K?ur.filter(A=>!A.disabled).map(A=>A.opt.value):[],Yd=ia.filter(A=>tt.includes(A)),mo=ia.length>0&&Yd.length===ia.length,fv=Yd.length>0&&!mo,bv=()=>{let A=tt.filter(ae=>!ia.includes(ae)),le=mo?A:[...A,...ia];be||Oe(le),J?.(le,{all:!0,selected:!mo})},gv=()=>{let A=K?[]:void 0;be||Oe(A),J?.(A,{all:!0,selected:!1})},Cs=(A,le)=>{let{className:ae,style:se,...ge}=ht(A,!0),At={value:A.value,selected:hr(A.value),disabled:le},Gt=N?.(A,At),Fn=Y?.(At),xv=!K&&ne==="none"?{role:"menuitemradio","aria-checked":hr(A.value)?"true":"false"}:void 0,$d=K&&B&&!le?go:void 0,Gd=A.tooltip??$d,yv=A.tooltip==null&&$d!=null;return S(Se,{...ge,selectionIndicator:ue,...xv,indicator:Fn??void 0,label:Gt?void 0:aa(A.label??String(A.value),Pe),hint:Gt?void 0:A.hint?aa(A.hint,Pe):A.hint,icon:Gt?void 0:A.icon,tone:A.tone??w,toneScope:A.toneScope??I,selected:hr(A.value),disabled:le||void 0,"data-menu-open":K?"":void 0,onSelect:wv=>mv(A,wv),className:ae,style:se,children:[Gt,Gd&&h(dt,{...yv?{delay:vo,placement:"left"}:{follow:!0},children:Gd})]},String(A.value))},As=(A,le)=>{let ae=[];return A.forEach((se,ge)=>{if(typeof se!="string"&&ut(se)){let Gt=le||!!se.disabled,Fn=As(se.submenu,Gt);Fn.length&&ae.push(h(Se,{submenu:!0,label:se.label,icon:se.icon,disabled:Gt||void 0,"data-menu-open":K?"":void 0,children:h(qe,{children:Fn})},`sub-${ge}-${se.label}`));return}if(typeof se!="string"&&R(se)){let Gt=le||!!se.disabled,Fn=As(se.options,Gt);Fn.length&&ae.push(h(ea,{label:se.label,children:Fn},`grp-${ge}-${se.label}`));return}let At=Nn(se);typeof C=="function"&&!re(At)||ae.push(Cs(At,le||!!At.disabled))}),ae},vv=()=>{let A=y.filter(ae=>re(ae.opt)),le=[];for(let ae=0;ae<A.length;){let se=A[ae].group;if(se===void 0){le.push(Cs(A[ae].opt,A[ae].disabled)),ae++;continue}let ge=[],At=ae;for(;ae<A.length&&A[ae].group===se;)ge.push(Cs(A[ae].opt,A[ae].disabled)),ae++;le.push(h(ea,{label:se,children:ge},`flat-${At}-${se}`))}return le},Wd=S(me,{children:[O?O({open:Qe,value:xe,selected:Nt,disabled:!!x,icon:d}):S(fe,{disabled:x,size:f,round:v,"aria-label":typeof m=="string"||typeof m=="number"?String(m):void 0,"aria-invalid":b==="critical"?"true":void 0,"aria-haspopup":M?"dialog":"menu","aria-expanded":Qe?"true":"false",...U,children:[(u??d)&&h("a-select-leading",{"aria-hidden":"true",children:u??h(ve,{shape:d})}),h("a-button-label",{"data-placeholder":_n?void 0:"",children:_n||c}),h("a-select-chevron",{open:Qe?"":void 0,"aria-hidden":"true",style:pe?{color:pe}:void 0,children:h(ve,{shape:"chevron-down"})})]}),S(qe,{role:M?"dialog":void 0,"aria-label":M?Ue:void 0,placement:n,offset:r,onStateChange:(A,{next:le})=>{et(le),le||ye("")},children:[M&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:q,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list",onInput:A=>ye(A.currentTarget.value)})}),K&&B&&ur.length>0&&S(me,{children:[h(Se,{selectionIndicator:"checkbox",selected:mo,indeterminate:fv,label:L,"data-menu-open":"","data-menu-skip-active":"",onSelect:bv}),h(Ln,{})]}),ur.length===0?ie?.({query:H}):oa?vv():As(e,!1),D&&tt.length>0&&S(me,{children:[h(Ln,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Se,{icon:"x",label:T,role:M?"button":void 0,"data-menu-open":"",onSelect:gv})})]})]})]});if(O)return Wd;let Zd=g===void 0?b?{brand:"circle-small-solid",info:"info",success:"circle-check",warning:"warning-triangle",critical:"warning-diamond"}[b]:void 0:g;return S("a-select-field",{size:f,status:b,disabled:x?"":void 0,class:de,style:E,children:[m!=null&&h("a-select-label",{children:m}),Wd,p!=null&&S("a-select-hint",{children:[Zd&&h(ve,{shape:Zd,"aria-hidden":"true"}),p]})]})};var jd=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...jd(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...jd(n.options)):e.push(Nn(n));return e},ws=t=>t==null||t===""||Array.isArray(t)&&t.length===0,dv=(t,e)=>ra(t,na(e)),W1=t=>{let{facets:e,placement:n,offset:r,value:a,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,tone:m,toneScope:p,searchable:f,searchPlaceholder:b="Filter\u2026",clearable:g=!0,clearAllLabel:v="Clear all",renderTrigger:x,className:w,style:I,...C}=t,B=a!==void 0,[L,D]=W(o??{}),T=B?a:L,[N,Y]=W(!1),[$,G]=W({}),[O,ie]=W({});{let y=null,k=$;for(let V of e)V.kind==="text"&&O[V.key]!==T[V.key]&&(y={...y??O,[V.key]:T[V.key]},k={...k,[V.key]:T[V.key]??""});y&&(ie(y),G(k))}let[de,E]=W({}),[U,K]=W(""),pe=e.reduce((y,k)=>y+(ws(T[k.key])?0:1),0),ne=Ge(()=>new Map(e.map(y=>[y.key,y.kind==="single"||y.kind==="multiple"?jd(y.options):[]])),[e]),ue=(y,k)=>{B||D(y),i?.(y,k)},J=(y,k)=>{let V=ws(k),M={...T};V?delete M[y.key]:M[y.key]=k,ue(M,{facet:y.key,kind:y.kind,value:V?void 0:k})},be=()=>ue({},{all:!0}),Re=y=>{let k=ne.get(y.key)??[];if(!y.filter)return k;let V=de[y.key]??"",M=typeof y.filter=="function"?y.filter:dv;return k.filter(H=>M(H,V))},Oe=y=>y.filter?h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:de[y.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${y.label}`,"aria-autocomplete":"list",onInput:k=>E(V=>({...V,[y.key]:k.currentTarget.value}))})}):null,xe=(y,k,V="")=>{let{className:M,style:H,...Pe}=ht(k,!0),re=y.kind==="single"?T[y.key]===k.value:(T[y.key]??[]).includes(k.value),dr=y.renderOption?.(k,{value:k.value,selected:re,disabled:!!k.disabled}),ur={...Pe,icon:dr?void 0:k.icon,label:dr?void 0:k.label??String(k.value),hint:dr?void 0:k.hint,tone:k.tone??m,toneScope:k.toneScope??p,disabled:k.disabled,className:M,style:H,"data-menu-open":""};if(y.kind==="single"){let pr=T[y.key];return h(Se,{...ur,selectionIndicator:"check",selected:re,onSelect:()=>J(y,pr===k.value?void 0:k.value),children:dr},`${V}${k.value}`)}let oa=T[y.key]??[],tt=y.selectAll!==!1&&!k.disabled,hr=k.tooltip??(tt?go:void 0),Nt=k.tooltip==null&&tt;return S(Se,{...ur,selectionIndicator:"checkbox",selected:re,onSelect:pr=>tt&&pr?.altKey?J(y,[k.value]):J(y,oa.includes(k.value)?oa.filter(ks=>ks!==k.value):[...oa,k.value]),children:[dr,hr&&h(dt,{...Nt?{delay:vo,placement:"left"}:{follow:!0},children:hr})]},`${V}${k.value}`)},Qe=y=>Re(y).map(k=>xe(y,k)),et=y=>{let k=T[y.key]??[],V=Re(y),M=V.filter(re=>!re.disabled).map(re=>re.value),H=M.length>0&&M.every(re=>k.includes(re)),Pe=M.some(re=>k.includes(re));return S(me,{children:[y.selectAll!==!1&&V.length>0&&S(me,{children:[h(Se,{selectionIndicator:"checkbox",selected:H,indeterminate:Pe&&!H,label:y.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>J(y,H?k.filter(re=>!M.includes(re)):[...new Set([...k,...M])])}),h(Ln,{})]}),V.map(re=>xe(y,re))]})},q=()=>e.filter(k=>k.kind==="single"||k.kind==="multiple").map(k=>{let V=typeof k.filter=="function"?k.filter:dv;return{facet:k,matched:(ne.get(k.key)??[]).filter(M=>V(M,U))}}).filter(k=>k.matched.length>0).map(({facet:k,matched:V})=>h(ea,{label:k.label,children:V.map(M=>xe(k,M,`${k.key}:`))},k.key)),ye=y=>{let k=T[y.key]??"",V=$[y.key]??k,M=()=>{let H=V.trim()===""?void 0:V;H!==(k||void 0)&&J(y,H)};return h("div",{"data-menu-open":"",style:{padding:"4px"},children:h(Rt,{size:"small",value:V,placeholder:y.placeholder,"aria-label":y.label,onInput:H=>G(Pe=>({...Pe,[y.key]:H.currentTarget.value})),onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),M())},onBlur:M})})},Ue=y=>h("div",{"data-menu-open":"",children:y.render({value:T[y.key],onChange:k=>J(y,k),close:()=>Y(!1)})}),ut=y=>{let k=y.kind==="single"||y.kind==="multiple",V=!k||!!y.filter,M=y.kind==="single"?Qe(y):y.kind==="multiple"?et(y):y.kind==="text"?ye(y):Ue(y),H=!ws(T[y.key]);return S(qe,{role:V?"dialog":void 0,"aria-label":V?`${y.label} ${k?"options":"editor"}`:void 0,children:[k&&Oe(y),M,g&&H&&S(me,{children:[h(Ln,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Se,{icon:"x",label:"Clear",role:V?"button":void 0,"data-menu-open":"",onSelect:()=>J(y,void 0)})})]})]})},R=y=>{let k=T[y.key];if(ws(k))return null;switch(y.kind){case"single":return(ne.get(y.key)??[]).find(M=>M.value===k)?.label??String(k);case"multiple":return String(k.length);case"text":return String(k);case"custom":return y.summary(k)}};return S(me,{children:[x?x({open:N,value:T,count:pe,disabled:!!u}):h(fe,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":f?"dialog":"menu","aria-expanded":N?"true":"false",className:w,style:I,...C,children:pe>0&&h(ms,{size:"small",priority:"primary",tone:"brand",children:String(pe)})}),S(qe,{role:f?"dialog":void 0,"aria-label":f?`${s} options`:void 0,placement:n,offset:r,open:N,onStateChange:(y,{next:k})=>{Y(k),k||K("")},children:[f&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:U,placeholder:b,"aria-label":"Filter all facets","aria-autocomplete":"list",onInput:y=>K(y.currentTarget.value)})}),f&&U.trim()?q():e.map(y=>S(Se,{submenu:!0,icon:y.icon,label:y.label,"aria-haspopup":y.kind==="text"||y.kind==="custom"||y.filter?"dialog":"menu",children:[(()=>{let k=R(y);return k!=null?h(ms,{size:"small",tone:"brand",children:h("a-select-faceted-summary",{children:k})}):null})(),ut(y)]},y.key)),g&&S(me,{children:[h(Ln,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Se,{icon:"filter-x",label:v,role:f?"button":void 0,disabled:pe===0,"data-menu-open":"",onSelect:be})})]})]})]})};var qd=({children:t,options:e,value:n,defaultValue:r,onStateChange:a,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:m,orientation:p,fill:f,noslide:b,round:g,disabled:v,className:x,style:w,id:I,...C})=>{let B=n!==void 0,[L,D]=W(r),T=B?n:L,N=e??[],Y=new Set;for(let E of N)Y.has(E.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(E.value)} \u2014 values must be unique.`),Y.add(E.value);let $=E=>{let{event:U,detail:K}=oe(E);K&&(a?.(U,K),!B&&(U.defaultPrevented||D(K.next??void 0)))},G=o||i?E=>{o?.(E),i?.(E,{value:E.currentTarget?.value??null})}:void 0,O=p==="vertical",ie=T!=null&&N.some(E=>E.value===T)?T:N.find(E=>!v&&!E.disabled)?.value,de=h("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":O?"vertical":void 0,"aria-disabled":v?"true":void 0,state:B?n:void 0,"default-state":B?void 0:r,priority:d&&d!=="primary"?d:void 0,tone:Q(u),size:m&&m!=="medium"?m:void 0,orientation:O?"vertical":void 0,fill:f?"":void 0,noslide:b?"":void 0,round:X(g),disabled:v?"":void 0,onstatechange:$,onchange:G,onfocusin:s,onfocusout:l,class:x,id:I,style:te(g,"--tabs-round",F(u,"--tabs-tone-source",w)),...C,children:N.map(E=>{let U=v||E.disabled,K=E.value===T,{className:pe,style:ne,...ue}=ht(E);return S("a-tab",{...ue,role:"tab",value:E.value,tone:E.tone||void 0,"aria-disabled":U?"true":void 0,tabIndex:E.value===ie?0:-1,disabled:U?"":void 0,round:X(g)??X(E.round),class:pe,style:F(E.tone,"--tabs-tone-source",ne),children:[E.icon&&h("a-icon",{shape:E.icon,"aria-hidden":"true"}),fo(E.label!=null?E.label:E.children,"a-tab-label"),E.iconTrailing&&h("a-icon",{shape:E.iconTrailing,"aria-hidden":"true"}),E.tooltip!=null&&E.tooltip!==""?h(dt,{truncatedOnly:!0,children:E.tooltip}):null]},E.value)})});return S(me,{children:[de,t,h("template",{"data-anta-tabs-end":""})]})};var uv={incomplete:"circle-large",completed:"check",error:"x"},Z1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:m,orientation:p,fill:f,disabled:b,children:g,className:v,style:x,id:w,...I})=>{let C=e!==void 0,[B,L]=W(n),D=C?e:B??t[0]?.value,T=(E,U)=>{r?.(E,U),!(C||E.defaultPrevented)&&L(U.next??void 0)},N=t.map(E=>{let{className:U,style:K,...pe}=ht(E),ne=E.tone||void 0,ue=E.disabled?"neutral":E.state==="error"?"critical":ne||d||"neutral",J=u?.(E,{state:E.state,selected:E.value===D,disabled:!!E.disabled}),be=E.disabled?h(ve,{shape:uv.incomplete}):E.state==="loading"?h(Td,{tone:ue}):h(ve,{shape:uv[E.state]}),Re=J!==void 0?J:E.marker!==void 0?typeof E.marker=="number"?E.marker:h(ve,{shape:E.marker}):be;return{...pe,value:E.value,disabled:E.disabled,"data-step-state":E.state,tone:ue,tooltip:S(me,{children:[E.label,E.hint!=null&&S(me,{children:[" \u2014 ",E.hint]})]}),className:U,style:K,children:S(me,{children:[h("a-step-marker",{"aria-hidden":"true",children:Re}),S("a-step-desc",{children:[h("a-tab-label",{children:E.label}),E.hint!=null&&h("a-step-hint",{children:E.hint})]})]})}}),Y=t.findIndex(E=>E.value===D),$=p==="vertical",G=g!=null&&g!==!1,O=$&&G,ie=(Y>=0?Y:t.length-1)+2,de=O?{...x,"--steps-panel-row":ie}:x;return h("a-steps",{class:v,style:de,id:w,...I,"data-orientation":$?"vertical":void 0,children:h(qd,{options:N,value:D,onStateChange:T,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,size:m,orientation:p,fill:f,priority:c,noslide:!0,disabled:b,"data-steps":"",children:g})})};var $1=({value:t,children:e,hideMode:n,className:r,style:a,...o})=>h("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:r,style:a,...o,children:e});var G1=new Set(["top","right","bottom","left"]),K1=({header:t,footer:e,position:n,closable:r,persistent:a,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:m,...p})=>{let f=i!==void 0,b=typeof o=="string"&&G1.has(o)?o:void 0;return S("a-dialog",{state:f?i?"open":"closed":void 0,"default-state":!f&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:a?"":void 0,round:b??X(o),name:f?void 0:l,onstatechange:c?g=>{let{event:v,detail:x,isOwn:w}=oe(g);w&&x&&c(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,class:d,style:te(b?void 0:o,"--dialog-round",u),...p,children:[r!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(fe,{priority:"tertiary",size:"large",icon:"x","aria-label":"Close","data-custom-event":"closerequest"})}),t!=null&&h("div",{slot:"header",children:t}),m,e!=null&&h("span",{slot:"footer",style:{display:"contents"},children:e})]})};var X1=({header:t,subtitle:e,icon:n,footer:r,media:a,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:m,target:p,rel:f,ping:b,className:g,style:v,children:x,...w})=>{let I=Q(i),C=te(u,"--card-round",F(I,"--card-tone-source",v)),B=l==="small"?5:l==="large"?3:4;return S("a-card",{tone:I,priority:s&&s!=="primary"?s:void 0,size:l&&l!=="medium"?l:void 0,"media-position":o&&o!=="top"?o:void 0,selected:c?"":void 0,loading:d?"":void 0,round:X(u),href:m,target:m?p:void 0,rel:m?f:void 0,ping:m?b:void 0,class:g,style:C,...w,children:[a!=null&&h("div",{slot:"media",children:a}),n!=null&&(typeof n=="string"?h("a-card-icon-chip",{slot:"icon",children:h(ve,{shape:n})}):h("div",{slot:"icon",children:n})),t!=null&&(typeof t=="string"||typeof t=="number"?h(Id,{slot:"header",level:B,tone:I,children:t}):h("div",{slot:"header",children:t})),e!=null&&h(ps,{slot:"header",size:"small",priority:"tertiary",tone:I,children:e}),typeof x=="string"||typeof x=="number"?h(ps,{priority:"secondary",tone:I,size:l,children:x}):x,r!=null&&h("span",{slot:"footer",style:{display:"contents"},children:r})]})};var Ud=({message:t,actions:e,tone:n,align:r,round:a,closable:o,role:i="status",dismissed:s,defaultDismissed:l,onDismiss:c,className:d,style:u,children:m,...p})=>{let f=s!=null,b=te(a,"--banner-round",F(n,"--banner-tone-source",u)),g=t==null?null:typeof t=="string"||typeof t=="number"?h("a-banner-message",{slot:"message",children:t}):h("span",{slot:"message",style:{display:"contents"},children:t});return S("a-banner",{state:f?s?"closed":"open":void 0,"default-state":f?void 0:l?"closed":"open",tone:Q(n),align:r==="center"?"center":void 0,round:X(a),role:i,onstatechange:c?v=>{let{detail:x,isOwn:w}=oe(v);w&&x?.next==="closed"&&c()}:void 0,class:d,style:b,...p,children:[g,m,e!=null&&h("span",{"data-anta-banner-actions-wrapper":"",slot:"actions",style:{display:"contents"},children:e}),o!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(fe,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var J1=({entry:t,store:e})=>{let n=Ge(()=>t.render(t.id),[t.id,t.rev]),r=typeof Node<"u"&&n instanceof Node,a=typeof n=="string"||typeof n=="number",o={slot:t.placement,duration:t.duration,leaving:t.leaving?"":void 0,rev:t.rev,role:t.politeness==="assertive"?"alert":t.politeness==="polite"?"status":void 0,ondismiss:()=>e.remove(t.id)};return r?h("a-toast",{...o,content:n}):a?h("a-toast",{...o,children:h(Ud,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):h("a-toast",{...o,children:n})},Q1=({toaster:t,label:e="Notifications",className:n,style:r,children:a,...o})=>{let i=t??hv(),s=eu(i.subscribe,i.getSnapshot,i.getServerSnapshot);return h("a-toaster",{role:"region","aria-label":e,class:n,style:r,...o,children:s.map(l=>h(J1,{entry:l,store:i},l.id))})},ew,hv=()=>ew??=ds(),pv=Q1;Object.defineProperty(pv,"manager",{get:hv,enumerable:!0});export{s1 as Avatar,Ud as Banner,d1 as Box,x1 as Breadcrumbs,fe as Button,Dd as ButtonCopy,Fd as Calendar,u1 as Capture,X1 as Card,E1 as Checkbox,jn as DEFAULT_CONFIG,K1 as Dialog,S1 as Expander,y1 as ICON_SHAPES,w1 as ICON_SYNONYMS,ve as Icon,Rt as Input,H1 as InputAutocomplete,V1 as InputDate,Hd as InputTime,Td as Loader,qe as Menu,ea as MenuGroup,Se as MenuItem,Pd as MenuItemCopy,Ln as MenuSeparator,h1 as Panel,l1 as Progress,q1 as RadioGroup,Y1 as Select,W1 as SelectFaceted,z1 as Slider,Z1 as Steps,A1 as Switch,$1 as TabPanel,qd as Tabs,ms as Tag,ps as Text,Id as Title,pv as Toaster,dt as Tooltip,Ns as avatarToSvg,Ld as buildMonth,Rn as clampDate,Ps as colorLightness,Cv as configure,ds as createToaster,vs as dateFormatPattern,_d as dateTimeFormatPattern,zd as firstDayOfWeek,xs as formatDateInput,Nd as formatDateTimeInput,Bs as getInitials,iv as getWeekdays,uu as hasFigure,su as hashSeed,Bd as isOutOfRange,du as maxChroma,lu as mulberry32,wo as oklchString,U1 as optionsWithSelection,ho as parseDateInput,ys as parseDateTimeInput,$e as parseISODate,lv as parseTimeInput,Rs as resolveAvatar,cu as rngFromSeed,po as usesHour12};
1344
1334
  /*! Bundled license information:
1345
1335
 
1346
1336
  tabbable/dist/index.esm.js: