@antadesign/anta 0.3.24 → 0.3.25

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 (66) hide show
  1. package/dist/bundle.css +1 -1
  2. package/dist/bundle.js +24 -23
  3. package/dist/components/Banner.d.ts +10 -10
  4. package/dist/components/Banner.js +3 -1
  5. package/dist/components/Breadcrumbs.css +1 -1
  6. package/dist/components/ButtonCopy.d.ts +2 -2
  7. package/dist/components/InputDate.css +1 -1
  8. package/dist/components/MenuItem.d.ts +5 -1
  9. package/dist/components/MenuItem.js +72 -2
  10. package/dist/components/MenuItemCopy.d.ts +2 -2
  11. package/dist/components/Steps.css +1 -1
  12. package/dist/components/copy-props.d.ts +3 -4
  13. package/dist/components/select-parts.css +1 -1
  14. package/dist/elements/a-avatar.css +1 -1
  15. package/dist/elements/a-banner.css +1 -1
  16. package/dist/elements/a-banner.js +12 -0
  17. package/dist/elements/a-button.css +1 -1
  18. package/dist/elements/a-calendar.css +1 -1
  19. package/dist/elements/a-card.css +1 -1
  20. package/dist/elements/a-checkbox.css +1 -1
  21. package/dist/elements/a-copy.css +1 -1
  22. package/dist/elements/a-dialog.css +1 -1
  23. package/dist/elements/a-expander.css +1 -1
  24. package/dist/elements/a-icon.css +1 -1
  25. package/dist/elements/a-icon.shapes.css +1 -1
  26. package/dist/elements/a-input-time.css +1 -1
  27. package/dist/elements/a-input.css +1 -1
  28. package/dist/elements/a-input.js +8 -0
  29. package/dist/elements/a-loader.css +1 -1
  30. package/dist/elements/a-menu-group.css +1 -1
  31. package/dist/elements/a-menu-item.css +1 -1
  32. package/dist/elements/a-menu-separator.css +1 -1
  33. package/dist/elements/a-menu.css +1 -1
  34. package/dist/elements/a-menu.d.ts +4 -4
  35. package/dist/elements/a-menu.js +6 -4
  36. package/dist/elements/a-progress.css +1 -1
  37. package/dist/elements/a-radio-group.css +1 -1
  38. package/dist/elements/a-radio.css +1 -1
  39. package/dist/elements/a-slider.css +1 -1
  40. package/dist/elements/a-switch.css +1 -1
  41. package/dist/elements/a-tab.css +1 -1
  42. package/dist/elements/a-tabpanel.css +1 -1
  43. package/dist/elements/a-tabs.css +1 -1
  44. package/dist/elements/a-tag.css +1 -1
  45. package/dist/elements/a-text.css +1 -1
  46. package/dist/elements/a-title.css +1 -1
  47. package/dist/elements/a-toast.css +1 -1
  48. package/dist/elements/a-toaster.css +1 -1
  49. package/dist/elements/a-tooltip.css +1 -1
  50. package/dist/elements/copy-behavior.d.ts +13 -15
  51. package/dist/general_types.d.ts +6 -4
  52. package/dist/generate-icons.mjs +3 -3
  53. package/dist/reset.css +1 -1
  54. package/dist/theme-anta.css +1 -1
  55. package/dist/tokens.css +1 -1
  56. package/docs/changelog.md +22 -1
  57. package/docs/components/banner.md +26 -15
  58. package/docs/components/breadcrumbs.md +2 -2
  59. package/docs/components/button.md +26 -15
  60. package/docs/components/input.md +5 -0
  61. package/docs/components/menu.md +14 -11
  62. package/docs/components/tag.md +47 -0
  63. package/docs/install-config.md +58 -13
  64. package/docs/normalization.md +37 -28
  65. package/docs/theming.md +4 -1
  66. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- import Qn from"react";var Ua=Qn.createElement,me=Qn.Fragment,Cc=Qn.useState,Ec=Qn.useId,Sc=Qn.useMemo,Tc=Qn.useSyncExternalStore;function Gm(t,e,n){Ua=t,e!==void 0&&(me=e),n?.useState&&(Cc=n.useState),n?.useId&&(Ec=n.useId),n?.useMemo&&(Sc=n.useMemo),n?.useSyncExternalStore&&(Tc=n.useSyncExternalStore)}function $(t){return Cc(t)}function qt(){return Ec()}function We(t,e){return Sc(t,e)}function Ac(t,e,n){return Tc(t,e,n)}function h(t,e,n){let{children:a,...r}=e??{},o=n!==void 0?{...r,key:n}:r;return a!==void 0?Ua(t,o,a):Ua(t,o)}function A(t,e,n){let{children:a,...r}=e??{},o=n!==void 0?{...r,key:n}:r;return a!==void 0?Ua(t,o,...a):Ua(t,o)}function Mc(t){return Array.isArray(t)?t.length>0:t!=null}function ot(t,e=!1){let n={};for(let[a,r]of Object.entries(t))(a==="className"||a==="style"||a.startsWith("data-")&&(!e||!a.startsWith("data-menu-")&&a!=="data-anta-menu-item"))&&(n[a]=r);return n}function Lr(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((a,r)=>typeof a=="string"?a.trim()===""?null:h(e,{children:a},r):typeof a=="number"?Number.isNaN(a)?null:h(e,{children:a},r):a==null||typeof a=="boolean"?null:a)}function J(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}var Km=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),Rr=Km?"\u2325+Click to select only this":"Alt+Click to select only this";function Zt(t){return t==="open"?"open":"closed"}function Fr(t,e,n){t.addEventListener("click",a=>{let r=a.target;if(!(r instanceof Element))return;let o=r.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var Xm=new Set(["brand","neutral","info","success","warning","critical"]);function F(t,e,n){return t!=null&&!Xm.has(t)?{...n,[e]:t}:n}function Hr(t){return typeof t=="number"?`${t}px`:t||void 0}function on(t,e,n){let a=Hr(t);return a?{...n,[e]:a}:n}function Q(t,e,n){return on(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function K(t){return t||t===0?"":void 0}var Jm=2e3;function Vr(t,e,n){let[a,r]=$("idle"),o=We(()=>({timer:void 0}),[]);return{shownIcon:a==="ok"?"check":a==="fail"?"x":t,shownTone:a==="ok"?"success":a==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),r(c?"ok":"fail"),o.timer=setTimeout(()=>r("idle"),Jm),n?.(c)}}}function Dt(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var Ai=null;function Ic(t){Ai=t}function Dc(){return Ai?.isOpen()??!1}function zc(t){return Ai?.contains(t)??!1}var Qm=typeof HTMLElement<"u"?HTMLElement:class{},P=class extends Qm{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}},ea=class extends P{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")}};function Pc(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 Nc(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 Bc=t=>Nc(Pc(t));function Oi(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var eb=.4;function tb(t,e,n){let a=n*Math.PI/180,r=e*Math.cos(a),o=e*Math.sin(a),i=(t+.3963377774*r+.2158037573*o)**3,s=(t-.1055613458*r-.0638541728*o)**3,l=(t-.0894841775*r-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 nb(t,e,n){let[a,r,o]=tb(t,e,n),i=8e-4;return a>=-i&&a<=1+i&&r>=-i&&r<=1+i&&o>=-i&&o<=1+i}function Lc(t,e){let n=0,a=eb;for(let r=0;r<18;r++){let o=(n+a)/2;nb(t,o,e)?n=o:a=o}return n}var vt=(t,e=3)=>Math.round(t*10**e)/10**e;function jr(t,e,n){let a=Math.min(e,Lc(t,n));return`oklch(${vt(t)} ${vt(a)} ${vt((n%360+360)%360,1)})`}function zi(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 a=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(a){let r=a[1];r.length===3&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);let o=parseInt(r.slice(0,2),16)/255,i=parseInt(r.slice(2,4),16)/255,s=parseInt(r.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var sn={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}},Ya={x:[-15,15],y:[-14,4],off:[0,0]},Mi={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)"}},Dn={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},In=(t,e,n)=>e+(n-e)*t,Pi=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function ln(t,e,n){let a=e?.mode??"any";return a==="off"?n.off:a==="list"&&e?.values?.length?Pi(t(),e.values):a==="range"?In(t(),e?.min??n.range[0],e?.max??n.range[1]):In(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function ab(t,e){let n=e?.mode??"off";if(n==="off")return Ya.off;if(n==="list"&&e?.values?.length)return Pi(t(),e.values);let a=n==="range"?e?.x??Ya.x:Ya.x,r=n==="range"?e?.y??Ya.y:Ya.y;return[In(t(),a[0],a[1]),In(t(),r[0],r[1])]}function Ii(t,e,n,a){let r=e?.mode??"any";if(r==="off")return{color:n.off,l:zi(n.off)};if(r==="list"&&e?.values?.length){let u=Pi(t(),e.values);return{color:u,l:zi(u)}}let o=r==="range"?e?.l??n.l:n.l,i=r==="range"?e?.c??n.c:n.c,s=r==="range"?e?.h??n.h:n.h,l=In(t(),o[0],o[1]),c=In(t(),i[0],i[1]),d=a??In(t(),s[0],s[1]);return{color:jr(l,c,d),l}}var aa=100,Di=aa/2,na=40,_i=74,rb=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function Rc(t){return rb.some(e=>(t[e]?.mode??Dn[e].mode)!=="off")}function Ni(t,e){let n={...Dn,...t},a=Bc(e),r=Ii(a,n.bgColor,Mi.bgColor),o=Fc(r.color),i=Ii(a,n.headColor,Mi.headColor,n.harmony?o:void 0),s=Ii(a,n.bodyColor,Mi.bodyColor,n.harmony?o:void 0),l=ln(a,n.figureScale,sn.figureScale),c=ab(a,n.figureTranslate),d=ln(a,n.figureAngle,sn.figureAngle),u=ln(a,n.headAngle,sn.headAngle),m=ln(a,n.bodyAngle,sn.bodyAngle),p=ln(a,n.figureGap,sn.figureGap),b=ln(a,n.headRadiusTop,sn.headRadiusTop),f=ln(a,n.headRadiusBottom,sn.headRadiusBottom),g=ln(a,n.bodyBorderRadius,sn.bodyBorderRadius),x=na/2,y=_i/2,k=aa/Math.min(1,l),S=b,M=Math.max(b,f),N=Math.min(S,1)*x,B=Math.min(M,1)*x,C=Math.max(0,S-1)*x,I=Math.max(0,M-1)*x;return{figure:Rc(t),bg:r.color,bgLightness:r.l,initialsColor:ob(r.color,r.l),scale:l,translate:c,angle:d,gap:p*(na+C+I),head:{color:i.color,radiusTop:N,radiusBottom:B,extendTop:C,extendBottom:I,angle:u},body:{color:s.color,radius:g*y,height:k,angle:m}}}function ob(t,e){let n=/^oklch\(/i.test(t.trim()),a=n?Fc(t):0;return e>.5?jr(.35,n?.06:0,a):jr(.95,n?.04:0,a)}function Fc(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var ta=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function Bi(t,e={}){let n=ta(t.bg),a=e.title?`<title>${ta(e.title)}</title>`:"",r=`<rect x="0" y="0" width="${aa}" height="${aa}" fill="${n}"/>`;if(!t.figure){let x=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="${ib(e.initials.length)}" fill="var(--avatar-initials-color, ${ta(t.initialsColor)})">${ta(e.initials)}</text>`:"";return Oc(a+r+x)}let[o,i]=t.translate,s=`translate(${vt(o,2)} ${vt(i,2)}) rotate(${vt(t.angle,2)} 50 50) translate(50 50) scale(${vt(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Di-na/2-l,u=na+l+c,m=_c(Di-na/2,d,na,u,t.head.radiusTop,t.head.radiusBottom),p=`<g transform="rotate(${vt(t.head.angle,2)} 50 50)"><path d="${m}" fill="${ta(t.head.color)}"/></g>`,b=d+u+t.gap,f=_c(Di-_i/2,b,_i,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${vt(t.body.angle,2)} 50 ${vt(b,2)})"><path d="${f}" fill="${ta(t.body.color)}"/></g>`;return Oc(`${a}${r}<g transform="${s}">${g}${p}</g>`)}function _c(t,e,n,a,r,o){let i=Math.max(0,Math.min(r,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>a&&l>0){let u=a/l;i*=u,s*=u}let c=u=>vt(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+a-s)}`,s?d(s,t+n-s,e+a):"",`H${c(t+s)}`,s?d(s,t,e+a-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var Oc=t=>`<svg viewBox="0 0 ${aa} ${aa}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,ib=t=>t>=3?30:t===2?38:46;var qr=class extends P{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=sb,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()}#a(){let e=this.getAttribute("config");if(!e)return Dn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:Dn}catch{return Dn}}#r(){let e=this.getAttribute("badge");this.#e.style.display=e&&e!=="none"?"":"none";let n=this.getAttribute("name")??void 0,a=this.getAttribute("src");if(a){let l=document.createElement("img");l.setAttribute("part","frame image"),l.src=a,l.alt=n??"",l.loading="lazy",this.#n(l);return}let r=this.getAttribute("seed")??n??"",o=Ni(this.#a(),r),i=document.createElement("template");i.innerHTML=Bi(o,{initials:Oi(n),title:n});let s=i.content.firstElementChild;s&&(s.setAttribute("part","frame"),this.#n(s))}},sb=`
1
+ import Qn from"react";var Ua=Qn.createElement,be=Qn.Fragment,Ec=Qn.useState,Sc=Qn.useId,Tc=Qn.useMemo,Ac=Qn.useSyncExternalStore;function Km(t,e,n){Ua=t,e!==void 0&&(be=e),n?.useState&&(Ec=n.useState),n?.useId&&(Sc=n.useId),n?.useMemo&&(Tc=n.useMemo),n?.useSyncExternalStore&&(Ac=n.useSyncExternalStore)}function $(t){return Ec(t)}function qt(){return Sc()}function We(t,e){return Tc(t,e)}function Mc(t,e,n){return Ac(t,e,n)}function h(t,e,n){let{children:a,...r}=e??{},o=n!==void 0?{...r,key:n}:r;return a!==void 0?Ua(t,o,a):Ua(t,o)}function T(t,e,n){let{children:a,...r}=e??{},o=n!==void 0?{...r,key:n}:r;return a!==void 0?Ua(t,o,...a):Ua(t,o)}function Ic(t){return Array.isArray(t)?t.length>0:t!=null}function ot(t,e=!1){let n={};for(let[a,r]of Object.entries(t))(a==="className"||a==="style"||a.startsWith("data-")&&(!e||!a.startsWith("data-menu-")&&a!=="data-anta-menu-item"))&&(n[a]=r);return n}function Lr(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((a,r)=>typeof a=="string"?a.trim()===""?null:h(e,{children:a},r):typeof a=="number"?Number.isNaN(a)?null:h(e,{children:a},r):a==null||typeof a=="boolean"?null:a)}function J(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}var Xm=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),Rr=Xm?"\u2325+Click to select only this":"Alt+Click to select only this";function Zt(t){return t==="open"?"open":"closed"}function Fr(t,e,n){t.addEventListener("click",a=>{let r=a.target;if(!(r instanceof Element))return;let o=r.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var Jm=new Set(["brand","neutral","info","success","warning","critical"]);function F(t,e,n){return t!=null&&!Jm.has(t)?{...n,[e]:t}:n}function Hr(t){return typeof t=="number"?`${t}px`:t||void 0}function on(t,e,n){let a=Hr(t);return a?{...n,[e]:a}:n}function Q(t,e,n){return on(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function K(t){return t||t===0?"":void 0}var Qm=2e3;function Vr(t,e,n){let[a,r]=$("idle"),o=We(()=>({timer:void 0}),[]);return{shownIcon:a==="ok"?"check":a==="fail"?"x":t,shownTone:a==="ok"?"success":a==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),r(c?"ok":"fail"),o.timer=setTimeout(()=>r("idle"),Qm),n?.(c)}}}function Dt(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var Ai=null;function Dc(t){Ai=t}function zc(){return Ai?.isOpen()??!1}function _c(t){return Ai?.contains(t)??!1}var eb=typeof HTMLElement<"u"?HTMLElement:class{},O=class extends eb{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}},ea=class extends O{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")}};function Nc(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 Bc(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 Lc=t=>Bc(Nc(t));function Oi(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var tb=.4;function nb(t,e,n){let a=n*Math.PI/180,r=e*Math.cos(a),o=e*Math.sin(a),i=(t+.3963377774*r+.2158037573*o)**3,s=(t-.1055613458*r-.0638541728*o)**3,l=(t-.0894841775*r-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 ab(t,e,n){let[a,r,o]=nb(t,e,n),i=8e-4;return a>=-i&&a<=1+i&&r>=-i&&r<=1+i&&o>=-i&&o<=1+i}function Rc(t,e){let n=0,a=tb;for(let r=0;r<18;r++){let o=(n+a)/2;ab(t,o,e)?n=o:a=o}return n}var vt=(t,e=3)=>Math.round(t*10**e)/10**e;function jr(t,e,n){let a=Math.min(e,Rc(t,n));return`oklch(${vt(t)} ${vt(a)} ${vt((n%360+360)%360,1)})`}function zi(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 a=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(a){let r=a[1];r.length===3&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);let o=parseInt(r.slice(0,2),16)/255,i=parseInt(r.slice(2,4),16)/255,s=parseInt(r.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var sn={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}},Ya={x:[-15,15],y:[-14,4],off:[0,0]},Mi={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)"}},Dn={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},In=(t,e,n)=>e+(n-e)*t,Pi=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function ln(t,e,n){let a=e?.mode??"any";return a==="off"?n.off:a==="list"&&e?.values?.length?Pi(t(),e.values):a==="range"?In(t(),e?.min??n.range[0],e?.max??n.range[1]):In(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function rb(t,e){let n=e?.mode??"off";if(n==="off")return Ya.off;if(n==="list"&&e?.values?.length)return Pi(t(),e.values);let a=n==="range"?e?.x??Ya.x:Ya.x,r=n==="range"?e?.y??Ya.y:Ya.y;return[In(t(),a[0],a[1]),In(t(),r[0],r[1])]}function Ii(t,e,n,a){let r=e?.mode??"any";if(r==="off")return{color:n.off,l:zi(n.off)};if(r==="list"&&e?.values?.length){let u=Pi(t(),e.values);return{color:u,l:zi(u)}}let o=r==="range"?e?.l??n.l:n.l,i=r==="range"?e?.c??n.c:n.c,s=r==="range"?e?.h??n.h:n.h,l=In(t(),o[0],o[1]),c=In(t(),i[0],i[1]),d=a??In(t(),s[0],s[1]);return{color:jr(l,c,d),l}}var aa=100,Di=aa/2,na=40,_i=74,ob=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function Fc(t){return ob.some(e=>(t[e]?.mode??Dn[e].mode)!=="off")}function Ni(t,e){let n={...Dn,...t},a=Lc(e),r=Ii(a,n.bgColor,Mi.bgColor),o=Hc(r.color),i=Ii(a,n.headColor,Mi.headColor,n.harmony?o:void 0),s=Ii(a,n.bodyColor,Mi.bodyColor,n.harmony?o:void 0),l=ln(a,n.figureScale,sn.figureScale),c=rb(a,n.figureTranslate),d=ln(a,n.figureAngle,sn.figureAngle),u=ln(a,n.headAngle,sn.headAngle),m=ln(a,n.bodyAngle,sn.bodyAngle),p=ln(a,n.figureGap,sn.figureGap),b=ln(a,n.headRadiusTop,sn.headRadiusTop),f=ln(a,n.headRadiusBottom,sn.headRadiusBottom),g=ln(a,n.bodyBorderRadius,sn.bodyBorderRadius),x=na/2,y=_i/2,w=aa/Math.min(1,l),S=b,A=Math.max(b,f),P=Math.min(S,1)*x,N=Math.min(A,1)*x,C=Math.max(0,S-1)*x,I=Math.max(0,A-1)*x;return{figure:Fc(t),bg:r.color,bgLightness:r.l,initialsColor:ib(r.color,r.l),scale:l,translate:c,angle:d,gap:p*(na+C+I),head:{color:i.color,radiusTop:P,radiusBottom:N,extendTop:C,extendBottom:I,angle:u},body:{color:s.color,radius:g*y,height:w,angle:m}}}function ib(t,e){let n=/^oklch\(/i.test(t.trim()),a=n?Hc(t):0;return e>.5?jr(.35,n?.06:0,a):jr(.95,n?.04:0,a)}function Hc(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var ta=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function Bi(t,e={}){let n=ta(t.bg),a=e.title?`<title>${ta(e.title)}</title>`:"",r=`<rect x="0" y="0" width="${aa}" height="${aa}" fill="${n}"/>`;if(!t.figure){let x=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="${sb(e.initials.length)}" fill="var(--avatar-initials-color, ${ta(t.initialsColor)})">${ta(e.initials)}</text>`:"";return Pc(a+r+x)}let[o,i]=t.translate,s=`translate(${vt(o,2)} ${vt(i,2)}) rotate(${vt(t.angle,2)} 50 50) translate(50 50) scale(${vt(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Di-na/2-l,u=na+l+c,m=Oc(Di-na/2,d,na,u,t.head.radiusTop,t.head.radiusBottom),p=`<g transform="rotate(${vt(t.head.angle,2)} 50 50)"><path d="${m}" fill="${ta(t.head.color)}"/></g>`,b=d+u+t.gap,f=Oc(Di-_i/2,b,_i,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${vt(t.body.angle,2)} 50 ${vt(b,2)})"><path d="${f}" fill="${ta(t.body.color)}"/></g>`;return Pc(`${a}${r}<g transform="${s}">${g}${p}</g>`)}function Oc(t,e,n,a,r,o){let i=Math.max(0,Math.min(r,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>a&&l>0){let u=a/l;i*=u,s*=u}let c=u=>vt(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+a-s)}`,s?d(s,t+n-s,e+a):"",`H${c(t+s)}`,s?d(s,t,e+a-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var Pc=t=>`<svg viewBox="0 0 ${aa} ${aa}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,sb=t=>t>=3?30:t===2?38:46;var qr=class extends O{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=lb,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()}#a(){let e=this.getAttribute("config");if(!e)return Dn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:Dn}catch{return Dn}}#r(){let e=this.getAttribute("badge");this.#e.style.display=e&&e!=="none"?"":"none";let n=this.getAttribute("name")??void 0,a=this.getAttribute("src");if(a){let l=document.createElement("img");l.setAttribute("part","frame image"),l.src=a,l.alt=n??"",l.loading="lazy",this.#n(l);return}let r=this.getAttribute("seed")??n??"",o=Ni(this.#a(),r),i=document.createElement("template");i.innerHTML=Bi(o,{initials:Oi(n),title:n});let s=i.content.firstElementChild;s&&(s.setAttribute("part","frame"),this.#n(s))}},lb=`
2
2
  :host { display: inline-block; position: relative; vertical-align: middle; }
3
3
  svg, img {
4
4
  display: block;
@@ -18,7 +18,7 @@ import Qn from"react";var Ua=Qn.createElement,me=Qn.Fragment,Cc=Qn.useState,Ec=Q
18
18
  border-radius: 50%;
19
19
  background: var(--avatar-badge-color);
20
20
  }
21
- `;function Hc(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",qr)}Hc();var Zr=class extends P{static observedAttributes=["value","max","tone"];indicator;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
21
+ `;function Vc(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",qr)}Vc();var Zr=class extends O{static observedAttributes=["value","max","tone"];indicator;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
22
22
  :host {
23
23
  display: block;
24
24
  position: relative;
@@ -74,7 +74,7 @@ import Qn from"react";var Ua=Qn.createElement,me=Qn.Fragment,Cc=Qn.useState,Ec=Q
74
74
  display: block;
75
75
  position: relative;
76
76
  }
77
- `,this.indicator=document.createElement("div"),this.indicator.className="indicator",this.indicator.setAttribute("part","indicator");let a=document.createElement("slot");e.append(n,this.indicator,a)}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),a=Number(this.getAttribute("max")??100),r=Number.isFinite(n)&&Number.isFinite(a)&&a>0?Math.min(100,Math.max(0,n/a*100)):0;this.indicator.style.setProperty("--_percent",`${r}%`)}};function Vc(){typeof customElements>"u"||customElements.get("a-progress")||customElements.define("a-progress",Zr)}Vc();var $r=class extends P{};function jc(){typeof customElements>"u"||customElements.get("a-loader")||customElements.define("a-loader",$r)}jc();var lb=`
77
+ `,this.indicator=document.createElement("div"),this.indicator.className="indicator",this.indicator.setAttribute("part","indicator");let a=document.createElement("slot");e.append(n,this.indicator,a)}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),a=Number(this.getAttribute("max")??100),r=Number.isFinite(n)&&Number.isFinite(a)&&a>0?Math.min(100,Math.max(0,n/a*100)):0;this.indicator.style.setProperty("--_percent",`${r}%`)}};function jc(){typeof customElements>"u"||customElements.get("a-progress")||customElements.define("a-progress",Zr)}jc();var $r=class extends O{};function qc(){typeof customElements>"u"||customElements.get("a-loader")||customElements.define("a-loader",$r)}qc();var cb=`
78
78
  :host {
79
79
  display: block;
80
80
  position: relative;
@@ -171,8 +171,8 @@ import Qn from"react";var Ua=Qn.createElement,me=Qn.Fragment,Cc=Qn.useState,Ec=Q
171
171
  .expand-btn.expanded::before {
172
172
  transform: rotate(180deg);
173
173
  }
174
- `,Ur=class extends P{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=lb,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,a){n!==a&&((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 qc(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",Ur)}qc();var Yr=class extends P{};function Zc(){typeof customElements>"u"||customElements.get("a-icon")||customElements.define("a-icon",Yr)}Zc();function Wr(t,e){let n=null;t.addEventListener("keydown",a=>{if(a.repeat||!e.keys.includes(a.key))return;let r=e.resolve(a.target);r&&(a.preventDefault(),n=e.blocked?.(r)?null:r)},!0),t.addEventListener("keyup",a=>{if(!e.keys.includes(a.key))return;let r=e.resolve(a.target);if(!r||r!==n){n=null;return}n=null,!e.blocked?.(r)&&e.activate(r)},!0)}function $c(t){!t||t.hasKeyListenerForAButton||(Wr(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",db,!0),t.hasKeyListenerForAButton=!0)}var Gr=class extends P{connectedCallback(){$c(this.doc)}};function cb(t){let e=t.getAttribute("form");return e?t.ownerDocument.getElementById(e):t.closest("form")}function db(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 a=e.getAttribute("type")||"button",r=cb(e);if(r)if(a==="submit"){r.requestSubmit();let o=new FormData(r);r.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 a==="reset"&&r.reset()}function Uc(){typeof customElements>"u"||($c(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Gr))}Uc();async function ub(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}async function hb(t){let e=t.cloneNode(!0);e.querySelectorAll("[data-copy-node-button]").forEach(r=>r.remove());let n=e.outerHTML,a=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([a],{type:"text/plain"})})]),!0):(await navigator.clipboard.writeText(a),!0)}catch{return!1}}function pb(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function Yc(t,e){e.then(n=>{t.dispatchEvent(new CustomEvent("copydone",{bubbles:!1,detail:{ok:n}}))})}function Wc(){return typeof location<"u"?location.href:""}function mb(t){if(t.hasAttribute("copy-url"))return Wc();let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${Wc()}
175
- ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function Kr(t){t.hasAttribute("copy")&&t.dispatchEvent(new CustomEvent("copyrequest",{bubbles:!1}))}function Gc(t){if(t.hasAttribute("copy-node")){let e=pb(t);return Yc(t,e?hb(e):Promise.resolve(!1)),!0}return bb(t)?(Yc(t,ub(mb(t))),!0):!1}var Xc="a-button, button, [role=button]",Jc="a-menu-item, [role=menuitem]",Qc=`${Xc}, ${Jc}`,zn=new WeakMap;function Li(t){return t?.querySelector(":scope > a-copy")??null}function Ri(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function fb(t){if(!t||t.hasCopyDelegation)return;let e=(n,a)=>{let r=n?.closest?.(Qc);if(!r||Ri(r))return;let o=Li(r);o&&(a?zn.set(o,a):zn.delete(o),Kr(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 a=n.target?.closest?.(Xc);if(!a||Ri(a))return;let r=Li(a);r&&(n.detail?zn.set(r,{x:n.clientX,y:n.clientY}):zn.delete(r),r.activate())},!0),t.addEventListener("menuselect",n=>{let a=n.target?.closest?.(Jc);!a||Ri(a)||Li(a)?.activate()},!0),t.hasCopyDelegation=!0}var ed=900,Kc=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=`
174
+ `,Ur=class extends O{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=cb,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,a){n!==a&&((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 Zc(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",Ur)}Zc();var Yr=class extends O{};function $c(){typeof customElements>"u"||customElements.get("a-icon")||customElements.define("a-icon",Yr)}$c();function Wr(t,e){let n=null;t.addEventListener("keydown",a=>{if(a.repeat||!e.keys.includes(a.key))return;let r=e.resolve(a.target);r&&(a.preventDefault(),n=e.blocked?.(r)?null:r)},!0),t.addEventListener("keyup",a=>{if(!e.keys.includes(a.key))return;let r=e.resolve(a.target);if(!r||r!==n){n=null;return}n=null,!e.blocked?.(r)&&e.activate(r)},!0)}function Uc(t){!t||t.hasKeyListenerForAButton||(Wr(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",ub,!0),t.hasKeyListenerForAButton=!0)}var Gr=class extends O{connectedCallback(){Uc(this.doc)}};function db(t){let e=t.getAttribute("form");return e?t.ownerDocument.getElementById(e):t.closest("form")}function ub(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 a=e.getAttribute("type")||"button",r=db(e);if(r)if(a==="submit"){r.requestSubmit();let o=new FormData(r);r.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 a==="reset"&&r.reset()}function Yc(){typeof customElements>"u"||(Uc(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Gr))}Yc();async function hb(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}async function pb(t){let e=t.cloneNode(!0);e.querySelectorAll("[data-copy-node-button]").forEach(r=>r.remove());let n=e.outerHTML,a=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([a],{type:"text/plain"})})]),!0):(await navigator.clipboard.writeText(a),!0)}catch{return!1}}function mb(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function Wc(t,e){e.then(n=>{t.dispatchEvent(new CustomEvent("copydone",{bubbles:!1,detail:{ok:n}}))})}function Gc(){return typeof location<"u"?location.href:""}function bb(t){if(t.hasAttribute("copy-url"))return Gc();let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${Gc()}
175
+ ${e}`:e}function fb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function Kr(t){t.hasAttribute("copy")&&t.dispatchEvent(new CustomEvent("copyrequest",{bubbles:!1}))}function Kc(t){if(t.hasAttribute("copy-node")){let e=mb(t);return Wc(t,e?pb(e):Promise.resolve(!1)),!0}return fb(t)?(Wc(t,hb(bb(t))),!0):!1}var Jc="a-button, button, [role=button]",Qc="a-menu-item, [role=menuitem]",ed=`${Jc}, ${Qc}`,zn=new WeakMap;function Li(t){return t?.querySelector(":scope > a-copy")??null}function Ri(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function gb(t){if(!t||t.hasCopyDelegation)return;let e=(n,a)=>{let r=n?.closest?.(ed);if(!r||Ri(r))return;let o=Li(r);o&&(a?zn.set(o,a):zn.delete(o),Kr(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 a=n.target?.closest?.(Jc);if(!a||Ri(a))return;let r=Li(a);r&&(n.detail?zn.set(r,{x:n.clientX,y:n.clientY}):zn.delete(r),r.activate())},!0),t.addEventListener("menuselect",n=>{let a=n.target?.closest?.(Qc);!a||Ri(a)||Li(a)?.activate()},!0),t.hasCopyDelegation=!0}var td=900,Xc=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=`
176
176
  .feedback {
177
177
  position: fixed;
178
178
  margin: 0;
@@ -195,12 +195,12 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
195
195
  transform: translate(var(--_feedback-x), calc(-100% - 10px));
196
196
  }
197
197
  .feedback:not(:popover-open) { display: none; }
198
- .feedback[data-show] { animation: a-copy-feedback-rise ${ed}ms ease-out forwards; }
198
+ .feedback[data-show] { animation: a-copy-feedback-rise ${td}ms ease-out forwards; }
199
199
  @keyframes a-copy-feedback-rise {
200
200
  from { opacity: 1; transform: translate(var(--_feedback-x), calc(-100% - 10px)); }
201
201
  to { opacity: 0; transform: translate(var(--_feedback-x), calc(-100% - 1.5em)); }
202
202
  }
203
- `;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let a=document.createElement("span");a.setAttribute("aria-hidden","true"),a.textContent="\u2713";let r=document.createElement("span");return r.className="label",n.append(a,r),t.content.append(e,n),t})(),Xr=class extends P{#e;#t;#n;connectedCallback(){fb(this.doc),this.addEventListener("copydone",this.#a)}activate(){Gc(this)}#a=e=>{let n=zn.get(this);if(zn.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let a=this.closest(Qc);a&&this.#o(a,n)};#r(){if(!Kc)return;let e=this.attachShadow({mode:"open"});e.append(Kc.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#o(e,n){this.#e||this.#r();let a=this.#e,r=this.#t;if(!(!a||!r)){if(r.textContent=this.getAttribute("copied-label")??"Copied",n)a.style.left=`${n.x}px`,a.style.top=`${n.y}px`,a.style.setProperty("--_feedback-x","8px");else{let o=e.getBoundingClientRect(),i=this.view.getComputedStyle(e).direction==="rtl";a.style.left=`${i?o.right-12:o.left+12}px`,a.style.top=`${o.top}px`,a.style.setProperty("--_feedback-x",i?"-100%":"0")}clearTimeout(this.#n),a.removeAttribute("data-show"),a.matches(":popover-open")&&a.hidePopover(),a.showPopover(),a.offsetWidth,a.setAttribute("data-show",""),this.#n=setTimeout(()=>{a.removeAttribute("data-show"),a.matches(":popover-open")&&a.hidePopover()},ed)}}disconnectedCallback(){clearTimeout(this.#n),zn.delete(this),this.removeEventListener("copydone",this.#a)}};function td(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",Xr)}td();var Fi=t=>t==="checked"||t==="indeterminate"?t:"unchecked",Jr=class extends P{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;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.alive=!0}attributeChangedCallback(e){if(e==="state"){let n=Fi(this.getAttribute("state")),a=n!==this.currentState;this.currentState=n,this.paint(),a&&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=Fi(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,a=n==="checked"?"unchecked":"checked",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#t||r&&(this.currentState=a,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))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Fi(e),this.paint()}formDisabledCallback(){this.paint()}};function nd(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",Jr)}nd();var Hi=t=>t==="checked"?"checked":"unchecked",Qr=class extends P{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;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.alive=!0}attributeChangedCallback(e){if(e==="state"){let n=Hi(this.getAttribute("state")),a=n!==this.currentState;this.currentState=n,this.paint(),a&&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=Hi(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,a=n==="checked"?"unchecked":"checked",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#t||r&&(this.currentState=a,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))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Hi(e),this.paint()}formDisabledCallback(){this.paint()}};function ad(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",Qr)}ad();var rd=200,gb='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"]',vb=':disabled,[disabled],[aria-disabled="true"]';function xb(t){return t.matches("[data-expander-ignore]")?!0:t.matches(gb)&&!t.matches(vb)}var yb=`
203
+ `;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let a=document.createElement("span");a.setAttribute("aria-hidden","true"),a.textContent="\u2713";let r=document.createElement("span");return r.className="label",n.append(a,r),t.content.append(e,n),t})(),Xr=class extends O{#e;#t;#n;connectedCallback(){gb(this.doc),this.addEventListener("copydone",this.#a)}activate(){Kc(this)}#a=e=>{let n=zn.get(this);if(zn.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let a=this.closest(ed);a&&this.#o(a,n)};#r(){if(!Xc)return;let e=this.attachShadow({mode:"open"});e.append(Xc.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#o(e,n){this.#e||this.#r();let a=this.#e,r=this.#t;if(!(!a||!r)){if(r.textContent=this.getAttribute("copied-label")??"Copied",n)a.style.left=`${n.x}px`,a.style.top=`${n.y}px`,a.style.setProperty("--_feedback-x","8px");else{let o=e.getBoundingClientRect(),i=this.view.getComputedStyle(e).direction==="rtl";a.style.left=`${i?o.right-12:o.left+12}px`,a.style.top=`${o.top}px`,a.style.setProperty("--_feedback-x",i?"-100%":"0")}clearTimeout(this.#n),a.removeAttribute("data-show"),a.matches(":popover-open")&&a.hidePopover(),a.showPopover(),a.offsetWidth,a.setAttribute("data-show",""),this.#n=setTimeout(()=>{a.removeAttribute("data-show"),a.matches(":popover-open")&&a.hidePopover()},td)}}disconnectedCallback(){clearTimeout(this.#n),zn.delete(this),this.removeEventListener("copydone",this.#a)}};function nd(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",Xr)}nd();var Fi=t=>t==="checked"||t==="indeterminate"?t:"unchecked",Jr=class extends O{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;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.alive=!0}attributeChangedCallback(e){if(e==="state"){let n=Fi(this.getAttribute("state")),a=n!==this.currentState;this.currentState=n,this.paint(),a&&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=Fi(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,a=n==="checked"?"unchecked":"checked",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#t||r&&(this.currentState=a,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))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Fi(e),this.paint()}formDisabledCallback(){this.paint()}};function ad(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",Jr)}ad();var Hi=t=>t==="checked"?"checked":"unchecked",Qr=class extends O{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;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.alive=!0}attributeChangedCallback(e){if(e==="state"){let n=Hi(this.getAttribute("state")),a=n!==this.currentState;this.currentState=n,this.paint(),a&&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=Hi(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,a=n==="checked"?"unchecked":"checked",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#t||r&&(this.currentState=a,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))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Hi(e),this.paint()}formDisabledCallback(){this.paint()}};function rd(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",Qr)}rd();var od=200,vb='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"]',xb=':disabled,[disabled],[aria-disabled="true"]';function yb(t){return t.matches("[data-expander-ignore]")?!0:t.matches(vb)&&!t.matches(xb)}var kb=`
204
204
  :host { display: block; }
205
205
 
206
206
  .header {
@@ -311,20 +311,20 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
311
311
  margin-inline-start: -1px;
312
312
  }
313
313
  @media (prefers-reduced-motion: no-preference) {
314
- .region { transition: grid-template-rows ${rd}ms ease; }
314
+ .region { transition: grid-template-rows ${od}ms ease; }
315
315
  }
316
316
 
317
317
  [part="content"] { display: block; min-height: 0; overflow: clip; }
318
318
  .header:has(button[aria-expanded="true"]) + .region [part="content"] {
319
319
  overflow: visible;
320
- transition: overflow 0s ${rd}ms;
320
+ transition: overflow 0s ${od}ms;
321
321
  transition-behavior: allow-discrete;
322
322
  }
323
- `,od=Zt,eo=class extends P{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=yb,this.summary=document.createElement("button"),this.summary.type="button",this.summary.setAttribute("aria-expanded","false"),this.summary.setAttribute("part","summary");let a=document.createElement("slot");a.name="title",this.titleSlot=a,this.summary.append(a),this.summary.addEventListener("click",this.onSummaryClick);let r=document.createElement("div");r.className="header",this.header=r;let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions"),o.addEventListener("slotchange",()=>{r.classList.toggle("has-actions",o.assignedElements().length>0)}),r.append(this.summary,o),this.region=document.createElement("div"),this.region.className="region";let i=document.createElement("slot");i.setAttribute("part","content"),this.region.append(i),this.roundStyle=document.createElement("style"),typeof ResizeObserver<"u"&&(this.roundObserver=new ResizeObserver(()=>this.measureRoundRadius())),e.append(n,this.roundStyle,r,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),a=(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),r=(e+a)/2;this.roundStyle.textContent=`:host{--_expander-round-radius:${r}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(od(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(od(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(),a=n.indexOf(this.summary);return(a===-1?n:n.slice(0,a)).some(o=>o instanceof Element&&xb(o))}#a(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||e.rangeCount===0)return!1;let n=e.getRangeAt(0);return this.titleSlot.assignedNodes().some(a=>n.intersectsNode(a))}onSummaryClick=e=>{if(this.#n(e)||e.detail!==0&&this.#a())return;let n=this.#t,a=n==="open"?"closed":"open",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#e||r&&this.applyState(a)}};function id(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",eo)}id();function Vi(t,e,{signal:n,edges:a}={}){let r,o=null,i=a!=null&&a.includes("leading"),s=a==null||a.includes("trailing"),l=()=>{o!==null&&(t.apply(r,o),r=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(),r=void 0,o=null},b=()=>{l()},f=function(...g){if(n?.aborted)return;r=this,o=g;let x=d==null;u(),i&&x&&l()};return f.schedule=u,f.cancel=p,f.flush=b,n?.addEventListener("abort",p,{once:!0}),f}var _n=4,wb=16,kb=8,sd=300,ld=150,Cb=300,Eb=120,ji=10,cd=100,Sb=60,Tb=500,Ab="a-tab-label, a-button-label, a-step-hint",qi="data-anta-text-tooltip",Mb=1500,Ib=10,it=null,oa;function Db(){return oa!==void 0}function zb(){return it!==null||Db()}function pd(){oa!==void 0&&(clearTimeout(oa),oa=void 0)}function _b(t){it&&it!==t&&(it.isConnected?it.hide():it.cleanup()),it=t,pd()}function dd(t){it===t&&(it=null,pd(),oa=setTimeout(()=>{oa=void 0},Cb))}var ra=new WeakMap;function ud(t){let e,n;for(let a of t.tooltips)a.hasAttribute(qi)?e=a:n=a;return n??e}function Zi(t,e){let n=ud(e);for(let a of e.tooltips)a!==n&&a.teardownListeners();if(!n||!e.intersecting){n?.teardownListeners();return}requestAnimationFrame(()=>{let a=ra.get(t);a!==e||!a.intersecting||ud(a)!==n||n.setupListeners()})}function Ob(t){for(let e of t){let n=ra.get(e.target);n&&(n.intersecting=e.isIntersecting,Zi(e.target,n))}}var hd=typeof IntersectionObserver<"u"?new IntersectionObserver(Ob,{root:null,rootMargin:"0px",threshold:0}):null,to=class extends P{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=`
323
+ `,id=Zt,eo=class extends O{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=kb,this.summary=document.createElement("button"),this.summary.type="button",this.summary.setAttribute("aria-expanded","false"),this.summary.setAttribute("part","summary");let a=document.createElement("slot");a.name="title",this.titleSlot=a,this.summary.append(a),this.summary.addEventListener("click",this.onSummaryClick);let r=document.createElement("div");r.className="header",this.header=r;let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions"),o.addEventListener("slotchange",()=>{r.classList.toggle("has-actions",o.assignedElements().length>0)}),r.append(this.summary,o),this.region=document.createElement("div"),this.region.className="region";let i=document.createElement("slot");i.setAttribute("part","content"),this.region.append(i),this.roundStyle=document.createElement("style"),typeof ResizeObserver<"u"&&(this.roundObserver=new ResizeObserver(()=>this.measureRoundRadius())),e.append(n,this.roundStyle,r,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),a=(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),r=(e+a)/2;this.roundStyle.textContent=`:host{--_expander-round-radius:${r}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(id(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(id(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(),a=n.indexOf(this.summary);return(a===-1?n:n.slice(0,a)).some(o=>o instanceof Element&&yb(o))}#a(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||e.rangeCount===0)return!1;let n=e.getRangeAt(0);return this.titleSlot.assignedNodes().some(a=>n.intersectsNode(a))}onSummaryClick=e=>{if(this.#n(e)||e.detail!==0&&this.#a())return;let n=this.#t,a=n==="open"?"closed":"open",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#e||r&&this.applyState(a)}};function sd(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",eo)}sd();function Vi(t,e,{signal:n,edges:a}={}){let r,o=null,i=a!=null&&a.includes("leading"),s=a==null||a.includes("trailing"),l=()=>{o!==null&&(t.apply(r,o),r=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(),r=void 0,o=null},b=()=>{l()},f=function(...g){if(n?.aborted)return;r=this,o=g;let x=d==null;u(),i&&x&&l()};return f.schedule=u,f.cancel=p,f.flush=b,n?.addEventListener("abort",p,{once:!0}),f}var _n=4,wb=16,Cb=8,ld=300,cd=150,Eb=300,Sb=120,ji=10,dd=100,Tb=60,Ab=500,Mb="a-tab-label, a-button-label, a-step-hint",qi="data-anta-text-tooltip",Ib=1500,Db=10,it=null,oa;function zb(){return oa!==void 0}function _b(){return it!==null||zb()}function md(){oa!==void 0&&(clearTimeout(oa),oa=void 0)}function Ob(t){it&&it!==t&&(it.isConnected?it.hide():it.cleanup()),it=t,md()}function ud(t){it===t&&(it=null,md(),oa=setTimeout(()=>{oa=void 0},Eb))}var ra=new WeakMap;function hd(t){let e,n;for(let a of t.tooltips)a.hasAttribute(qi)?e=a:n=a;return n??e}function Zi(t,e){let n=hd(e);for(let a of e.tooltips)a!==n&&a.teardownListeners();if(!n||!e.intersecting){n?.teardownListeners();return}requestAnimationFrame(()=>{let a=ra.get(t);a!==e||!a.intersecting||hd(a)!==n||n.setupListeners()})}function Pb(t){for(let e of t){let n=ra.get(e.target);n&&(n.intersecting=e.isIntersecting,Zi(e.target,n))}}var pd=typeof IntersectionObserver<"u"?new IntersectionObserver(Pb,{root:null,rootMargin:"0px",threshold:0}):null,to=class extends O{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=`
324
324
  :host { display: contents; }
325
325
 
326
326
  .container {
327
- --_dur: ${ld}ms;
327
+ --_dur: ${cd}ms;
328
328
  position: fixed;
329
329
  left: 0;
330
330
  top: 0;
@@ -381,11 +381,11 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
381
381
  word-break: break-word;
382
382
  overflow-wrap: break-word;
383
383
  opacity: 1;
384
- transition: opacity ${Sb}ms linear;
384
+ transition: opacity ${Tb}ms linear;
385
385
  }
386
386
 
387
387
  :host([interactive]) .container { pointer-events: auto; }
388
- `,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=ra.get(e);n||(n={tooltips:new Set,intersecting:!1},ra.set(e,n),hd?.observe(e)),n.tooltips.add(this),Zi(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=ra.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(ra.delete(e),hd?.unobserve(this.anchor)):n&&Zi(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=Vi(e=>this.show(e),this.#a)}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#a(){let e=this.getAttribute("delay");if(e==null)return sd;let n=parseInt(e,10);return Number.isFinite(n)?n:sd}get#r(){return this.hasAttribute("truncated-only")}get#o(){return this.hasAttribute(qi)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#o||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(qi))}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.#o&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let r=Array.from(e.querySelectorAll(n));if(r.length)return r}catch{}let a=Array.from(e.querySelectorAll(Ab));return a.length?a:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>{let n=e.isTruncated;return typeof n=="boolean"?n:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1})}isEmpty(){return this.#o?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.#o?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,a,r,o){return o?e<_n?n:e:n+a>r?e:n}place(e,n,a,r){e+a>r&&(e=r-a-_n),e=Math.max(_n,e),n=Math.max(_n,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=Dt(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:a,innerHeight:r}=this.view,o=this.flipVertical(e.top-n.height-_n,e.bottom+_n,n.height,r,this.#n||this.touchOpen);this.place(e.left,o,n.width,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:a,innerHeight:r}=this.view,o=this.flipVertical(e.clientY-n.height-_n*2,e.clientY+wb,n.height,r,this.#n);this.place(e.clientX-kb,o,n.width,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=Dt(this.anchor),a=Math.max(n.left-e.clientX,0,e.clientX-n.right),r=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(a,r);return o<=ji?1:o>=cd?0:1-(o-ji)/(cd-ji)}show=e=>{this.anchor&&(Dc()&&!zc(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#r&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(it&&it!==this&&this.anchor.contains(it.anchor))&&(_b(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(),ld),dd(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(),dd(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=Eb)=>{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.#r&&!this.isTargetTruncated()||(zb()?(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,a=this.doc;this.makeDebouncedShow();let r=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),a.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",r),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),a.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),a.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)>Ib&&u()},p=()=>{u(),b(),this.shown&&this.touchOpen&&this.scheduleHide(Mb)},b=()=>{e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",p),e.removeEventListener("pointercancel",p),e.removeEventListener("contextmenu",d)},f=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()},Tb))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",f),this.teardown=()=>{this.debouncedShow?.cancel(),u(),b(),e.removeEventListener("pointermove",r),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",f),n.removeEventListener("pagehide",o),a.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function md(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",to)}md();var bd=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step","aria-label"],Pb=new Set(["readonly","required"]),$i=!1,fd=new WeakSet;function Nb(t){fd.has(t)||(fd.add(t),t.addEventListener("keydown",()=>{$i=!0},!0),t.addEventListener("pointerdown",()=>{$i=!1},!0))}var Bb="clearrequest",Lb="clearclick",Rb="clearinput",gd=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),Fb=`
388
+ `,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=ra.get(e);n||(n={tooltips:new Set,intersecting:!1},ra.set(e,n),pd?.observe(e)),n.tooltips.add(this),Zi(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=ra.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(ra.delete(e),pd?.unobserve(this.anchor)):n&&Zi(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=Vi(e=>this.show(e),this.#a)}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#a(){let e=this.getAttribute("delay");if(e==null)return ld;let n=parseInt(e,10);return Number.isFinite(n)?n:ld}get#r(){return this.hasAttribute("truncated-only")}get#o(){return this.hasAttribute(qi)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#o||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(qi))}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.#o&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let r=Array.from(e.querySelectorAll(n));if(r.length)return r}catch{}let a=Array.from(e.querySelectorAll(Mb));return a.length?a:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>{let n=e.isTruncated;return typeof n=="boolean"?n:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1})}isEmpty(){return this.#o?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.#o?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,a,r,o){return o?e<_n?n:e:n+a>r?e:n}place(e,n,a,r){e+a>r&&(e=r-a-_n),e=Math.max(_n,e),n=Math.max(_n,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=Dt(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:a,innerHeight:r}=this.view,o=this.flipVertical(e.top-n.height-_n,e.bottom+_n,n.height,r,this.#n||this.touchOpen);this.place(e.left,o,n.width,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:a,innerHeight:r}=this.view,o=this.flipVertical(e.clientY-n.height-_n*2,e.clientY+wb,n.height,r,this.#n);this.place(e.clientX-Cb,o,n.width,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=Dt(this.anchor),a=Math.max(n.left-e.clientX,0,e.clientX-n.right),r=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(a,r);return o<=ji?1:o>=dd?0:1-(o-ji)/(dd-ji)}show=e=>{this.anchor&&(zc()&&!_c(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#r&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(it&&it!==this&&this.anchor.contains(it.anchor))&&(Ob(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(),cd),ud(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(),ud(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=Sb)=>{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.#r&&!this.isTargetTruncated()||(_b()?(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,a=this.doc;this.makeDebouncedShow();let r=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),a.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",r),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),a.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),a.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)>Db&&u()},p=()=>{u(),b(),this.shown&&this.touchOpen&&this.scheduleHide(Ib)},b=()=>{e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",p),e.removeEventListener("pointercancel",p),e.removeEventListener("contextmenu",d)},f=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()},Ab))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",f),this.teardown=()=>{this.debouncedShow?.cancel(),u(),b(),e.removeEventListener("pointermove",r),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",f),n.removeEventListener("pagehide",o),a.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function bd(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",to)}bd();var fd=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step","aria-label"],Nb=new Set(["readonly","required"]),$i=!1,gd=new WeakSet;function Bb(t){gd.has(t)||(gd.add(t),t.addEventListener("keydown",()=>{$i=!0},!0),t.addEventListener("pointerdown",()=>{$i=!1},!0))}var Lb="clearrequest",Rb="clearclick",Fb="clearinput",vd=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),Hb=`
389
389
  :host {
390
390
  --_fs: 15px;
391
391
  --_lh: 20px;
@@ -529,7 +529,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
529
529
  font-size: calc(var(--_fs) - 1px);
530
530
  line-height: calc(var(--_lh) - 2px);
531
531
  }
532
- `,no=class extends P{static formAssociated=!0;static observedAttributes=[...bd,"value","defaultvalue","multiline","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;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=Fb,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 a=document.createElement("slot");a.name="trailing",a.setAttribute("part","trailing");let r=document.createElement("slot");r.name="clear",r.setAttribute("part","clear"),this.field.append(this.leadingSlot,r,a),this.addEventListener(Bb,()=>{this.dispatchEvent(new CustomEvent(Lb,{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(Nb(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}attributeChangedCallback(e,n,a){if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="rows"||e==="maxrows"){if(!this.control)return;let r=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement;r!==o?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"){a!==null&&(this.value=a);return}e!=="defaultvalue"&&this.control&&(this.forward(e,a),this.updateValidity())}}buildControl(e){let n=this.control,a=n!=null&&this.shadowRoot?.activeElement===n,r=null,o=null;if(n)try{r=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=document.createElement(i?"textarea":"input");s.setAttribute("part","input"),this.control?this.control.replaceWith(s):this.leadingSlot.after(s),this.control=s;for(let c of bd)s instanceof HTMLTextAreaElement&&c==="type"||this.forward(c,this.getAttribute(c));this.syncDisabled(),this.syncStatus(),this.applyLabelAria(),this.applyDescriptionAria(),i&&this.configureTextarea(s);let l=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(s.value=l,s.addEventListener("input",this.onInput),s.addEventListener("change",this.onChange),s.addEventListener("focus",this.onFocus),s.addEventListener("blur",this.onBlur),a&&(s.focus(),r!=null))try{s.setSelectionRange(r,o??r)}catch{}this.internals?.setFormValue(l),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),a=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,gd?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),a!=null?e.style.setProperty("--_maxrows",String(parseInt(a,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(gd)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 a=this.control;a&&(a instanceof HTMLTextAreaElement&&e==="type"||(Pb.has(e)?a.toggleAttribute(e,n!=null):n==null?a.removeAttribute(e):a.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncStatus(){let e=this.getAttribute("status")==="critical";this.control?.setAttribute("aria-invalid",e?"true":"false");try{e?this.internals?.states.add("invalid"):this.internals?.states.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.internals?.setFormValue(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{$i?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.hasAttribute("aria-label")||this.hasAttribute("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(a=>a.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.hasAttribute("aria-description")||this.hasAttribute("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(a=>a.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}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.internals?.setFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.internals?.setFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(Rb,{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??""}};function vd(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",no)}vd();var cn=(t,e)=>{if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e},Ui=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},ao=class extends P{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix"];#e;#t;#n;#a;#r;#o;#u;#h;#l;#c;#s;#d;#x;#p;#f;#b;#g;#y;#i=0;#k=!1;#v=!1;#C;get value(){return this.#i}set value(e){this.setAttribute("value",String(e))}get defaultValue(){return cn(this.getAttribute("defaultvalue"),this.#m)}set defaultValue(e){this.setAttribute("defaultvalue",String(e))}constructor(){super(),this.#e=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
532
+ `,no=class extends O{static formAssociated=!0;static observedAttributes=[...fd,"value","defaultvalue","multiline","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;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=Hb,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 a=document.createElement("slot");a.name="trailing",a.setAttribute("part","trailing");let r=document.createElement("slot");r.name="clear",r.setAttribute("part","clear"),this.field.append(this.leadingSlot,r,a),this.addEventListener(Lb,()=>{this.dispatchEvent(new CustomEvent(Rb,{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(){Bb(this.doc);let e=this.getAttribute("type")?.toLowerCase();if(this.internals&&e!=="number"&&e!=="search"?this.internals.role="textbox":this.internals&&e==="number"?this.internals.role="spinbutton":this.internals&&e==="search"&&(this.internals.role="searchbox"),Object.prototype.hasOwnProperty.call(this,"value")){let n=this.value;delete this.value,this.value=n}this.control||this.buildControl(),this.ready=!0}attributeChangedCallback(e,n,a){if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="rows"||e==="maxrows"){if(!this.control)return;let r=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement;r!==o?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"){a!==null&&(this.value=a);return}e!=="defaultvalue"&&this.control&&(this.forward(e,a),this.updateValidity())}}buildControl(e){let n=this.control,a=n!=null&&this.shadowRoot?.activeElement===n,r=null,o=null;if(n)try{r=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=document.createElement(i?"textarea":"input");s.setAttribute("part","input"),this.control?this.control.replaceWith(s):this.leadingSlot.after(s),this.control=s;for(let c of fd)s instanceof HTMLTextAreaElement&&c==="type"||this.forward(c,this.getAttribute(c));this.syncDisabled(),this.syncStatus(),this.applyLabelAria(),this.applyDescriptionAria(),i&&this.configureTextarea(s);let l=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(s.value=l,s.addEventListener("input",this.onInput),s.addEventListener("change",this.onChange),s.addEventListener("focus",this.onFocus),s.addEventListener("blur",this.onBlur),a&&(s.focus(),r!=null))try{s.setSelectionRange(r,o??r)}catch{}this.internals?.setFormValue(l),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),a=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,vd?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),a!=null?e.style.setProperty("--_maxrows",String(parseInt(a,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(vd)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 a=this.control;a&&(a instanceof HTMLTextAreaElement&&e==="type"||(Nb.has(e)?a.toggleAttribute(e,n!=null):n==null?a.removeAttribute(e):a.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncStatus(){let e=this.getAttribute("status")==="critical";this.control?.setAttribute("aria-invalid",e?"true":"false");try{e?this.internals?.states.add("invalid"):this.internals?.states.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.internals?.setFormValue(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{$i?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.hasAttribute("aria-label")||this.hasAttribute("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(a=>a.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.hasAttribute("aria-description")||this.hasAttribute("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(a=>a.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}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.internals?.setFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.internals?.setFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(Fb,{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??""}};function xd(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",no)}xd();var cn=(t,e)=>{if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e},Ui=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},ao=class extends O{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix"];#e;#t;#n;#a;#r;#o;#u;#h;#l;#c;#s;#d;#x;#p;#f;#b;#g;#y;#i=0;#w=!1;#v=!1;#C;get value(){return this.#i}set value(e){this.setAttribute("value",String(e))}get defaultValue(){return cn(this.getAttribute("defaultvalue"),this.#m)}set defaultValue(e){this.setAttribute("defaultvalue",String(e))}constructor(){super(),this.#e=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
533
533
  :host {
534
534
  display: grid;
535
535
  grid-template-columns: minmax(0, 1fr);
@@ -685,7 +685,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
685
685
  .fill,
686
686
  .thumb { transition: none; }
687
687
  }
688
- `,this.#o=document.createElement("div"),this.#o.className="header",this.#o.part.add("header"),this.#u=document.createElement("slot"),this.#u.name="label",this.#u.part.add("label");let a=document.createElement("span");a.className="inline-separator",a.textContent=":",this.#h=document.createElement("span"),this.#h.className="inline-value",this.#h.part.add("value"),this.#l=document.createElement("span"),this.#l.className="value-affix",this.#c=document.createElement("span"),this.#c.className="value-affix",this.#h.append(this.#l,this.#c),this.#s=document.createElement("span"),this.#s.className="end-value",this.#s.part.add("value"),this.#d=document.createElement("span"),this.#d.className="value-affix",this.#x=document.createElement("span"),this.#x.className="value-affix",this.#s.append(this.#d,this.#x),this.#o.append(this.#u,a,this.#h,this.#s),this.#t=document.createElement("div"),this.#t.className="control",this.#t.part.add("control"),this.#n=document.createElement("div"),this.#n.className="rail-area";let r=document.createElement("div");r.className="rail",r.part.add("track"),this.#a=document.createElement("div"),this.#a.className="fill",this.#a.part.add("fill"),this.#r=document.createElement("div"),this.#r.className="thumb",this.#r.part.add("thumb"),this.#p=document.createElement("span"),this.#p.className="thumb-value",this.#p.part.add("thumb-value"),this.#f=document.createElement("span"),this.#f.className="value-affix",this.#b=document.createElement("span"),this.#b.className="value-affix",this.#p.append(this.#f,this.#b),this.#n.append(r,this.#a,this.#r,this.#p),this.#t.append(this.#n),this.#g=document.createElement("slot"),this.#g.name="markers",this.#g.part.add("markers"),this.#y=document.createElement("slot"),this.#y.part.add("extras");for(let o of[this.#u,this.#g,this.#y])o.addEventListener("slotchange",()=>this.#z());this.#t.addEventListener("pointerdown",o=>this.#B(o)),this.#t.addEventListener("pointermove",o=>this.#H(o)),this.#t.addEventListener("pointerup",o=>this.#D(o)),this.#t.addEventListener("pointercancel",o=>this.#D(o)),this.addEventListener("keydown",o=>this.#V(o)),this.addEventListener("blur",()=>delete this.#t.dataset.pointerFocus),e.append(n,this.#o,this.#t,this.#g,this.#y)}connectedCallback(){this.#k||(this.#i=this.#I(),this.#k=!0),this.#A(),this.#z()}attributeChangedCallback(e){this.#k&&(e==="value"?this.hasAttribute("value")?(this.#i=this.#T(cn(this.getAttribute("value"),this.#m)),this.#v=!1):this.#v||(this.#i=this.#I()):e==="defaultvalue"&&!this.hasAttribute("value")&&!this.#v?this.#i=this.#I():(e==="min"||e==="max"||e==="step")&&(this.#i=this.#T(this.#i)),this.#A(),e==="value-display"&&this.#z())}formResetCallback(){let e=this.#i;this.#i=this.#T(cn(this.getAttribute("defaultvalue"),this.#m)),this.#v=!1,this.#A(),this.#i!==e&&this.#F()}formStateRestoreCallback(e){typeof e=="string"&&(this.#i=this.#T(cn(e,this.#m)),this.#v=!0,this.#A())}formDisabledCallback(){this.#A()}get#m(){return cn(this.getAttribute("min"),0)}get#w(){return Math.max(this.#m,cn(this.getAttribute("max"),100))}get#S(){let e=cn(this.getAttribute("step"),1);return e>0?e:1}get#M(){return this.hasAttribute("disabled")||this.matches(":disabled")}#I(){let e=this.getAttribute("value")??this.getAttribute("defaultvalue");return this.#T(cn(e,this.#m))}#T(e){let n=this.#m,a=this.#w,r=this.#S,o=n+Math.round((Math.min(a,Math.max(n,e))-n)/r)*r,i=Math.min(12,Math.max(Ui(n),Ui(a),Ui(r)));return Number(Math.min(a,Math.max(n,o)).toFixed(i))}#P(e=this.#i){let n=this.#w-this.#m;return n>0?(e-this.#m)/n*100:0}#A(){let e=`${this.#P()}%`;this.#n.style.setProperty("--_percent",e);let n=this.#R(),a=String(this.#i),r=this.getAttribute("value-prefix")??"",o=this.getAttribute("value-suffix")??"";for(let[s,l,c]of[[this.#h,this.#l,this.#c],[this.#s,this.#d,this.#x],[this.#p,this.#f,this.#b]])s.textContent=a,l.textContent=r,c.textContent=o,s.prepend(l),s.append(c);let i=this.#e;i&&(i.ariaValueMin=String(this.#m),i.ariaValueMax=String(this.#w),i.ariaValueNow=String(this.#i),i.ariaValueText=n,i.setFormValue(this.#M?null:String(this.#i),String(this.#i)))}#R(){return`${this.getAttribute("value-prefix")??""}${this.#i}${this.getAttribute("value-suffix")??""}`}#z(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#o.hidden=!e(this.#u)&&this.getAttribute("value-display")==="none",this.#g.hidden=!e(this.#g),this.#y.hidden=!e(this.#y)}#_(e){let n=this.#T(e);return n===this.#i?!1:(this.#i=n,this.#v=!0,this.#A(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),!0)}#F(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#N(e){let n=this.#n.getBoundingClientRect();return n.width<=0?this.#i:this.#m+(e-n.left)/n.width*(this.#w-this.#m)}#B(e){this.#M||e.button!==0||this.#n.getBoundingClientRect().width<=0||(this.#C={pointerId:e.pointerId,startX:e.clientX,startValue:this.#i},this.#t.setPointerCapture(e.pointerId),this.#t.dataset.dragging="",this.#t.dataset.pointerFocus="",this.focus({preventScroll:!0}),this.getAttribute("track-click")==="jump"&&this.#_(this.#N(e.clientX)),e.preventDefault())}#H(e){let n=this.#C;if(!n||n.pointerId!==e.pointerId)return;let a=this.getAttribute("track-click")==="jump"?this.#N(e.clientX):n.startValue+(e.clientX-n.startX)/this.#n.getBoundingClientRect().width*(this.#w-this.#m);this.#_(a),e.preventDefault()}#D(e){let n=this.#C;!n||n.pointerId!==e.pointerId||(this.#C=void 0,delete this.#t.dataset.dragging,this.#t.hasPointerCapture(e.pointerId)&&this.#t.releasePointerCapture(e.pointerId),this.#i!==n.startValue&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}#V(e){if(e.target!==this||this.#M)return;delete this.#t.dataset.pointerFocus;let n=Math.max(this.#S,(this.#w-this.#m)/10),a;switch(e.key){case"ArrowRight":case"ArrowUp":a=this.#i+this.#S;break;case"ArrowLeft":case"ArrowDown":a=this.#i-this.#S;break;case"PageUp":a=this.#i+n;break;case"PageDown":a=this.#i-n;break;case"Home":a=this.#m;break;case"End":a=this.#w;break;default:return}e.preventDefault(),this.#_(a)&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}};function xd(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",ao)}xd();var Hb="clearrequest",Vb="clearinput",Wa=t=>String(t).padStart(2,"0"),yd=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-꓏가-힣豈-﫿︐-﹯!-⦆¢-₩]/u.test(n)?2:1),0),jb=(t,e)=>e==="pm"?t%12+12:t%12,wd=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},qb=`
688
+ `,this.#o=document.createElement("div"),this.#o.className="header",this.#o.part.add("header"),this.#u=document.createElement("slot"),this.#u.name="label",this.#u.part.add("label");let a=document.createElement("span");a.className="inline-separator",a.textContent=":",this.#h=document.createElement("span"),this.#h.className="inline-value",this.#h.part.add("value"),this.#l=document.createElement("span"),this.#l.className="value-affix",this.#c=document.createElement("span"),this.#c.className="value-affix",this.#h.append(this.#l,this.#c),this.#s=document.createElement("span"),this.#s.className="end-value",this.#s.part.add("value"),this.#d=document.createElement("span"),this.#d.className="value-affix",this.#x=document.createElement("span"),this.#x.className="value-affix",this.#s.append(this.#d,this.#x),this.#o.append(this.#u,a,this.#h,this.#s),this.#t=document.createElement("div"),this.#t.className="control",this.#t.part.add("control"),this.#n=document.createElement("div"),this.#n.className="rail-area";let r=document.createElement("div");r.className="rail",r.part.add("track"),this.#a=document.createElement("div"),this.#a.className="fill",this.#a.part.add("fill"),this.#r=document.createElement("div"),this.#r.className="thumb",this.#r.part.add("thumb"),this.#p=document.createElement("span"),this.#p.className="thumb-value",this.#p.part.add("thumb-value"),this.#f=document.createElement("span"),this.#f.className="value-affix",this.#b=document.createElement("span"),this.#b.className="value-affix",this.#p.append(this.#f,this.#b),this.#n.append(r,this.#a,this.#r,this.#p),this.#t.append(this.#n),this.#g=document.createElement("slot"),this.#g.name="markers",this.#g.part.add("markers"),this.#y=document.createElement("slot"),this.#y.part.add("extras");for(let o of[this.#u,this.#g,this.#y])o.addEventListener("slotchange",()=>this.#z());this.#t.addEventListener("pointerdown",o=>this.#B(o)),this.#t.addEventListener("pointermove",o=>this.#H(o)),this.#t.addEventListener("pointerup",o=>this.#D(o)),this.#t.addEventListener("pointercancel",o=>this.#D(o)),this.addEventListener("keydown",o=>this.#V(o)),this.addEventListener("blur",()=>delete this.#t.dataset.pointerFocus),e.append(n,this.#o,this.#t,this.#g,this.#y)}connectedCallback(){this.#w||(this.#i=this.#I(),this.#w=!0),this.#A(),this.#z()}attributeChangedCallback(e){this.#w&&(e==="value"?this.hasAttribute("value")?(this.#i=this.#T(cn(this.getAttribute("value"),this.#m)),this.#v=!1):this.#v||(this.#i=this.#I()):e==="defaultvalue"&&!this.hasAttribute("value")&&!this.#v?this.#i=this.#I():(e==="min"||e==="max"||e==="step")&&(this.#i=this.#T(this.#i)),this.#A(),e==="value-display"&&this.#z())}formResetCallback(){let e=this.#i;this.#i=this.#T(cn(this.getAttribute("defaultvalue"),this.#m)),this.#v=!1,this.#A(),this.#i!==e&&this.#F()}formStateRestoreCallback(e){typeof e=="string"&&(this.#i=this.#T(cn(e,this.#m)),this.#v=!0,this.#A())}formDisabledCallback(){this.#A()}get#m(){return cn(this.getAttribute("min"),0)}get#k(){return Math.max(this.#m,cn(this.getAttribute("max"),100))}get#S(){let e=cn(this.getAttribute("step"),1);return e>0?e:1}get#M(){return this.hasAttribute("disabled")||this.matches(":disabled")}#I(){let e=this.getAttribute("value")??this.getAttribute("defaultvalue");return this.#T(cn(e,this.#m))}#T(e){let n=this.#m,a=this.#k,r=this.#S,o=n+Math.round((Math.min(a,Math.max(n,e))-n)/r)*r,i=Math.min(12,Math.max(Ui(n),Ui(a),Ui(r)));return Number(Math.min(a,Math.max(n,o)).toFixed(i))}#P(e=this.#i){let n=this.#k-this.#m;return n>0?(e-this.#m)/n*100:0}#A(){let e=`${this.#P()}%`;this.#n.style.setProperty("--_percent",e);let n=this.#R(),a=String(this.#i),r=this.getAttribute("value-prefix")??"",o=this.getAttribute("value-suffix")??"";for(let[s,l,c]of[[this.#h,this.#l,this.#c],[this.#s,this.#d,this.#x],[this.#p,this.#f,this.#b]])s.textContent=a,l.textContent=r,c.textContent=o,s.prepend(l),s.append(c);let i=this.#e;i&&(i.ariaValueMin=String(this.#m),i.ariaValueMax=String(this.#k),i.ariaValueNow=String(this.#i),i.ariaValueText=n,i.setFormValue(this.#M?null:String(this.#i),String(this.#i)))}#R(){return`${this.getAttribute("value-prefix")??""}${this.#i}${this.getAttribute("value-suffix")??""}`}#z(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#o.hidden=!e(this.#u)&&this.getAttribute("value-display")==="none",this.#g.hidden=!e(this.#g),this.#y.hidden=!e(this.#y)}#_(e){let n=this.#T(e);return n===this.#i?!1:(this.#i=n,this.#v=!0,this.#A(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),!0)}#F(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#N(e){let n=this.#n.getBoundingClientRect();return n.width<=0?this.#i:this.#m+(e-n.left)/n.width*(this.#k-this.#m)}#B(e){this.#M||e.button!==0||this.#n.getBoundingClientRect().width<=0||(this.#C={pointerId:e.pointerId,startX:e.clientX,startValue:this.#i},this.#t.setPointerCapture(e.pointerId),this.#t.dataset.dragging="",this.#t.dataset.pointerFocus="",this.focus({preventScroll:!0}),this.getAttribute("track-click")==="jump"&&this.#_(this.#N(e.clientX)),e.preventDefault())}#H(e){let n=this.#C;if(!n||n.pointerId!==e.pointerId)return;let a=this.getAttribute("track-click")==="jump"?this.#N(e.clientX):n.startValue+(e.clientX-n.startX)/this.#n.getBoundingClientRect().width*(this.#k-this.#m);this.#_(a),e.preventDefault()}#D(e){let n=this.#C;!n||n.pointerId!==e.pointerId||(this.#C=void 0,delete this.#t.dataset.dragging,this.#t.hasPointerCapture(e.pointerId)&&this.#t.releasePointerCapture(e.pointerId),this.#i!==n.startValue&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}#V(e){if(e.target!==this||this.#M)return;delete this.#t.dataset.pointerFocus;let n=Math.max(this.#S,(this.#k-this.#m)/10),a;switch(e.key){case"ArrowRight":case"ArrowUp":a=this.#i+this.#S;break;case"ArrowLeft":case"ArrowDown":a=this.#i-this.#S;break;case"PageUp":a=this.#i+n;break;case"PageDown":a=this.#i-n;break;case"Home":a=this.#m;break;case"End":a=this.#k;break;default:return}e.preventDefault(),this.#_(a)&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}};function yd(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",ao)}yd();var Vb="clearrequest",jb="clearinput",Wa=t=>String(t).padStart(2,"0"),kd=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-꓏가-힣豈-﫿︐-﹯!-⦆¢-₩]/u.test(n)?2:1),0),qb=(t,e)=>e==="pm"?t%12+12:t%12,wd=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},Zb=`
689
689
  :host {
690
690
  display: grid;
691
691
  grid-template-columns: minmax(0, 1fr);
@@ -825,7 +825,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
825
825
  font-size: calc(var(--input-time-font-size) - 1px);
826
826
  line-height: calc(var(--input-time-line-height) - 2px);
827
827
  }
828
- `,kd=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=qb;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let a=document.createElement("div");a.className="field",a.part.add("field");let r=document.createElement("slot");r.name="leading",r.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"),a.append(r,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,a,document.createElement("slot"),l),t})(),ro=class extends P{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","aria-label","required"];#e;#t;#n;#a;#r=!1;#o=!1;#u=!1;#h="";#l=null;#c=null;#s=null;#d=[];#x=[];#p;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(!kd)throw new Error("a-input-time requires a DOM document");e.append(kd.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#d[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#W),this.#t=e.querySelector(".field"),this.#a=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#C),this.#a.addEventListener("input",this.#I),this.#a.addEventListener("keydown",this.#S),this.#a.addEventListener("focusin",this.#m),this.#a.addEventListener("focusout",this.#w),this.#a.addEventListener("paste",this.#M),this.addEventListener(Hb,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#f(e)}else this.#u||this.#f(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#y(),this.#r=!0}#f(e){this.#O(e),this.#h=this.value}attributeChangedCallback(e,n,a){if(this.#r){if(e==="value"){a!==null&&(this.value=a);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#y();return}if(e==="status"){this.#U();return}if(e==="disabled"){this.#Z();return}if(e==="min"||e==="max"){this.#$();return}if(e==="aria-label"){this.#q();return}if(e==="required"){this.#$();return}}}}get#b(){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.#b,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#y(){let e=this.#g,n=this.#b,a=this.#h,r=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});r=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=r.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{r=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#i=o,this.#k=i,this.#a.replaceChildren(),this.#d=[],this.#x=[];for(let s of r)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,yd(this.#i),yd(this.#k));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.#a.append(l),this.#d.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.#a.append(l),this.#x.push(s.value)}this.#O(a),this.#q(),this.#U(),this.#Z(),this.#E({dispatch:!1})}#i="AM";#k="PM";#v(e){if(e instanceof HTMLInputElement)return this.#d.find(n=>n.el===e)}#C=e=>{let n=this.#v(e.target);if(n){this.#p=n.el;return}(e.target===this.#t||e.target===this.#a)&&(e.preventDefault(),this.#H(this.#d[0]))};#m=e=>{let n=this.#v(e.target);if(!n)return;let a=this.#p===n.el;this.#p=void 0,a||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#w=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#d.some(a=>a.el===n)||(this.#B()&&this.#E(),this.#L("change"))})};#S=e=>{let n=this.#v(e.target);if(!n)return;let{el:a}=n,r=e.key;if(r==="ArrowUp"||r==="ArrowDown"){e.preventDefault(),this.#A(n,r==="ArrowUp"?1:-1);return}if(r==="PageUp"||r==="PageDown"){e.preventDefault(),this.#A(n,(r==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(r==="ArrowLeft"||r==="ArrowRight"){let o=a.selectionStart??0,i=a.selectionEnd??o;(r==="ArrowLeft"?o===0&&i===0:o===a.value.length&&i===a.value.length)&&(e.preventDefault(),this.#j(),this.#D(n,r==="ArrowRight"?1:-1));return}if(r==="Backspace"&&a.value===""){e.preventDefault(),this.#D(n,-1);return}n.kind!=="period"&&this.#x.some(o=>o.includes(r))&&(e.preventDefault(),this.#j(),this.#D(n,1,{numeric:!0}))};#M=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#O(n),this.#E(),this.#L("change"))};#I=e=>{let n=this.#v(e.target);!n||e.isComposing||(n.kind==="period"?this.#P(e,n):this.#T(n))};#T(e){let{el:n}=e,a=n.value.replace(/\D/g,"");a!==n.value&&(n.value=a);let r=e.kind==="hour"&&this.#g,o=r?23:e.max;if(a===""){e.kind==="hour"?this.#l=null:this.#c=null,this.#E({dispatch:!1,preserve:n});return}let i=a.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;r?s===0&&i.length===1?this.#l=null:s===0?(this.#l=12,this.#s="am"):s>12?(this.#l=s-12,this.#s="pm"):(this.#l=s,this.#s==null&&(this.#s="am")):this.#R(e,Math.max(e.min,s)),this.#E({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#D(e,1)}#P(e,n){let{el:a}=n,r=a.value.trim();if(!r){this.#s=null,this.#E({dispatch:!1,preserve:a});return}let o=r.toLowerCase(),i=this.#i.toLowerCase(),s=this.#k.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#s=l,this.#E({dispatch:!1}),this.#D(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#s=null,this.#E({dispatch:!1,preserve:a});return}e.stopPropagation(),a.value=this.#s==="pm"?this.#k:this.#s==="am"?this.#i:""}#A(e,n){if(e.kind==="period"){this.#s=this.#s==null?"am":this.#s==="am"?"pm":"am",this.#B(),this.#E();return}let a=e.kind==="hour"?this.#l:this.#c,r=e.max-e.min+1,o;a==null?o=n>0?e.min:e.max:o=((a-e.min+n)%r+r)%r+e.min,this.#R(e,o),this.#B(),this.#E()}#R(e,n){e.kind==="hour"?this.#l=n:this.#c=n,e.kind==="hour"&&this.#g&&this.#s==null&&(this.#s="am")}#z(e){let n=wd(e);return n?n.h*60+n.min:null}get#_(){return this.#z(this.getAttribute("min"))}get#F(){return this.#z(this.getAttribute("max"))}#N(){let e=this.#V;return e==null||this.#c==null?null:e*60+this.#c}#B(){let e=this.#N();if(e==null)return!1;let n=this.#_,a=this.#F,r=e;return n!=null&&r<n&&(r=n),a!=null&&r>a&&(r=a),r===e?!1:(this.#O(`${Wa(Math.floor(r/60))}:${Wa(r%60)}`),!0)}#H(e){e&&(e.el.focus(),e.el.select())}#D(e,n,a={}){let r=this.#d.indexOf(e);for(let o=r+n;o>=0&&o<this.#d.length;o+=n){let i=this.#d[o];if(!a.numeric||i.kind!=="period"){this.#H(i);return}}}get#V(){return this.#l==null?null:this.#g?this.#s==null?null:jb(this.#l,this.#s):this.#l}#E({dispatch:e=!0,preserve:n}={}){this.#j(n),this.#h=this.value,this.#e?.setFormValue(this.value),this.#G(),this.#$(),e&&this.#L("input")}#j(e){for(let n of this.#d)this.#Y(n,e===n.el)}#Y(e,n){let a=e.el;if(e.kind==="period"){let o=this.#s==="pm"?this.#k:this.#s==="am"?this.#i:"";n||(a.value=o),a.placeholder=this.#i;return}let r=e.kind==="hour"?this.#l:this.#c;n||(a.value=r==null?"":Wa(r)),a.placeholder="\u2013\u2013"}#O(e){let n=wd(e);if(!n){this.#l=null,this.#c=null,this.#s=null;return}this.#c=n.min,this.#g?(this.#l=(n.h+11)%12+1,this.#s=n.h<12?"am":"pm"):(this.#l=n.h,this.#s=null)}#L(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#q(){let e=this.getAttribute("aria-label")||this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#a.setAttribute("aria-label",e):this.#a.removeAttribute("aria-label")}#W=()=>{this.#q()};#Z(){let e=this.hasAttribute("disabled")||this.#o;for(let n of this.#d)n.el.disabled=e}#U(){let e=this.getAttribute("status")==="critical";for(let n of this.#d)n.el.setAttribute("aria-invalid",e?"true":"false");try{e?this.#e?.states.add("invalid"):this.#e?.states.delete("invalid")}catch{}}#G(){this.value?this.#e?.states.add("filled"):this.#e?.states.delete("filled")}#$(){if(!this.#e)return;let e=this.#d[0]?.el??this,n=this.hasAttribute("required"),a=this.#N(),r=this.#_,o=this.#F;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):a!=null&&r!=null&&a<r?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):a!=null&&o!=null&&a>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.#V;return e==null||this.#c==null?"":`${Wa(e)}:${Wa(this.#c)}`}set value(e){this.#u=!0;let n=e??"";n!==this.value&&(this.#O(n),this.#r?this.#E({dispatch:!1}):this.#h=this.value)}clear(){this.#l=null,this.#c=null,this.#s=null,this.#E(),this.#L("change"),this.dispatchEvent(new CustomEvent(Vb,{bubbles:!0})),this.#d[0]?.el.focus()}focus(e){this.#d[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.#O(this.getAttribute("defaultvalue")??""),this.#E(),this.#L("change")}formDisabledCallback(e){this.#o=e,this.#Z()}formStateRestoreCallback(e){this.value=e??""}};function Cd(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",ro)}Cd();var Yi=globalThis.Temporal;var Ed=(t,e)=>`Non-positive ${t}: ${e}`,Sd=(t,e)=>`Non-finite ${t}: ${e}`,Td=t=>`Cannot convert bigint to ${t}`,Ad="Invalid object",Ga=(t,e,n,a)=>On(t,e)+`; must be between ${n}-${a}`,On=(t,e)=>`Invalid ${t}: ${e}`;var Wi=1e3,Gi=1e6,Ki=1e9,Xi=6e10,Ji=36e11;function st(t){return t===void 0?Object.create(null):Pn(t)}function oo(t,e="number"){if(typeof t=="bigint")throw new TypeError(Td(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Sd(e,t));return t}function Be(t,e){return Math.trunc(oo(t,e))||0}function io(t,e){return Md(Be(t,e),e)}function Md(t,e="number"){if(t<=0)throw new RangeError(Ed(e,t));return t}function Qi(t,e,n){return Math.min(Math.max(t,e),n)}function ia(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function Pn(t){if(!ia(t))throw new TypeError(Ad);return t}var fo=On;var tr=t=>`Missing ${t}`,Rd=t=>"No valid fields: "+t.join(),Fd="Invalid bag",Hd=(t,e,n)=>On(t,e)+"; must be "+Object.keys(n).join(),Vd="Cannot use valueOf",jd="Invalid calling context",go=t=>"Missing year"+(t?"/era/eraYear":""),Bn="Invalid leap month",qd=t=>On("Calendar",t),Zd=(t,e)=>`Unknown calendar ${t}; might need ${e}`,bs=t=>On("TimeZone",t),dn="Out-of-bounds date";var $d=t=>`Cannot parse: ${t}`,$t=t=>`Invalid substring: ${t}`;var fs=Qi,Xe=ia;function D(t){throw new RangeError(t)}function le(t){throw new TypeError(t)}function as(t,e,n,a,r){return _t(e,((o,i)=>{let s=o[i];return s===void 0&&le(tr(i)),s})(t,e),n,a,r)}function _t(t,e,n,a,r,o){let i=fs(e,n,a);return r&&e!==i&&D(((s,l,c,d,u)=>u?Ga(s,u[l],u[c],u[d]):Ga(s,l,c,d))(t,e,n,a,o)),i}function ca(t,e=Map){let n=new e;return(a,...r)=>{if(n.has(a))return n.get(a);let o=t(a,...r);return n.set(a,o),o}}var Ud=t=>vo({name:t},1),vo=(t,e)=>bn(n=>({value:n,configurable:1,writable:!e}),t),nr=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function bn(t,e){let n={};for(let a in e)n[a]=t(e[a],a);return n}function ar(t,e){let n={};for(let a of t)n[a]=e;return n}function xo(t){let e={};for(let n of t)e[n]=a=>a[n];return e}function Ot(t,e,n=Object.create(null)){for(let a of t)n[a]=e[a];return n}function Yd(t,e,n){for(let a of t)if(e[a]!==n[a])return 0;return 1}function Wb(t,e,n){let a={...n};for(let r=0;r<e;r++)a[t[r]]=0;return a}function Je(t,...e){return(...n)=>t(...e,...n)}function gs(){}function Id(t){return t[0].toUpperCase()+t.substring(1)}function Ne(...t){return[].concat(...t).sort()}function pa(t){return new RegExp(`^${t}$`,"i")}function vs(t){return parseInt(t.padEnd(9,"0"))}function xs(t){return t&&t!=="+"?-1:1}function sa(t){return t===void 0?0:parseInt(t)}function uo(t,e){return String(e).padStart(t,"0")}var xt=Je(uo,2);function Ut(t,e){return Math.sign(t-e)}function Ie(t,e){return t<e?-1:t>e?1:0}function Wd(t,e){let n=t/e;return t%e<0n?n-1n:n}function ys(t,e){let n=Wd(t,e);return[n,t-n*e]}function zt(t,e){return[Math.floor(t/e),yo(t,e)]}function yo(t,e){return(t%e+e)%e}function ma(t,e){return Math.trunc(t/e)||0}function ws(t,e){return t%e||0}function Gd(t,e=1){return e*(.5+t/5)}function so(t){return Math.abs(t%1)===.5}var ks="iso8601",Kd="gregory",Gb={bce:-1,ce:0};function Xd(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 lt=void 0,Jd=0;function wt(t){return t===lt?"iso8601":t===0?"gregory":t.id}var Kb=/^M(\d{2})(L?)$/;function Qd(t){let e=Kb.exec(t);return e||D((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function eu(t,e){return"M"+xt(t)+(e?"L":"")}function rs(t,e,n){return t+(e||n&&t>=n?1:0)}var os={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Cs=Object.keys(os);var rr=Wi,or=Gi,fn=Ki,ir=Xi,sr=Ji,Gt=864e11,kt=[1,rr,or,fn,ir,sr,Gt],Xb=BigInt(rr),ba=BigInt(or),Ln=BigInt(fn),Jb=BigInt(ir),Qb=BigInt(sr),ye=BigInt(Gt);function tu(t,e){let n=Number(t/ye),a=Number(t%ye);return n*(Gt/e)+(Math.trunc(a/e)+a%e/e)}var $e=Cs.slice(0,6),lr=xo($e),wo=["year"],qn=["day"],Es=["day","month","year"],ko=["offset"],Ss=["timeZone"],fa=["era","eraYear"],ef=["era","eraYear","year"],nu=["month","monthCode"],tf=["day","month","monthCode"],is=Ne($e),nf=Ne(fa,wo),cr=Ne(nu,wo),au=Ne(fa,cr),dr=Ne(["monthCode"],wo),ru=Ne(fa,dr),ou=Ne(qn,["monthCode"]),Zn=Ne(qn,cr),$n=Ne(qn,fa,cr),iu=Ne(Zn,$e),su=Ne($n,$e),af=Ne(Zn,$e,ko),rf=Ne($n,$e,ko),lu=Ne(Zn,$e,ko,Ss),cu=Ne($n,$e,ko,Ss),of=Ne(qn,dr),sf=Ne(qn,fa,dr),Ge=ar($e,0);function ur(t){return Co(t,1),t}var lf={hour:23,minute:59,second:59};function Co(t,e){let n={};for(let a of $e)n[a]=_t(a,t[a],0,lf[a]||999,e);return n}function nt(t){return As(t)*fn+du(t)}function Ts(t){return 1e3*As(t)+t.millisecond}function As(t){return 3600*t.hour+60*t.minute+t.second}function du(t){return t.millisecond*or+t.microsecond*rr+t.nanosecond}function Ms(t){let[e,n]=zt(t,Gt);return[uu(n),e]}function uu(t){let[e,n]=zt(t,or),[a,r]=zt(n,rr);return cf(e,a,r)}function cf(t,e=0,n=0){let[a,r]=zt(t,36e5),[o,i]=zt(r,6e4),[s,l]=zt(i,1e3);return{hour:a,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function Dd(t){let[e,n]=ys(t,Ln);return[Number(e),Number(n)]}function ct(t){return un(t)+BigInt(nt(t))}function hu(t){return hr(t)+Ts(t)}function un(t){return BigInt(Pt(t))*ye}function hr(t){return 864e5*Pt(t)}function Pt(t){return Ka(t.year,t.month,t.day)}function Ka(t,e=1,n=1){let a=e-1;return t+=Math.floor(a/12),e=yo(a,12),Date.UTC(t%400-400,e,0)/864e5+146097*(ma(t,400)+1)+n}function pr(t){let[e,n]=ys(t,ye);return{...pu(Number(e)),...uu(Number(n))}}function pu(t){let e=new Date(864e5*yo(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var mu=1972;function df(t){return[t,0]}function ss(t,e){if(!e)return{year:1972,month:t}}function uf(t,e,n){return{year:t,month:e,day:n}}function bu(t,e){switch(e){case 2:return Eo(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function hf(t){return Eo(t)?366:365}function Eo(t){return t%4==0&&(t%100!=0||t%400==0)}function fu(t,e,n){return t+=ma(n,12),(e+=ws(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function pf(t,e,n,a){return 12*(n-t)+a-e}function So(t){return yo(Ka(t.year,t.month,t.day)+4,7)||7}function gu(t){return Ka(t.year,t.month,t.day)-Ka(t.year)+1}function vu(t){let e=t.year,n=Math.floor((gu(t)-So(t)+10)/7),a=es(e);return n<1?n=a=es(--e):n>a&&(n=1,a=es(++e)),{weekOfYear:n,yearOfWeek:e,Be:a}}function es(t){let e=So({year:t,month:1,day:1});return e===4||e===3&&Eo(t)?53:52}function mf({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function mr(t){return Kt(t),ur(t)}function Kt(t){return xu(t,1),t}function zd(t){return Yd(Es,t,xu(t))}function xu(t,e){let{year:n}=t,a=as(t,"month",1,12,e);return{year:n,month:a,day:as(t,"day",1,bu(n,a),e)}}function be(t,e){return t?t.ae(e):e}function Rn(t,e,n){return t?t.L(e,n):df(n)}function br(t,e){return t===0?mf(e):t&&t.h?.(e)||{}}function Fn(t,e,n,a){return t?t.de(e,n,a):uf(e,n,a)}function Xa(t,e){return t?t.j(e):12}function Ja(t,e,n){return t?t.o(e,n):bu(e,n)}function To(t,e){let{year:n,month:a}=be(t,e),[r,o]=Rn(t,n,a);return eu(r,o)}function Is(t,e){let{year:n}=be(t,e);return t?t.q(n):Eo(n)}function Ds(t,e){let{year:n}=be(t,e);return Xa(t,n)}function zs(t,e){let{year:n,month:a}=be(t,e);return Ja(t,n,a)}function _s(t,e){let{year:n}=be(t,e);return t?t.i(n):hf(n)}function yu(t,e){if(!t)return gu(e);let{year:n}=be(t,e),a=Fn(t,n,1,1);return Pt(e)-Pt(a)+1}function wu(t,e){return t===lt?vu(e).weekOfYear:void 0}function ku(t,e){return t===lt?vu(e).yearOfWeek:void 0}var we=Cs.map(t=>t+"s"),Os=xo(we),Cu=Ne(we),bf=we.slice(0,6),Eu=we.slice(6),ff=Eu.slice(1),De=ar(we,0),Ps=ar(bf,0),Ns=Je(Wb,we);function Su(t,e){return e==null&&D(tr(t)),e}var Fe=Je(gf,"string");function gf(t,e,n=t){return typeof e!==t&&le(fo(n,e)),e}function Bs(t,e="number"){return Number.isInteger(t)||D(((n,a)=>`Non-integer ${n}: ${a}`)(e,t)),t||0}function Ls(t){return typeof t=="symbol"&&le("Cannot convert Symbol to string"),String(t)}function Rs(t,e){return ia(t)?String(t):Fe(t,e)}function Ao(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&le(`Invalid bigint: ${t}`),t)}function Mo(t,e){return Bs(oo(t,e),e)}function Io(t,e){return typeof t=="string"?((n,a)=>{let r=Object.create(null);return r[n]=a,r})(e,t):Pn(t)}var Yt="smallestUnit";var vf={constrain:0,reject:1},xf={compatible:0,reject:1,earlier:2,later:3},yf={reject:0,use:1,prefer:2,ignore:3},wf={auto:0,never:1,critical:2,always:3},kf={auto:0,never:1,critical:2},Cf={auto:0,never:1},Ef={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Sf=[Math.floor,t=>so(t)?Math.floor(t):Math.round(t),Math.ceil,t=>so(t)?Math.ceil(t):Math.round(t),Math.trunc,t=>so(t)?Math.trunc(t)||0:Math.round(t),t=>t<0?Math.floor(t):Math.ceil(t),t=>Math.sign(t)*Math.round(Math.abs(t))||0,t=>so(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)],Tf={previous:-1,next:1};function Fs(t){let e=t.roundingIncrement;return e===void 0?1:Be(e,"roundingIncrement")}function Hs(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Ls(e)==="auto")return;D(fo("fractionalSecondDigits",e))}e=_t("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function Vs(t,e,n=0,a){let r=e[t];if(r===void 0)return a?n:void 0;if(r=Ls(r),r==="auto")return a?n:null;let o=os[r];return o===void 0&&(o=we.indexOf(r)),o<0&&D(Hd(t,r,os)),o}function gn(t,e,n,a=0){let r=n[t];if(r===void 0)return a;let o=Ls(r),i=e[o];return i===void 0&&D(Hd(t,o,e)),i}var ga=Je(Vs,Yt),Tu=Je(Vs,"largestUnit"),Af=Je(Vs,"unit"),Au=Je(gn,"overflow",vf),Mu=Je(gn,"disambiguation",xf),Mf=Je(gn,"offset",yf),js=Je(gn,"calendarName",wf),If=Je(gn,"timeZoneName",kf),Df=Je(gn,"offset",Cf),va=Je(gn,"roundingMode",Ef),zf=Je(gn,"direction",Tf);function qs(t,e,n,a){let r=a?Gt:kt[e+1];if(r){let o=kt[e];r%((t=_t("roundingIncrement",t,1,r/o-(a?0:1),1))*o)&&D(fo("roundingIncrement",t))}else t=_t("roundingIncrement",t,1,n?10**9:1,1);return t}function da(t,e,n,a){return e!=null&&_t(t,e,n,a,1,Cs),e}function Iu(t,e){e>t&&D("smallestUnit > largestUnit")}function xa(t,e,n,a=9,r=0,o=4){e=st(e);let i=Tu(e,r),s=Fs(e),l=va(e,o),c=ga(e,r,1);return i=da("largestUnit",i,r,a),c=da(Yt,c,r,a),i==null?i=Math.max(n,c):Iu(i,c),s=qs(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function fr(t,e=6,n){let a=Fs(t=Io(t,Yt)),r=va(t,7),o=ga(t);return o=Su(Yt,o),o=da(Yt,o,0,e),a=qs(a,o,void 0,n),[o,a,r]}function ue(t,e){return Ot(Es,t,Ot($e,e))}function re(t){return t===void 0?0:Au(Pn(t))}function ua(t,e=0){t=st(t);let n=Mu(t),a=Mf(t,e);return[Au(t),a,n]}var Du=BigInt(1e8)*ye,Zs=BigInt(-1e8)*ye,zu=Zs-ye,_u=-3261848;function Do(t){let e=12*t.year+t.month;return(e<_u||e>3309129)&&D(dn),t}function Ke(t,e=1){return Ou(un(t),e),t}function Un(t){let e=un(t);return Ou(e),e!==zu||nt(t)||D(dn),t}function Ou(t,e=1){(t<(e?zu:Zs)||t>Du)&&D(dn)}function Ct(t){return(t<Zs||t>Du)&&D(dn),t}function $s(t,e){return Ct(un(t)+BigInt(nt(t)-e))}function dt(t){return{epochNanoseconds:t}}function Et(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Nt(t,e){return Ot($e,t,fe(t,e))}function fe(t,e){return Ot(Es,t,{calendar:e})}function Yn(t){return Ot($e,t)}function Pe(t){return Ot(we,t,{sign:Ro(t)})}function gr(t){return e=t.epochNanoseconds,Number(Wd(e,ba));var e}function Us(t){return t.epochNanoseconds}function Pu(t,e,n){let a=mn(e),[r,o]=((u,m)=>{let p=m((u=Io(u,"unit")).relativeTo),b=Af(u);return b=Su("unit",b),[b,p]})(n,t),i=Math.max(r,a),s=o&&jn(o);if(!o&&la(i,s))return _d(e,r);if(o||D("Missing relativeTo"),!e.sign&&la(r,s))return 0;let[l,c,d]=Gu(o,e,r);return la(r,s)?_d(l,r):_f(l,c,r,d)}function _f(t,e,n,a){let r=Ro(t)||1,o=Ys(Ns(n,t),n,r,a,e),i=o.ee,s=o.te,l=Number(s-i),c=Number(e-i);return o.pe[we[n]]+c/l*r}function _d(t,e){return tu(Wt(t),kt[e])}function Ys(t,e,n,a,r){let o=we[e],i=t,s=0,l=Od(i,o,n,a);return r&&!((c,d,u,m)=>m>0?Ie(d,c)<=0&&Ie(c,u)<=0:Ie(u,c)<=0&&Ie(c,d)<=0)(r,l.ee,l.te,Math.sign(n))&&(i={...t,[o]:t[o]+n},s=1,l=Od(i,o,n,a)),{...l,pe:i,Ae:s}}function Od(t,e,n,a){let r={...t,[e]:t[e]+n};return{ee:ds(a,t),te:ds(a,r),se:r}}function Nu(t,e,n){let a=n-e,r=t-e;if(!r)return 0;let o=r<0n?-r:r,i=a<0n?-a:a,s=Ie(r,0n)===Ie(a,0n)?1:-1;return Ie(o,i)<=0?o===i?s:Gd(Ie(2n*o,i),s):Number(r)/Number(a)}function Bu(t,e,n,a){let{epochNanoseconds:r}=t,{timeZone:o,calendar:i}=t;if(e===0&&n===1)return{epochNanoseconds:r,timeZone:o,calendar:i};if(e===6){let s=ue(ze(t),Ge),l=ue(vn(s,1),Ge),c=hn(o,s),d=hn(o,l);r=Ws(Of(r,c,d),a)?d:c}else{let s=ze(t),l=s.offsetNanoseconds;r=wa(o,zo(s,ya(e,n),a),l,2,0,1)}return{epochNanoseconds:r,timeZone:o,calendar:i}}function Lu(t){let{timeZone:e}=t,n=ue(ze(t),Ge),a=ue(vn(n,1),Ge),r=hn(e,n);return tu(hn(e,a)-r,sr)}function Ru(t){let{timeZone:e,calendar:n}=t;return Et(hn(e,ue(ze(t),Ge)),e,n)}function Of(t,e,n){return Nu(t<n?t:n-1n,e,n)}function zo(t,e,n){let[a,r]=_o(t,e,n),o=ue(vn(t,r),a);return Un(o),o}function _o(t,e,n){return Ms(ha(nt(t),e,n))}function ho(t){return ha(t,ir,7)}function ya(t,e){return kt[t]*e}function vr(t,e){return BigInt(kt[t])*BigInt(e)}function Pf(t,e,n){let a=Math.min(mn(t),6);return pn(Po(Wt(t),BigInt(e),n),a)}function Oo(t,e,n,a,r,o,i,s){if(a===0&&r===1)return t;let l=Ro(t)||1,c=la(a,s)?s&&a<6&&n>=6?Bf:Nf:Lf,[d,u,m]=c(l,t,e,n,a,r,o,i);return m&&a!==7&&(d=((p,b,f,g,x,y)=>{for(let k=g+1;k<=f;k++){if(k===7&&f!==7)continue;let S=Ns(k,p);S[we[k]]+=x;let M=Ie(b,ds(y,S));if(M&&M!==x)break;p=S}return p})(d,u,n,Math.max(6,a),l,i)),d}function Po(t,e,n){return Fu(t,e,n,t/e%2n)}function No(t,e,n){let[a,r]=ys(t,ye),o=a*ye;return o+Fu(r,e,n,(o/e+r/e)%2n)}function Fu(t,e,n,a){let r=t/e,o=t%e,i=0;o&&(i=Gd(Ie(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=Ws(Number(a)+i,n);return(r-a+BigInt(s))*e}function ha(t,e,n){return Ws(t/e,n)*e}function Ws(t,e){return Sf[e](t)}function Nf(t,e,n,a,r,o,i){let s=Wt(e),l=Po(s,vr(r,o),i),c=l-s,d=Math.sign(Number(l/ye)-Number(s/ye))===t,u=pn(l,Math.min(a,6));return[{...e,...u},n+c,d]}function Bf(t,e,n,a,r,o,i,s){let l=Number(Wn(e)),c=ya(r,o),d=ha(l,c,i),u=Ys({...e,...Ps},6,t,s,n),m=u.ee,p=u.te,b=d-Number(p-m),f=0;b&&Math.sign(b)!==t?n=m+BigInt(d):(f+=t,d=ha(b,c,i),n=p+BigInt(d));let g=Fo(d);return[{...e,...g,days:e.days+f},n,!!f]}function Lf(t,e,n,a,r,o,i,s){let l=we[r],c=Ns(r,e);r===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=ma(e[l],o)*o;c[l]=d;let u=Ys(c,r,o*t,s,n),m=u.ee,p=u.te,b=Nu(n,m,p),f=u.pe[l],g=u.se[l],x=ha(f+b*t*o,o,i),y=x===g;return c[l]=x,[c,y?p:m,u.Ae||y]}function Hu(t,e){return t.timeZone.O(t.epochNanoseconds,(n=>{let a=Io(n,"direction"),r=zf(a,0);return r||D(fo("direction",r)),r})(e))}var ze=ca(Rf,WeakMap);function Rf(t){let{epochNanoseconds:e,timeZone:n}=t,a=n.B(e);return{...pr(e+BigInt(a)),offsetNanoseconds:a}}function wa(t,e,n,a=0,r=0,o,i){if(n!==void 0&&a===1&&(a===1||i))return $s(e,n);a!==2&&a!==0||Ke(e,0);let s=t.N(e);if(n!==void 0&&a!==3){let l=((c,d,u,m)=>{let p=ct(d);m&&(u=ho(u));for(let b of c){let f=Number(p-b);if(m&&(f=ho(f)),f===u)return b}})(s,e,n,o);if(l!==void 0)return l;a===0&&D("Invalid TimeZone offset")}return i?ct(e):ka(t,e,r,s)}function ka(t,e,n=0,a=t.N(e)){if(a.length===1)return a[0];if(n===1&&D("Ambiguous offset"),a.length)return a[n===3?1:0];let r=ct(e),o=((s,l)=>{let c=s.B(l-ye);return(d=>(d>Gt&&D("Out-of-bounds TimeZone gap"),d))(s.B(l+ye)-c)})(t,r),i=pr(r+BigInt(o*(n===2?-1:1)));return(a=t.N(i))[n===2?0:a.length-1]}function hn(t,e){let n=t.N(e);if(n.length)return n[0];let a=ct(e)-ye;return t.O(a,1)}function Gs(t,e,n,a,r){let o=re(r);a.sign&&mn(a)<8&&D("Cannot use small units");let i=Ke(Qa(e,n));return Qa(e,Vu(e,i,t?He(a):a,o))}function Ks(t,e){return Ct(t+(ll(n=e)&&D("Cannot use large units"),Wn(n)));var n}function Hn(t,e,n){let{calendar:a,epochNanoseconds:r,timeZone:o}=t,i=Wn(e),s=r;if(ll(e)){let l=ze(t);s=ka(o,ue(Ca(a,l,{...e,...Ps},n),l))+i}else s+=i,re(n);return{...t,epochNanoseconds:Ct(s)}}function Vn(t,e,n,a){let[r,o]=Bo(e,n);return Un(ue(Ca(t,e,{...n,...Ps,days:n.days+o},a),r))}function Ca(t,e,n,a){if(n.years||n.months||n.weeks)return Vu(t,e,n,re(a));re(a);let r=n.days+Number(Wn(n)/ye);return r?Ke(vn(e,r)):e}function Qa(t,e){return vn(e,1-be(t,e).day)}function Bo(t,e){let n=Wn(e),a=Number(n/ye),r=Number(n%ye),[o,i]=Ms(nt(t)+r);return[o,a+i]}function vn(t,e){return e?pu(Pt(t)+e):t}function Vu(t,e,n,a){let{years:r,months:o,weeks:i,days:s}=n,l;if(s+=Number(Wn(n)/ye),r||o)l=ls(t,e,r,o,a);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=vn(l,7*i+s)),Ke(l)}function ls(t,e,n,a,r){let o=be(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=Rn(t,i,s);i+=n,s=cs(t,c,d,t?t.p(i):void 0,r),s=_t("month",s,1,Xa(t,i),r)}return a&&({year:i,month:s}=t?t.K(i,s,a):fu(i,s,a)),l=_t("day",l,1,Ja(t,i,s),r),Fn(t,i,s,l)}function cs(t,e,n,a,r){if(n){let o=t?t.l:void 0;return a!==void 0&&(o<0||a===e+1)?a:(r===1&&D(Bn),o<0?-o:e)}return rs(e,0,a)}function Xt(t,e){return wt(t)!==wt(e)&&D("Mismatching Calendars"),t}function Ff(t,e){return t.m!==e.m&&D("Mismatching TimeZones"),t}function ju(t){return t.timeZone.id}function Xs(t,e,n,a){let[r,o,i,s]=xa(t,a,3,5),l=Lo(e.epochNanoseconds,n.epochNanoseconds,r,o,i,s);return Pe(t?He(l):l)}function Js(t,e,n,a,r){let[o,i,s,l]=xa(t,r,5),c=n.epochNanoseconds,d=a.epochNanoseconds,u;if(Ie(d,c))if(o<6)u=Lo(c,d,o,i,s,l);else{let m=Ff(n.timeZone,a.timeZone);u=al(m,e,n,a,o),u=Oo(u,d,o,i,s,l,Wu(e,m,n),1)}else u=De;return Pe(t?He(u):u)}function Qs(t,e,n,a,r){let[o,i,s,l]=xa(t,r,6),c=ct(n),d=ct(a),u=Ie(d,c),m;return u?o<=6?m=Lo(c,d,o,i,s,l):(m=$u(e,n,a,u,o),m=Oo(m,d,o,i,s,l,Vf(e,n))):m=De,Pe(t?He(m):m)}function el(t,e,n,a,r){let[o,i,s,l]=xa(t,r,6,9,6);return qu(t,e,n,a,o,i,s,l)}function tl(t,e,n,a,r){let[o,i,s,l]=xa(t,r,9,9,8),c=Qa(e,n),d=Qa(e,a);return Uu(c,d)?qu(t,e,Ke(c),Ke(d),o,i,s,l,8):Pe(De)}function qu(t,e,n,a,r,o,i,s,l=6){let c=un(n),d=un(a),u;return Ie(d,c)?r===6?u=Lo(c,d,r,o,i,s):(u=rl(e,n,a,r),o===l&&i===1||(u=Oo(u,d,r,o,i,s,Yu(e,n)))):u=De,Pe(t?He(u):u)}function nl(t,e,n,a){let[r,o,i,s]=xa(t,a,5,5),l=ha(nt(n)-nt(e),ya(o,i),s),c={...De,...Fo(l,r)};return Pe(t?He(c):c)}function al(t,e,n,a,r){let o=Ie(a.epochNanoseconds,n.epochNanoseconds);if(!o)return De;if(r<6)return{...De,...pn(a.epochNanoseconds-n.epochNanoseconds,r)};if(!Uu(ze(n),ze(a)))return{...De,...pn(a.epochNanoseconds-n.epochNanoseconds,5)};let[i,s,l]=Hf(t,n,a,o);return{...r===6?{...De,days:co(i,s)}:rl(e,i,s,r),...Fo(l)}}function Zu(t,e,n,a){let r=ct(e),o=ct(n),i=Ie(o,r);return i?a<=6?{...De,...pn(o-r,a)}:$u(t,e,n,i,a):De}function $u(t,e,n,a,r){let o=n,i=nt(n)-nt(e);return Math.sign(i)===-a&&(o=vn(n,-a),i+=Gt*a),{...rl(t,e,o,r),...Fo(i)}}function rl(t,e,n,a){if(a<=7){let f=co(e,n);return a===7?{...De,weeks:ma(f,7),days:ws(f,7)}:{...De,days:f}}let r=be(t,e),o=be(t,n);if(a===8){let{year:f,month:g,day:x}=r,{year:y,month:k,day:S}=o,M=Math.sign(Ut(y,f)||Ut(k,g)||co(e,n)),N=0,B=0;if(M){N=t?t._(f,g,y,k):pf(f,g,y,k);let C=ls(t,e,0,N,0);M*Ut(x,S)>0&&(N-=M,C=ls(t,e,0,N,0)),B=co(C,n)}return{...De,months:N,days:B}}let{year:i,month:s,day:l}=r,{year:c,month:d,day:u}=o,m=c-i,p=d-s,b=u-l;if(m||p){let f=Math.sign(m||p),g=Ja(t,c,d),x=0;if(Math.sign(u-l)===-f){let y=g;({year:c,month:d}=t?t.K(c,d,-f):fu(c,d,-f)),m=c-i,p=d-s,g=Ja(t,c,d),x=f<0?-y:g}if(b=u-Math.min(l,g)+x,m){let[y,k]=Rn(t,i,s),[S,M]=Rn(t,c,d),N=t?t.l:void 0;if(p=N!==void 0&&k&&!M&&(N<0?f>0&&S===-N:f<0&&S===y)?0:S-y||Number(M)-Number(k),Math.sign(p)===-f){let B=f<0&&-Xa(t,c);c-=f,m=c-i,p=d-cs(t,y,k,t?t.p(c):void 0,0)+(B||Xa(t,c))}else if(t){let B=cs(t,y,k,t.p(c),0);p=t._(c,B,c,d)}}}return{...De,years:m,months:p,days:b}}function Uu(t,e){return Ut(t.year,e.year)||Ut(t.month,e.month)||Ut(t.day,e.day)}function Hf(t,e,n,a){let r=ze(e),o=ze(n),i=n.epochNanoseconds,s=0,l=nt(o)-nt(r);Math.sign(l)===-a&&s++;let c=s+(a>0?1:0);for(;s<=c;s++){let d=vn(o,s*-a),u=ka(t,ue(d,r));if(Ie(i,u)!==-a)return[r,d,Number(i-u)]}}function Lo(t,e,n,a,r,o){return{...De,...pn(Po(e-t,vr(a,r),o),n)}}function co(t,e){return Pt(e)-Pt(t)}function Yu(t,e){return{origin:e,ie:un(e),calendar:t,he:un}}function Vf(t,e){return{origin:e,ie:ct(e),calendar:t,he:n=>ct(ue(n,e))}}function Wu(t,e,n){let a=ze(n);return{origin:a,ie:n.epochNanoseconds,calendar:t,he:r=>ka(e,ue(r,a))}}function ds(t,e){return ll(e)?t.he(Ca(t.calendar,t.origin,e)):t.ie}function Gu(t,e,n){let{calendar:a}=t;if(jn(t)){let{timeZone:i}=t,s=Hn(t,e);return[al(i,a,t,s,n),s.epochNanoseconds,Wu(a,i,t)]}let r=Un(ue(t,Ge)),o=Vn(a,r,e);return[Zu(a,r,o,n),ct(o),Yu(a,t)]}function Pd(t,e){return jn(t)?Hn(t,e).epochNanoseconds:ct(Vn(t.calendar,ue(t,Ge),e))}function jn(t){return"timeZone"in t}function la(t,e){return t<=6-(e?1:0)}function ol(t,e,n){let a={};for(let r=e;r>=0;r--){let o=kt[r];a[n[r]]=ma(t,o),t=ws(t,o)}return a}var jf=2**53;function il(t,e,n,a,r){let o=t(st(r).relativeTo),i=Math.max(mn(n),mn(a));return la(i,o&&jn(o))?qf(e,n,a,i):(o||D("Missing relativeTo"),e&&(a=He(a)),Pe(((s,l,c,d)=>{let{calendar:u}=s;if(jn(s)){let{timeZone:b}=s,f=Hn(s,l);return al(b,u,s,Hn(f,c),d)}let m=ue(s,Ge),p=Vn(u,m,l);return Zu(u,m,Vn(u,p,c),d)})(o,n,a,i)))}function qf(t,e,n,a){return Pe(xn(((r,o,i,s)=>{let l=Wt(r)+Wt(o)*BigInt(s?-1:1);return Number.isFinite(Number(l/ye))||D(dn),{...De,...pn(l,i)}})(e,n,a,t)))}function Ku(t,e,n){let a=mn(e),[r,o,i,s,l]=((b,f,g)=>{b=Io(b,Yt);let x=Tu(b),y=g(b.relativeTo),k=Fs(b),S=va(b,7),M=ga(b);return x===void 0&&M===void 0&&D("Required smallestUnit or largestUnit"),M==null&&(M=0),x==null&&(x=Math.max(M,f)),Iu(x,M),k=qs(k,M,1),k>1&&M>5&&x!==M&&D("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[x,M,k,S,y]})(n,a,t);if(!l&&Math.max(a,r)<=6)return Pe(xn(((b,f,g,x,y)=>{let k=Po(Wt(b),vr(g,x),y);return{...De,...pn(k,f)}})(e,r,o,i,s)));let c=l&&jn(l),d=c&&r>=6&&o<6;if(!e.sign&&!d)return e;l||D("Missing relativeTo");let[u,m,p]=Gu(l,e,r);return Pe(Oo(u,m,r,o,i,s,p,c))}function Xu(t){return t.sign===-1?sl(t):t}function sl(t){return Pe(He(t))}function He(t){let e={};for(let n of we)e[n]=-1*t[n]||0;return e}function Ro(t,e=we){let n=0;for(let a of e){let r=Math.sign(t[a]);r&&(n&&n!==r&&D("Cannot mix duration signs"),n=r)}return n}function xn(t){for(let n of ff)_t(n,t[n],-4294967295,4294967295,1);let e=Wt(t);return Ju(Number(e/Ln)),t}function Ju(t){Number.isSafeInteger(t)||D("Out-of-bounds duration")}function Wt(t){return BigInt(t.days)*ye+Wn(t)}function Wn(t){return BigInt(t.hours)*Qb+BigInt(t.minutes)*Jb+Qu(t)}function Qu(t){return BigInt(t.seconds)*Ln+BigInt(t.milliseconds)*ba+BigInt(t.microseconds)*Xb+BigInt(t.nanoseconds)}function pn(t,e=6){let n=Number(t/ye),a=Number(t%ye),r=kt[e],o=e<=3?Number(t/BigInt(r)):n*(Gt/r)+ma(a,r);Number.isFinite(o)||D(dn),e<=3&&Math.abs(o)/(fn/kt[e])>=jf&&D(dn);let i=ol(a,e,we);return i[we[e]]=o,i}function Fo(t,e=5){return ol(t,e,we)}function ll(t){return!!Ro(t,Eu)}function mn(t){let e=9;for(;e>0&&!t[we[e]];e--);return e}function xr(t,e){return Ie(t.epochNanoseconds,e.epochNanoseconds)}function eh(t,e,n,a){let r=t(st(a).relativeTo),o=Math.max(mn(e),mn(n));return Yd(we,e,n)?0:la(o,r&&jn(r))?Ie(Wt(e),Wt(n)):(r||D("Missing relativeTo"),Ie(Pd(r,e),Pd(r,n)))}function cl(t,e){return Gn(t,e)||Ho(t,e)}function Gn(t,e){return Ut(Pt(t),Pt(e))}function Ho(t,e){return Ut(nt(t),nt(e))}function th(t,e){return!xr(t,e)}function nh(t,e){return!xr(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function ah(t,e){return!cl(t,e)&&t.calendar===e.calendar}function rh(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function oh(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function ih(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function sh(t,e){return!Ho(t,e)}function Ea(t){return t===0?Gb:t?t.k:void 0}function Ue(t,e,n=e){return Ea(t)?n:e}function dl(t,e){let n=t||void 0,a=Ea(t),{era:r,eraYear:o,year:i}=e;if(i!==void 0&&(i=Be(i,"year")),o!==void 0&&(o=Be(o,"eraYear")),r!==void 0||o!==void 0){r!==void 0&&o!==void 0||le("Mismatching era/eraYear"),a||D("Forbidden era/eraYear");let s=Xd(r),l=a[s];l===void 0&&D((d=>`Invalid era: ${d}`)(r));let c=n?.$?n.$(o,s,l):Zf(o,l);i!==void 0&&i!==c&&D("Mismatching year/eraYear"),i=c}else i===void 0&&le(go(a));return i}function po(t,e,n,a,r){let{month:o,monthCode:i}=e;if(i!==void 0){let s=((l,c,d,u,m=Qd(c))=>{let p=l?l.p(d):void 0,[b,f]=m,g=rs(b,f,p);if(f){let x=l?l.l:void 0;x===void 0&&D(Bn),x>0?(g>x&&D(Bn),p!==g&&(u===1&&D(Bn),g=rs(b,0,p))):(g!==-x&&D(Bn),p===void 0&&u===1&&D(Bn))}return g})(t,i,n,a,r);o!==void 0&&o!==s&&D("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&le("Missing month/monthCode");return _t("month",o,1,Xa(t,n),a)}function us(t,e,n,a,r){return as(e,"day",1,Ja(t,a,n),r)}function Zf(t,e){return(e+t)*(Math.sign(e)||1)||0}function yr(t,e){return Co(Ot($e,{...Ge,...t}),e)}var $f=pa("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Vo(t){let e=ul(t);return e===void 0&&D($d(t)),e}function ul(t,e){let n=$f.exec(t);if(n&&(a=>(r=>{r[0]!=="T"&&r[0]!=="t"||(r=r.slice(1));let o=r.search(/[.,]/),i=o<0?r:r.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))})(a.slice(1)))(n[0]))return((a,r)=>{let o=a[4]||a[5];return r&&o&&D($t(o)),s=(sa(a[2])*sr+sa(a[3])*ir+sa(a[4])*fn+vs(a[5]||""))*xs(a[1]),Math.abs(s)>=Gt&&D("Out-of-bounds offset"),s;var s})(n,e)}var ut={era:Rs,month:io,monthCode(t,e){if(typeof t=="string")return t;if(t&&typeof t=="object"){let n=t.toString;if(typeof n=="function")return Fe(n.call(t),e)}return Fe(t,e)},day:io},hl=ar($e,Be),lh=ar(we,Mo),pl=Object.assign({},ut,hl),ml={offset(t){return Vo(Rs(t))},...pl};function Se(t,e,n,a,r=!a){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 a&&a.includes(s)&&le(tr(s))}return r&&!i&&le(Rd(e)),o}function wr(t,e=Ge,n){let a=ue(t,e);return Un(a),Nt(a,n)}function er(t,e,n){return ch(t,e,dh(t,e),re(n))}function jo(t,e,n){let a=dh(t,e),r=n();return[ch(t,e,a,r[0]),...r]}function ch(t,e,n,a){let r=n[1],o=po(t,e,r,a,n[0]);return fe(Ke(Fn(t,r,o,us(t,e,o,r,a))),t)}function bl(t){if(t.monthCode!==void 0)return Qd(t.monthCode)}function dh(t,e){let n=Ea(t);return e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||le(go(n)),e.monthCode===void 0&&e.month===void 0&&le("Missing month/monthCode"),e.day===void 0&&le(tr("day")),[bl(e),dl(t,e)]}function fl(t,e,n){let a=Ea(t);e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||le(go(a)),e.monthCode===void 0&&e.month===void 0&&le("Missing month/monthCode");let r=bl(e),o=dl(t,e);return fe(Do(Fn(t,o,po(t,e,o,re(n),r),1)),t)}function gl(t,e,n){let a=t===lt,r=Ea(t);e.day===void 0&&le(tr("day")),a||e.month===void 0||e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||le(go(r));let o=bl(e),i=e.eraYear!==void 0||e.year!==void 0?dl(t,e):void 0,s=re(n),l,c,d;if(i===void 0&&a&&(i=1972),i!==void 0){a||Ke(Fn(t,i,1,1));let b=po(t,e,i,s,o);l=us(t,e,b,i,s),[c,d]=Rn(t,i,b)}else{e.monthCode===void 0&&le("Missing month/monthCode"),[c,d]=o;let b=t?t.ne:1972;if(b!==void 0)l=us(t,e,po(t,e,b,s,o),b,s);else{let f=s===0&&t?t.fe?.(c,d,e.day):void 0;l=f!==void 0?f:e.day}}d&&((t&&t.U?.[c])??1/0)<e.day&&(s===1&&D(Bn),d=0,l=fs(e.day,1,(t&&t.R)??1/0));let u=t?t.u(c,!!d,l):ss(c,!!d);for(;!u&&s===0&&l>1;)l--,u=t?t.u(c,!!d,l):ss(c,!!d);u||D("Cannot guess year");let{year:m,month:p}=u;return fe(Ke(Fn(t,m,p,l)),t)}var Bt=Intl.DateTimeFormat;function Uf(t,e){e<-864e13&&D(dn);let n=t.formatToParts(e),a={};for(let r of n)a[r.type]=r.value;return a}var Yf={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},ts=-388152e4;function uh(t,e=4){let n=Hs(t),a=va(t,4),r=ga(t);return[a,...xl(da(Yt,r,0,e),n)]}function vl(t){return js(st(t))}function hh(t,e){return uh(st(t),e)}function xl(t,e){return t!=null?[kt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function yl(t,e,n){let[a,r,o,i]=(l=>{let c=Hs(l=st(l)),d=va(l,4),u=ga(l);return[l.timeZone,d,...xl(da(Yt,u,0,4),c)]})(n),s=a!==void 0;return((l,c,d,u,m,p)=>{d=No(d,BigInt(m),u);let b=c.B(d);return Al(pr(d+BigInt(b)),p)+(l?kr(ho(b)):"Z")})(s,Qe(s?t(a):"UTC"),e.epochNanoseconds,r,o,i)}function wl(t,e){let n=(a=>{a=st(a);let r=js(a),o=Hs(a),i=Df(a),s=va(a,4),l=ga(a);return[r,If(a),i,s,...xl(da(Yt,l,0,4),o)]})(e);return((a,r,o,i,s,l,c,d,u,m)=>{i=No(i,BigInt(u),d);let p=o.B(i);return Al(pr(i+BigInt(p)),m)+kr(ho(p),c)+Kf(r,l)+Ml(a,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function kl(t,e){let n=(a=>(a=st(a),[js(a),...uh(a)]))(e);return((a,r,o,i,s,l)=>Al(zo(r,s,i),l)+Ml(a,o))(t.calendar,t,...n)}function Cl(t,e){return n=t.calendar,a=t,r=vl(e),mo(a)+Ml(n,r);var n,a,r}function El(t,e){return ph(t.calendar,mh,t,vl(e))}function Sl(t,e){return ph(t.calendar,Gf,t,vl(e))}function ph(t,e,n,a){let r=a>1||a===0&&t!==lt;return a===1?t===lt?e(n):mo(n):r?mo(n)+fh(wt(t),a===2):e(n)}function Tl(t,e){return((n,a,r,o)=>bh(_o(n,r,a)[0],o))(t,...hh(e))}function qo(t,e){let[n,a,r]=hh(e,3);return a>1&&xn(t={...t,...Pf(t,a,n)}),Wf(t,r)}function Wf(t,e){let{sign:n}=t,a=n===-1?He(t):t,{hours:r,minutes:o}=a,i=Qu(a),s=Number(i/Ln),l=Number(i%Ln);Ju(s);let c=Il(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+Nd({Y:Nn(a.years),M:Nn(a.months),W:Nn(a.weeks),D:Nn(a.days)})+(r||o||s||d?"T"+Nd({H:Nn(r),M:Nn(o),S:Nn(s,d)+c}):"")}function Nd(t){let e=[];for(let n in t){let a=t[n];a&&e.push(a,n)}return e.join("")}function Nn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function Al(t,e){return mo(t)+"T"+bh(t,e)}function mo(t){return mh(t)+"-"+xt(t.day)}function mh(t){let{year:e}=t;return(e<0||e>9999?gh(e)+uo(6,Math.abs(e)):uo(4,e))+"-"+xt(t.month)}function Gf(t){return xt(t.month)+"-"+xt(t.day)}function bh(t,e){let n=[xt(t.hour),xt(t.minute)];return e!==-1&&n.push(xt(t.second)+((a,r,o,i)=>Il(a*or+r*rr+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function kr(t,e=0){if(e===1)return"";let[n,a]=zt(Math.abs(t),sr),[r,o]=zt(a,ir),[i,s]=zt(o,fn);return gh(t)+xt(n)+":"+xt(r)+(i||s?":"+xt(i)+Il(s):"")}function Kf(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Ml(t,e){return e>1||e===0&&t!==lt?fh(wt(t),e===2):""}function fh(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var Xf=/0+$/;function Il(t,e){let n=uo(9,t);return n=e===void 0?n.replace(Xf,""):n.slice(0,e),n?"."+n:""}function gh(t){return t<0?"-":"+"}var Jf=/^(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$/,Qf=/[^\w\/:+-]+/;function vh(t){return Zo(Fe(t))}function Zo(t){return xh(t).id}function xh(t){let e=t.toUpperCase(),n=(r=>{let o=ul(r,1);if(o!==void 0)return{id:kr(o),X:o,m:o}})(e);if(n)return{kind:"fixed",...n};let a=e==="UTC"?"UTC":(r=>(Qf.test(r)&&D(bs(r)),Jf.test(r)&&D("Forbidden ICU TimeZone"),r.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?Id(s).replace(/island|noronha|murdo|rivadavia|urville/,Id):s)).join("/")))(t);return eg(a)}var eg=ca(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=tg(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),tg=ca(t=>new Bt("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Qe(t){let e=xh(t);return ng(e.id,e)}var ng=ca((t,e)=>e.kind==="named"?new ps(t,e.m,e.format):new hs(t,e.m,e.kind==="fixed"?e.X:0)),hs=class{constructor(e,n,a){this.id=e,this.m=n,this.X=a}B(){return this.X}N(e){return[$s(e,this.X)]}O(){}},ps=class{constructor(e,n,a){this.id=e,this.m=n,this.ke=((r,o)=>{let i=ca(r),s=ca(ag),l=86400*o;function c(u){let[m,p]=Ld(u,l),b=lo(m),f=lo(p),g=i(b),x=i(f);return g===x?g:d(s(b,f),g,x,u)}function d(u,m,p,b){let f,g;for(;(b===void 0||(f=b<u[0]?m:b>=u[1]?p:void 0)===void 0)&&(g=u[1]-u[0]);){let x=u[0]+Math.floor(g/2);r(x)===p?u[1]=x:u[0]=x+1}return f}return{xe(u){let m=c(u-86400),p=c(u+86400),b=u-m,f=u-p;if(m===p)return[b];let g=c(b);return g===c(f)?[u-g]:m>p?[b,f]:[]},we:c,O:function u(m,p){if(p>0&&m>=864e10)return;if(p<0){if(m<=ts)return;let S=Bd()+94867200;if(m>S)return u(S,-1)}let b=p>0?Math.max(m,ts):m,[f,g]=Ld(b,l),x=l*p,y=p>0?Math.max(m,Bd())+94867200:ts,k=()=>p<0?g>y:f<y;for(;k();){let S=lo(f),M=lo(g),N=i(S),B=i(M);if(N!==B){let C=s(S,M);d(C,N,B);let I=C[0];if((Ut(I,m)||1)===p)return I}f+=x,g+=x}}}})((r=>o=>{let i=Uf(r,1e3*o);return 86400*Ka((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&Xd(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})(a),(r=>{let o=r.split("/").pop();return Yf[o]||60})(e))}B(e){return this.ke.we((n=>Dd(n)[0])(e))*fn}N(e){let n=86400*Pt(e)+As(e),a=du(e);return this.ke.xe(n).map(r=>Ct(BigInt(r)*Ln+BigInt(a)))}O(e,n){let[a,r]=Dd(e),o=this.ke.O(a+(n>0||r?1:0),n);if(o!==void 0)return BigInt(o)*Ln}};function Bd(){return Math.floor(Date.now()/1e3)}function ag(t,e){return[t,e]}function Ld(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function lo(t){return fs(t,-1e10,864e10)}function yh(t,e,n){let a=Se(n,Ue(e,lu,cu),ml,[],0);if(a.timeZone!==void 0){let r=er(e,a),o=yr(a),i=Qe(t(a.timeZone));return{epochNanoseconds:wa(i,ue(r,o),a.offset),timeZone:i,calendar:e}}return er(e,a)}function wh(t,e,n,a){let r=Se(n,Ue(e,lu,cu),ml,Ss,0),o=t(r.timeZone),[i,s,l,c]=jo(e,r,()=>ua(a)),d=yr(r,s),u=Qe(o);return Et(wa(u,ue(i,d),r.offset,l,c),u,e)}function kh(t,e,n){let a=Se(e,Ue(t,iu,su),pl,[],0),[r,o]=jo(t,a,()=>[re(n)]);return wr(r,yr(a,o),t)}function Ch(t,e,n,a=[]){return er(t,Se(e,Ue(t,Zn,$n),ut,a),n)}function Eh(t,e,n,a){return fl(t,Se(e,Ue(t,cr,au),ut,a),n)}function Sh(t,e,n,a){let r=Se(n,Ue(t,Zn,$n),ut,qn,0);return e&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),gl(t,r,a)}function Th(t,e){return yr(Se(t,is,hl,[],1),re(e))}function Ah(t){let e=Se(t,Cu,lh);return Pe(xn({...De,...e}))}function yt(t){D($d(t))}function Mh(t){let e=yn(t=Rs(t)),n;return e||yt(t),e.C?n=0:e.offset?n=Vo(e.offset):yt(t),e.timeZoneId&&ul(e.timeZoneId,1),mr(e),dt($s(e,n))}function Ih(t,e){let n=yn(Fe(t));return n||yt(t),n.timeZoneId?Fh(n,e,void 0):(n.C&&yt(t),ms(n,e))}function Dh(t,e,n){let a=yn(Fe(t));return a&&a.timeZoneId||yt(t),Fh(a,e,n)}function zh(t,e){let n=yn(Fe(t));return n&&!n.C||yt(t),Hh(n,e)}function _h(t,e){let n=_l(zl(Fe(t)),void 0,e);return fe(n,n.calendar)}function Oh(t,e){let n=Ol(Fe(t));if(n)return Dl(n),fe(Do(Kt(n)),e(n.calendarId));let a=_l(zl(t),rg,e),{calendar:r}=a;return fe(Qa(r,a),r)}function Dl(t){t.calendarId!=="iso8601"&&D($t(t.calendarId))}function Ph(t,e){let n=Pl(Fe(t));if(n)return Dl(n),fe(Kt(n),e(n.calendarId));let a=_l(zl(t),og,e),{calendar:r}=a,{year:o,month:i,day:s}=be(r,a),[l,c]=Rn(r,o,i),{year:d,month:u}=((m,p,b,f)=>{let g=m?m.u(p,b,f):ss(p,b);return g||D("Cannot guess year"),g})(r,l,c,s);return fe(Ke(Fn(r,d,u,s)),r)}function Nh(t){let e=(a=>{let r=Vh(a);return r?(Cr(r[13]),jh(r,1)):void 0})(t=Fe(t));if(!e){let a=yn(t);a&&a.re||yt(t),a.C&&D($t("Z")),Dl(a),e=a}let n;return(n=Ol(t))&&zd(n)&&yt(t),(n=Pl(t))&&zd(n)&&yt(t),Yn(ur(e))}function Bh(t){let e=hg.exec(Fe(t));return e||yt(t),Pe(xn((n=>{let a=0,r=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),...ol(o,2,we)};return a||D(Rd(we)),xs(n[1])<0&&(i=He(i)),i;function s(l,c,d){let u=0,m=0;return d&&([u,o]=zt(o,kt[d])),l!==void 0&&(r&&D($t(l)),m=(p=>{let b=parseInt(p);return Number.isFinite(b)||D($t(p)),b})(l),a=1,c&&(o=vs(c)*(kt[d]/fn),r=1)),u+m}})(e)))}function Lh(t){let e=yn(t)||Ol(t)||Pl(t);if(e)return e.calendarId;let n=Vh(t);return n?Cr(n[13]).calendarId:t}function Rh(t){let e=yn(t);return e&&(e.timeZoneId||e.C&&"UTC"||e.offset)||t}function zl(t){let e=yn(t);return e&&!e.C||yt(t),e}function _l(t,e,n){return e&&t.calendarId==="iso8601"?(Kt(t),t.re&&ur(t),ms(e(t),n)):t.re?Hh(t,n):ms(t,n)}function rg(t){let e=12*t.year+t.month===_u?20:1;return{...t,day:e}}function og(t){return{...t,year:1972}}function Fh(t,e,n){let a=Qe(Zo(t.timeZoneId)),r;if(mr(t),t.re){let i=t.offset?Vo(t.offset):void 0,[,s,l]=ua(n);r=wa(a,t,i,s,l,!(a.X||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.C)}else ua(n),r=hn(a,t);var o;return Ct(r),Et(r,a,e(t.calendarId))}function Hh(t,e){return mr(t),Un(t),{...ue(t,t),calendar:e(t.calendarId)}}function ms(t,e){return Kt(t),Ke(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function bo(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var ig="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+bo(8)+"(Z|([+-])"+bo(15)+")?)?",sg=pa("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),lg=pa("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),cg=pa(ig+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),dg=pa("T?"+bo(2)+`(([+-])${bo(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),ug=new RegExp("\\[(!?)([^\\]]*)\\]","g"),hg=pa("([+-])?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 yn(t){let e=cg.exec(t);return e?(n=>{let a=n[12],r=(a||"").toUpperCase()==="Z";return{year:qh(n),month:parseInt(n[5]),day:parseInt(n[6]),...jh(n,7),...Cr(n[19]),re:!!n[7],C:r,offset:r?void 0:a}})(e):void 0}function Ol(t){let e=sg.exec(t);if(e)return(n=>({year:qh(n),month:parseInt(n[4]),day:1,...Cr(n[5])}))(e)}function Pl(t){let e=lg.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...Cr(n[3])}))(e):void 0}function Vh(t){let e=dg.exec(t);if(e)return e[6]&&Vo(e[6]),e}function jh(t,e){let n=sa(t[e+3]);return{...Ms(vs(t[e+4]||""))[0],hour:sa(t[e]),minute:sa(t[e+2]),second:n===60?59:n}}function qh(t){let e=xs(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&D($t(-0)),e*n}function Cr(t){let e,n,a=[];return t.replace(ug,(r,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(a.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&D($t(r)):(n&&D($t(r)),n=l),""}),a.length>1&&e&&D($t(t)),{timeZoneId:n,calendarId:a[0]||"iso8601"}}function Sa(t,e,n){let a=Object.assign(Object.create(null),e);return ns(a,n,nu),Ea(t)&&(ns(a,n,ef),t&&t.ge&&ns(a,n,tf,fa)),a}function ns(t,e,n,a){let r=0,o=[];for(let i of n)e[i]!==void 0?r=1:o.push(i);if(Object.assign(t,e),r)for(let i of a||o)delete t[i]}function Zh(t,e,n){let{calendar:a,timeZone:r}=t,o=Ue(a,af,rf),i=ze(t),{year:s,month:l,day:c}=be(a,i),d={year:s,monthCode:Er(a,s,l),day:c,hour:i.hour,minute:i.minute,second:i.second,millisecond:i.millisecond,microsecond:i.microsecond,nanosecond:i.nanosecond,offset:i.offsetNanoseconds},u=Se(e,o,ml),m=Sa(a,d,u),p={...d,...u},[b,f,g,x]=jo(a,m,()=>ua(n,2));return Et(wa(r,ue(b,Co(p,f)),p.offset,g,x),r,a)}function $h(t,e,n){let{calendar:a}=t,r=Ue(a,iu,su),{year:o,month:i,day:s}=be(a,t),l={year:o,monthCode:Er(a,o,i),day:s,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,microsecond:t.microsecond,nanosecond:t.nanosecond},c=Se(e,r,pl),d=Sa(a,l,c),u={...l,...c},[m,p]=jo(a,d,()=>[re(n)]);return wr(m,Co(u,p),a)}function Uh(t,e,n){let{calendar:a}=t,r=Ue(a,Zn,$n),{year:o,month:i,day:s}=be(a,t);return er(a,Sa(a,{year:o,monthCode:Er(a,o,i),day:s},Se(e,r,ut)),n)}function Yh(t,e,n){let{calendar:a}=t,r=Ue(a,cr,au),{year:o,month:i}=be(a,t);return fl(a,Sa(a,{year:o,monthCode:Er(a,o,i)},Se(e,r,ut)),n)}function Wh(t,e,n){let{calendar:a}=t,r=Ue(a,Zn,$n),{year:o,month:i,day:s}=be(a,t);return gl(a,Sa(a,{monthCode:Er(a,o,i),day:s},Se(e,r,ut)),n)}function Gh(t,e,n){return((a,r,o)=>yr({...Ot(is,a),...Se(r,is,hl)},re(o)))(t,e,n)}function Kh(t,e){return Pe((n=t,a=e,xn({...n,...Se(a,Cu,lh)})));var n,a}function Er(t,e,n){let[a,r]=Rn(t,e,n);return eu(a,r)}function Xh(t,e,n){return Et(t.epochNanoseconds,e,n)}function Jh(t){return dt(t.epochNanoseconds)}function Nl(t){return Nt(ze(t),t.calendar)}function Bl(t){return fe(ze(t),t.calendar)}function Ll(t){return Yn(ze(t))}function Qh(t,e,n){let a=ka(e,t,(r=>Mu(st(r)))(n));return Et(Ct(a),e,t.calendar)}function ep(t,e,n,a){let r=t(a.timeZone),o=a.plainTime,i=o!==void 0?e(o):void 0,s=Qe(r),l;return l=i?ka(s,ue(n,i)):hn(s,ue(n,Ge)),Et(l,s,n.calendar)}function tp(t,e,n){return op(t,Ot(Ue(t,dr,ru),e),Se(Pn(n),qn,ut,[]))}function np(t,e,n){let a=Ue(t,wo,nf);return op(t,Ot(ou,e),Se(Pn(n),a,ut,[]))}function ap(t,e){return gl(t,Se(e,ou,ut))}function rp(t,e,n){return fl(t,Se(e,Ue(t,dr,ru),ut),n)}function op(t,e,n){let a=Ue(t,of,sf),r=Sa(t,e,n);return r=Se(r,a,ut,[]),er(t,r)}function ip(t){return dt(Ct(BigInt(Mo(t))*ba))}function sp(t){return dt(Ct(Ao(t)))}function Ta(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function lp(t,e){return t.timeZone!==void 0&&le("Cannot specify TimeZone"),t.timeZone=e,t}function Aa(t,e,n){let a=t.resolvedOptions().calendar;!n&&e.calendar===lt||wt(e.calendar)===a||D("Mismatching Calendars")}function Kn(t,e,n,a,r){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,m={},p={},b={},f=0,g=0;for(let I of Object.keys(l)){let R=l[I];R===void 0||s.has(I)||(o.has(I)?I==="dateStyle"?d=R:I==="timeStyle"?u=R:m[I]=R:I==="era"?p[I]=R:i.has(I)?I==="dateStyle"||I==="timeStyle"?g=1:f=1:b[I]=R)}let x=d!==void 0,y=u!==void 0,k=x||y,S=Object.keys(m).length>0,M=f||g,N=S||x||y,B=Object.keys(p).length>0;(!c&&M||c&&M&&!N||k&&(S||B||f))&&le("Invalid formatting options");let C={};return k||N||Object.assign(C,a),Object.assign(C,m,p,b),x&&(r?Object.assign(C,r[d]):C.dateStyle=d),y&&(C.timeStyle=u),C}}var cp={year:"numeric",month:"numeric",day:"numeric"},dp={hour:"numeric",minute:"numeric",second:"numeric"},Rl=Object.assign({},cp,dp),Fl=["weekday","year","month","day","dateStyle"],Sr=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],Hl=Fl.concat(Sr),pg=["weekday","day"].concat(Sr),mg=["weekday","year"].concat(Sr),up=Kn(Hl,[],[],Rl),hp=Kn(Hl,[],[],{...Rl,timeZoneName:"short"}),pp=Kn(Hl,[],["timeZoneName"],Rl),mp=Kn(Fl,Sr,["timeZoneName"],cp),bp=Kn(Sr,Fl,["timeZoneName","era"],dp),fp=Kn(["year","month","dateStyle"],pg,["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"}}),gp=Kn(["month","day","dateStyle"],mg,["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 vp(t,e){let{timeZone:n}=t,a=ze(t),{offsetNanoseconds:r}=a,o=e||Ge,i;return i=e?wa(n,ue(a,o),r,2):hn(n,ue(a,o)),Et(i,n,t.calendar)}function $o(t){let e=Uo(),n=t.B(e);return pr(e+BigInt(n))}function Uo(){return BigInt(Date.now())*ba}function Ma(){return new Bt().resolvedOptions().timeZone}var Vl="PlainYearMonth",jl="PlainMonthDay",ql="PlainDate",Zl="PlainDateTime",$l="PlainTime",Ul="ZonedDateTime",Yl="Instant",Wl="Duration";function Jt(t,e,n,...a){return Object.defineProperties(e,Ud(t)),Object.defineProperties(e.prototype,nr("Temporal."+t)),Object.defineProperties(e.prototype,bn(r=>({get(){return r(n(this))},configurable:1}),Object.assign({},...a))),e}var Qt=gs.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:gs;function en(){le(jd)}function tn(){le(Vd)}var yp={era(t){return br(t.calendar,t).era},eraYear(t){return br(t.calendar,t).eraYear},year(t){return be(t.calendar,t).year},month(t){return be(t.calendar,t).month},monthCode(t){return To(t.calendar,t)}},Yo={era(t){return br(t.calendar,t).era},eraYear(t){return br(t.calendar,t).eraYear},year(t){return be(t.calendar,t).year},month(t){return be(t.calendar,t).month},monthCode(t){return To(t.calendar,t)},day(t){return be(t.calendar,t).day}},wp={monthCode(t){return To(t.calendar,t)},day(t){return be(t.calendar,t).day}},Gl={daysInMonth(t){return zs(t.calendar,t)},daysInYear(t){return _s(t.calendar,t)},monthsInYear(t){return Ds(t.calendar,t)},inLeapYear(t){return Is(t.calendar,t)}},Tr={dayOfWeek(t){return So(t)},dayOfYear(t){return yu(t.calendar,t)},weekOfYear(t){return wu(t.calendar,t)},yearOfWeek(t){return ku(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return zs(t.calendar,t)},daysInYear(t){return _s(t.calendar,t)},monthsInYear(t){return Ds(t.calendar,t)},inLeapYear(t){return Is(t.calendar,t)}};function xp(t){return xo(Object.keys(t))}xp(Gl),xp(Tr);function En(t){let e=Fe(t).toLowerCase();return e===ks?lt:e===Kd?Jd:void D(Zd(t,"temporal-polyfill/full"))}function Ir(t=ks){return En(t)}var Cp=new WeakMap,Ep=Jt(Ul,class{constructor(t,e,n=void 0){let a=Ct(Ao(t)),r=Qe(vh(e)),o=Ir(n);Sp(this,Et(a,r,o))}static from(t,e=void 0){return et(Ia(t,e))}static compare(t,e){return xr(Ia(t),Ia(e))}get calendarId(){return wt(se(this).calendar)}get timeZoneId(){return se(this).timeZone.id}get epochMilliseconds(){return gr(se(this))}get epochNanoseconds(){return Us(se(this))}get offset(){return kr(ze(se(this)).offsetNanoseconds)}get offsetNanoseconds(){return ze(se(this)).offsetNanoseconds}get hoursInDay(){return Lu(se(this))}with(t,e=void 0){return et(Zh(se(this),Pa(t),e))}withCalendar(t){return et({...se(this),calendar:Ko(t)})}withTimeZone(t){return et({...se(this),timeZone:Qe(mt(t))})}withPlainTime(t=void 0){return et(vp(se(this),Ql(t)))}add(t,e=void 0){let n=se(this);return et(Hn(n,Re(t),e))}subtract(t,e=void 0){let n=se(this);return et(Hn(n,He(Re(t)),e))}until(t,e=void 0){let n=se(this),a=Ia(t),r=Xt(n.calendar,a.calendar);return _e(Pe(Js(0,r,n,a,e)))}since(t,e=void 0){let n=se(this),a=Ia(t),r=Xt(n.calendar,a.calendar);return _e(Pe(Js(1,r,n,a,e)))}round(t){let e=se(this),[n,a,r]=fr(t);return et(Bu(e,n,a,r))}startOfDay(){return et(Ru(se(this)))}equals(t){return nh(se(this),Ia(t))}toInstant(){return nn(Jh(se(this)))}toPlainDateTime(){return Lt(Nl(se(this)))}toPlainDate(){return Rt(Bl(se(this)))}toPlainTime(){return Cn(Ll(se(this)))}toLocaleString(t=void 0,e={}){let n=se(this),a=new Bt(t,lp(hp(e),ju(n)));return Aa(a,n),a.format(gr(n))}toString(t=void 0){return wl(se(this),t)}toJSON(){return wl(se(this))}getTimeZoneTransition(t){let e=se(this),n=Hu(e,t);return n?et({...e,epochNanoseconds:n}):null}valueOf(){return tn()}},bg,Yo,Tr,lr);function et(t){return Sp(Object.create(Ep.prototype),t)}function se(t){return Ft(t)||en()}function bg(t){let e=se(t);return{...ze(e),calendar:e.calendar}}function Ft(t){return Cp.get(t)}function Ia(t,e){if(Xe(t)){let n=Ft(t);if(n)return ua(e),n;let a=Dr(t);return wh(mt,a,t,e)}return Dh(t,En,e)}function Sp(t,e){return Cp.set(t,e),Qt(t),t}function mt(t){if(Xe(t)){let e=Ft(t);return e||le(bs(t)),e.timeZone.id}return(e=>Zo(Rh(Fe(e))))(t)}var Tp=new WeakMap,Ap=Jt(Yl,class{constructor(t){let e=Ct(Ao(t));Ip(this,dt(e))}static from(t){return nn(Da(t))}static fromEpochMilliseconds(t){return nn(ip(t))}static fromEpochNanoseconds(t){return nn(sp(t))}static compare(t,e){return xr(Da(t),Da(e))}get epochMilliseconds(){return gr(ht(this))}get epochNanoseconds(){return Us(ht(this))}add(t){let e=ht(this);return nn(dt(Ks(e.epochNanoseconds,Re(t))))}subtract(t){let e=ht(this);return nn(dt(Ks(e.epochNanoseconds,He(Re(t)))))}until(t,e=void 0){return _e(Xs(0,ht(this),Da(t),e))}since(t,e=void 0){return _e(Xs(1,ht(this),Da(t),e))}round(t){let e=ht(this),[n,a,r]=fr(t,5,1);return nn(dt(No(e.epochNanoseconds,vr(n,a),r)))}equals(t){return th(ht(this),Da(t))}toZonedDateTimeISO(t){return et(Xh(ht(this),Qe(mt(t))))}toLocaleString(t=void 0,e={}){let n=ht(this);return new Bt(t,up(e)).format(gr(n))}toString(t=void 0){return yl(mt,ht(this),t)}toJSON(){return yl(mt,ht(this))}valueOf(){return tn()}});function nn(t){return Ip(Object.create(Ap.prototype),t)}function ht(t){return Xl(t)||en()}function Xl(t){return Tp.get(t)}function Da(t){if(Xe(t)){let e=Xl(t);if(e)return e;let n=Ft(t);if(n)return dt(n.epochNanoseconds)}return Mh(t)}var{toTemporalInstant:Mp}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return nn(dt(BigInt(Bs(t))*ba))}};function Ip(t,e){return Tp.set(t,e),Qt(t),t}var Dp=new WeakMap,zp=Jt(jl,class{constructor(t,e,n=void 0,a){let r=Be(t),o=Be(e),i=Ir(n),s=Be(a??mu),l=Ke(Kt({year:s,month:r,day:o}));_p(this,fe(l,i))}static from(t,e=void 0){return Kl(kp(t,e))}get calendarId(){return wt(wn(this).calendar)}with(t,e=void 0){return Kl(Wh(wn(this),Pa(t),e))}equals(t){return ih(wn(this),kp(t))}toPlainDate(t){let e=wn(this);return Rt(np(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=wn(this),a=new Bt(t,Ta(gp(e)));return Aa(a,n,1),a.format(hr(n))}toString(t=void 0){return Sl(wn(this),t)}toJSON(){return Sl(wn(this))}valueOf(){return tn()}},wn,wp);function Kl(t){return _p(Object.create(zp.prototype),t)}function wn(t){return Wo(t)||en()}function Wo(t){return Dp.get(t)}function kp(t,e){if(Xe(t)){let a=Wo(t);if(a)return re(e),a;let r=$p(t);return Sh(r===void 0?lt:r,r===void 0,t,e)}let n=Ph(t,En);return re(e),n}function _p(t,e){return Dp.set(t,e),Qt(t),t}var Op=new WeakMap,Pp=Jt(Vl,class{constructor(t,e,n=void 0,a){let r=Be(t),o=Be(e),i=Ir(n),s=Be(a??1),l=Do(Kt({year:r,month:o,day:s}));Np(this,fe(l,i))}static from(t,e=void 0){return Mr(za(t,e))}static compare(t,e){return Gn(za(t),za(e))}get calendarId(){return wt(pt(this).calendar)}with(t,e=void 0){return Mr(Yh(pt(this),Pa(t),e))}add(t,e=void 0){let n=pt(this);return Mr(fe(Gs(0,n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=pt(this);return Mr(fe(Gs(1,n.calendar,n,Re(t),e),n.calendar))}until(t,e=void 0){let n=pt(this),a=za(t),r=Xt(n.calendar,a.calendar);return _e(tl(0,r,n,a,e))}since(t,e=void 0){let n=pt(this),a=za(t),r=Xt(n.calendar,a.calendar);return _e(tl(1,r,n,a,e))}equals(t){return oh(pt(this),za(t))}toPlainDate(t){let e=pt(this);return Rt(tp(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=pt(this),a=new Bt(t,Ta(fp(e)));return Aa(a,n,1),a.format(hr(n))}toString(t=void 0){return El(pt(this),t)}toJSON(){return El(pt(this))}valueOf(){return tn()}},pt,yp,Gl);function Mr(t){return Np(Object.create(Pp.prototype),t)}function pt(t){return Go(t)||en()}function Go(t){return Op.get(t)}function za(t,e){if(Xe(t)){let a=Go(t);if(a)return re(e),a;let r=Dr(t);return Eh(r,t,e)}let n=Oh(t,En);return re(e),n}function Np(t,e){return Op.set(t,e),Qt(t),t}function fg(t){if(!Xe(t))return;let e=Xl(t);return e?[Yl,e]:(e=Ft(t),e?[Ul,e]:(e=Xn(t),e?[Zl,e]:(e=Na(t),e?[ql,e]:(e=Jl(t),e?[$l,e]:(e=Go(t),e?[Vl,e]:(e=Wo(t),e?[jl,e]:(e=ec(t),e?[Wl,e]:void 0)))))))}function Pa(t){return(fg(t)||t.calendar!==void 0||t.timeZone!==void 0)&&le(Fd),t}var Bp=new WeakMap,Lp=Jt($l,class{constructor(t=0,e=0,n=0,a=0,r=0,o=0){let i=ur(bn(Be,{hour:t,minute:e,second:n,millisecond:a,microsecond:r,nanosecond:o}));Rp(this,Yn(i))}static from(t,e=void 0){return Cn(kn(t,e))}static compare(t,e){return Ho(kn(t),kn(e))}with(t,e=void 0){return Cn(Gh(St(this),Pa(t),e))}add(t){let e=St(this);return Cn(Bo(e,Re(t))[0])}subtract(t){let e=St(this);return Cn(Bo(e,He(Re(t)))[0])}until(t,e=void 0){return _e(nl(0,St(this),kn(t),e))}since(t,e=void 0){return _e(nl(1,St(this),kn(t),e))}round(t){let e=St(this),[n,a,r]=fr(t,5);return Cn(_o(e,ya(n,a),r)[0])}equals(t){return sh(St(this),kn(t))}toLocaleString(t=void 0,e={}){let n=St(this);return new Bt(t,Ta(bp(e))).format(Ts(n))}toString(t=void 0){return Tl(St(this),t)}toJSON(){return Tl(St(this))}valueOf(){return tn()}},St,lr);function Cn(t){return Rp(Object.create(Lp.prototype),t)}function St(t){return Jl(t)||en()}function Jl(t){return Bp.get(t)}function kn(t,e){if(Xe(t)){let a=Jl(t);if(a)return re(e),a;let r=Xn(t);if(r)return re(e),Yn(r);let o=Ft(t);return o?(re(e),Ll(o)):Th(t,e)}let n=Nh(t);return re(e),n}function Ql(t){return t===void 0?void 0:kn(t)}function Rp(t,e){return Bp.set(t,e),Qt(t),t}var Fp=new WeakMap,Hp=Jt(Zl,class{constructor(t,e,n,a=0,r=0,o=0,i=0,s=0,l=0,c=void 0){let d=Un(mr(bn(Be,{year:t,month:e,day:n,hour:a,minute:r,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=Ir(c);Vp(this,Nt(d,u))}static from(t,e=void 0){return Lt(_a(t,e))}static compare(t,e){let n=_a(t),a=_a(e);return cl(n,a)}get calendarId(){return wt(Le(this).calendar)}with(t,e=void 0){return Lt($h(Le(this),Pa(t),e))}withCalendar(t){let e=Le(this);return Lt(Nt(e,Ko(t)))}withPlainTime(t=void 0){let e=Le(this);return Lt(wr(e,Ql(t),e.calendar))}add(t,e=void 0){let n=Le(this);return Lt(Nt(Vn(n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=Le(this);return Lt(Nt(Vn(n.calendar,n,He(Re(t)),e),n.calendar))}until(t,e=void 0){let n=Le(this),a=_a(t),r=Xt(n.calendar,a.calendar);return _e(Qs(0,r,n,a,e))}since(t,e=void 0){let n=Le(this),a=_a(t),r=Xt(n.calendar,a.calendar);return _e(Qs(1,r,n,a,e))}round(t){let e=Le(this),[n,a,r]=fr(t);return Lt(Nt(zo(e,ya(n,a),r),e.calendar))}equals(t){return ah(Le(this),_a(t))}toZonedDateTime(t,e=void 0){return et(Qh(Le(this),Qe(mt(t)),e))}toPlainDate(){let t=Le(this);return Rt(fe(t,t.calendar))}toPlainTime(){return Cn(Yn(Le(this)))}toLocaleString(t=void 0,e={}){let n=Le(this),a=new Bt(t,Ta(pp(e)));return Aa(a,n),a.format(hu(n))}toString(t=void 0){return kl(Le(this),t)}toJSON(){return kl(Le(this))}valueOf(){return tn()}},Le,Yo,Tr,lr);function Lt(t){return Vp(Object.create(Hp.prototype),t)}function Le(t){return Xn(t)||en()}function Xn(t){return Fp.get(t)}function _a(t,e){if(Xe(t)){let a=Xn(t);if(a)return re(e),a;let r=Na(t);if(r)return re(e),Nt(ue(r,Ge),r.calendar);let o=Ft(t);if(o)return re(e),Nl(o);let i=Dr(t);return kh(i,t,e)}let n=zh(t,En);return re(e),n}function Vp(t,e){return Fp.set(t,e),Qt(t),t}var jp=new WeakMap,qp=Jt(ql,class{constructor(t,e,n,a=void 0){let r=Ke(Kt(bn(Be,{year:t,month:e,day:n}))),o=Ir(a);Zp(this,fe(r,o))}static from(t,e=void 0){return Rt(Oa(t,e))}static compare(t,e){return Gn(Oa(t),Oa(e))}get calendarId(){return wt(Ve(this).calendar)}with(t,e=void 0){let n=Ve(this);return Rt(Uh(n,Pa(t),e))}withCalendar(t){let e=Ve(this);return Rt(fe(e,Ko(t)))}add(t,e=void 0){let n=Ve(this);return Rt(fe(Ca(n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=Ve(this);return Rt(fe(Ca(n.calendar,n,He(Re(t)),e),n.calendar))}until(t,e=void 0){let n=Ve(this),a=Oa(t),r=Xt(n.calendar,a.calendar);return _e(el(0,r,n,a,e))}since(t,e=void 0){let n=Ve(this),a=Oa(t),r=Xt(n.calendar,a.calendar);return _e(el(1,r,n,a,e))}equals(t){return rh(Ve(this),Oa(t))}toZonedDateTime(t){let e=Xe(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t};return et(ep(mt,kn,Ve(this),e))}toPlainDateTime(t=void 0){let e=Ve(this);return Lt(wr(e,Ql(t),e.calendar))}toPlainYearMonth(){let t=Ve(this);return Mr(rp(t.calendar,this))}toPlainMonthDay(){let t=Ve(this);return Kl(ap(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=Ve(this),a=new Bt(t,Ta(mp(e)));return Aa(a,n),a.format(hr(n))}toString(t=void 0){return Cl(Ve(this),t)}toJSON(){return Cl(Ve(this))}valueOf(){return tn()}},Ve,Yo,Tr);function Rt(t){return Zp(Object.create(qp.prototype),t)}function Ve(t){return Na(t)||en()}function Na(t){return jp.get(t)}function Oa(t,e){if(Xe(t)){let a=Na(t);if(a)return re(e),a;let r=Xn(t);if(r)return re(e),fe(r,r.calendar);let o=Ft(t);if(o)return re(e),Bl(o);let i=Dr(t);return Ch(i,t,e)}let n=_h(t,En);return re(e),n}function Zp(t,e){return jp.set(t,e),Qt(t),t}function Dr(t){let e=$p(t);return e===void 0?lt:e}function $p(t){let{calendar:e}=t;if(e!==void 0)return Ko(e)}function Ko(t){if(Xe(t)){let e=Na(t)||Xn(t)||Ft(t)||Wo(t)||Go(t);return e||le(qd(t)),e.calendar}return(e=>En(Lh(Fe(e))))(t)}var Up=new WeakMap,Yp=Jt(Wl,class{constructor(t=0,e=0,n=0,a=0,r=0,o=0,i=0,s=0,l=0,c=0){let d=xn(bn(Mo,{years:t,months:e,weeks:n,days:a,hours:r,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));Wp(this,Pe(d))}static from(t){return _e(Re(t))}static compare(t,e,n=void 0){return eh(Ar,Re(t),Re(e),n)}get sign(){return at(this).sign}get blank(){return!at(this).sign}with(t){return _e(Kh(at(this),t))}negated(){return _e(sl(at(this)))}abs(){return _e(Xu(at(this)))}add(t,e=void 0){return _e(il(Ar,0,at(this),Re(t),e))}subtract(t,e=void 0){return _e(il(Ar,1,at(this),Re(t),e))}round(t){return _e(Ku(Ar,at(this),t))}total(t){return Pu(Ar,at(this),t)}toLocaleString(t=void 0,e){let n=at(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):qo(n,e)}toString(t=void 0){return qo(at(this),t)}toJSON(){return qo(at(this))}valueOf(){return tn()}},at,Os);function _e(t){return Wp(Object.create(Yp.prototype),t)}function at(t){return ec(t)||en()}function ec(t){return Up.get(t)}function Re(t){return Xe(t)?ec(t)||Ah(t):Bh(t)}function Ar(t){if(t!==void 0){if(Xe(t)){let e=Ft(t);if(e)return e;let n=Na(t);if(n)return n;let a=Xn(t);if(a)return fe(a,a.calendar);let r=Dr(t);return yh(mt,r,t)}return Ih(t,En)}}function Wp(t,e){return Up.set(t,e),Qt(t),t}var gg=Object.defineProperties({},{...nr("Temporal.Now"),...vo({timeZoneId(){return Ma()},instant(){return nn(dt(Uo()))},zonedDateTimeISO(t=Ma()){let e=Qe(mt(t));return et(Et(Uo(),e))},plainDateTimeISO(t=Ma()){let e=$o(Qe(mt(t)));return Lt(Nt(e))},plainDateISO(t=Ma()){let e=$o(Qe(mt(t)));return Rt(fe(e))},plainTimeISO(t=Ma()){let e=$o(Qe(mt(t)));return Cn(Yn(e))}})}),Gp=Object.defineProperties({},{...nr("Temporal"),...vo({PlainYearMonth:Pp,PlainMonthDay:zp,PlainDate:qp,PlainTime:Lp,PlainDateTime:Hp,ZonedDateTime:Ep,Instant:Ap,Duration:Yp,Now:gg})});var Te=Yi||Gp;var Zx=Yi?Date.prototype.toTemporalInstant:Mp;var Xo=class extends P{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,a){if(e==="value"){this.applyFormValue(a);return}e==="data-focus"&&this.focusCell(a)}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 a=n.dataset.date;a&&this.requestSelect(a)};requestSelect(e){let n=this.currentIso();if(e===n)return;let a=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!a||(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=this.#t;if(n.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??n.find(i=>i.tabIndex===0)??null;if(!a?.dataset.date)return;let r=null;switch(e.key){case"Home":case"End":{let i=n.indexOf(a);if(i<0)return;let s=i-i%7;r=n[e.key==="Home"?s:s+6]?.dataset.date??null;break}default:{let i=Te.PlainDate.from(a.dataset.date),s;switch(e.key){case"ArrowLeft":s=i.subtract({days:1});break;case"ArrowRight":s=i.add({days:1});break;case"ArrowUp":s=i.subtract({days:7});break;case"ArrowDown":s=i.add({days:7});break;case"PageUp":s=i.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":s=i.add({[e.shiftKey?"years":"months"]:1});break;default:return}r=s.toString()}}if(!r)return;e.preventDefault();let o=n.find(i=>i.dataset.date===r);o&&!o.hasAttribute("disabled")&&o.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:r}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,a){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:a}})),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 Kp(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Xo)}Kp();var Jo=class extends ea{ariaProp="ariaChecked"};function Xp(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",Jo)}Xp();var Qo=class extends P{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(a=>[...a.addedNodes,...a.removedNodes].some(r=>r.nodeName==="A-RADIO"||r.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,a){this.sync(),e==="state"&&this.alive&&a!==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,a=n.find(o=>o.value===e&&e!=null)??null,r=a?a.value:null;this.internals?.setFormValue(r,r);for(let o of n)o.selected=o===a;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=a)};requestSelect(e){let n=this.#e;if(e===n)return;let a=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||a&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,a,r){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:r,detail:{next:e,prev:n,reason:a}}))}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)return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let a=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){a&&n.includes(a)&&(e.preventDefault(),this.requestSelect(a.value));return}let r=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!r&&!o)return;e.preventDefault();let i=a?n.indexOf(a):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(r?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function Jp(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",Qo)}Jp();var Tt=class extends P{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals.states.add("active"):this.internals.states.delete("active"))}get active(){return this.internals?.states.has("active")??!1}connectedCallback(){tc(this.doc)}},vg="a-menu-item, a[data-anta-menu-item]";function zr(t){return t instanceof Tt||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function tc(t){t.hasKeyListenerForAMenuItem||(Wr(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?.(vg)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function Qp(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",Tt)}Qp();var G=4,ei=96,xg=130,yg=130,wg=500,kg='a-button, button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',Cg="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",Eg="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",Z=[],ni=!1,Ba=null,nc=null;function Sg(t,e){ni||(t.addEventListener("pointerdown",am,!0),t.addEventListener("keydown",im,!0),t.addEventListener("keyup",sm,!0),t.addEventListener("contextmenu",rm,!0),e.addEventListener("resize",om),Ba=t,nc=e,ni=!0)}function tm(){ni&&(Ba?.removeEventListener("pointerdown",am,!0),Ba?.removeEventListener("keydown",im,!0),Ba?.removeEventListener("keyup",sm,!0),Ba?.removeEventListener("contextmenu",rm,!0),nc?.removeEventListener("resize",om),Ba=null,nc=null,ni=!1)}function nm(t,e=!1){let n=t.composedPath();for(let a of Z){if(n.includes(a.surface))return!0;let r=a.triggerAnchor;if(r&&!(e&&a.hasAttribute("context"))&&n.includes(r))return!0}return!1}function Tg(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 Ag(t){for(let e of Z)if(e.contains(t)||e.surface.contains(t))return!0;return!1}Ic({isOpen:()=>Z.length>0,contains:Ag});function am(t){Z.length&&(nm(t,t.button===0)||ac(t))}function rm(t){Z.length&&(nm(t)||ac(t))}function om(){Z.length&&ac()}function im(t){let e=Z[Z.length-1];e&&e.handleKey(t)}function sm(t){let e=Z[Z.length-1];e&&e.handleKeyUp(t)}function ac(t){Z[0]?.requestClose(t)}function Mg(){for(let t=Z.length-1;t>=0;t--){let e=Z[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}Z.length=0,tm()}var ti=new WeakMap;function Ig(t){for(let e of t){let n=ti.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var em=typeof IntersectionObserver<"u"?new IntersectionObserver(Ig,{root:null,rootMargin:"0px",threshold:0}):null,ai=class extends P{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;typeBuffer="";typeTimer;activeItem=null;comboObserver;#e;#t;#n;#a;#r=new Set;#o=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch{}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
828
+ `,Cd=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=Zb;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let a=document.createElement("div");a.className="field",a.part.add("field");let r=document.createElement("slot");r.name="leading",r.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"),a.append(r,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,a,document.createElement("slot"),l),t})(),ro=class extends O{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","aria-label","required"];#e;#t;#n;#a;#r=!1;#o=!1;#u=!1;#h="";#l=null;#c=null;#s=null;#d=[];#x=[];#p;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(!Cd)throw new Error("a-input-time requires a DOM document");e.append(Cd.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#d[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#W),this.#t=e.querySelector(".field"),this.#a=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#C),this.#a.addEventListener("input",this.#I),this.#a.addEventListener("keydown",this.#S),this.#a.addEventListener("focusin",this.#m),this.#a.addEventListener("focusout",this.#k),this.#a.addEventListener("paste",this.#M),this.addEventListener(Vb,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#f(e)}else this.#u||this.#f(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#y(),this.#r=!0}#f(e){this.#O(e),this.#h=this.value}attributeChangedCallback(e,n,a){if(this.#r){if(e==="value"){a!==null&&(this.value=a);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#y();return}if(e==="status"){this.#U();return}if(e==="disabled"){this.#Z();return}if(e==="min"||e==="max"){this.#$();return}if(e==="aria-label"){this.#q();return}if(e==="required"){this.#$();return}}}}get#b(){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.#b,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#y(){let e=this.#g,n=this.#b,a=this.#h,r=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});r=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=r.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{r=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#i=o,this.#w=i,this.#a.replaceChildren(),this.#d=[],this.#x=[];for(let s of r)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,kd(this.#i),kd(this.#w));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.#a.append(l),this.#d.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.#a.append(l),this.#x.push(s.value)}this.#O(a),this.#q(),this.#U(),this.#Z(),this.#E({dispatch:!1})}#i="AM";#w="PM";#v(e){if(e instanceof HTMLInputElement)return this.#d.find(n=>n.el===e)}#C=e=>{let n=this.#v(e.target);if(n){this.#p=n.el;return}(e.target===this.#t||e.target===this.#a)&&(e.preventDefault(),this.#H(this.#d[0]))};#m=e=>{let n=this.#v(e.target);if(!n)return;let a=this.#p===n.el;this.#p=void 0,a||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#k=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#d.some(a=>a.el===n)||(this.#B()&&this.#E(),this.#L("change"))})};#S=e=>{let n=this.#v(e.target);if(!n)return;let{el:a}=n,r=e.key;if(r==="ArrowUp"||r==="ArrowDown"){e.preventDefault(),this.#A(n,r==="ArrowUp"?1:-1);return}if(r==="PageUp"||r==="PageDown"){e.preventDefault(),this.#A(n,(r==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(r==="ArrowLeft"||r==="ArrowRight"){let o=a.selectionStart??0,i=a.selectionEnd??o;(r==="ArrowLeft"?o===0&&i===0:o===a.value.length&&i===a.value.length)&&(e.preventDefault(),this.#j(),this.#D(n,r==="ArrowRight"?1:-1));return}if(r==="Backspace"&&a.value===""){e.preventDefault(),this.#D(n,-1);return}n.kind!=="period"&&this.#x.some(o=>o.includes(r))&&(e.preventDefault(),this.#j(),this.#D(n,1,{numeric:!0}))};#M=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#O(n),this.#E(),this.#L("change"))};#I=e=>{let n=this.#v(e.target);!n||e.isComposing||(n.kind==="period"?this.#P(e,n):this.#T(n))};#T(e){let{el:n}=e,a=n.value.replace(/\D/g,"");a!==n.value&&(n.value=a);let r=e.kind==="hour"&&this.#g,o=r?23:e.max;if(a===""){e.kind==="hour"?this.#l=null:this.#c=null,this.#E({dispatch:!1,preserve:n});return}let i=a.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;r?s===0&&i.length===1?this.#l=null:s===0?(this.#l=12,this.#s="am"):s>12?(this.#l=s-12,this.#s="pm"):(this.#l=s,this.#s==null&&(this.#s="am")):this.#R(e,Math.max(e.min,s)),this.#E({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#D(e,1)}#P(e,n){let{el:a}=n,r=a.value.trim();if(!r){this.#s=null,this.#E({dispatch:!1,preserve:a});return}let o=r.toLowerCase(),i=this.#i.toLowerCase(),s=this.#w.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#s=l,this.#E({dispatch:!1}),this.#D(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#s=null,this.#E({dispatch:!1,preserve:a});return}e.stopPropagation(),a.value=this.#s==="pm"?this.#w:this.#s==="am"?this.#i:""}#A(e,n){if(e.kind==="period"){this.#s=this.#s==null?"am":this.#s==="am"?"pm":"am",this.#B(),this.#E();return}let a=e.kind==="hour"?this.#l:this.#c,r=e.max-e.min+1,o;a==null?o=n>0?e.min:e.max:o=((a-e.min+n)%r+r)%r+e.min,this.#R(e,o),this.#B(),this.#E()}#R(e,n){e.kind==="hour"?this.#l=n:this.#c=n,e.kind==="hour"&&this.#g&&this.#s==null&&(this.#s="am")}#z(e){let n=wd(e);return n?n.h*60+n.min:null}get#_(){return this.#z(this.getAttribute("min"))}get#F(){return this.#z(this.getAttribute("max"))}#N(){let e=this.#V;return e==null||this.#c==null?null:e*60+this.#c}#B(){let e=this.#N();if(e==null)return!1;let n=this.#_,a=this.#F,r=e;return n!=null&&r<n&&(r=n),a!=null&&r>a&&(r=a),r===e?!1:(this.#O(`${Wa(Math.floor(r/60))}:${Wa(r%60)}`),!0)}#H(e){e&&(e.el.focus(),e.el.select())}#D(e,n,a={}){let r=this.#d.indexOf(e);for(let o=r+n;o>=0&&o<this.#d.length;o+=n){let i=this.#d[o];if(!a.numeric||i.kind!=="period"){this.#H(i);return}}}get#V(){return this.#l==null?null:this.#g?this.#s==null?null:qb(this.#l,this.#s):this.#l}#E({dispatch:e=!0,preserve:n}={}){this.#j(n),this.#h=this.value,this.#e?.setFormValue(this.value),this.#G(),this.#$(),e&&this.#L("input")}#j(e){for(let n of this.#d)this.#Y(n,e===n.el)}#Y(e,n){let a=e.el;if(e.kind==="period"){let o=this.#s==="pm"?this.#w:this.#s==="am"?this.#i:"";n||(a.value=o),a.placeholder=this.#i;return}let r=e.kind==="hour"?this.#l:this.#c;n||(a.value=r==null?"":Wa(r)),a.placeholder="\u2013\u2013"}#O(e){let n=wd(e);if(!n){this.#l=null,this.#c=null,this.#s=null;return}this.#c=n.min,this.#g?(this.#l=(n.h+11)%12+1,this.#s=n.h<12?"am":"pm"):(this.#l=n.h,this.#s=null)}#L(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#q(){let e=this.getAttribute("aria-label")||this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#a.setAttribute("aria-label",e):this.#a.removeAttribute("aria-label")}#W=()=>{this.#q()};#Z(){let e=this.hasAttribute("disabled")||this.#o;for(let n of this.#d)n.el.disabled=e}#U(){let e=this.getAttribute("status")==="critical";for(let n of this.#d)n.el.setAttribute("aria-invalid",e?"true":"false");try{e?this.#e?.states.add("invalid"):this.#e?.states.delete("invalid")}catch{}}#G(){this.value?this.#e?.states.add("filled"):this.#e?.states.delete("filled")}#$(){if(!this.#e)return;let e=this.#d[0]?.el??this,n=this.hasAttribute("required"),a=this.#N(),r=this.#_,o=this.#F;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):a!=null&&r!=null&&a<r?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):a!=null&&o!=null&&a>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.#V;return e==null||this.#c==null?"":`${Wa(e)}:${Wa(this.#c)}`}set value(e){this.#u=!0;let n=e??"";n!==this.value&&(this.#O(n),this.#r?this.#E({dispatch:!1}):this.#h=this.value)}clear(){this.#l=null,this.#c=null,this.#s=null,this.#E(),this.#L("change"),this.dispatchEvent(new CustomEvent(jb,{bubbles:!0})),this.#d[0]?.el.focus()}focus(e){this.#d[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.#O(this.getAttribute("defaultvalue")??""),this.#E(),this.#L("change")}formDisabledCallback(e){this.#o=e,this.#Z()}formStateRestoreCallback(e){this.value=e??""}};function Ed(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",ro)}Ed();var Yi=globalThis.Temporal;var Sd=(t,e)=>`Non-positive ${t}: ${e}`,Td=(t,e)=>`Non-finite ${t}: ${e}`,Ad=t=>`Cannot convert bigint to ${t}`,Md="Invalid object",Ga=(t,e,n,a)=>On(t,e)+`; must be between ${n}-${a}`,On=(t,e)=>`Invalid ${t}: ${e}`;var Wi=1e3,Gi=1e6,Ki=1e9,Xi=6e10,Ji=36e11;function st(t){return t===void 0?Object.create(null):Pn(t)}function oo(t,e="number"){if(typeof t=="bigint")throw new TypeError(Ad(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Td(e,t));return t}function Be(t,e){return Math.trunc(oo(t,e))||0}function io(t,e){return Id(Be(t,e),e)}function Id(t,e="number"){if(t<=0)throw new RangeError(Sd(e,t));return t}function Qi(t,e,n){return Math.min(Math.max(t,e),n)}function ia(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function Pn(t){if(!ia(t))throw new TypeError(Md);return t}var fo=On;var tr=t=>`Missing ${t}`,Fd=t=>"No valid fields: "+t.join(),Hd="Invalid bag",Vd=(t,e,n)=>On(t,e)+"; must be "+Object.keys(n).join(),jd="Cannot use valueOf",qd="Invalid calling context",go=t=>"Missing year"+(t?"/era/eraYear":""),Bn="Invalid leap month",Zd=t=>On("Calendar",t),$d=(t,e)=>`Unknown calendar ${t}; might need ${e}`,bs=t=>On("TimeZone",t),dn="Out-of-bounds date";var Ud=t=>`Cannot parse: ${t}`,$t=t=>`Invalid substring: ${t}`;var fs=Qi,Xe=ia;function D(t){throw new RangeError(t)}function de(t){throw new TypeError(t)}function as(t,e,n,a,r){return _t(e,((o,i)=>{let s=o[i];return s===void 0&&de(tr(i)),s})(t,e),n,a,r)}function _t(t,e,n,a,r,o){let i=fs(e,n,a);return r&&e!==i&&D(((s,l,c,d,u)=>u?Ga(s,u[l],u[c],u[d]):Ga(s,l,c,d))(t,e,n,a,o)),i}function ca(t,e=Map){let n=new e;return(a,...r)=>{if(n.has(a))return n.get(a);let o=t(a,...r);return n.set(a,o),o}}var Yd=t=>vo({name:t},1),vo=(t,e)=>bn(n=>({value:n,configurable:1,writable:!e}),t),nr=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function bn(t,e){let n={};for(let a in e)n[a]=t(e[a],a);return n}function ar(t,e){let n={};for(let a of t)n[a]=e;return n}function xo(t){let e={};for(let n of t)e[n]=a=>a[n];return e}function Ot(t,e,n=Object.create(null)){for(let a of t)n[a]=e[a];return n}function Wd(t,e,n){for(let a of t)if(e[a]!==n[a])return 0;return 1}function Gb(t,e,n){let a={...n};for(let r=0;r<e;r++)a[t[r]]=0;return a}function Je(t,...e){return(...n)=>t(...e,...n)}function gs(){}function Dd(t){return t[0].toUpperCase()+t.substring(1)}function Ne(...t){return[].concat(...t).sort()}function pa(t){return new RegExp(`^${t}$`,"i")}function vs(t){return parseInt(t.padEnd(9,"0"))}function xs(t){return t&&t!=="+"?-1:1}function sa(t){return t===void 0?0:parseInt(t)}function uo(t,e){return String(e).padStart(t,"0")}var xt=Je(uo,2);function Ut(t,e){return Math.sign(t-e)}function Ie(t,e){return t<e?-1:t>e?1:0}function Gd(t,e){let n=t/e;return t%e<0n?n-1n:n}function ys(t,e){let n=Gd(t,e);return[n,t-n*e]}function zt(t,e){return[Math.floor(t/e),yo(t,e)]}function yo(t,e){return(t%e+e)%e}function ma(t,e){return Math.trunc(t/e)||0}function ks(t,e){return t%e||0}function Kd(t,e=1){return e*(.5+t/5)}function so(t){return Math.abs(t%1)===.5}var ws="iso8601",Xd="gregory",Kb={bce:-1,ce:0};function Jd(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 lt=void 0,Qd=0;function kt(t){return t===lt?"iso8601":t===0?"gregory":t.id}var Xb=/^M(\d{2})(L?)$/;function eu(t){let e=Xb.exec(t);return e||D((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function tu(t,e){return"M"+xt(t)+(e?"L":"")}function rs(t,e,n){return t+(e||n&&t>=n?1:0)}var os={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Cs=Object.keys(os);var rr=Wi,or=Gi,fn=Ki,ir=Xi,sr=Ji,Gt=864e11,wt=[1,rr,or,fn,ir,sr,Gt],Jb=BigInt(rr),ba=BigInt(or),Ln=BigInt(fn),Qb=BigInt(ir),ef=BigInt(sr),ke=BigInt(Gt);function nu(t,e){let n=Number(t/ke),a=Number(t%ke);return n*(Gt/e)+(Math.trunc(a/e)+a%e/e)}var $e=Cs.slice(0,6),lr=xo($e),ko=["year"],qn=["day"],Es=["day","month","year"],wo=["offset"],Ss=["timeZone"],fa=["era","eraYear"],tf=["era","eraYear","year"],au=["month","monthCode"],nf=["day","month","monthCode"],is=Ne($e),af=Ne(fa,ko),cr=Ne(au,ko),ru=Ne(fa,cr),dr=Ne(["monthCode"],ko),ou=Ne(fa,dr),iu=Ne(qn,["monthCode"]),Zn=Ne(qn,cr),$n=Ne(qn,fa,cr),su=Ne(Zn,$e),lu=Ne($n,$e),rf=Ne(Zn,$e,wo),of=Ne($n,$e,wo),cu=Ne(Zn,$e,wo,Ss),du=Ne($n,$e,wo,Ss),sf=Ne(qn,dr),lf=Ne(qn,fa,dr),Ge=ar($e,0);function ur(t){return Co(t,1),t}var cf={hour:23,minute:59,second:59};function Co(t,e){let n={};for(let a of $e)n[a]=_t(a,t[a],0,cf[a]||999,e);return n}function nt(t){return As(t)*fn+uu(t)}function Ts(t){return 1e3*As(t)+t.millisecond}function As(t){return 3600*t.hour+60*t.minute+t.second}function uu(t){return t.millisecond*or+t.microsecond*rr+t.nanosecond}function Ms(t){let[e,n]=zt(t,Gt);return[hu(n),e]}function hu(t){let[e,n]=zt(t,or),[a,r]=zt(n,rr);return df(e,a,r)}function df(t,e=0,n=0){let[a,r]=zt(t,36e5),[o,i]=zt(r,6e4),[s,l]=zt(i,1e3);return{hour:a,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function zd(t){let[e,n]=ys(t,Ln);return[Number(e),Number(n)]}function ct(t){return un(t)+BigInt(nt(t))}function pu(t){return hr(t)+Ts(t)}function un(t){return BigInt(Pt(t))*ke}function hr(t){return 864e5*Pt(t)}function Pt(t){return Ka(t.year,t.month,t.day)}function Ka(t,e=1,n=1){let a=e-1;return t+=Math.floor(a/12),e=yo(a,12),Date.UTC(t%400-400,e,0)/864e5+146097*(ma(t,400)+1)+n}function pr(t){let[e,n]=ys(t,ke);return{...mu(Number(e)),...hu(Number(n))}}function mu(t){let e=new Date(864e5*yo(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var bu=1972;function uf(t){return[t,0]}function ss(t,e){if(!e)return{year:1972,month:t}}function hf(t,e,n){return{year:t,month:e,day:n}}function fu(t,e){switch(e){case 2:return Eo(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function pf(t){return Eo(t)?366:365}function Eo(t){return t%4==0&&(t%100!=0||t%400==0)}function gu(t,e,n){return t+=ma(n,12),(e+=ks(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function mf(t,e,n,a){return 12*(n-t)+a-e}function So(t){return yo(Ka(t.year,t.month,t.day)+4,7)||7}function vu(t){return Ka(t.year,t.month,t.day)-Ka(t.year)+1}function xu(t){let e=t.year,n=Math.floor((vu(t)-So(t)+10)/7),a=es(e);return n<1?n=a=es(--e):n>a&&(n=1,a=es(++e)),{weekOfYear:n,yearOfWeek:e,Be:a}}function es(t){let e=So({year:t,month:1,day:1});return e===4||e===3&&Eo(t)?53:52}function bf({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function mr(t){return Kt(t),ur(t)}function Kt(t){return yu(t,1),t}function _d(t){return Wd(Es,t,yu(t))}function yu(t,e){let{year:n}=t,a=as(t,"month",1,12,e);return{year:n,month:a,day:as(t,"day",1,fu(n,a),e)}}function fe(t,e){return t?t.ae(e):e}function Rn(t,e,n){return t?t.L(e,n):uf(n)}function br(t,e){return t===0?bf(e):t&&t.h?.(e)||{}}function Fn(t,e,n,a){return t?t.de(e,n,a):hf(e,n,a)}function Xa(t,e){return t?t.j(e):12}function Ja(t,e,n){return t?t.o(e,n):fu(e,n)}function To(t,e){let{year:n,month:a}=fe(t,e),[r,o]=Rn(t,n,a);return tu(r,o)}function Is(t,e){let{year:n}=fe(t,e);return t?t.q(n):Eo(n)}function Ds(t,e){let{year:n}=fe(t,e);return Xa(t,n)}function zs(t,e){let{year:n,month:a}=fe(t,e);return Ja(t,n,a)}function _s(t,e){let{year:n}=fe(t,e);return t?t.i(n):pf(n)}function ku(t,e){if(!t)return vu(e);let{year:n}=fe(t,e),a=Fn(t,n,1,1);return Pt(e)-Pt(a)+1}function wu(t,e){return t===lt?xu(e).weekOfYear:void 0}function Cu(t,e){return t===lt?xu(e).yearOfWeek:void 0}var we=Cs.map(t=>t+"s"),Os=xo(we),Eu=Ne(we),ff=we.slice(0,6),Su=we.slice(6),gf=Su.slice(1),De=ar(we,0),Ps=ar(ff,0),Ns=Je(Gb,we);function Tu(t,e){return e==null&&D(tr(t)),e}var Fe=Je(vf,"string");function vf(t,e,n=t){return typeof e!==t&&de(fo(n,e)),e}function Bs(t,e="number"){return Number.isInteger(t)||D(((n,a)=>`Non-integer ${n}: ${a}`)(e,t)),t||0}function Ls(t){return typeof t=="symbol"&&de("Cannot convert Symbol to string"),String(t)}function Rs(t,e){return ia(t)?String(t):Fe(t,e)}function Ao(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&de(`Invalid bigint: ${t}`),t)}function Mo(t,e){return Bs(oo(t,e),e)}function Io(t,e){return typeof t=="string"?((n,a)=>{let r=Object.create(null);return r[n]=a,r})(e,t):Pn(t)}var Yt="smallestUnit";var xf={constrain:0,reject:1},yf={compatible:0,reject:1,earlier:2,later:3},kf={reject:0,use:1,prefer:2,ignore:3},wf={auto:0,never:1,critical:2,always:3},Cf={auto:0,never:1,critical:2},Ef={auto:0,never:1},Sf={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Tf=[Math.floor,t=>so(t)?Math.floor(t):Math.round(t),Math.ceil,t=>so(t)?Math.ceil(t):Math.round(t),Math.trunc,t=>so(t)?Math.trunc(t)||0:Math.round(t),t=>t<0?Math.floor(t):Math.ceil(t),t=>Math.sign(t)*Math.round(Math.abs(t))||0,t=>so(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)],Af={previous:-1,next:1};function Fs(t){let e=t.roundingIncrement;return e===void 0?1:Be(e,"roundingIncrement")}function Hs(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Ls(e)==="auto")return;D(fo("fractionalSecondDigits",e))}e=_t("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function Vs(t,e,n=0,a){let r=e[t];if(r===void 0)return a?n:void 0;if(r=Ls(r),r==="auto")return a?n:null;let o=os[r];return o===void 0&&(o=we.indexOf(r)),o<0&&D(Vd(t,r,os)),o}function gn(t,e,n,a=0){let r=n[t];if(r===void 0)return a;let o=Ls(r),i=e[o];return i===void 0&&D(Vd(t,o,e)),i}var ga=Je(Vs,Yt),Au=Je(Vs,"largestUnit"),Mf=Je(Vs,"unit"),Mu=Je(gn,"overflow",xf),Iu=Je(gn,"disambiguation",yf),If=Je(gn,"offset",kf),js=Je(gn,"calendarName",wf),Df=Je(gn,"timeZoneName",Cf),zf=Je(gn,"offset",Ef),va=Je(gn,"roundingMode",Sf),_f=Je(gn,"direction",Af);function qs(t,e,n,a){let r=a?Gt:wt[e+1];if(r){let o=wt[e];r%((t=_t("roundingIncrement",t,1,r/o-(a?0:1),1))*o)&&D(fo("roundingIncrement",t))}else t=_t("roundingIncrement",t,1,n?10**9:1,1);return t}function da(t,e,n,a){return e!=null&&_t(t,e,n,a,1,Cs),e}function Du(t,e){e>t&&D("smallestUnit > largestUnit")}function xa(t,e,n,a=9,r=0,o=4){e=st(e);let i=Au(e,r),s=Fs(e),l=va(e,o),c=ga(e,r,1);return i=da("largestUnit",i,r,a),c=da(Yt,c,r,a),i==null?i=Math.max(n,c):Du(i,c),s=qs(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function fr(t,e=6,n){let a=Fs(t=Io(t,Yt)),r=va(t,7),o=ga(t);return o=Tu(Yt,o),o=da(Yt,o,0,e),a=qs(a,o,void 0,n),[o,a,r]}function pe(t,e){return Ot(Es,t,Ot($e,e))}function re(t){return t===void 0?0:Mu(Pn(t))}function ua(t,e=0){t=st(t);let n=Iu(t),a=If(t,e);return[Mu(t),a,n]}var zu=BigInt(1e8)*ke,Zs=BigInt(-1e8)*ke,_u=Zs-ke,Ou=-3261848;function Do(t){let e=12*t.year+t.month;return(e<Ou||e>3309129)&&D(dn),t}function Ke(t,e=1){return Pu(un(t),e),t}function Un(t){let e=un(t);return Pu(e),e!==_u||nt(t)||D(dn),t}function Pu(t,e=1){(t<(e?_u:Zs)||t>zu)&&D(dn)}function Ct(t){return(t<Zs||t>zu)&&D(dn),t}function $s(t,e){return Ct(un(t)+BigInt(nt(t)-e))}function dt(t){return{epochNanoseconds:t}}function Et(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Nt(t,e){return Ot($e,t,ge(t,e))}function ge(t,e){return Ot(Es,t,{calendar:e})}function Yn(t){return Ot($e,t)}function Pe(t){return Ot(we,t,{sign:Ro(t)})}function gr(t){return e=t.epochNanoseconds,Number(Gd(e,ba));var e}function Us(t){return t.epochNanoseconds}function Nu(t,e,n){let a=mn(e),[r,o]=((u,m)=>{let p=m((u=Io(u,"unit")).relativeTo),b=Mf(u);return b=Tu("unit",b),[b,p]})(n,t),i=Math.max(r,a),s=o&&jn(o);if(!o&&la(i,s))return Od(e,r);if(o||D("Missing relativeTo"),!e.sign&&la(r,s))return 0;let[l,c,d]=Ku(o,e,r);return la(r,s)?Od(l,r):Of(l,c,r,d)}function Of(t,e,n,a){let r=Ro(t)||1,o=Ys(Ns(n,t),n,r,a,e),i=o.ee,s=o.te,l=Number(s-i),c=Number(e-i);return o.pe[we[n]]+c/l*r}function Od(t,e){return nu(Wt(t),wt[e])}function Ys(t,e,n,a,r){let o=we[e],i=t,s=0,l=Pd(i,o,n,a);return r&&!((c,d,u,m)=>m>0?Ie(d,c)<=0&&Ie(c,u)<=0:Ie(u,c)<=0&&Ie(c,d)<=0)(r,l.ee,l.te,Math.sign(n))&&(i={...t,[o]:t[o]+n},s=1,l=Pd(i,o,n,a)),{...l,pe:i,Ae:s}}function Pd(t,e,n,a){let r={...t,[e]:t[e]+n};return{ee:ds(a,t),te:ds(a,r),se:r}}function Bu(t,e,n){let a=n-e,r=t-e;if(!r)return 0;let o=r<0n?-r:r,i=a<0n?-a:a,s=Ie(r,0n)===Ie(a,0n)?1:-1;return Ie(o,i)<=0?o===i?s:Kd(Ie(2n*o,i),s):Number(r)/Number(a)}function Lu(t,e,n,a){let{epochNanoseconds:r}=t,{timeZone:o,calendar:i}=t;if(e===0&&n===1)return{epochNanoseconds:r,timeZone:o,calendar:i};if(e===6){let s=pe(ze(t),Ge),l=pe(vn(s,1),Ge),c=hn(o,s),d=hn(o,l);r=Ws(Pf(r,c,d),a)?d:c}else{let s=ze(t),l=s.offsetNanoseconds;r=ka(o,zo(s,ya(e,n),a),l,2,0,1)}return{epochNanoseconds:r,timeZone:o,calendar:i}}function Ru(t){let{timeZone:e}=t,n=pe(ze(t),Ge),a=pe(vn(n,1),Ge),r=hn(e,n);return nu(hn(e,a)-r,sr)}function Fu(t){let{timeZone:e,calendar:n}=t;return Et(hn(e,pe(ze(t),Ge)),e,n)}function Pf(t,e,n){return Bu(t<n?t:n-1n,e,n)}function zo(t,e,n){let[a,r]=_o(t,e,n),o=pe(vn(t,r),a);return Un(o),o}function _o(t,e,n){return Ms(ha(nt(t),e,n))}function ho(t){return ha(t,ir,7)}function ya(t,e){return wt[t]*e}function vr(t,e){return BigInt(wt[t])*BigInt(e)}function Nf(t,e,n){let a=Math.min(mn(t),6);return pn(Po(Wt(t),BigInt(e),n),a)}function Oo(t,e,n,a,r,o,i,s){if(a===0&&r===1)return t;let l=Ro(t)||1,c=la(a,s)?s&&a<6&&n>=6?Lf:Bf:Rf,[d,u,m]=c(l,t,e,n,a,r,o,i);return m&&a!==7&&(d=((p,b,f,g,x,y)=>{for(let w=g+1;w<=f;w++){if(w===7&&f!==7)continue;let S=Ns(w,p);S[we[w]]+=x;let A=Ie(b,ds(y,S));if(A&&A!==x)break;p=S}return p})(d,u,n,Math.max(6,a),l,i)),d}function Po(t,e,n){return Hu(t,e,n,t/e%2n)}function No(t,e,n){let[a,r]=ys(t,ke),o=a*ke;return o+Hu(r,e,n,(o/e+r/e)%2n)}function Hu(t,e,n,a){let r=t/e,o=t%e,i=0;o&&(i=Kd(Ie(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=Ws(Number(a)+i,n);return(r-a+BigInt(s))*e}function ha(t,e,n){return Ws(t/e,n)*e}function Ws(t,e){return Tf[e](t)}function Bf(t,e,n,a,r,o,i){let s=Wt(e),l=Po(s,vr(r,o),i),c=l-s,d=Math.sign(Number(l/ke)-Number(s/ke))===t,u=pn(l,Math.min(a,6));return[{...e,...u},n+c,d]}function Lf(t,e,n,a,r,o,i,s){let l=Number(Wn(e)),c=ya(r,o),d=ha(l,c,i),u=Ys({...e,...Ps},6,t,s,n),m=u.ee,p=u.te,b=d-Number(p-m),f=0;b&&Math.sign(b)!==t?n=m+BigInt(d):(f+=t,d=ha(b,c,i),n=p+BigInt(d));let g=Fo(d);return[{...e,...g,days:e.days+f},n,!!f]}function Rf(t,e,n,a,r,o,i,s){let l=we[r],c=Ns(r,e);r===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=ma(e[l],o)*o;c[l]=d;let u=Ys(c,r,o*t,s,n),m=u.ee,p=u.te,b=Bu(n,m,p),f=u.pe[l],g=u.se[l],x=ha(f+b*t*o,o,i),y=x===g;return c[l]=x,[c,y?p:m,u.Ae||y]}function Vu(t,e){return t.timeZone.O(t.epochNanoseconds,(n=>{let a=Io(n,"direction"),r=_f(a,0);return r||D(fo("direction",r)),r})(e))}var ze=ca(Ff,WeakMap);function Ff(t){let{epochNanoseconds:e,timeZone:n}=t,a=n.B(e);return{...pr(e+BigInt(a)),offsetNanoseconds:a}}function ka(t,e,n,a=0,r=0,o,i){if(n!==void 0&&a===1&&(a===1||i))return $s(e,n);a!==2&&a!==0||Ke(e,0);let s=t.N(e);if(n!==void 0&&a!==3){let l=((c,d,u,m)=>{let p=ct(d);m&&(u=ho(u));for(let b of c){let f=Number(p-b);if(m&&(f=ho(f)),f===u)return b}})(s,e,n,o);if(l!==void 0)return l;a===0&&D("Invalid TimeZone offset")}return i?ct(e):wa(t,e,r,s)}function wa(t,e,n=0,a=t.N(e)){if(a.length===1)return a[0];if(n===1&&D("Ambiguous offset"),a.length)return a[n===3?1:0];let r=ct(e),o=((s,l)=>{let c=s.B(l-ke);return(d=>(d>Gt&&D("Out-of-bounds TimeZone gap"),d))(s.B(l+ke)-c)})(t,r),i=pr(r+BigInt(o*(n===2?-1:1)));return(a=t.N(i))[n===2?0:a.length-1]}function hn(t,e){let n=t.N(e);if(n.length)return n[0];let a=ct(e)-ke;return t.O(a,1)}function Gs(t,e,n,a,r){let o=re(r);a.sign&&mn(a)<8&&D("Cannot use small units");let i=Ke(Qa(e,n));return Qa(e,ju(e,i,t?He(a):a,o))}function Ks(t,e){return Ct(t+(ll(n=e)&&D("Cannot use large units"),Wn(n)));var n}function Hn(t,e,n){let{calendar:a,epochNanoseconds:r,timeZone:o}=t,i=Wn(e),s=r;if(ll(e)){let l=ze(t);s=wa(o,pe(Ca(a,l,{...e,...Ps},n),l))+i}else s+=i,re(n);return{...t,epochNanoseconds:Ct(s)}}function Vn(t,e,n,a){let[r,o]=Bo(e,n);return Un(pe(Ca(t,e,{...n,...Ps,days:n.days+o},a),r))}function Ca(t,e,n,a){if(n.years||n.months||n.weeks)return ju(t,e,n,re(a));re(a);let r=n.days+Number(Wn(n)/ke);return r?Ke(vn(e,r)):e}function Qa(t,e){return vn(e,1-fe(t,e).day)}function Bo(t,e){let n=Wn(e),a=Number(n/ke),r=Number(n%ke),[o,i]=Ms(nt(t)+r);return[o,a+i]}function vn(t,e){return e?mu(Pt(t)+e):t}function ju(t,e,n,a){let{years:r,months:o,weeks:i,days:s}=n,l;if(s+=Number(Wn(n)/ke),r||o)l=ls(t,e,r,o,a);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=vn(l,7*i+s)),Ke(l)}function ls(t,e,n,a,r){let o=fe(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=Rn(t,i,s);i+=n,s=cs(t,c,d,t?t.p(i):void 0,r),s=_t("month",s,1,Xa(t,i),r)}return a&&({year:i,month:s}=t?t.K(i,s,a):gu(i,s,a)),l=_t("day",l,1,Ja(t,i,s),r),Fn(t,i,s,l)}function cs(t,e,n,a,r){if(n){let o=t?t.l:void 0;return a!==void 0&&(o<0||a===e+1)?a:(r===1&&D(Bn),o<0?-o:e)}return rs(e,0,a)}function Xt(t,e){return kt(t)!==kt(e)&&D("Mismatching Calendars"),t}function Hf(t,e){return t.m!==e.m&&D("Mismatching TimeZones"),t}function qu(t){return t.timeZone.id}function Xs(t,e,n,a){let[r,o,i,s]=xa(t,a,3,5),l=Lo(e.epochNanoseconds,n.epochNanoseconds,r,o,i,s);return Pe(t?He(l):l)}function Js(t,e,n,a,r){let[o,i,s,l]=xa(t,r,5),c=n.epochNanoseconds,d=a.epochNanoseconds,u;if(Ie(d,c))if(o<6)u=Lo(c,d,o,i,s,l);else{let m=Hf(n.timeZone,a.timeZone);u=al(m,e,n,a,o),u=Oo(u,d,o,i,s,l,Gu(e,m,n),1)}else u=De;return Pe(t?He(u):u)}function Qs(t,e,n,a,r){let[o,i,s,l]=xa(t,r,6),c=ct(n),d=ct(a),u=Ie(d,c),m;return u?o<=6?m=Lo(c,d,o,i,s,l):(m=Uu(e,n,a,u,o),m=Oo(m,d,o,i,s,l,jf(e,n))):m=De,Pe(t?He(m):m)}function el(t,e,n,a,r){let[o,i,s,l]=xa(t,r,6,9,6);return Zu(t,e,n,a,o,i,s,l)}function tl(t,e,n,a,r){let[o,i,s,l]=xa(t,r,9,9,8),c=Qa(e,n),d=Qa(e,a);return Yu(c,d)?Zu(t,e,Ke(c),Ke(d),o,i,s,l,8):Pe(De)}function Zu(t,e,n,a,r,o,i,s,l=6){let c=un(n),d=un(a),u;return Ie(d,c)?r===6?u=Lo(c,d,r,o,i,s):(u=rl(e,n,a,r),o===l&&i===1||(u=Oo(u,d,r,o,i,s,Wu(e,n)))):u=De,Pe(t?He(u):u)}function nl(t,e,n,a){let[r,o,i,s]=xa(t,a,5,5),l=ha(nt(n)-nt(e),ya(o,i),s),c={...De,...Fo(l,r)};return Pe(t?He(c):c)}function al(t,e,n,a,r){let o=Ie(a.epochNanoseconds,n.epochNanoseconds);if(!o)return De;if(r<6)return{...De,...pn(a.epochNanoseconds-n.epochNanoseconds,r)};if(!Yu(ze(n),ze(a)))return{...De,...pn(a.epochNanoseconds-n.epochNanoseconds,5)};let[i,s,l]=Vf(t,n,a,o);return{...r===6?{...De,days:co(i,s)}:rl(e,i,s,r),...Fo(l)}}function $u(t,e,n,a){let r=ct(e),o=ct(n),i=Ie(o,r);return i?a<=6?{...De,...pn(o-r,a)}:Uu(t,e,n,i,a):De}function Uu(t,e,n,a,r){let o=n,i=nt(n)-nt(e);return Math.sign(i)===-a&&(o=vn(n,-a),i+=Gt*a),{...rl(t,e,o,r),...Fo(i)}}function rl(t,e,n,a){if(a<=7){let f=co(e,n);return a===7?{...De,weeks:ma(f,7),days:ks(f,7)}:{...De,days:f}}let r=fe(t,e),o=fe(t,n);if(a===8){let{year:f,month:g,day:x}=r,{year:y,month:w,day:S}=o,A=Math.sign(Ut(y,f)||Ut(w,g)||co(e,n)),P=0,N=0;if(A){P=t?t._(f,g,y,w):mf(f,g,y,w);let C=ls(t,e,0,P,0);A*Ut(x,S)>0&&(P-=A,C=ls(t,e,0,P,0)),N=co(C,n)}return{...De,months:P,days:N}}let{year:i,month:s,day:l}=r,{year:c,month:d,day:u}=o,m=c-i,p=d-s,b=u-l;if(m||p){let f=Math.sign(m||p),g=Ja(t,c,d),x=0;if(Math.sign(u-l)===-f){let y=g;({year:c,month:d}=t?t.K(c,d,-f):gu(c,d,-f)),m=c-i,p=d-s,g=Ja(t,c,d),x=f<0?-y:g}if(b=u-Math.min(l,g)+x,m){let[y,w]=Rn(t,i,s),[S,A]=Rn(t,c,d),P=t?t.l:void 0;if(p=P!==void 0&&w&&!A&&(P<0?f>0&&S===-P:f<0&&S===y)?0:S-y||Number(A)-Number(w),Math.sign(p)===-f){let N=f<0&&-Xa(t,c);c-=f,m=c-i,p=d-cs(t,y,w,t?t.p(c):void 0,0)+(N||Xa(t,c))}else if(t){let N=cs(t,y,w,t.p(c),0);p=t._(c,N,c,d)}}}return{...De,years:m,months:p,days:b}}function Yu(t,e){return Ut(t.year,e.year)||Ut(t.month,e.month)||Ut(t.day,e.day)}function Vf(t,e,n,a){let r=ze(e),o=ze(n),i=n.epochNanoseconds,s=0,l=nt(o)-nt(r);Math.sign(l)===-a&&s++;let c=s+(a>0?1:0);for(;s<=c;s++){let d=vn(o,s*-a),u=wa(t,pe(d,r));if(Ie(i,u)!==-a)return[r,d,Number(i-u)]}}function Lo(t,e,n,a,r,o){return{...De,...pn(Po(e-t,vr(a,r),o),n)}}function co(t,e){return Pt(e)-Pt(t)}function Wu(t,e){return{origin:e,ie:un(e),calendar:t,he:un}}function jf(t,e){return{origin:e,ie:ct(e),calendar:t,he:n=>ct(pe(n,e))}}function Gu(t,e,n){let a=ze(n);return{origin:a,ie:n.epochNanoseconds,calendar:t,he:r=>wa(e,pe(r,a))}}function ds(t,e){return ll(e)?t.he(Ca(t.calendar,t.origin,e)):t.ie}function Ku(t,e,n){let{calendar:a}=t;if(jn(t)){let{timeZone:i}=t,s=Hn(t,e);return[al(i,a,t,s,n),s.epochNanoseconds,Gu(a,i,t)]}let r=Un(pe(t,Ge)),o=Vn(a,r,e);return[$u(a,r,o,n),ct(o),Wu(a,t)]}function Nd(t,e){return jn(t)?Hn(t,e).epochNanoseconds:ct(Vn(t.calendar,pe(t,Ge),e))}function jn(t){return"timeZone"in t}function la(t,e){return t<=6-(e?1:0)}function ol(t,e,n){let a={};for(let r=e;r>=0;r--){let o=wt[r];a[n[r]]=ma(t,o),t=ks(t,o)}return a}var qf=2**53;function il(t,e,n,a,r){let o=t(st(r).relativeTo),i=Math.max(mn(n),mn(a));return la(i,o&&jn(o))?Zf(e,n,a,i):(o||D("Missing relativeTo"),e&&(a=He(a)),Pe(((s,l,c,d)=>{let{calendar:u}=s;if(jn(s)){let{timeZone:b}=s,f=Hn(s,l);return al(b,u,s,Hn(f,c),d)}let m=pe(s,Ge),p=Vn(u,m,l);return $u(u,m,Vn(u,p,c),d)})(o,n,a,i)))}function Zf(t,e,n,a){return Pe(xn(((r,o,i,s)=>{let l=Wt(r)+Wt(o)*BigInt(s?-1:1);return Number.isFinite(Number(l/ke))||D(dn),{...De,...pn(l,i)}})(e,n,a,t)))}function Xu(t,e,n){let a=mn(e),[r,o,i,s,l]=((b,f,g)=>{b=Io(b,Yt);let x=Au(b),y=g(b.relativeTo),w=Fs(b),S=va(b,7),A=ga(b);return x===void 0&&A===void 0&&D("Required smallestUnit or largestUnit"),A==null&&(A=0),x==null&&(x=Math.max(A,f)),Du(x,A),w=qs(w,A,1),w>1&&A>5&&x!==A&&D("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[x,A,w,S,y]})(n,a,t);if(!l&&Math.max(a,r)<=6)return Pe(xn(((b,f,g,x,y)=>{let w=Po(Wt(b),vr(g,x),y);return{...De,...pn(w,f)}})(e,r,o,i,s)));let c=l&&jn(l),d=c&&r>=6&&o<6;if(!e.sign&&!d)return e;l||D("Missing relativeTo");let[u,m,p]=Ku(l,e,r);return Pe(Oo(u,m,r,o,i,s,p,c))}function Ju(t){return t.sign===-1?sl(t):t}function sl(t){return Pe(He(t))}function He(t){let e={};for(let n of we)e[n]=-1*t[n]||0;return e}function Ro(t,e=we){let n=0;for(let a of e){let r=Math.sign(t[a]);r&&(n&&n!==r&&D("Cannot mix duration signs"),n=r)}return n}function xn(t){for(let n of gf)_t(n,t[n],-4294967295,4294967295,1);let e=Wt(t);return Qu(Number(e/Ln)),t}function Qu(t){Number.isSafeInteger(t)||D("Out-of-bounds duration")}function Wt(t){return BigInt(t.days)*ke+Wn(t)}function Wn(t){return BigInt(t.hours)*ef+BigInt(t.minutes)*Qb+eh(t)}function eh(t){return BigInt(t.seconds)*Ln+BigInt(t.milliseconds)*ba+BigInt(t.microseconds)*Jb+BigInt(t.nanoseconds)}function pn(t,e=6){let n=Number(t/ke),a=Number(t%ke),r=wt[e],o=e<=3?Number(t/BigInt(r)):n*(Gt/r)+ma(a,r);Number.isFinite(o)||D(dn),e<=3&&Math.abs(o)/(fn/wt[e])>=qf&&D(dn);let i=ol(a,e,we);return i[we[e]]=o,i}function Fo(t,e=5){return ol(t,e,we)}function ll(t){return!!Ro(t,Su)}function mn(t){let e=9;for(;e>0&&!t[we[e]];e--);return e}function xr(t,e){return Ie(t.epochNanoseconds,e.epochNanoseconds)}function th(t,e,n,a){let r=t(st(a).relativeTo),o=Math.max(mn(e),mn(n));return Wd(we,e,n)?0:la(o,r&&jn(r))?Ie(Wt(e),Wt(n)):(r||D("Missing relativeTo"),Ie(Nd(r,e),Nd(r,n)))}function cl(t,e){return Gn(t,e)||Ho(t,e)}function Gn(t,e){return Ut(Pt(t),Pt(e))}function Ho(t,e){return Ut(nt(t),nt(e))}function nh(t,e){return!xr(t,e)}function ah(t,e){return!xr(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function rh(t,e){return!cl(t,e)&&t.calendar===e.calendar}function oh(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function ih(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function sh(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function lh(t,e){return!Ho(t,e)}function Ea(t){return t===0?Kb:t?t.k:void 0}function Ue(t,e,n=e){return Ea(t)?n:e}function dl(t,e){let n=t||void 0,a=Ea(t),{era:r,eraYear:o,year:i}=e;if(i!==void 0&&(i=Be(i,"year")),o!==void 0&&(o=Be(o,"eraYear")),r!==void 0||o!==void 0){r!==void 0&&o!==void 0||de("Mismatching era/eraYear"),a||D("Forbidden era/eraYear");let s=Jd(r),l=a[s];l===void 0&&D((d=>`Invalid era: ${d}`)(r));let c=n?.$?n.$(o,s,l):$f(o,l);i!==void 0&&i!==c&&D("Mismatching year/eraYear"),i=c}else i===void 0&&de(go(a));return i}function po(t,e,n,a,r){let{month:o,monthCode:i}=e;if(i!==void 0){let s=((l,c,d,u,m=eu(c))=>{let p=l?l.p(d):void 0,[b,f]=m,g=rs(b,f,p);if(f){let x=l?l.l:void 0;x===void 0&&D(Bn),x>0?(g>x&&D(Bn),p!==g&&(u===1&&D(Bn),g=rs(b,0,p))):(g!==-x&&D(Bn),p===void 0&&u===1&&D(Bn))}return g})(t,i,n,a,r);o!==void 0&&o!==s&&D("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&de("Missing month/monthCode");return _t("month",o,1,Xa(t,n),a)}function us(t,e,n,a,r){return as(e,"day",1,Ja(t,a,n),r)}function $f(t,e){return(e+t)*(Math.sign(e)||1)||0}function yr(t,e){return Co(Ot($e,{...Ge,...t}),e)}var Uf=pa("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Vo(t){let e=ul(t);return e===void 0&&D(Ud(t)),e}function ul(t,e){let n=Uf.exec(t);if(n&&(a=>(r=>{r[0]!=="T"&&r[0]!=="t"||(r=r.slice(1));let o=r.search(/[.,]/),i=o<0?r:r.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))})(a.slice(1)))(n[0]))return((a,r)=>{let o=a[4]||a[5];return r&&o&&D($t(o)),s=(sa(a[2])*sr+sa(a[3])*ir+sa(a[4])*fn+vs(a[5]||""))*xs(a[1]),Math.abs(s)>=Gt&&D("Out-of-bounds offset"),s;var s})(n,e)}var ut={era:Rs,month:io,monthCode(t,e){if(typeof t=="string")return t;if(t&&typeof t=="object"){let n=t.toString;if(typeof n=="function")return Fe(n.call(t),e)}return Fe(t,e)},day:io},hl=ar($e,Be),ch=ar(we,Mo),pl=Object.assign({},ut,hl),ml={offset(t){return Vo(Rs(t))},...pl};function Ae(t,e,n,a,r=!a){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 a&&a.includes(s)&&de(tr(s))}return r&&!i&&de(Fd(e)),o}function kr(t,e=Ge,n){let a=pe(t,e);return Un(a),Nt(a,n)}function er(t,e,n){return dh(t,e,uh(t,e),re(n))}function jo(t,e,n){let a=uh(t,e),r=n();return[dh(t,e,a,r[0]),...r]}function dh(t,e,n,a){let r=n[1],o=po(t,e,r,a,n[0]);return ge(Ke(Fn(t,r,o,us(t,e,o,r,a))),t)}function bl(t){if(t.monthCode!==void 0)return eu(t.monthCode)}function uh(t,e){let n=Ea(t);return e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||de(go(n)),e.monthCode===void 0&&e.month===void 0&&de("Missing month/monthCode"),e.day===void 0&&de(tr("day")),[bl(e),dl(t,e)]}function fl(t,e,n){let a=Ea(t);e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||de(go(a)),e.monthCode===void 0&&e.month===void 0&&de("Missing month/monthCode");let r=bl(e),o=dl(t,e);return ge(Do(Fn(t,o,po(t,e,o,re(n),r),1)),t)}function gl(t,e,n){let a=t===lt,r=Ea(t);e.day===void 0&&de(tr("day")),a||e.month===void 0||e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||de(go(r));let o=bl(e),i=e.eraYear!==void 0||e.year!==void 0?dl(t,e):void 0,s=re(n),l,c,d;if(i===void 0&&a&&(i=1972),i!==void 0){a||Ke(Fn(t,i,1,1));let b=po(t,e,i,s,o);l=us(t,e,b,i,s),[c,d]=Rn(t,i,b)}else{e.monthCode===void 0&&de("Missing month/monthCode"),[c,d]=o;let b=t?t.ne:1972;if(b!==void 0)l=us(t,e,po(t,e,b,s,o),b,s);else{let f=s===0&&t?t.fe?.(c,d,e.day):void 0;l=f!==void 0?f:e.day}}d&&((t&&t.U?.[c])??1/0)<e.day&&(s===1&&D(Bn),d=0,l=fs(e.day,1,(t&&t.R)??1/0));let u=t?t.u(c,!!d,l):ss(c,!!d);for(;!u&&s===0&&l>1;)l--,u=t?t.u(c,!!d,l):ss(c,!!d);u||D("Cannot guess year");let{year:m,month:p}=u;return ge(Ke(Fn(t,m,p,l)),t)}var Bt=Intl.DateTimeFormat;function Yf(t,e){e<-864e13&&D(dn);let n=t.formatToParts(e),a={};for(let r of n)a[r.type]=r.value;return a}var Wf={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},ts=-388152e4;function hh(t,e=4){let n=Hs(t),a=va(t,4),r=ga(t);return[a,...xl(da(Yt,r,0,e),n)]}function vl(t){return js(st(t))}function ph(t,e){return hh(st(t),e)}function xl(t,e){return t!=null?[wt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function yl(t,e,n){let[a,r,o,i]=(l=>{let c=Hs(l=st(l)),d=va(l,4),u=ga(l);return[l.timeZone,d,...xl(da(Yt,u,0,4),c)]})(n),s=a!==void 0;return((l,c,d,u,m,p)=>{d=No(d,BigInt(m),u);let b=c.B(d);return Al(pr(d+BigInt(b)),p)+(l?wr(ho(b)):"Z")})(s,Qe(s?t(a):"UTC"),e.epochNanoseconds,r,o,i)}function kl(t,e){let n=(a=>{a=st(a);let r=js(a),o=Hs(a),i=zf(a),s=va(a,4),l=ga(a);return[r,Df(a),i,s,...xl(da(Yt,l,0,4),o)]})(e);return((a,r,o,i,s,l,c,d,u,m)=>{i=No(i,BigInt(u),d);let p=o.B(i);return Al(pr(i+BigInt(p)),m)+wr(ho(p),c)+Xf(r,l)+Ml(a,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function wl(t,e){let n=(a=>(a=st(a),[js(a),...hh(a)]))(e);return((a,r,o,i,s,l)=>Al(zo(r,s,i),l)+Ml(a,o))(t.calendar,t,...n)}function Cl(t,e){return n=t.calendar,a=t,r=vl(e),mo(a)+Ml(n,r);var n,a,r}function El(t,e){return mh(t.calendar,bh,t,vl(e))}function Sl(t,e){return mh(t.calendar,Kf,t,vl(e))}function mh(t,e,n,a){let r=a>1||a===0&&t!==lt;return a===1?t===lt?e(n):mo(n):r?mo(n)+gh(kt(t),a===2):e(n)}function Tl(t,e){return((n,a,r,o)=>fh(_o(n,r,a)[0],o))(t,...ph(e))}function qo(t,e){let[n,a,r]=ph(e,3);return a>1&&xn(t={...t,...Nf(t,a,n)}),Gf(t,r)}function Gf(t,e){let{sign:n}=t,a=n===-1?He(t):t,{hours:r,minutes:o}=a,i=eh(a),s=Number(i/Ln),l=Number(i%Ln);Qu(s);let c=Il(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+Bd({Y:Nn(a.years),M:Nn(a.months),W:Nn(a.weeks),D:Nn(a.days)})+(r||o||s||d?"T"+Bd({H:Nn(r),M:Nn(o),S:Nn(s,d)+c}):"")}function Bd(t){let e=[];for(let n in t){let a=t[n];a&&e.push(a,n)}return e.join("")}function Nn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function Al(t,e){return mo(t)+"T"+fh(t,e)}function mo(t){return bh(t)+"-"+xt(t.day)}function bh(t){let{year:e}=t;return(e<0||e>9999?vh(e)+uo(6,Math.abs(e)):uo(4,e))+"-"+xt(t.month)}function Kf(t){return xt(t.month)+"-"+xt(t.day)}function fh(t,e){let n=[xt(t.hour),xt(t.minute)];return e!==-1&&n.push(xt(t.second)+((a,r,o,i)=>Il(a*or+r*rr+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function wr(t,e=0){if(e===1)return"";let[n,a]=zt(Math.abs(t),sr),[r,o]=zt(a,ir),[i,s]=zt(o,fn);return vh(t)+xt(n)+":"+xt(r)+(i||s?":"+xt(i)+Il(s):"")}function Xf(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Ml(t,e){return e>1||e===0&&t!==lt?gh(kt(t),e===2):""}function gh(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var Jf=/0+$/;function Il(t,e){let n=uo(9,t);return n=e===void 0?n.replace(Jf,""):n.slice(0,e),n?"."+n:""}function vh(t){return t<0?"-":"+"}var Qf=/^(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$/,eg=/[^\w\/:+-]+/;function xh(t){return Zo(Fe(t))}function Zo(t){return yh(t).id}function yh(t){let e=t.toUpperCase(),n=(r=>{let o=ul(r,1);if(o!==void 0)return{id:wr(o),X:o,m:o}})(e);if(n)return{kind:"fixed",...n};let a=e==="UTC"?"UTC":(r=>(eg.test(r)&&D(bs(r)),Qf.test(r)&&D("Forbidden ICU TimeZone"),r.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?Dd(s).replace(/island|noronha|murdo|rivadavia|urville/,Dd):s)).join("/")))(t);return tg(a)}var tg=ca(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=ng(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),ng=ca(t=>new Bt("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Qe(t){let e=yh(t);return ag(e.id,e)}var ag=ca((t,e)=>e.kind==="named"?new ps(t,e.m,e.format):new hs(t,e.m,e.kind==="fixed"?e.X:0)),hs=class{constructor(e,n,a){this.id=e,this.m=n,this.X=a}B(){return this.X}N(e){return[$s(e,this.X)]}O(){}},ps=class{constructor(e,n,a){this.id=e,this.m=n,this.ke=((r,o)=>{let i=ca(r),s=ca(rg),l=86400*o;function c(u){let[m,p]=Rd(u,l),b=lo(m),f=lo(p),g=i(b),x=i(f);return g===x?g:d(s(b,f),g,x,u)}function d(u,m,p,b){let f,g;for(;(b===void 0||(f=b<u[0]?m:b>=u[1]?p:void 0)===void 0)&&(g=u[1]-u[0]);){let x=u[0]+Math.floor(g/2);r(x)===p?u[1]=x:u[0]=x+1}return f}return{xe(u){let m=c(u-86400),p=c(u+86400),b=u-m,f=u-p;if(m===p)return[b];let g=c(b);return g===c(f)?[u-g]:m>p?[b,f]:[]},we:c,O:function u(m,p){if(p>0&&m>=864e10)return;if(p<0){if(m<=ts)return;let S=Ld()+94867200;if(m>S)return u(S,-1)}let b=p>0?Math.max(m,ts):m,[f,g]=Rd(b,l),x=l*p,y=p>0?Math.max(m,Ld())+94867200:ts,w=()=>p<0?g>y:f<y;for(;w();){let S=lo(f),A=lo(g),P=i(S),N=i(A);if(P!==N){let C=s(S,A);d(C,P,N);let I=C[0];if((Ut(I,m)||1)===p)return I}f+=x,g+=x}}}})((r=>o=>{let i=Yf(r,1e3*o);return 86400*Ka((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&Jd(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})(a),(r=>{let o=r.split("/").pop();return Wf[o]||60})(e))}B(e){return this.ke.we((n=>zd(n)[0])(e))*fn}N(e){let n=86400*Pt(e)+As(e),a=uu(e);return this.ke.xe(n).map(r=>Ct(BigInt(r)*Ln+BigInt(a)))}O(e,n){let[a,r]=zd(e),o=this.ke.O(a+(n>0||r?1:0),n);if(o!==void 0)return BigInt(o)*Ln}};function Ld(){return Math.floor(Date.now()/1e3)}function rg(t,e){return[t,e]}function Rd(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function lo(t){return fs(t,-1e10,864e10)}function kh(t,e,n){let a=Ae(n,Ue(e,cu,du),ml,[],0);if(a.timeZone!==void 0){let r=er(e,a),o=yr(a),i=Qe(t(a.timeZone));return{epochNanoseconds:ka(i,pe(r,o),a.offset),timeZone:i,calendar:e}}return er(e,a)}function wh(t,e,n,a){let r=Ae(n,Ue(e,cu,du),ml,Ss,0),o=t(r.timeZone),[i,s,l,c]=jo(e,r,()=>ua(a)),d=yr(r,s),u=Qe(o);return Et(ka(u,pe(i,d),r.offset,l,c),u,e)}function Ch(t,e,n){let a=Ae(e,Ue(t,su,lu),pl,[],0),[r,o]=jo(t,a,()=>[re(n)]);return kr(r,yr(a,o),t)}function Eh(t,e,n,a=[]){return er(t,Ae(e,Ue(t,Zn,$n),ut,a),n)}function Sh(t,e,n,a){return fl(t,Ae(e,Ue(t,cr,ru),ut,a),n)}function Th(t,e,n,a){let r=Ae(n,Ue(t,Zn,$n),ut,qn,0);return e&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),gl(t,r,a)}function Ah(t,e){return yr(Ae(t,is,hl,[],1),re(e))}function Mh(t){let e=Ae(t,Eu,ch);return Pe(xn({...De,...e}))}function yt(t){D(Ud(t))}function Ih(t){let e=yn(t=Rs(t)),n;return e||yt(t),e.C?n=0:e.offset?n=Vo(e.offset):yt(t),e.timeZoneId&&ul(e.timeZoneId,1),mr(e),dt($s(e,n))}function Dh(t,e){let n=yn(Fe(t));return n||yt(t),n.timeZoneId?Hh(n,e,void 0):(n.C&&yt(t),ms(n,e))}function zh(t,e,n){let a=yn(Fe(t));return a&&a.timeZoneId||yt(t),Hh(a,e,n)}function _h(t,e){let n=yn(Fe(t));return n&&!n.C||yt(t),Vh(n,e)}function Oh(t,e){let n=_l(zl(Fe(t)),void 0,e);return ge(n,n.calendar)}function Ph(t,e){let n=Ol(Fe(t));if(n)return Dl(n),ge(Do(Kt(n)),e(n.calendarId));let a=_l(zl(t),og,e),{calendar:r}=a;return ge(Qa(r,a),r)}function Dl(t){t.calendarId!=="iso8601"&&D($t(t.calendarId))}function Nh(t,e){let n=Pl(Fe(t));if(n)return Dl(n),ge(Kt(n),e(n.calendarId));let a=_l(zl(t),ig,e),{calendar:r}=a,{year:o,month:i,day:s}=fe(r,a),[l,c]=Rn(r,o,i),{year:d,month:u}=((m,p,b,f)=>{let g=m?m.u(p,b,f):ss(p,b);return g||D("Cannot guess year"),g})(r,l,c,s);return ge(Ke(Fn(r,d,u,s)),r)}function Bh(t){let e=(a=>{let r=jh(a);return r?(Cr(r[13]),qh(r,1)):void 0})(t=Fe(t));if(!e){let a=yn(t);a&&a.re||yt(t),a.C&&D($t("Z")),Dl(a),e=a}let n;return(n=Ol(t))&&_d(n)&&yt(t),(n=Pl(t))&&_d(n)&&yt(t),Yn(ur(e))}function Lh(t){let e=pg.exec(Fe(t));return e||yt(t),Pe(xn((n=>{let a=0,r=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),...ol(o,2,we)};return a||D(Fd(we)),xs(n[1])<0&&(i=He(i)),i;function s(l,c,d){let u=0,m=0;return d&&([u,o]=zt(o,wt[d])),l!==void 0&&(r&&D($t(l)),m=(p=>{let b=parseInt(p);return Number.isFinite(b)||D($t(p)),b})(l),a=1,c&&(o=vs(c)*(wt[d]/fn),r=1)),u+m}})(e)))}function Rh(t){let e=yn(t)||Ol(t)||Pl(t);if(e)return e.calendarId;let n=jh(t);return n?Cr(n[13]).calendarId:t}function Fh(t){let e=yn(t);return e&&(e.timeZoneId||e.C&&"UTC"||e.offset)||t}function zl(t){let e=yn(t);return e&&!e.C||yt(t),e}function _l(t,e,n){return e&&t.calendarId==="iso8601"?(Kt(t),t.re&&ur(t),ms(e(t),n)):t.re?Vh(t,n):ms(t,n)}function og(t){let e=12*t.year+t.month===Ou?20:1;return{...t,day:e}}function ig(t){return{...t,year:1972}}function Hh(t,e,n){let a=Qe(Zo(t.timeZoneId)),r;if(mr(t),t.re){let i=t.offset?Vo(t.offset):void 0,[,s,l]=ua(n);r=ka(a,t,i,s,l,!(a.X||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.C)}else ua(n),r=hn(a,t);var o;return Ct(r),Et(r,a,e(t.calendarId))}function Vh(t,e){return mr(t),Un(t),{...pe(t,t),calendar:e(t.calendarId)}}function ms(t,e){return Kt(t),Ke(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function bo(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var sg="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+bo(8)+"(Z|([+-])"+bo(15)+")?)?",lg=pa("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),cg=pa("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),dg=pa(sg+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),ug=pa("T?"+bo(2)+`(([+-])${bo(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),hg=new RegExp("\\[(!?)([^\\]]*)\\]","g"),pg=pa("([+-])?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 yn(t){let e=dg.exec(t);return e?(n=>{let a=n[12],r=(a||"").toUpperCase()==="Z";return{year:Zh(n),month:parseInt(n[5]),day:parseInt(n[6]),...qh(n,7),...Cr(n[19]),re:!!n[7],C:r,offset:r?void 0:a}})(e):void 0}function Ol(t){let e=lg.exec(t);if(e)return(n=>({year:Zh(n),month:parseInt(n[4]),day:1,...Cr(n[5])}))(e)}function Pl(t){let e=cg.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...Cr(n[3])}))(e):void 0}function jh(t){let e=ug.exec(t);if(e)return e[6]&&Vo(e[6]),e}function qh(t,e){let n=sa(t[e+3]);return{...Ms(vs(t[e+4]||""))[0],hour:sa(t[e]),minute:sa(t[e+2]),second:n===60?59:n}}function Zh(t){let e=xs(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&D($t(-0)),e*n}function Cr(t){let e,n,a=[];return t.replace(hg,(r,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(a.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&D($t(r)):(n&&D($t(r)),n=l),""}),a.length>1&&e&&D($t(t)),{timeZoneId:n,calendarId:a[0]||"iso8601"}}function Sa(t,e,n){let a=Object.assign(Object.create(null),e);return ns(a,n,au),Ea(t)&&(ns(a,n,tf),t&&t.ge&&ns(a,n,nf,fa)),a}function ns(t,e,n,a){let r=0,o=[];for(let i of n)e[i]!==void 0?r=1:o.push(i);if(Object.assign(t,e),r)for(let i of a||o)delete t[i]}function $h(t,e,n){let{calendar:a,timeZone:r}=t,o=Ue(a,rf,of),i=ze(t),{year:s,month:l,day:c}=fe(a,i),d={year:s,monthCode:Er(a,s,l),day:c,hour:i.hour,minute:i.minute,second:i.second,millisecond:i.millisecond,microsecond:i.microsecond,nanosecond:i.nanosecond,offset:i.offsetNanoseconds},u=Ae(e,o,ml),m=Sa(a,d,u),p={...d,...u},[b,f,g,x]=jo(a,m,()=>ua(n,2));return Et(ka(r,pe(b,Co(p,f)),p.offset,g,x),r,a)}function Uh(t,e,n){let{calendar:a}=t,r=Ue(a,su,lu),{year:o,month:i,day:s}=fe(a,t),l={year:o,monthCode:Er(a,o,i),day:s,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,microsecond:t.microsecond,nanosecond:t.nanosecond},c=Ae(e,r,pl),d=Sa(a,l,c),u={...l,...c},[m,p]=jo(a,d,()=>[re(n)]);return kr(m,Co(u,p),a)}function Yh(t,e,n){let{calendar:a}=t,r=Ue(a,Zn,$n),{year:o,month:i,day:s}=fe(a,t);return er(a,Sa(a,{year:o,monthCode:Er(a,o,i),day:s},Ae(e,r,ut)),n)}function Wh(t,e,n){let{calendar:a}=t,r=Ue(a,cr,ru),{year:o,month:i}=fe(a,t);return fl(a,Sa(a,{year:o,monthCode:Er(a,o,i)},Ae(e,r,ut)),n)}function Gh(t,e,n){let{calendar:a}=t,r=Ue(a,Zn,$n),{year:o,month:i,day:s}=fe(a,t);return gl(a,Sa(a,{monthCode:Er(a,o,i),day:s},Ae(e,r,ut)),n)}function Kh(t,e,n){return((a,r,o)=>yr({...Ot(is,a),...Ae(r,is,hl)},re(o)))(t,e,n)}function Xh(t,e){return Pe((n=t,a=e,xn({...n,...Ae(a,Eu,ch)})));var n,a}function Er(t,e,n){let[a,r]=Rn(t,e,n);return tu(a,r)}function Jh(t,e,n){return Et(t.epochNanoseconds,e,n)}function Qh(t){return dt(t.epochNanoseconds)}function Nl(t){return Nt(ze(t),t.calendar)}function Bl(t){return ge(ze(t),t.calendar)}function Ll(t){return Yn(ze(t))}function ep(t,e,n){let a=wa(e,t,(r=>Iu(st(r)))(n));return Et(Ct(a),e,t.calendar)}function tp(t,e,n,a){let r=t(a.timeZone),o=a.plainTime,i=o!==void 0?e(o):void 0,s=Qe(r),l;return l=i?wa(s,pe(n,i)):hn(s,pe(n,Ge)),Et(l,s,n.calendar)}function np(t,e,n){return ip(t,Ot(Ue(t,dr,ou),e),Ae(Pn(n),qn,ut,[]))}function ap(t,e,n){let a=Ue(t,ko,af);return ip(t,Ot(iu,e),Ae(Pn(n),a,ut,[]))}function rp(t,e){return gl(t,Ae(e,iu,ut))}function op(t,e,n){return fl(t,Ae(e,Ue(t,dr,ou),ut),n)}function ip(t,e,n){let a=Ue(t,sf,lf),r=Sa(t,e,n);return r=Ae(r,a,ut,[]),er(t,r)}function sp(t){return dt(Ct(BigInt(Mo(t))*ba))}function lp(t){return dt(Ct(Ao(t)))}function Ta(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function cp(t,e){return t.timeZone!==void 0&&de("Cannot specify TimeZone"),t.timeZone=e,t}function Aa(t,e,n){let a=t.resolvedOptions().calendar;!n&&e.calendar===lt||kt(e.calendar)===a||D("Mismatching Calendars")}function Kn(t,e,n,a,r){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,m={},p={},b={},f=0,g=0;for(let I of Object.keys(l)){let R=l[I];R===void 0||s.has(I)||(o.has(I)?I==="dateStyle"?d=R:I==="timeStyle"?u=R:m[I]=R:I==="era"?p[I]=R:i.has(I)?I==="dateStyle"||I==="timeStyle"?g=1:f=1:b[I]=R)}let x=d!==void 0,y=u!==void 0,w=x||y,S=Object.keys(m).length>0,A=f||g,P=S||x||y,N=Object.keys(p).length>0;(!c&&A||c&&A&&!P||w&&(S||N||f))&&de("Invalid formatting options");let C={};return w||P||Object.assign(C,a),Object.assign(C,m,p,b),x&&(r?Object.assign(C,r[d]):C.dateStyle=d),y&&(C.timeStyle=u),C}}var dp={year:"numeric",month:"numeric",day:"numeric"},up={hour:"numeric",minute:"numeric",second:"numeric"},Rl=Object.assign({},dp,up),Fl=["weekday","year","month","day","dateStyle"],Sr=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],Hl=Fl.concat(Sr),mg=["weekday","day"].concat(Sr),bg=["weekday","year"].concat(Sr),hp=Kn(Hl,[],[],Rl),pp=Kn(Hl,[],[],{...Rl,timeZoneName:"short"}),mp=Kn(Hl,[],["timeZoneName"],Rl),bp=Kn(Fl,Sr,["timeZoneName"],dp),fp=Kn(Sr,Fl,["timeZoneName","era"],up),gp=Kn(["year","month","dateStyle"],mg,["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"}}),vp=Kn(["month","day","dateStyle"],bg,["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 xp(t,e){let{timeZone:n}=t,a=ze(t),{offsetNanoseconds:r}=a,o=e||Ge,i;return i=e?ka(n,pe(a,o),r,2):hn(n,pe(a,o)),Et(i,n,t.calendar)}function $o(t){let e=Uo(),n=t.B(e);return pr(e+BigInt(n))}function Uo(){return BigInt(Date.now())*ba}function Ma(){return new Bt().resolvedOptions().timeZone}var Vl="PlainYearMonth",jl="PlainMonthDay",ql="PlainDate",Zl="PlainDateTime",$l="PlainTime",Ul="ZonedDateTime",Yl="Instant",Wl="Duration";function Jt(t,e,n,...a){return Object.defineProperties(e,Yd(t)),Object.defineProperties(e.prototype,nr("Temporal."+t)),Object.defineProperties(e.prototype,bn(r=>({get(){return r(n(this))},configurable:1}),Object.assign({},...a))),e}var Qt=gs.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:gs;function en(){de(qd)}function tn(){de(jd)}var kp={era(t){return br(t.calendar,t).era},eraYear(t){return br(t.calendar,t).eraYear},year(t){return fe(t.calendar,t).year},month(t){return fe(t.calendar,t).month},monthCode(t){return To(t.calendar,t)}},Yo={era(t){return br(t.calendar,t).era},eraYear(t){return br(t.calendar,t).eraYear},year(t){return fe(t.calendar,t).year},month(t){return fe(t.calendar,t).month},monthCode(t){return To(t.calendar,t)},day(t){return fe(t.calendar,t).day}},wp={monthCode(t){return To(t.calendar,t)},day(t){return fe(t.calendar,t).day}},Gl={daysInMonth(t){return zs(t.calendar,t)},daysInYear(t){return _s(t.calendar,t)},monthsInYear(t){return Ds(t.calendar,t)},inLeapYear(t){return Is(t.calendar,t)}},Tr={dayOfWeek(t){return So(t)},dayOfYear(t){return ku(t.calendar,t)},weekOfYear(t){return wu(t.calendar,t)},yearOfWeek(t){return Cu(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return zs(t.calendar,t)},daysInYear(t){return _s(t.calendar,t)},monthsInYear(t){return Ds(t.calendar,t)},inLeapYear(t){return Is(t.calendar,t)}};function yp(t){return xo(Object.keys(t))}yp(Gl),yp(Tr);function En(t){let e=Fe(t).toLowerCase();return e===ws?lt:e===Xd?Qd:void D($d(t,"temporal-polyfill/full"))}function Ir(t=ws){return En(t)}var Ep=new WeakMap,Sp=Jt(Ul,class{constructor(t,e,n=void 0){let a=Ct(Ao(t)),r=Qe(xh(e)),o=Ir(n);Tp(this,Et(a,r,o))}static from(t,e=void 0){return et(Ia(t,e))}static compare(t,e){return xr(Ia(t),Ia(e))}get calendarId(){return kt(ce(this).calendar)}get timeZoneId(){return ce(this).timeZone.id}get epochMilliseconds(){return gr(ce(this))}get epochNanoseconds(){return Us(ce(this))}get offset(){return wr(ze(ce(this)).offsetNanoseconds)}get offsetNanoseconds(){return ze(ce(this)).offsetNanoseconds}get hoursInDay(){return Ru(ce(this))}with(t,e=void 0){return et($h(ce(this),Pa(t),e))}withCalendar(t){return et({...ce(this),calendar:Ko(t)})}withTimeZone(t){return et({...ce(this),timeZone:Qe(mt(t))})}withPlainTime(t=void 0){return et(xp(ce(this),Ql(t)))}add(t,e=void 0){let n=ce(this);return et(Hn(n,Re(t),e))}subtract(t,e=void 0){let n=ce(this);return et(Hn(n,He(Re(t)),e))}until(t,e=void 0){let n=ce(this),a=Ia(t),r=Xt(n.calendar,a.calendar);return _e(Pe(Js(0,r,n,a,e)))}since(t,e=void 0){let n=ce(this),a=Ia(t),r=Xt(n.calendar,a.calendar);return _e(Pe(Js(1,r,n,a,e)))}round(t){let e=ce(this),[n,a,r]=fr(t);return et(Lu(e,n,a,r))}startOfDay(){return et(Fu(ce(this)))}equals(t){return ah(ce(this),Ia(t))}toInstant(){return nn(Qh(ce(this)))}toPlainDateTime(){return Lt(Nl(ce(this)))}toPlainDate(){return Rt(Bl(ce(this)))}toPlainTime(){return Cn(Ll(ce(this)))}toLocaleString(t=void 0,e={}){let n=ce(this),a=new Bt(t,cp(pp(e),qu(n)));return Aa(a,n),a.format(gr(n))}toString(t=void 0){return kl(ce(this),t)}toJSON(){return kl(ce(this))}getTimeZoneTransition(t){let e=ce(this),n=Vu(e,t);return n?et({...e,epochNanoseconds:n}):null}valueOf(){return tn()}},fg,Yo,Tr,lr);function et(t){return Tp(Object.create(Sp.prototype),t)}function ce(t){return Ft(t)||en()}function fg(t){let e=ce(t);return{...ze(e),calendar:e.calendar}}function Ft(t){return Ep.get(t)}function Ia(t,e){if(Xe(t)){let n=Ft(t);if(n)return ua(e),n;let a=Dr(t);return wh(mt,a,t,e)}return zh(t,En,e)}function Tp(t,e){return Ep.set(t,e),Qt(t),t}function mt(t){if(Xe(t)){let e=Ft(t);return e||de(bs(t)),e.timeZone.id}return(e=>Zo(Fh(Fe(e))))(t)}var Ap=new WeakMap,Mp=Jt(Yl,class{constructor(t){let e=Ct(Ao(t));Dp(this,dt(e))}static from(t){return nn(Da(t))}static fromEpochMilliseconds(t){return nn(sp(t))}static fromEpochNanoseconds(t){return nn(lp(t))}static compare(t,e){return xr(Da(t),Da(e))}get epochMilliseconds(){return gr(ht(this))}get epochNanoseconds(){return Us(ht(this))}add(t){let e=ht(this);return nn(dt(Ks(e.epochNanoseconds,Re(t))))}subtract(t){let e=ht(this);return nn(dt(Ks(e.epochNanoseconds,He(Re(t)))))}until(t,e=void 0){return _e(Xs(0,ht(this),Da(t),e))}since(t,e=void 0){return _e(Xs(1,ht(this),Da(t),e))}round(t){let e=ht(this),[n,a,r]=fr(t,5,1);return nn(dt(No(e.epochNanoseconds,vr(n,a),r)))}equals(t){return nh(ht(this),Da(t))}toZonedDateTimeISO(t){return et(Jh(ht(this),Qe(mt(t))))}toLocaleString(t=void 0,e={}){let n=ht(this);return new Bt(t,hp(e)).format(gr(n))}toString(t=void 0){return yl(mt,ht(this),t)}toJSON(){return yl(mt,ht(this))}valueOf(){return tn()}});function nn(t){return Dp(Object.create(Mp.prototype),t)}function ht(t){return Xl(t)||en()}function Xl(t){return Ap.get(t)}function Da(t){if(Xe(t)){let e=Xl(t);if(e)return e;let n=Ft(t);if(n)return dt(n.epochNanoseconds)}return Ih(t)}var{toTemporalInstant:Ip}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return nn(dt(BigInt(Bs(t))*ba))}};function Dp(t,e){return Ap.set(t,e),Qt(t),t}var zp=new WeakMap,_p=Jt(jl,class{constructor(t,e,n=void 0,a){let r=Be(t),o=Be(e),i=Ir(n),s=Be(a??bu),l=Ke(Kt({year:s,month:r,day:o}));Op(this,ge(l,i))}static from(t,e=void 0){return Kl(Cp(t,e))}get calendarId(){return kt(kn(this).calendar)}with(t,e=void 0){return Kl(Gh(kn(this),Pa(t),e))}equals(t){return sh(kn(this),Cp(t))}toPlainDate(t){let e=kn(this);return Rt(ap(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=kn(this),a=new Bt(t,Ta(vp(e)));return Aa(a,n,1),a.format(hr(n))}toString(t=void 0){return Sl(kn(this),t)}toJSON(){return Sl(kn(this))}valueOf(){return tn()}},kn,wp);function Kl(t){return Op(Object.create(_p.prototype),t)}function kn(t){return Wo(t)||en()}function Wo(t){return zp.get(t)}function Cp(t,e){if(Xe(t)){let a=Wo(t);if(a)return re(e),a;let r=Up(t);return Th(r===void 0?lt:r,r===void 0,t,e)}let n=Nh(t,En);return re(e),n}function Op(t,e){return zp.set(t,e),Qt(t),t}var Pp=new WeakMap,Np=Jt(Vl,class{constructor(t,e,n=void 0,a){let r=Be(t),o=Be(e),i=Ir(n),s=Be(a??1),l=Do(Kt({year:r,month:o,day:s}));Bp(this,ge(l,i))}static from(t,e=void 0){return Mr(za(t,e))}static compare(t,e){return Gn(za(t),za(e))}get calendarId(){return kt(pt(this).calendar)}with(t,e=void 0){return Mr(Wh(pt(this),Pa(t),e))}add(t,e=void 0){let n=pt(this);return Mr(ge(Gs(0,n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=pt(this);return Mr(ge(Gs(1,n.calendar,n,Re(t),e),n.calendar))}until(t,e=void 0){let n=pt(this),a=za(t),r=Xt(n.calendar,a.calendar);return _e(tl(0,r,n,a,e))}since(t,e=void 0){let n=pt(this),a=za(t),r=Xt(n.calendar,a.calendar);return _e(tl(1,r,n,a,e))}equals(t){return ih(pt(this),za(t))}toPlainDate(t){let e=pt(this);return Rt(np(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=pt(this),a=new Bt(t,Ta(gp(e)));return Aa(a,n,1),a.format(hr(n))}toString(t=void 0){return El(pt(this),t)}toJSON(){return El(pt(this))}valueOf(){return tn()}},pt,kp,Gl);function Mr(t){return Bp(Object.create(Np.prototype),t)}function pt(t){return Go(t)||en()}function Go(t){return Pp.get(t)}function za(t,e){if(Xe(t)){let a=Go(t);if(a)return re(e),a;let r=Dr(t);return Sh(r,t,e)}let n=Ph(t,En);return re(e),n}function Bp(t,e){return Pp.set(t,e),Qt(t),t}function gg(t){if(!Xe(t))return;let e=Xl(t);return e?[Yl,e]:(e=Ft(t),e?[Ul,e]:(e=Xn(t),e?[Zl,e]:(e=Na(t),e?[ql,e]:(e=Jl(t),e?[$l,e]:(e=Go(t),e?[Vl,e]:(e=Wo(t),e?[jl,e]:(e=ec(t),e?[Wl,e]:void 0)))))))}function Pa(t){return(gg(t)||t.calendar!==void 0||t.timeZone!==void 0)&&de(Hd),t}var Lp=new WeakMap,Rp=Jt($l,class{constructor(t=0,e=0,n=0,a=0,r=0,o=0){let i=ur(bn(Be,{hour:t,minute:e,second:n,millisecond:a,microsecond:r,nanosecond:o}));Fp(this,Yn(i))}static from(t,e=void 0){return Cn(wn(t,e))}static compare(t,e){return Ho(wn(t),wn(e))}with(t,e=void 0){return Cn(Kh(St(this),Pa(t),e))}add(t){let e=St(this);return Cn(Bo(e,Re(t))[0])}subtract(t){let e=St(this);return Cn(Bo(e,He(Re(t)))[0])}until(t,e=void 0){return _e(nl(0,St(this),wn(t),e))}since(t,e=void 0){return _e(nl(1,St(this),wn(t),e))}round(t){let e=St(this),[n,a,r]=fr(t,5);return Cn(_o(e,ya(n,a),r)[0])}equals(t){return lh(St(this),wn(t))}toLocaleString(t=void 0,e={}){let n=St(this);return new Bt(t,Ta(fp(e))).format(Ts(n))}toString(t=void 0){return Tl(St(this),t)}toJSON(){return Tl(St(this))}valueOf(){return tn()}},St,lr);function Cn(t){return Fp(Object.create(Rp.prototype),t)}function St(t){return Jl(t)||en()}function Jl(t){return Lp.get(t)}function wn(t,e){if(Xe(t)){let a=Jl(t);if(a)return re(e),a;let r=Xn(t);if(r)return re(e),Yn(r);let o=Ft(t);return o?(re(e),Ll(o)):Ah(t,e)}let n=Bh(t);return re(e),n}function Ql(t){return t===void 0?void 0:wn(t)}function Fp(t,e){return Lp.set(t,e),Qt(t),t}var Hp=new WeakMap,Vp=Jt(Zl,class{constructor(t,e,n,a=0,r=0,o=0,i=0,s=0,l=0,c=void 0){let d=Un(mr(bn(Be,{year:t,month:e,day:n,hour:a,minute:r,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=Ir(c);jp(this,Nt(d,u))}static from(t,e=void 0){return Lt(_a(t,e))}static compare(t,e){let n=_a(t),a=_a(e);return cl(n,a)}get calendarId(){return kt(Le(this).calendar)}with(t,e=void 0){return Lt(Uh(Le(this),Pa(t),e))}withCalendar(t){let e=Le(this);return Lt(Nt(e,Ko(t)))}withPlainTime(t=void 0){let e=Le(this);return Lt(kr(e,Ql(t),e.calendar))}add(t,e=void 0){let n=Le(this);return Lt(Nt(Vn(n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=Le(this);return Lt(Nt(Vn(n.calendar,n,He(Re(t)),e),n.calendar))}until(t,e=void 0){let n=Le(this),a=_a(t),r=Xt(n.calendar,a.calendar);return _e(Qs(0,r,n,a,e))}since(t,e=void 0){let n=Le(this),a=_a(t),r=Xt(n.calendar,a.calendar);return _e(Qs(1,r,n,a,e))}round(t){let e=Le(this),[n,a,r]=fr(t);return Lt(Nt(zo(e,ya(n,a),r),e.calendar))}equals(t){return rh(Le(this),_a(t))}toZonedDateTime(t,e=void 0){return et(ep(Le(this),Qe(mt(t)),e))}toPlainDate(){let t=Le(this);return Rt(ge(t,t.calendar))}toPlainTime(){return Cn(Yn(Le(this)))}toLocaleString(t=void 0,e={}){let n=Le(this),a=new Bt(t,Ta(mp(e)));return Aa(a,n),a.format(pu(n))}toString(t=void 0){return wl(Le(this),t)}toJSON(){return wl(Le(this))}valueOf(){return tn()}},Le,Yo,Tr,lr);function Lt(t){return jp(Object.create(Vp.prototype),t)}function Le(t){return Xn(t)||en()}function Xn(t){return Hp.get(t)}function _a(t,e){if(Xe(t)){let a=Xn(t);if(a)return re(e),a;let r=Na(t);if(r)return re(e),Nt(pe(r,Ge),r.calendar);let o=Ft(t);if(o)return re(e),Nl(o);let i=Dr(t);return Ch(i,t,e)}let n=_h(t,En);return re(e),n}function jp(t,e){return Hp.set(t,e),Qt(t),t}var qp=new WeakMap,Zp=Jt(ql,class{constructor(t,e,n,a=void 0){let r=Ke(Kt(bn(Be,{year:t,month:e,day:n}))),o=Ir(a);$p(this,ge(r,o))}static from(t,e=void 0){return Rt(Oa(t,e))}static compare(t,e){return Gn(Oa(t),Oa(e))}get calendarId(){return kt(Ve(this).calendar)}with(t,e=void 0){let n=Ve(this);return Rt(Yh(n,Pa(t),e))}withCalendar(t){let e=Ve(this);return Rt(ge(e,Ko(t)))}add(t,e=void 0){let n=Ve(this);return Rt(ge(Ca(n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=Ve(this);return Rt(ge(Ca(n.calendar,n,He(Re(t)),e),n.calendar))}until(t,e=void 0){let n=Ve(this),a=Oa(t),r=Xt(n.calendar,a.calendar);return _e(el(0,r,n,a,e))}since(t,e=void 0){let n=Ve(this),a=Oa(t),r=Xt(n.calendar,a.calendar);return _e(el(1,r,n,a,e))}equals(t){return oh(Ve(this),Oa(t))}toZonedDateTime(t){let e=Xe(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t};return et(tp(mt,wn,Ve(this),e))}toPlainDateTime(t=void 0){let e=Ve(this);return Lt(kr(e,Ql(t),e.calendar))}toPlainYearMonth(){let t=Ve(this);return Mr(op(t.calendar,this))}toPlainMonthDay(){let t=Ve(this);return Kl(rp(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=Ve(this),a=new Bt(t,Ta(bp(e)));return Aa(a,n),a.format(hr(n))}toString(t=void 0){return Cl(Ve(this),t)}toJSON(){return Cl(Ve(this))}valueOf(){return tn()}},Ve,Yo,Tr);function Rt(t){return $p(Object.create(Zp.prototype),t)}function Ve(t){return Na(t)||en()}function Na(t){return qp.get(t)}function Oa(t,e){if(Xe(t)){let a=Na(t);if(a)return re(e),a;let r=Xn(t);if(r)return re(e),ge(r,r.calendar);let o=Ft(t);if(o)return re(e),Bl(o);let i=Dr(t);return Eh(i,t,e)}let n=Oh(t,En);return re(e),n}function $p(t,e){return qp.set(t,e),Qt(t),t}function Dr(t){let e=Up(t);return e===void 0?lt:e}function Up(t){let{calendar:e}=t;if(e!==void 0)return Ko(e)}function Ko(t){if(Xe(t)){let e=Na(t)||Xn(t)||Ft(t)||Wo(t)||Go(t);return e||de(Zd(t)),e.calendar}return(e=>En(Rh(Fe(e))))(t)}var Yp=new WeakMap,Wp=Jt(Wl,class{constructor(t=0,e=0,n=0,a=0,r=0,o=0,i=0,s=0,l=0,c=0){let d=xn(bn(Mo,{years:t,months:e,weeks:n,days:a,hours:r,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));Gp(this,Pe(d))}static from(t){return _e(Re(t))}static compare(t,e,n=void 0){return th(Ar,Re(t),Re(e),n)}get sign(){return at(this).sign}get blank(){return!at(this).sign}with(t){return _e(Xh(at(this),t))}negated(){return _e(sl(at(this)))}abs(){return _e(Ju(at(this)))}add(t,e=void 0){return _e(il(Ar,0,at(this),Re(t),e))}subtract(t,e=void 0){return _e(il(Ar,1,at(this),Re(t),e))}round(t){return _e(Xu(Ar,at(this),t))}total(t){return Nu(Ar,at(this),t)}toLocaleString(t=void 0,e){let n=at(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):qo(n,e)}toString(t=void 0){return qo(at(this),t)}toJSON(){return qo(at(this))}valueOf(){return tn()}},at,Os);function _e(t){return Gp(Object.create(Wp.prototype),t)}function at(t){return ec(t)||en()}function ec(t){return Yp.get(t)}function Re(t){return Xe(t)?ec(t)||Mh(t):Lh(t)}function Ar(t){if(t!==void 0){if(Xe(t)){let e=Ft(t);if(e)return e;let n=Na(t);if(n)return n;let a=Xn(t);if(a)return ge(a,a.calendar);let r=Dr(t);return kh(mt,r,t)}return Dh(t,En)}}function Gp(t,e){return Yp.set(t,e),Qt(t),t}var vg=Object.defineProperties({},{...nr("Temporal.Now"),...vo({timeZoneId(){return Ma()},instant(){return nn(dt(Uo()))},zonedDateTimeISO(t=Ma()){let e=Qe(mt(t));return et(Et(Uo(),e))},plainDateTimeISO(t=Ma()){let e=$o(Qe(mt(t)));return Lt(Nt(e))},plainDateISO(t=Ma()){let e=$o(Qe(mt(t)));return Rt(ge(e))},plainTimeISO(t=Ma()){let e=$o(Qe(mt(t)));return Cn(Yn(e))}})}),Kp=Object.defineProperties({},{...nr("Temporal"),...vo({PlainYearMonth:Np,PlainMonthDay:_p,PlainDate:Zp,PlainTime:Rp,PlainDateTime:Vp,ZonedDateTime:Sp,Instant:Mp,Duration:Wp,Now:vg})});var Me=Yi||Kp;var Yx=Yi?Date.prototype.toTemporalInstant:Ip;var Xo=class extends O{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,a){if(e==="value"){this.applyFormValue(a);return}e==="data-focus"&&this.focusCell(a)}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 a=n.dataset.date;a&&this.requestSelect(a)};requestSelect(e){let n=this.currentIso();if(e===n)return;let a=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!a||(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=this.#t;if(n.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??n.find(i=>i.tabIndex===0)??null;if(!a?.dataset.date)return;let r=null;switch(e.key){case"Home":case"End":{let i=n.indexOf(a);if(i<0)return;let s=i-i%7;r=n[e.key==="Home"?s:s+6]?.dataset.date??null;break}default:{let i=Me.PlainDate.from(a.dataset.date),s;switch(e.key){case"ArrowLeft":s=i.subtract({days:1});break;case"ArrowRight":s=i.add({days:1});break;case"ArrowUp":s=i.subtract({days:7});break;case"ArrowDown":s=i.add({days:7});break;case"PageUp":s=i.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":s=i.add({[e.shiftKey?"years":"months"]:1});break;default:return}r=s.toString()}}if(!r)return;e.preventDefault();let o=n.find(i=>i.dataset.date===r);o&&!o.hasAttribute("disabled")&&o.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:r}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,a){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:a}})),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 Xp(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Xo)}Xp();var Jo=class extends ea{ariaProp="ariaChecked"};function Jp(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",Jo)}Jp();var Qo=class extends O{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(a=>[...a.addedNodes,...a.removedNodes].some(r=>r.nodeName==="A-RADIO"||r.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,a){this.sync(),e==="state"&&this.alive&&a!==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,a=n.find(o=>o.value===e&&e!=null)??null,r=a?a.value:null;this.internals?.setFormValue(r,r);for(let o of n)o.selected=o===a;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=a)};requestSelect(e){let n=this.#e;if(e===n)return;let a=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||a&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,a,r){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:r,detail:{next:e,prev:n,reason:a}}))}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)return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let a=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){a&&n.includes(a)&&(e.preventDefault(),this.requestSelect(a.value));return}let r=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!r&&!o)return;e.preventDefault();let i=a?n.indexOf(a):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(r?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function Qp(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",Qo)}Qp();var Tt=class extends O{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals.states.add("active"):this.internals.states.delete("active"))}get active(){return this.internals?.states.has("active")??!1}connectedCallback(){tc(this.doc)}},xg="a-menu-item, a[data-anta-menu-item]";function zr(t){return t instanceof Tt||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function tc(t){t.hasKeyListenerForAMenuItem||(Wr(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?.(xg)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function em(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",Tt)}em();var G=4,ei=96,yg=130,kg=130,wg=500,Cg='a-button, button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',Eg="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",Sg="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",Z=[],ni=!1,Ba=null,nc=null;function Tg(t,e){ni||(t.addEventListener("pointerdown",rm,!0),t.addEventListener("keydown",sm,!0),t.addEventListener("keyup",lm,!0),t.addEventListener("contextmenu",om,!0),e.addEventListener("resize",im),Ba=t,nc=e,ni=!0)}function nm(){ni&&(Ba?.removeEventListener("pointerdown",rm,!0),Ba?.removeEventListener("keydown",sm,!0),Ba?.removeEventListener("keyup",lm,!0),Ba?.removeEventListener("contextmenu",om,!0),nc?.removeEventListener("resize",im),Ba=null,nc=null,ni=!1)}function am(t,e=!1){let n=t.composedPath();for(let a of Z){if(n.includes(a.surface))return!0;let r=a.triggerAnchor;if(r&&!(e&&a.hasAttribute("context"))&&n.includes(r))return!0}return!1}function Ag(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 Mg(t){for(let e of Z)if(e.contains(t)||e.surface.contains(t))return!0;return!1}Dc({isOpen:()=>Z.length>0,contains:Mg});function rm(t){Z.length&&(am(t,t.button===0)||ac(t))}function om(t){Z.length&&(am(t)||ac(t))}function im(){Z.length&&ac()}function sm(t){let e=Z[Z.length-1];e&&e.handleKey(t)}function lm(t){let e=Z[Z.length-1];e&&e.handleKeyUp(t)}function ac(t){Z[0]?.requestClose(t)}function Ig(){for(let t=Z.length-1;t>=0;t--){let e=Z[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}Z.length=0,nm()}var ti=new WeakMap;function Dg(t){for(let e of t){let n=ti.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var tm=typeof IntersectionObserver<"u"?new IntersectionObserver(Dg,{root:null,rootMargin:"0px",threshold:0}):null,ai=class extends O{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;typeBuffer="";typeTimer;activeItem=null;comboObserver;#e;#t;#n;#a;#r=new Set;#o=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=`
829
829
  :host { display: contents; }
830
830
 
831
831
  .container {
@@ -921,11 +921,11 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
921
921
  -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%);
922
922
  mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
923
923
  }
924
- `,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let a=document.createElement("slot");a.setAttribute("name","header");let r=document.createElement("div");r.className="scroll",r.setAttribute("part","scroll"),r.append(document.createElement("slot")),r.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=r;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(a,r,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.cancelCloseTimer()}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#l&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){tc(this.doc),this.#m();let e=this.triggerAnchor;e&&(ti.set(e,this),em?.observe(e)),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer();let e=this.triggerAnchor;e&&ti.get(e)===this&&(ti.delete(e),em?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#m();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&&zr(this.parentElement)}get#u(){return this.hasAttribute("context")}get#h(){return this.hasAttribute("coord")}get#l(){return!this.hasAttribute("nohover")}get#c(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:G}get#s(){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&&zr(e)?e:this.previousElementSibling}get#d(){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.#d;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#x(){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.focusables().filter(e=>e instanceof Tt)}navigableItems(){return this.focusables().filter(e=>zr(e))}focusables(){return Array.from(this.querySelectorAll('a-menu-item, a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), a-input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [data-menu-search]')).filter(n=>n.closest("a-menu")===this&&!n.hasAttribute("disabled")&&this.isVisible(n))}seatInitialFocus(e){let n=this.navigableItems(),a=n.find(r=>r.hasAttribute("selected")||r.getAttribute("aria-checked")==="true"||r.getAttribute("aria-selected")==="true");a&&this.scrollItemIntoView(a),e&&(a??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let a=4,r=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<r.top+a?n.scrollTop-=r.top+a-o.top:o.bottom>r.bottom-a&&(n.scrollTop+=o.bottom-r.bottom+a)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,a=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",a?"14px":"0px")}get#p(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#f(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#p}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#f?.value;if(!e||!e.trim())return this.setActive(null);if(this.#p)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(a=>!a.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),a=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[a<0?0:(a+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[a<=0?n.length-1:a-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 r=this.activeItem.querySelector(":scope > a-copy");r&&Kr(r),this.#b=this.activeItem}return!0;default:return!1}}#b=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#b;this.#b=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=Z.indexOf(this);if(n!==-1){for(let r=Z.length-1;r>n;r--){let o=Z[r];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}Z.length=n+1}let a=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}a&&this.hide()}show(e,n=!1,a){if(this.isSubmenu){let i=this.#x;if(i){let s=Z.indexOf(i);if(s!==-1){for(let l=Z.length-1;l>s;l--)Z[l]._doHide();Z.length=s+1}}}else if(!Z.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=Z.length-1;l>=0;l--)if(Z[l]!==this&&Z[l].contains(i)){s=Z[l];break}}if(s){let l=Z.indexOf(s);for(let c=Z.length-1;c>l;c--){let d=Z[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}Z.length=l+1}else Mg()}if(Z.includes(this)){this.position(e);return}let r=Z.length===0;this._doShow(e,!r),Z.push(this),r&&Sg(this.doc,this.view);let o=this.#f;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.#f||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let e=Z.indexOf(this);if(e===-1){this._shown&&this._doHide();return}for(let n=Z.length-1;n>=e;n--)Z[n]._doHide();Z.length=e,Z.length===0&&tm()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,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(){this.#i(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states.add("open"):this.internals?.states.delete("open")}catch{}}#g(e){if(this.#i(),e||this.#h)return;let n=this.triggerAnchor;if(!n)return;this.#t=this.#k(n);let a=()=>{if(!this._shown){this.#e=void 0;return}let r=this.triggerAnchor;if(!r){this.#e=void 0;return}let o=this.#k(r);this.#v(o)||(this.#t=o,this.#y(r)),this.#e=this.view.requestAnimationFrame(a)};this.#e=this.view.requestAnimationFrame(a)}#y(e){if(this.#a===void 0||this.#n===void 0)return;let n=this.surface.getBoundingClientRect(),a=Dt(e).top+this.#a;a=Math.min(a,this.view.innerHeight-n.height-G),a=Math.max(G,a),this.surface.style.transform=`translate(${this.#n}px, ${Math.round(a)}px)`,this.updateScrollFade()}#i(){this.#e!==void 0&&(this.view.cancelAnimationFrame(this.#e),this.#e=void 0),this.#t=void 0,this.#n=void 0,this.#a=void 0}#k(e){let{left:n,top:a,right:r,bottom:o,width:i,height:s}=Dt(e);return[n,a,r,o,i,s]}#v(e){let n=this.#t;return!!n&&n.length===e.length&&n.every((a,r)=>a===e[r])}position(e,n=!1,a=!1){let r=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=G,d=G;if(e){l.style.maxHeight=`${Math.max(ei,s-2*G)}px`;let p=l.getBoundingClientRect();c=e[0],c+p.width>i-G&&(c=i-p.width-G),c=Math.max(G,c),d=e[1],d+p.height>s-G&&(d=d-p.height),d=Math.max(G,d)}else if(this.isSubmenu){let p=this.triggerAnchor?Dt(this.triggerAnchor):null;if(!p)return;l.style.maxHeight=`${Math.max(ei,s-2*G)}px`;let b=l.getBoundingClientRect();c=p.right+this.#c,c+b.width>i-G&&(c=p.left-b.width-this.#c),c=Math.max(G,c);let f=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),x=parseFloat(f.borderTopWidth)+parseFloat(f.paddingTop)+parseFloat(g.paddingTop);d=p.top-x,d+b.height>s-G&&(d=s-b.height-G),d=Math.max(G,d)}else{let p=this.triggerAnchor?Dt(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 b=this.#s;if(b.startsWith("right")||b.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(ei,s-2*G)}px`;let f=l.getBoundingClientRect(),g=i-p.right-2*G,x=p.left-2*G,y=b.startsWith("left");a&&this._flippedSide!==null?y=this._flippedSide:y&&x<f.width&&g>x?y=!1:!y&&g<f.width&&x>g&&(y=!0),this._flippedSide=y,c=y?p.left-f.width-this.#c:p.right+this.#c,c=Math.max(G,Math.min(c,i-f.width-G));let k=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";d=k==="center"?p.top+p.height/2-f.height/2:k==="end"?p.bottom-f.height:p.top,d+f.height>s-G&&(d=s-f.height-G),d=Math.max(G,d)}else{let f=s-p.bottom-2*G,g=p.top-2*G,x=b.startsWith("top");l.style.maxHeight="";let y=l.scrollHeight;a&&this._flippedTop!==null?x=this._flippedTop:x&&g<y&&f>g?x=!1:!x&&f<y&&g>f&&(x=!0),this._flippedTop=x;let k=x?g:f;l.style.maxHeight=`${Math.max(ei,Math.floor(k))}px`;let S=l.getBoundingClientRect(),M=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";c=M==="center"?p.left+p.width/2-S.width/2:M==="end"?p.right-S.width:p.left,c+S.width>i-G&&(c=i-S.width-G),c=Math.max(G,c),d=x?p.top-S.height-this.#c:p.bottom+this.#c,d=Math.max(G,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.#n=u,this.#a=m-Dt(this.triggerAnchor).top)};n?r():requestAnimationFrame(r)}onSurfaceClick=e=>{let n=!1,a=!1;for(let r of e.composedPath()){if(r===this.surface)break;r instanceof Element&&(r.matches(Eg)&&(a=!0),(r instanceof Tt||r.hasAttribute("data-menu-close"))&&(n=!0))}n&&!a&&e.stopPropagation();for(let r of e.composedPath()){if(r===this.surface)break;if(r instanceof Tt){!r.hasAttribute("disabled")&&!r.querySelector(":scope > a-menu")&&r.closest("a-menu")===this&&r.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let r of e.composedPath()){if(r===this.surface)break;if(r instanceof Element){if(r.hasAttribute("data-menu-open"))return;if(r instanceof Tt){if(r.hasAttribute("disabled")){e.preventDefault();return}return r.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(r.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(r.hasAttribute("data-menu-close"))return this.closeSystem(e)}}};closeSystem(e){(Z[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"])}#m(){let e=this.#C();for(let n of this.#r)e.has(n)||this.surface.removeEventListener(n,this.#o);for(let n of e)this.#r.has(n)||this.surface.addEventListener(n,this.#o);this.#r=e}handleKey(e){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.#p){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault();let l=n?s.indexOf(n):-1;if(l===-1){s[0]?.focus();return}let c=e.shiftKey?l===0?s.length-1:l-1:l===s.length-1?0:l+1;s[c]?.focus();return}let a=this.#f;if(a&&(n===a||a.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!zr(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 Tt)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",wg),n.find(r=>this.itemLabel(r).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#w(e){let n=Dt(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 a,r;this.#l&&(a=o=>{o.pointerType==="mouse"&&this.scheduleOpen()},r=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",a),e.addEventListener("pointerleave",r)),this.teardown=()=>{e.removeEventListener("click",n),a&&e.removeEventListener("pointerenter",a),r&&e.removeEventListener("pointerleave",r),this.listening=!1}}else if(this.#u){let n=a=>{Tg(a,e)||(a.preventDefault(),this.requestOpen({coord:[a.clientX,a.clientY],originEvent:a}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#p){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=r=>{let o=r.detail===0,i=this.#h?o?this.#w(e):[r.clientX,r.clientY]:void 0;this._shown?this.requestClose(r):this.requestOpen({coord:i,viaKeyboard:o,originEvent:r})},a=r=>{if(this._shown||e.matches(kg)||e.hasAttribute("disabled"))return;let o=e.matches(Cg);if(!(r.key==="ArrowDown"||r.key==="ArrowUp"||!o&&(r.key==="Enter"||r.key===" ")))return;r.preventDefault();let s=this.#h?this.#w(e):void 0;this.requestOpen({coord:s,viaKeyboard:!0,originEvent:r})};e.addEventListener("click",n),e.addEventListener("keydown",a),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",a),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()},xg))}scheduleClose(){this.cancelOpenTimer(),this._shown&&(this.#S||Z.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))||(this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},yg)))}get#S(){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 lm(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",ai)}lm();var ri=class extends P{};function cm(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",ri)}cm();var oi=class extends P{};function dm(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",oi)}dm();var ii=class extends ea{ariaProp="ariaSelected"};function um(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",ii)}um();var si=class extends P{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(a=>[...a.addedNodes,...a.removedNodes].some(r=>r.nodeName==="A-TAB"||r.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.#u()}attributeChangedCallback(e,n,a){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&a!==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#a(){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.#u();return}this.resizeObserver??=new this.view.ResizeObserver(this.#o),this.resizeObserver.observe(this)}#o=()=>{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)};#u(){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.#a,a=n.find(r=>r.value===e&&e!=null)??null;for(let r of n)r.selected=r===a;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=a),this.alive&&a&&a!==this.lastSelected&&this.#h(a),this.lastSelected=a};#h(e){let n=this.getBoundingClientRect(),a=e.getBoundingClientRect();this.#n?a.top<n.top?this.scrollTop-=n.top-a.top:a.bottom>n.bottom&&(this.scrollTop+=a.bottom-n.bottom):a.left<n.left?this.scrollLeft-=n.left-a.left:a.right>n.right&&(this.scrollLeft+=a.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let a=this.emitStateChange(e,n);this.hasAttribute("state")||a&&(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)return;let n=this.#a.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let a=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){a&&n.includes(a)&&(e.preventDefault(),this.requestSelect(a.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 r=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!r&&!o)return;e.preventDefault();let i=a?n.indexOf(a):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(r?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function hm(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",si)}hm();var li=class extends P{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 a=e!=null?this.tabs?.querySelector(`a-tab[value="${Dg(e)}"]`):null;this.internals.ariaLabelledByElements=a?[a]:[]}}};function Dg(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function pm(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",li)}pm();var zg="closerequest",_g=200,Og=`
924
+ `,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let a=document.createElement("slot");a.setAttribute("name","header");let r=document.createElement("div");r.className="scroll",r.setAttribute("part","scroll"),r.append(document.createElement("slot")),r.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=r;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(a,r,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.cancelCloseTimer()}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#l&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){tc(this.doc),this.#m();let e=this.triggerAnchor;e&&(ti.set(e,this),tm?.observe(e)),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer();let e=this.triggerAnchor;e&&ti.get(e)===this&&(ti.delete(e),tm?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#m();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&&zr(this.parentElement)}get#u(){return this.hasAttribute("context")}get#h(){return this.hasAttribute("coord")}get#l(){return!this.hasAttribute("nohover")}get#c(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:G}get#s(){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&&zr(e)?e:this.previousElementSibling}get#d(){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.#d;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#x(){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.focusables().filter(e=>e instanceof Tt)}navigableItems(){return this.focusables().filter(e=>zr(e))}focusables(){return Array.from(this.querySelectorAll('a-menu-item, a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), a-input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [data-menu-search]')).filter(n=>n.closest("a-menu")===this&&!n.hasAttribute("disabled")&&this.isVisible(n))}seatInitialFocus(e){let n=this.navigableItems(),a=n.find(r=>r.hasAttribute("selected")||r.getAttribute("aria-checked")==="true"||r.getAttribute("aria-selected")==="true");a&&this.scrollItemIntoView(a),e&&(a??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let a=4,r=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<r.top+a?n.scrollTop-=r.top+a-o.top:o.bottom>r.bottom-a&&(n.scrollTop+=o.bottom-r.bottom+a)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,a=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",a?"14px":"0px")}get#p(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#f(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#p}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#f?.value;if(!e||!e.trim())return this.setActive(null);if(this.#p)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(a=>!a.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),a=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[a<0?0:(a+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[a<=0?n.length-1:a-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 r=this.activeItem.querySelector(":scope > a-copy");r&&Kr(r),this.#b=this.activeItem}return!0;default:return!1}}#b=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#b;this.#b=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=Z.indexOf(this);if(n!==-1){for(let r=Z.length-1;r>n;r--){let o=Z[r];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}Z.length=n+1}let a=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}a&&this.hide()}show(e,n=!1,a){if(this.isSubmenu){let i=this.#x;if(i){let s=Z.indexOf(i);if(s!==-1){for(let l=Z.length-1;l>s;l--)Z[l]._doHide();Z.length=s+1}}}else if(!Z.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=Z.length-1;l>=0;l--)if(Z[l]!==this&&Z[l].contains(i)){s=Z[l];break}}if(s){let l=Z.indexOf(s);for(let c=Z.length-1;c>l;c--){let d=Z[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}Z.length=l+1}else Ig()}if(Z.includes(this)){this.position(e);return}let r=Z.length===0;this._doShow(e,!r),Z.push(this),r&&Tg(this.doc,this.view);let o=this.#f;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.#f||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let e=Z.indexOf(this);if(e===-1){this._shown&&this._doHide();return}for(let n=Z.length-1;n>=e;n--)Z[n]._doHide();Z.length=e,Z.length===0&&nm()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,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(){this.#i(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!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.#i(),e||this.#h)return;let n=this.triggerAnchor;if(!n)return;this.#t=this.#w(n);let a=()=>{if(!this._shown){this.#e=void 0;return}let r=this.triggerAnchor;if(!r){this.#e=void 0;return}let o=this.#w(r);this.#v(o)||(this.#t=o,this.#y(r)),this.#e=this.view.requestAnimationFrame(a)};this.#e=this.view.requestAnimationFrame(a)}#y(e){if(this.#a===void 0||this.#n===void 0)return;let n=this.surface.getBoundingClientRect(),a=Dt(e).top+this.#a;a=Math.min(a,this.view.innerHeight-n.height-G),a=Math.max(G,a),this.surface.style.transform=`translate(${this.#n}px, ${Math.round(a)}px)`,this.updateScrollFade()}#i(){this.#e!==void 0&&(this.view.cancelAnimationFrame(this.#e),this.#e=void 0),this.#t=void 0,this.#n=void 0,this.#a=void 0}#w(e){let{left:n,top:a,right:r,bottom:o,width:i,height:s}=Dt(e);return[n,a,r,o,i,s]}#v(e){let n=this.#t;return!!n&&n.length===e.length&&n.every((a,r)=>a===e[r])}position(e,n=!1,a=!1){let r=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=G,d=G;if(e){l.style.maxHeight=`${Math.max(ei,s-2*G)}px`;let p=l.getBoundingClientRect();c=e[0],c+p.width>i-G&&(c=i-p.width-G),c=Math.max(G,c),d=e[1],d+p.height>s-G&&(d=d-p.height),d=Math.max(G,d)}else if(this.isSubmenu){let p=this.triggerAnchor?Dt(this.triggerAnchor):null;if(!p)return;l.style.maxHeight=`${Math.max(ei,s-2*G)}px`;let b=l.getBoundingClientRect();c=p.right+this.#c,c+b.width>i-G&&(c=p.left-b.width-this.#c),c=Math.max(G,c);let f=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),x=parseFloat(f.borderTopWidth)+parseFloat(f.paddingTop)+parseFloat(g.paddingTop);d=p.top-x,d+b.height>s-G&&(d=s-b.height-G),d=Math.max(G,d)}else{let p=this.triggerAnchor?Dt(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 b=this.#s;if(b.startsWith("right")||b.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(ei,s-2*G)}px`;let f=l.getBoundingClientRect(),g=i-p.right-2*G,x=p.left-2*G,y=b.startsWith("left");a&&this._flippedSide!==null?y=this._flippedSide:y&&x<f.width&&g>x?y=!1:!y&&g<f.width&&x>g&&(y=!0),this._flippedSide=y,c=y?p.left-f.width-this.#c:p.right+this.#c,c=Math.max(G,Math.min(c,i-f.width-G));let w=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";d=w==="center"?p.top+p.height/2-f.height/2:w==="end"?p.bottom-f.height:p.top,d+f.height>s-G&&(d=s-f.height-G),d=Math.max(G,d)}else{let f=s-p.bottom-2*G,g=p.top-2*G,x=b.startsWith("top");l.style.maxHeight="";let y=l.scrollHeight;a&&this._flippedTop!==null?x=this._flippedTop:x&&g<y&&f>g?x=!1:!x&&f<y&&g>f&&(x=!0),this._flippedTop=x;let w=x?g:f;l.style.maxHeight=`${Math.max(ei,Math.floor(w))}px`;let S=l.getBoundingClientRect(),A=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";c=A==="center"?p.left+p.width/2-S.width/2:A==="end"?p.right-S.width:p.left,c+S.width>i-G&&(c=i-S.width-G),c=Math.max(G,c),d=x?p.top-S.height-this.#c:p.bottom+this.#c,d=Math.max(G,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.#n=u,this.#a=m-Dt(this.triggerAnchor).top)};n?r():requestAnimationFrame(r)}onSurfaceClick=e=>{let n=!1,a=!1;for(let r of e.composedPath()){if(r===this.surface)break;r instanceof Element&&(r.matches(Sg)&&(a=!0),(r instanceof Tt||r.hasAttribute("data-menu-close"))&&(n=!0))}n&&!a&&e.stopPropagation();for(let r of e.composedPath()){if(r===this.surface)break;if(r instanceof Tt){!r.hasAttribute("disabled")&&!r.querySelector(":scope > a-menu")&&r.closest("a-menu")===this&&r.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let r of e.composedPath()){if(r===this.surface)break;if(r instanceof Element){if(r.hasAttribute("data-menu-open"))return;if(r instanceof Tt){if(r.hasAttribute("disabled")){e.preventDefault();return}return r.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(r.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(r.hasAttribute("data-menu-close"))return this.closeSystem(e)}}};closeSystem(e){(Z[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"])}#m(){let e=this.#C();for(let n of this.#r)e.has(n)||this.surface.removeEventListener(n,this.#o);for(let n of e)this.#r.has(n)||this.surface.addEventListener(n,this.#o);this.#r=e}handleKey(e){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.#p){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault();let l=n?s.indexOf(n):-1;if(l===-1){s[0]?.focus();return}let c=e.shiftKey?l===0?s.length-1:l-1:l===s.length-1?0:l+1;s[c]?.focus();return}let a=this.#f;if(a&&(n===a||a.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!zr(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 Tt)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",wg),n.find(r=>this.itemLabel(r).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#k(e){let n=Dt(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 a,r;this.#l&&(a=o=>{o.pointerType==="mouse"&&this.scheduleOpen()},r=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",a),e.addEventListener("pointerleave",r)),this.teardown=()=>{e.removeEventListener("click",n),a&&e.removeEventListener("pointerenter",a),r&&e.removeEventListener("pointerleave",r),this.listening=!1}}else if(this.#u){let n=a=>{Ag(a,e)||(a.preventDefault(),this.requestOpen({coord:[a.clientX,a.clientY],originEvent:a}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#p){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=r=>{let o=r.detail===0,i=this.#h?o?this.#k(e):[r.clientX,r.clientY]:void 0;this._shown?this.requestClose(r):this.requestOpen({coord:i,viaKeyboard:o,originEvent:r})},a=r=>{if(this._shown||e.matches(Cg)||e.hasAttribute("disabled"))return;let o=e.matches(Eg);if(!(r.key==="ArrowDown"||r.key==="ArrowUp"||!o&&(r.key==="Enter"||r.key===" ")))return;r.preventDefault();let s=this.#h?this.#k(e):void 0;this.requestOpen({coord:s,viaKeyboard:!0,originEvent:r})};e.addEventListener("click",n),e.addEventListener("keydown",a),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",a),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()},yg))}scheduleClose(){this.cancelOpenTimer(),this._shown&&(this.#S||Z.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))||(this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},kg)))}get#S(){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 cm(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",ai)}cm();var ri=class extends O{};function dm(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",ri)}dm();var oi=class extends O{};function um(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",oi)}um();var ii=class extends ea{ariaProp="ariaSelected"};function hm(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",ii)}hm();var si=class extends O{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(a=>[...a.addedNodes,...a.removedNodes].some(r=>r.nodeName==="A-TAB"||r.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.#u()}attributeChangedCallback(e,n,a){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&a!==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#a(){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.#u();return}this.resizeObserver??=new this.view.ResizeObserver(this.#o),this.resizeObserver.observe(this)}#o=()=>{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)};#u(){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.#a,a=n.find(r=>r.value===e&&e!=null)??null;for(let r of n)r.selected=r===a;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=a),this.alive&&a&&a!==this.lastSelected&&this.#h(a),this.lastSelected=a};#h(e){let n=this.getBoundingClientRect(),a=e.getBoundingClientRect();this.#n?a.top<n.top?this.scrollTop-=n.top-a.top:a.bottom>n.bottom&&(this.scrollTop+=a.bottom-n.bottom):a.left<n.left?this.scrollLeft-=n.left-a.left:a.right>n.right&&(this.scrollLeft+=a.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let a=this.emitStateChange(e,n);this.hasAttribute("state")||a&&(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)return;let n=this.#a.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let a=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){a&&n.includes(a)&&(e.preventDefault(),this.requestSelect(a.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 r=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!r&&!o)return;e.preventDefault();let i=a?n.indexOf(a):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(r?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function pm(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",si)}pm();var li=class extends O{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 a=e!=null?this.tabs?.querySelector(`a-tab[value="${zg(e)}"]`):null;this.internals.ariaLabelledByElements=a?[a]:[]}}};function zg(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function mm(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",li)}mm();var _g="closerequest",Og=200,Pg=`
925
925
  :host { display: contents; }
926
926
 
927
927
  dialog {
928
- --_dur: ${_g}ms;
928
+ --_dur: ${Og}ms;
929
929
  --_r: var(--dialog-round, var(--dialog-radius, 10px));
930
930
 
931
931
  position: fixed;
@@ -1074,7 +1074,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1074
1074
  inset-inline-end: 10px;
1075
1075
  z-index: 1;
1076
1076
  }
1077
- `,ci=class extends P{static observedAttributes=["state","name"];dialog;headerSlot;footerSlot;closeSlot;#e=0;#t=!1;#n=!1;#a=!1;#r;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Og,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 a=document.createElement("slot");a.setAttribute("part","body"),this.footerSlot=document.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer");for(let r of[this.headerSlot,this.footerSlot,this.closeSlot])r.addEventListener("slotchange",()=>{let o=r.assignedNodes().length>0;r.classList.toggle("has-content",o),r===this.closeSlot&&this.dialog.classList.toggle("has-close",o)});this.headerSlot.addEventListener("slotchange",()=>this.#x()),this.dialog.append(this.headerSlot,a,this.footerSlot,this.closeSlot),e.append(n,this.dialog),this.dialog.addEventListener("cancel",r=>{r.preventDefault(),this.#u||this.requestClose()}),this.dialog.addEventListener("pointerdown",r=>{this.#a=r.target===this.dialog}),this.dialog.addEventListener("click",r=>{this.#u||this.#a&&r.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#o?this.#c(Zt(this.getAttribute("state"))):this.#t=!1}),this.addEventListener(zg,()=>this.requestClose())}connectedCallback(){this.#o?this.#c(Zt(this.getAttribute("state"))):(this.#n||(Zt(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#s()),this.#p(),this.#x()}disconnectedCallback(){this.#b(),this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#o&&this.#c(Zt(this.getAttribute("state"))),this.#p()):e==="name"&&this.#p()}get#o(){return this.hasAttribute("state")}get#u(){return this.hasAttribute("persistent")}get#h(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#h==="open")return;let e=this.#l("open");this.#o||e&&this.#s()}requestClose(){if(this.#h==="closed")return;let e=this.#l("closed");this.#o||e&&this.#d()}#l(e){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#h}}))}#c(e){e==="open"?this.#s():this.#d()}#s(){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()}#d(){this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#x(){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.#o&&!!this.getAttribute("name");e&&!this.#r?this.#f():!e&&this.#r&&this.#b()}#f(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let a=e.target;a instanceof Element&&(a.closest(`[data-dialog-open="${CSS.escape(n)}"]`)?this.requestOpen():a.closest(`[data-dialog-close="${CSS.escape(n)}"]`)&&this.requestClose())},this.doc.addEventListener("click",this.#r)}#b(){this.#r&&(this.doc.removeEventListener("click",this.#r),this.#r=void 0)}};function mm(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",ci)}mm();var Pg=`
1077
+ `,ci=class extends O{static observedAttributes=["state","name"];dialog;headerSlot;footerSlot;closeSlot;#e=0;#t=!1;#n=!1;#a=!1;#r;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Pg,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 a=document.createElement("slot");a.setAttribute("part","body"),this.footerSlot=document.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer");for(let r of[this.headerSlot,this.footerSlot,this.closeSlot])r.addEventListener("slotchange",()=>{let o=r.assignedNodes().length>0;r.classList.toggle("has-content",o),r===this.closeSlot&&this.dialog.classList.toggle("has-close",o)});this.headerSlot.addEventListener("slotchange",()=>this.#x()),this.dialog.append(this.headerSlot,a,this.footerSlot,this.closeSlot),e.append(n,this.dialog),this.dialog.addEventListener("cancel",r=>{r.preventDefault(),this.#u||this.requestClose()}),this.dialog.addEventListener("pointerdown",r=>{this.#a=r.target===this.dialog}),this.dialog.addEventListener("click",r=>{this.#u||this.#a&&r.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#o?this.#c(Zt(this.getAttribute("state"))):this.#t=!1}),this.addEventListener(_g,()=>this.requestClose())}connectedCallback(){this.#o?this.#c(Zt(this.getAttribute("state"))):(this.#n||(Zt(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#s()),this.#p(),this.#x()}disconnectedCallback(){this.#b(),this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#o&&this.#c(Zt(this.getAttribute("state"))),this.#p()):e==="name"&&this.#p()}get#o(){return this.hasAttribute("state")}get#u(){return this.hasAttribute("persistent")}get#h(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#h==="open")return;let e=this.#l("open");this.#o||e&&this.#s()}requestClose(){if(this.#h==="closed")return;let e=this.#l("closed");this.#o||e&&this.#d()}#l(e){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#h}}))}#c(e){e==="open"?this.#s():this.#d()}#s(){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()}#d(){this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#x(){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.#o&&!!this.getAttribute("name");e&&!this.#r?this.#f():!e&&this.#r&&this.#b()}#f(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let a=e.target;a instanceof Element&&(a.closest(`[data-dialog-open="${CSS.escape(n)}"]`)?this.requestOpen():a.closest(`[data-dialog-close="${CSS.escape(n)}"]`)&&this.requestClose())},this.doc.addEventListener("click",this.#r)}#b(){this.#r&&(this.doc.removeEventListener("click",this.#r),this.#r=void 0)}};function bm(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",ci)}bm();var Ng=`
1078
1078
  .container {
1079
1079
  display: flex;
1080
1080
  flex-direction: column;
@@ -1163,7 +1163,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1163
1163
  :host([loading]) [part="content"] { animation: card-pulse 1.4s ease-in-out infinite; }
1164
1164
  }
1165
1165
  @keyframes card-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
1166
- `,di=class extends P{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=Pg,this.#e=document.createElement("a"),this.#e.className="container",this.#e.setAttribute("part","container");let a=document.createElement("slot");a.name="media",a.setAttribute("part","media");let r=document.createElement("div");r.className="content",r.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"),r.append(o,this.#n,s),this.#e.append(a,r),e.append(n,this.#e),this.#t.addEventListener("slotchange",()=>this.#r()),this.#n.addEventListener("slotchange",()=>this.#r())}connectedCallback(){this.#a()}attributeChangedCallback(){this.#a()}#a(){let e=this.getAttribute("href"),n=this.hasAttribute("loading");if(e!=null&&!n){this.#e.setAttribute("href",e);for(let a of["target","rel","ping"]){let r=this.getAttribute(a);r!=null?this.#e.setAttribute(a,r):this.#e.removeAttribute(a)}}else for(let a of["href","target","rel","ping"])this.#e.removeAttribute(a);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.#o(this.#t)||this.#o(this.#n)||this.getAttribute("href")||"";n?this.#e.setAttribute("aria-label",n):this.#e.removeAttribute("aria-label")}#o(e){return e.assignedNodes().map(n=>n.textContent??"").join(" ").replace(/\s+/g," ").trim()}};function bm(){typeof customElements>"u"||customElements.get("a-card")||customElements.define("a-card",di)}bm();var Ng="dismissrequest",Bg="data-banner-dismiss",Lg=`
1166
+ `,di=class extends O{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=Ng,this.#e=document.createElement("a"),this.#e.className="container",this.#e.setAttribute("part","container");let a=document.createElement("slot");a.name="media",a.setAttribute("part","media");let r=document.createElement("div");r.className="content",r.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"),r.append(o,this.#n,s),this.#e.append(a,r),e.append(n,this.#e),this.#t.addEventListener("slotchange",()=>this.#r()),this.#n.addEventListener("slotchange",()=>this.#r())}connectedCallback(){this.#a()}attributeChangedCallback(){this.#a()}#a(){let e=this.getAttribute("href"),n=this.hasAttribute("loading");if(e!=null&&!n){this.#e.setAttribute("href",e);for(let a of["target","rel","ping"]){let r=this.getAttribute(a);r!=null?this.#e.setAttribute(a,r):this.#e.removeAttribute(a)}}else for(let a of["href","target","rel","ping"])this.#e.removeAttribute(a);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.#o(this.#t)||this.#o(this.#n)||this.getAttribute("href")||"";n?this.#e.setAttribute("aria-label",n):this.#e.removeAttribute("aria-label")}#o(e){return e.assignedNodes().map(n=>n.textContent??"").join(" ").replace(/\s+/g," ").trim()}};function fm(){typeof customElements>"u"||customElements.get("a-card")||customElements.define("a-card",di)}fm();var Bg="dismissrequest",Lg="data-banner-dismiss",Rg=`
1167
1167
  slot[name="message"], slot:not([name]) { display: contents; }
1168
1168
 
1169
1169
  slot[name="actions"] {
@@ -1172,6 +1172,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1172
1172
  gap: 4px;
1173
1173
  flex-shrink: 0;
1174
1174
  }
1175
+ slot[name="actions"][hidden] { display: none; }
1175
1176
 
1176
1177
  slot[name="close"] {
1177
1178
  position: absolute;
@@ -1186,7 +1187,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1186
1187
  slot[name="close"]:focus-within {
1187
1188
  opacity: 1;
1188
1189
  }
1189
- `,fm=Zt,ui=class extends P{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=Lg;let a=document.createElement("slot");a.name="message",a.setAttribute("part","message");let r=document.createElement("slot");r.setAttribute("part","content");let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions");let i=document.createElement("slot");i.name="close",i.setAttribute("part","close"),e.append(n,a,r,o,i),this.addEventListener(Ng,s=>{s.stopPropagation(),this.#u()}),Fr(this,Bg,()=>this.#u())}get#n(){return this.hasAttribute("state")}get#a(){return this.#e?.states?.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#o(fm(this.getAttribute("state"))):this.#t||(this.#o(this.#r()),this.#t=!0)}#r(){return this.getAttribute("default-state")==="closed"?"closed":"open"}attributeChangedCallback(e){e==="state"&&this.#n&&this.#o(fm(this.getAttribute("state")))}#o(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{}}#u(){if(this.#a==="closed")return;let e=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));this.#n||e&&this.#o("closed")}};function gm(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",ui)}gm();var xm=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],Rg="bottom-right",vm=Object.freeze([]),Fg=0;function hi(){let t=vm,e=new Set,n=()=>e.forEach(l=>l());function a(l,c={}){let d=c.id??`t${++Fg}`,u=t.findIndex(b=>b.id===d),m=u===-1?void 0:t[u],p={id:d,render:l,placement:c.placement??m?.placement??Rg,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((b,f)=>f===u?p:b):[...t,p],n(),d}function r(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:a,dismiss:r,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return vm}}}var Hg=xm,pi=class extends P{#e;#t=!1;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Vg,this.#e=document.createElement("div"),this.#e.className="region",this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let a of Hg){let r=document.createElement("slot");r.name=a,this.#e.append(r)}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}}},Vg=`
1190
+ `,gm=Zt,ui=class extends O{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=Rg;let a=document.createElement("slot");a.name="message",a.setAttribute("part","message");let r=document.createElement("slot");r.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,a,r,o,s),i(),this.addEventListener(Bg,l=>{l.stopPropagation(),this.#u()}),Fr(this,Lg,()=>this.#u())}get#n(){return this.hasAttribute("state")}get#a(){return this.#e?.states?.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#o(gm(this.getAttribute("state"))):this.#t||(this.#o(this.#r()),this.#t=!0)}#r(){return this.getAttribute("default-state")==="closed"?"closed":"open"}attributeChangedCallback(e){e==="state"&&this.#n&&this.#o(gm(this.getAttribute("state")))}#o(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{}}#u(){if(this.#a==="closed")return;let e=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));this.#n||e&&this.#o("closed")}};function vm(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",ui)}vm();var ym=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],Fg="bottom-right",xm=Object.freeze([]),Hg=0;function hi(){let t=xm,e=new Set,n=()=>e.forEach(l=>l());function a(l,c={}){let d=c.id??`t${++Hg}`,u=t.findIndex(b=>b.id===d),m=u===-1?void 0:t[u],p={id:d,render:l,placement:c.placement??m?.placement??Fg,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((b,f)=>f===u?p:b):[...t,p],n(),d}function r(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:a,dismiss:r,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return xm}}}var Vg=ym,pi=class extends O{#e;#t=!1;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=jg,this.#e=document.createElement("div"),this.#e.className="region",this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let a of Vg){let r=document.createElement("slot");r.name=a,this.#e.append(r)}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}}},jg=`
1190
1191
  :host { display: contents; }
1191
1192
 
1192
1193
  .region {
@@ -1220,7 +1221,7 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1220
1221
  slot[name$="-left"] { left: var(--toaster-inset, 16px); }
1221
1222
  slot[name$="-right"] { right: var(--toaster-inset, 16px); }
1222
1223
  slot[name$="-center"] { left: 50%; transform: translateX(-50%); }
1223
- `;function ym(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",pi)}ym();var jg=220,wm=5e3,qg="data-toast-dismiss",mi=class extends P{static observedAttributes=["leaving","rev"];#e;#t;#n;#a;#r;#o;#u=0;#h=0;#l=!1;#c=!1;#s=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(a){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",a)}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Zg,this.#t=document.createElement("slot"),e.append(n,this.#t),Fr(this,qg,()=>this.dismiss())}connectedCallback(){if(this.#x(),this.addEventListener("pointerenter",this.#w),this.addEventListener("pointerleave",this.#S),this.addEventListener("focusin",this.#M),this.addEventListener("focusout",this.#I),this.hasAttribute("leaving")){this.dismiss();return}this.#b()}disconnectedCallback(){this.#C(),this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.removeEventListener("pointerenter",this.#w),this.removeEventListener("pointerleave",this.#S),this.removeEventListener("focusin",this.#M),this.removeEventListener("focusout",this.#I)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#l&&this.#d():e==="rev"&&this.isConnected&&this.restart()}#d(){this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.#l=!1,this.#e?.states.delete("leaving"),this.#b()}get content(){return this.#n??null}set content(e){this.#n=e??void 0,this.#x()}#x(){this.#n!==this.#a&&(this.#a?.parentNode===this&&this.removeChild(this.#a),this.#a=this.#n,this.#n&&this.append(this.#n))}get#p(){let e=this.getAttribute("duration");if(e==null)return wm;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:wm}get#f(){return this.#c||this.#s}#b(){this.#u=this.#p,this.#g(),this.#v()}#g(){Number.isFinite(this.#p)?(this.#t.style.animation=`toast-remaining ${this.#p}ms linear forwards`,this.#y(e=>{e.currentTime=0}),(this.#f||this.#l)&&this.#i()):this.#t.style.animation=""}#y(e){try{for(let n of this.#t.getAnimations?.()??[])n.animationName==="toast-remaining"&&e(n)}catch{}}#i(){this.#y(e=>e.pause())}#k(){this.#y(e=>e.play())}#v(){if(!(this.#r!=null||this.#l||this.#f||!Number.isFinite(this.#p))){if(this.#u<=0){this.dismiss();return}this.#h=Date.now(),this.#r=this.view.setTimeout(()=>{this.#r=void 0,this.dismiss()},this.#u),this.#k()}}#C(){this.#r!=null&&(this.view.clearTimeout(this.#r),this.#r=void 0)}#m(){this.#r!=null&&(this.#u-=Date.now()-this.#h,this.#C(),this.#i())}#w=()=>{this.#c=!0,this.#m()};#S=()=>{this.#c=!1,this.#v()};#M=()=>{this.#s=!0,this.#m()};#I=()=>{this.#s=!1,this.#v()};#T(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#P(){if(this.#T())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 jg}restart(){this.#l||(this.#C(),this.#b())}dismiss(){if(this.#l)return;this.#l=!0,this.#C(),this.#i(),this.#e?.states.add("leaving");let e=this.#P();this.#o=this.view.setTimeout(()=>{this.#o=void 0,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}},Zg=`
1224
+ `;function km(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",pi)}km();var qg=220,wm=5e3,Zg="data-toast-dismiss",mi=class extends O{static observedAttributes=["leaving","rev"];#e;#t;#n;#a;#r;#o;#u=0;#h=0;#l=!1;#c=!1;#s=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(a){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",a)}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=$g,this.#t=document.createElement("slot"),e.append(n,this.#t),Fr(this,Zg,()=>this.dismiss())}connectedCallback(){if(this.#x(),this.addEventListener("pointerenter",this.#k),this.addEventListener("pointerleave",this.#S),this.addEventListener("focusin",this.#M),this.addEventListener("focusout",this.#I),this.hasAttribute("leaving")){this.dismiss();return}this.#b()}disconnectedCallback(){this.#C(),this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.removeEventListener("pointerenter",this.#k),this.removeEventListener("pointerleave",this.#S),this.removeEventListener("focusin",this.#M),this.removeEventListener("focusout",this.#I)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#l&&this.#d():e==="rev"&&this.isConnected&&this.restart()}#d(){this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.#l=!1,this.#e?.states.delete("leaving"),this.#b()}get content(){return this.#n??null}set content(e){this.#n=e??void 0,this.#x()}#x(){this.#n!==this.#a&&(this.#a?.parentNode===this&&this.removeChild(this.#a),this.#a=this.#n,this.#n&&this.append(this.#n))}get#p(){let e=this.getAttribute("duration");if(e==null)return wm;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:wm}get#f(){return this.#c||this.#s}#b(){this.#u=this.#p,this.#g(),this.#v()}#g(){Number.isFinite(this.#p)?(this.#t.style.animation=`toast-remaining ${this.#p}ms linear forwards`,this.#y(e=>{e.currentTime=0}),(this.#f||this.#l)&&this.#i()):this.#t.style.animation=""}#y(e){try{for(let n of this.#t.getAnimations?.()??[])n.animationName==="toast-remaining"&&e(n)}catch{}}#i(){this.#y(e=>e.pause())}#w(){this.#y(e=>e.play())}#v(){if(!(this.#r!=null||this.#l||this.#f||!Number.isFinite(this.#p))){if(this.#u<=0){this.dismiss();return}this.#h=Date.now(),this.#r=this.view.setTimeout(()=>{this.#r=void 0,this.dismiss()},this.#u),this.#w()}}#C(){this.#r!=null&&(this.view.clearTimeout(this.#r),this.#r=void 0)}#m(){this.#r!=null&&(this.#u-=Date.now()-this.#h,this.#C(),this.#i())}#k=()=>{this.#c=!0,this.#m()};#S=()=>{this.#c=!1,this.#v()};#M=()=>{this.#s=!0,this.#m()};#I=()=>{this.#s=!1,this.#v()};#T(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#P(){if(this.#T())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 qg}restart(){this.#l||(this.#C(),this.#b())}dismiss(){if(this.#l)return;this.#l=!0,this.#C(),this.#i(),this.#e?.states.add("leaving");let e=this.#P();this.#o=this.view.setTimeout(()=>{this.#o=void 0,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}},$g=`
1224
1225
  :host { display: block; opacity: 1; translate: 0 0; }
1225
1226
  :host(:state(leaving)) { opacity: 0; }
1226
1227
 
@@ -1242,4 +1243,4 @@ ${e}`:e}function bb(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
1242
1243
  from { --toast-remaining: 1; }
1243
1244
  to { --toast-remaining: 0; }
1244
1245
  }
1245
- `;function km(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",mi)}km();var $g=({seed:t,name:e,src:n,size:a,badge:r,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof a=="number",u=d?on(a,"--avatar-size",l):l,m=Q(o,"--avatar-radius",u),p=F(r,"--avatar-badge-tone-source",m);return h("a-avatar",{seed:t,name:e,src:n,size:!d&&a&&a!=="medium"?a:void 0,badge:r,round:K(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 Ug=({value:t,max:e=100,tone:n,size:a,round:r,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,b=e>0?Math.min(e,Math.max(0,m)):0,f=[o,!u&&`${p}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return h("a-progress",{value:u?!1:m,max:e,tone:n&&n!=="neutral"?n:void 0,size:a&&a!=="medium"?a:void 0,round:K(r),role:"progressbar","aria-valuenow":u?void 0:b,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":f,class:s,style:Q(r,"--progress-round",F(n,"--progress-tone-source",l)),...d,children:Mc(c)?c:A("a-progress-label",{children:[!u&&A("a-progress-number",{children:[p,"%"]}),o!=null&&h("a-progress-text",{children:o}),i!=null&&h("a-progress-hint",{children:i})]})})};var rc=({tone:t,value:e,max:n=100,size:a,speed:r,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,...a!=null?{"--loader-size":`${a}px`}:{},...!c&&r!=null&&Number.isFinite(r)&&r>0?{"--loader-speed":`${r}s`}:{},...m!=null?{"--loader-value":`${m}%`}:{}},b=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:t,...c?{value:u}:{},class:i,style:p,...b,...l})};var At=({delay:t,placement:e,round:n,follow:a,interactive:r,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>h("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"?"top":void 0,round:K(n),follow:a?"":void 0,interactive:r?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:Q(n,"--tooltip-round",l),...d,children:c});var bi=({priority:t,tone:e,size:n,inline:a,truncate:r,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=typeof r=="number"?r:r?1:null,m=u!=null&&u>=1?u:null,p=e||void 0,b=F(p,"--text-tone-source",m!=null?{...l,"--line-clamp":m}:l),f=o&&m!=null;return A("a-text",{priority:t,tone:p,size:n,inline:a?"":void 0,truncate:m!=null?String(m):void 0,expandable:f?"":void 0,collapsible:f&&i?"":void 0,class:s,style:b,...d,children:[c,m!=null&&!f&&h(At,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var oc=({level:t=2,priority:e,tone:n,className:a,style:r,children:o,...i})=>{let s=n||void 0;return h("a-title",{level:String(t),priority:e,tone:s,role:"heading","aria-level":t,class:a,style:F(s,"--title-tone-source",r),...i,children:o})};var ge=({shape:t,size:e,label:n,className:a,style:r,...o})=>{let i=e!=null?{...r,"--icon-size":`${e}px`}:r,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return h("a-icon",{shape:t,class:a,style:i,...s,...o})};var fi=({icon:t,iconTrailing:e,label:n,value:a,tone:r,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let m=r||void 0,p=F(m,"--tag-tone-source",c),b=a!=null,f=t!=null&&n==null&&a==null&&d==null&&e==null;return A("a-tag",{tone:m,"aria-label":f?`${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(ge,{shape:t}),n!=null&&(b?h("a-tag-label",{children:n}):h("a-tag-value",{children:n})),b&&h("a-tag-value",{children:a}),d,e&&h(ge,{shape:e})]})};var ve=({priority:t,tone:e,underline:n,underlineOnHover:a,icon:r,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:m,onClick:p,href:b,target:f,rel:g,download:x,ping:y,type:k,form:S,className:M,style:N,children:B,...C})=>{let I=e||void 0,R=d||c,U=Q(m,"--button-round",F(I,"--button-tone-source",N)),Y=r!=null&&s==null&&B==null&&o==null,W={role:"button",priority:t,tone:I,underline:n,"underline-on-hover":a?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:K(m),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:R?-1:0,"aria-disabled":R?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":Y?r:void 0,class:M,style:U,onClick:R?void 0:p},z=A(me,{children:[r&&h("a-icon",{shape:r,"aria-hidden":"true"}),s!=null&&h("a-button-label",{children:s}),Lr(B,"a-button-label"),o&&h("a-icon",{shape:o,"aria-hidden":"true"})]});if(b!=null){let ne={...W,disabled:R||void 0};return h("a",{href:R?void 0:b,"data-anta":"",target:f,rel:g,download:x,ping:y,...ne,...C,children:z})}return h("a-button",{type:k,form:S,...W,...C,children:z})};function gi(t){let{copy:e,copyNode:n,copyUrl:a,copyWithUrl:r,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":a?"":void 0,"copy-with-url":r?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(J(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function vi(t){return t.copyNode!=null&&t.copyNode!==!1}var ic=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:a,onCopied:r,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":m,...p})=>{let b=e==="none"?void 0:t??"copy",{shownIcon:f,shownTone:g,handleCopied:x}=Vr(b,a,r),y=e==="trailing"?{iconTrailing:f}:e==="none"?{}:{icon:f},k=d!=null||u!=null,S=gi({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:x,toast:e==="none",copiedLabel:n});return A(ve,{...y,label:d,tone:e==="none"?a:g,"aria-label":m??(k?void 0:"Copy"),"data-copy-node-button":vi({copyNode:s})?"":void 0,...p,children:[u,h("a-copy",{...S})]})};var je=({placement:t,context:e,coord:n,nohover:a,offset:r,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:m,style:p,children:b,...f})=>h("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:a?"":void 0,offset:r!=null?String(r):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:x,detail:y,isOwn:k}=J(g);k&&y&&l(x,{next:y.next==="open",prev:y.prev==="open"})}:void 0,round:K(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":"vertical",class:m,style:on(i,"--menu-padding",Q(c,"--menu-round",p)),...f,children:b});var ke=({icon:t,label:e,hint:n,kbd:a,iconTrailing:r,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneSelected:u,submenu:m,value:p,onSelect:b,href:f,target:g,rel:x,download:y,ping:k,role:S,className:M,style:N,children:B,...C})=>{let I=t,R=s==="checkbox"||s==="radio"||s==="check",U=s==="checkbox"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",Y=R?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,W=i&&(s===void 0||s==="check"),z=i&&u||d,ne=z&&z!=="neutral"?z:void 0,O=e!=null&&(n!=null?A("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(f!=null){let T={"data-anta-menu-item":"",role:S??"menuitem",href:o?void 0:f,target:g,rel:x,download:y===!0?"":y||void 0,ping:k,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,tone:ne,style:F(z,"--menu-item-tone-source",N),onClick:b&&!o?V=>b(V,{value:p,label:e}):void 0,class:M};return A("a",{...T,...C,children:[t&&h("a-icon",{shape:t,"aria-hidden":"true"}),O,B,a&&h("kbd",{children:a}),r&&h("a-icon",{shape:r,"aria-hidden":"true"})]})}return A("a-menu-item",{role:S??U,tabIndex:0,disabled:o?"":void 0,selected:W?"":void 0,"aria-checked":Y,tone:ne,style:F(z,"--menu-item-tone-source",N),submenu:m?"":void 0,"aria-haspopup":m?"menu":void 0,"aria-disabled":o?"true":void 0,onmenuselect:b?T=>b(T,{value:p,label:e}):void 0,class:M,...C,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:ne,style:F(z,"--checkbox-tone-source")}):s==="radio"?h("a-radio",{"aria-hidden":"true",selected:!!i,tone:ne,style:F(z,"--radio-tone-source")}):null,I&&h("a-icon",{shape:I,"aria-hidden":"true"}),O,B,a&&h("kbd",{children:a}),(()=>{let T=m?r??"chevron-right":r;return!m&&!r&&s==="check"&&c==null&&(T=i?"check":"blank"),T?h("a-icon",{shape:T,"aria-hidden":"true"}):null})()]})};var sc=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:a,tone:r,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...m})=>{let p=n==="none"?void 0:e,{shownIcon:b,shownTone:f,handleCopied:g}=Vr(p,r,o),x=n==="trailing"?{iconTrailing:b}:n==="none"?{}:{icon:b},y=gi({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:g,toast:n==="none",copiedLabel:a});return A(ke,{label:t,tone:f,...x,"data-menu-open":"","data-copy-node-button":vi({copyNode:l})?"":void 0,...m,children:[u,h("a-copy",{...y})]})};var Yg=new Set(["\u2192","/","\u2022","\u25B8"]);function Cm(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function Wg(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let a=Math.max(1,Math.floor(e));if(t.length<=a)return t.map(s=>({kind:"item",item:s}));let r=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),a-1),o=a-r,i=t.slice(r,t.length-o);return[...t.slice(0,r).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function Em(t){return t.current?{"aria-current":"page"}:{}}function Gg(t,e,n,a,r,o,i){let{label:s,current:l,...c}=t,d=Em(t);if(Cm(t)){let m={...c,priority:e,size:n,underline:a,underlineOnHover:r,paddingless:o,...d};return h(ic,{...m,children:s},i)}let u={...c,priority:e,size:n,underline:a,underlineOnHover:r,paddingless:o,...d};return h(ve,{...u,children:s},i)}function Kg(t,e){let{label:n,current:a,onClick:r,...o}=t,i=Em(t);return Cm(t)?h(sc,{...o,label:n,onSelect:r,...i},e):h(ke,{...o,label:n,onSelect:r,...i},e)}var Xg=({items:t,priority:e="quaternary",size:n="medium",separator:a="chevron-right",maxItems:r,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":m,...p})=>{let b=Wg(t,r,o),f=Yg.has(a),g=f?a:h(ge,{shape:a});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":f?void 0:"",class:d,style:u,...p,children:b.flatMap((x,y)=>{let k=x.kind==="overflow"?[h(ve,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${y}`),h(je,{autoWidth:!0,children:x.items.map((S,M)=>Kg(S,M))},`menu-${y}`)]:[Gg(x.item,e,n,s,l,c,y)];return y<b.length-1&&k.push(h("a-breadcrumb-separator",{"aria-hidden":"true",children:g},`separator-${y}`)),k})})};var Jg=["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"],Qg={"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 Sm=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",Tm=t=>t==="indeterminate"?"indeterminate":t==="checked",ev=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),tv=({checked:t,defaultChecked:e,disabled:n,tone:a,toneSelected:r,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:m,style:p,children:b,tabIndex:f,...g})=>{let x=Q(i,"--checkbox-round",F(r,"--checkbox-tone-source",F(a,"--checkbox-off-tone-source",r==null?F(a,"--checkbox-tone-source",p):p))),y=g["aria-label"],k=(typeof y=="string"?y:void 0)??d??(typeof b=="string"?b:void 0),S=s?I=>{let{event:R,detail:U}=J(I);U&&s(R,{next:Tm(U.next),prev:Tm(U.prev)})}:void 0,M=l||c?I=>{l?.(I),c?.(I,ev(I.currentTarget))}:void 0,N=t!==void 0?Sm(t):void 0,B=t===void 0&&e!==void 0?Sm(e):void 0,C=d!=null||b!=null;return A("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":k,...g,state:N,"default-state":B,disabled:n?"":void 0,tone:a&&a!=="neutral"?a:void 0,"tone-selected":r||void 0,size:o&&o!=="medium"?o:void 0,round:K(i),tabIndex:n?-1:f??0,onstatechange:S,onchange:M,class:m,style:x,children:[C&&A("a-checkbox-label",{children:[d,b]}),u!=null&&h("a-checkbox-hint",{children:u})]})};var nv=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),av=({checked:t,defaultChecked:e,disabled:n,tone:a,toneSelected:r,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:m,className:p,style:b,children:f,tabIndex:g,...x})=>{let y=Q(i,"--switch-round",F(r,"--switch-tone-source",F(a,"--switch-off-tone-source",r==null?F(a,"--switch-tone-source",b):b))),k=x["aria-label"],S=(typeof k=="string"?k:void 0)??u??(typeof f=="string"?f:void 0),M=l?R=>{let{event:U,detail:Y}=J(R);Y&&l(U,{next:Y.next==="checked",prev:Y.prev==="checked"})}:void 0,N=c||d?R=>{c?.(R),d?.(R,nv(R.currentTarget))}:void 0,B=t===void 0?void 0:t?"checked":"unchecked",C=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,I=u!=null||f!=null;return A("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":S,...x,state:B,"default-state":C,disabled:n?"":void 0,tone:a,"tone-selected":r,size:o&&o!=="medium"?o:void 0,round:K(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:M,onchange:N,class:p,style:y,children:[I&&A("a-switch-label",{children:[u,f]}),m!=null&&h("a-switch-hint",{children:m})]})};var Sn=({className:t,children:e,...n})=>{let a=!!e&&!(typeof e=="string"&&e.trim()==="");return h("a-menu-separator",{role:a?"status":"separator","aria-live":a?"polite":void 0,class:t,...n,children:a?e:null})};var La=({label:t,className:e,children:n,...a})=>A("a-menu-group",{role:"group","aria-label":t,class:e,...a,children:[t!=null&&h("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var rv=({title:t,level:e,tone:n,priority:a,outdent:r,actions:o,disabled:i,round:s,open:l,defaultOpen:c,onStateChange:d,className:u,style:m,children:p,...b})=>{let f=l!==void 0,g=Q(s,"--expander-round",F(n,"--expander-tone-source",m)),x=typeof t=="object"&&t!==null?h("span",{slot:"title",style:{display:"contents"},children:t}):h("a-expander-summary",{slot:"title",children:t});return A("a-expander",{state:f?l?"open":"closed":void 0,"default-state":!f&&c?"open":void 0,level:e!=null?String(e):void 0,tone:n&&n!=="neutral"?n:void 0,priority:a&&a!=="secondary"?a:void 0,outdent:r?"":void 0,round:K(s),disabled:i?"":void 0,onstatechange:d?y=>{let{event:k,detail:S,isOwn:M}=J(y);M&&S&&d(k,{next:S.next==="open",prev:S.prev==="open"})}:void 0,class:u,style:g,...b,children:[x,o!=null&&h("span",{slot:"actions",children:o}),h("a-expander-details",{children:p})]})};var Ra=t=>t?"":void 0,ov=t=>typeof t=="string"||typeof t=="number",Am=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??""}},iv={email:"email",tel:"tel",url:"url"},sv={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},lv={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},bt=({label:t,hint:e,status:n,statusIcon:a,tone:r,size:o,round:i,value:s,defaultValue:l,multiline:c,rows:d,maxRows:u,clearable:m,leading:p,trailing:b,type:f,autoComplete:g,inputMode:x,autoFocus:y,name:k,placeholder:S,truncate:M=!0,disabled:N,readOnly:B,required:C,dimActions:I,spellCheck:R,maxLength:U,minLength:Y,pattern:W,min:z,max:ne,step:O,onInput:T,onChange:V,onValueChange:he,onClearClick:Ae,onClearInput:Me,children:ce,className:de,style:Oe,...ee})=>{let Ce=n&&n!=="neutral"?n:void 0,q=a===void 0?Ce?lv[Ce]:void 0:a,Ee=f==="search",qe=Ee?void 0:f,ft=p??(Ee?h(ge,{shape:"search"}):void 0),Mt=Ee?m??!0:m;return A("a-input",{size:o&&o!=="medium"?o:void 0,round:K(i),value:s,defaultvalue:l,multiline:Ra(c||d!=null),rows:d!=null?String(d):void 0,maxrows:u!=null?String(u):void 0,status:Ce,tone:r||void 0,type:!c&&d==null?qe:void 0,name:k,placeholder:S,truncate:Ra(M),disabled:Ra(N),readonly:Ra(B),required:Ra(C),"dim-actions":Ra(I),autocomplete:g??(!c&&d==null&&f?iv[f]:void 0),inputmode:x??(!c&&d==null&&f?sv[f]:void 0),autofocus:y?!0:void 0,spellcheck:R!=null?R?"true":"false":void 0,maxlength:U!=null?String(U):void 0,minlength:Y!=null?String(Y):void 0,pattern:W,min:z,max:ne,step:O,"aria-invalid":n==="critical"?"true":void 0,oninput:T||he?xe=>{T?.(xe),he?.(xe,Am(xe))}:void 0,onchange:V||he?xe=>{V?.(xe),he?.(xe,Am(xe))}:void 0,onclearclick:Ae?xe=>Ae(J(xe).event):void 0,onclearinput:Me?xe=>Me(J(xe).event):void 0,class:de,style:Q(i,"--input-round",F(r,"--input-tone-source",Oe)),...ee,children:[t!=null&&(ov(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),ft!=null&&h("span",{slot:"leading",style:{display:"contents"},children:ft}),Mt&&h("span",{slot:"clear",style:{display:"contents"},children:h(ve,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),b!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:b}),e!=null&&A("span",{slot:"hint",style:{display:"contents"},children:[q&&h(ge,{shape:q,"aria-hidden":"true"}),h("span",{children:e})]}),ce]})};var xi=(t,e)=>Number.isFinite(t)?t:e,cv=t=>typeof t=="string"||typeof t=="number",dv=(t,e)=>{let n=xi(t,0);return{min:n,max:Math.max(n,xi(e,100))}},Mm=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}},uv=({label:t,value:e,defaultValue:n,min:a,max:r,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:m,thumbFill:p,round:b,valueDisplay:f="end",valuePrefix:g,valueSuffix:x,markers:y,trackClick:k="drag-only",onInput:S,onChange:M,onValueChange:N,onValueCommit:B,className:C,style:I,children:R,tabIndex:U,...Y})=>{let W=Hr(u),z=Hr(m),ne=on(m,"--anta-slider-thumb-size",on(u,"--anta-slider-track-size",Q(b,"--slider-round",F(c,"--slider-thumb-tone-source",F(l,"--slider-tone-source",I))))),{min:O,max:T}=dv(a,r),V=xi(o,1)>0?xi(o,1):1,he=Y["aria-label"],Ae=(typeof he=="string"?he:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),Me=f==="inline"&&t==null?"end":f,ce=q=>q.value<=O?"0%":q.value>=T?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(q.value-O)/(T-O)} + var(--anta-slider-thumb-size) / 2)`,de=q=>q.value<=O?"start":q.value>=T?"end":void 0,Oe=q=>{let Ee={};return Object.assign(Ee,{"--slider-marker-position":ce(q)}),Ee},ee=S||N?q=>{let Ee=Mm(q);S?.(q),N?.(q,Ee)}:void 0,Ce=M||B?q=>{let Ee=Mm(q);M?.(q),B?.(q,Ee)}:void 0;return A("a-slider",{value:e,defaultvalue:n,min:O,max:T,step:V,name:i,disabled:s?"":void 0,tone:l&&l!=="neutral"?l:void 0,"thumb-tone":c&&c!=="neutral"?c:void 0,size:d&&d!=="medium"?d:void 0,"track-size":W,"thumb-size":z,"thumb-fill":p?"":void 0,round:K(b),"track-click":k==="jump"?"jump":void 0,"value-display":Me==="end"?void 0:Me,"value-prefix":g,"value-suffix":x,role:"slider","aria-label":Ae,tabIndex:s?-1:U??0,oninput:ee,onchange:Ce,class:C,style:ne,...Y,children:[t!=null&&(cv(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),y?.map((q,Ee)=>{let qe=de(q);return h("span",{slot:"markers",style:Oe(q),"data-slider-marker-start":qe==="start"?"":void 0,"data-slider-marker-end":qe==="end"?"":void 0,children:q.label},`${q.value}-${Ee}`)}),R]})};function Im(t){var e,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=Im(t[e]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}function hv(){for(var t,e,n=0,a="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=Im(t))&&(a&&(a+=" "),a+=e);return a}var Dm=hv;var Fa=Te.PlainDate.compare,zm=new Map;function Ht(t,e){let n=`${t}|${JSON.stringify(e)}`,a=zm.get(n);return a||(a=new Intl.DateTimeFormat(t,e),zm.set(n,a)),a}var _r=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function Ye(t){if(!t)return null;try{return Te.PlainDate.from(t)}catch{return null}}function lc(t){try{let e=new Intl.Locale(t),a=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof a=="number"&&a>=1&&a<=7)return a}catch{}return 1}function Tn(t,e,n){return e&&Fa(t,e)<0?e:n&&Fa(t,n)>0?n:t}function cc(t,e,n){return e!=null&&Fa(t,e)<0||n!=null&&Fa(t,n)>0}var pv=t=>Array.from(t).slice(0,2).join("");function _m(t,e=lc(t)){let n=Te.PlainDate.from("2021-02-01"),a=n.add({days:(e-n.dayOfWeek+7)%7}),r=Ht(t,{weekday:"short",timeZone:"UTC"}),o=Ht(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=a.add({days:s}),c=r.format(_r(l));i.push({short:c,narrow:pv(c),long:o.format(_r(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function dc(t){let{anchor:e,locale:n="en-US",min:a=null,max:r=null,selected:o=null,today:i=Te.Now.plainDateISO(),weeks:s=6}=t,l=lc(n),c=e.year,d=e.month,u=e.with({day:1}),m=(u.dayOfWeek-l+7)%7,p=u.subtract({days:m}),b=Ht(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),f=[];for(let g=0;g<s;g++){let x=[];for(let y=0;y<7;y++){let k=p.add({days:g*7+y});x.push({date:k,iso:k.toString(),day:k.day,weekday:k.dayOfWeek,outside:k.month!==d||k.year!==c,disabled:cc(k,a,r),today:i!=null&&Fa(k,i)===0,selected:o!=null&&Fa(k,o)===0,label:b.format(_r(k))})}f.push(x)}return{year:c,month:d,heading:Ht(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(_r(e)),weekdays:_m(n,l),weeks:f}}var Om=new Date(Date.UTC(2026,5,15)),uc={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function mv(t){try{return Ht(t,uc).formatToParts(Om).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function yi(t){try{return Ht(t,uc).formatToParts(Om).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function wi(t,e){return Ht(e,uc).format(_r(t))}function bv(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let a=Ht(e,{month:"long",timeZone:"UTC"}),r=Ht(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=a.format(i).toLowerCase(),l=r.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function Or(t,e,n={}){let a=u=>cc(u,n.min??null,n.max??null)?null:u,r=(t??"").trim();if(!r)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(r)){let u=Ye(r);return u?a(u):null}let o=mv(e),i=bv(r,e),s=(r.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=Te.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=r.replace(/\D/g,"");if(u.length!==8)return null;let m=0,p={};for(let b of o){let f=b==="year"?4:2;p[b]=Number(u.slice(m,m+f)),m+=f}({year:l,month:c,day:d}=p)}else if(s.length===2){let u=o.filter(p=>p!=="year"),m={};u.forEach((p,b)=>m[p]=s[b]),c=m.month,d=m.day,l=Te.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 a(Te.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function Pm(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,a=e.match(/([ap])\.?m?\.?$/);a&&(n=a[1]==="p"?"pm":"am",e=e.slice(0,a.index).trim());let r,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);r=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)r=Number(i),o=0;else{let s=i.length-2;r=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&r<12&&(r+=12),n==="am"&&r===12&&(r=0);try{return Te.PlainTime.from({hour:r,minute:o},{overflow:"reject"})}catch{return null}}function ki(t,e,n={}){let a=(t??"").trim();if(!a)return null;let r=a.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=a,i=null;r&&(i=Pm(r[1]),i&&(o=a.slice(0,r.index).trim()));let s=Or(o,e,n);return s?s.toPlainDateTime(i??Te.PlainTime.from("00:00")):null}function Pr(t){try{let e=Ht(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function hc(t,e,n=Pr(e)){let a=wi(t.toPlainDate(),e),r=String(t.minute).padStart(2,"0");if(!n)return`${a} ${String(t.hour).padStart(2,"0")}:${r}`;let o=(t.hour+11)%12+1;return`${a} ${String(o).padStart(2,"0")}:${r} ${t.hour<12?"AM":"PM"}`}function pc(t,e=Pr(t)){return`${yi(t)} HH:MM${e?" AM":""}`}var mc=({value:t,defaultValue:e,min:n,max:a,locale:r,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:m,style:p,"aria-label":b,...f})=>{let g=t!==void 0,x=r||(typeof navigator<"u"?navigator.language:"en-US"),y=Ye(n),k=Ye(a),S=Te.Now.plainDateISO(),[M,N]=$(()=>Ye(e)),B=g?Ye(t):M,[C,I]=$(()=>Tn(Ye(t??e)??S,y,k)),[R,U]=$(t),Y=C;if(t!==R){U(t);let L=Ye(t);L&&(Y=Tn(L,y,k),I(Y))}let[W,z]=$(null),[ne,O]=$(!1),T=qt(),V=dc({anchor:Y,locale:x,min:y,max:k,selected:B,today:S}),he=Y.toString(),[Ae,Me]=$(l);l!==Ae&&(Me(l),l!==void 0&&z({iso:he,n:l}));let ce=y?y.year:S.year-3,de=k?k.year:S.year+3,Oe=[];for(let L=ce;L<=de;L++)Oe.push(L);let ee=We(()=>Array.from({length:12},(L,H)=>Te.PlainDate.from({year:2e3,month:H+1,day:1}).toLocaleString(x,{month:"long"})),[x]),Ce=(L,H)=>y!=null&&(L<y.year||L===y.year&&H<y.month)||k!=null&&(L>k.year||L===k.year&&H>k.month),q=L=>{s||I(H=>Tn(H.add({months:L}),y,k))},Ee=(L,H)=>{s||I(oe=>Tn(oe.with({year:L,month:H}),y,k))},qe=We(()=>{let L=(H,oe)=>{let w=oe+1,v=H===C.year&&w===C.month;return h(ke,{label:ee[oe],selected:v,disabled:Ce(H,w)||void 0,"data-menu-open":"",onSelect:()=>{Ee(H,w),O(!1)},children:v&&h("span",{className:"jump-dot","aria-hidden":"true"})},`${H}-${w}`)};return Oe.length===1?ee.map((H,oe)=>L(Oe[0],oe)):Oe.map(H=>A(ke,{submenu:!0,label:String(H),selected:H===C.year,children:[H===C.year&&h("span",{className:"jump-dot","aria-hidden":"true"}),h(je,{children:ee.map((oe,w)=>L(H,w))})]},H))},[ee,C.year,C.month,ce,de,n,a,s]),ft=L=>{let{event:H,detail:oe}=J(L);if(!oe||(c?.(H,oe),oe.reason==="user"&&(g||H.defaultPrevented)))return;let w=Ye(oe.next);g||N(w),I(Tn(w??C,y,k))},Mt=L=>{let H="nativeEvent"in L?L.nativeEvent:L;d?.(H),u?.(H,{value:H?.target?.value||null,name:o})},xe=L=>{if(s)return;let{detail:H}=J(L),oe=Ye(H?.date??null);if(!oe)return;let w=Tn(oe,y,k);I(w),z(v=>({iso:w.toString(),n:(v?.n??0)+1}))},an=s||y!=null&&Te.PlainDate.compare(C.with({day:1}).subtract({days:1}),y)<0,It=s||k!=null&&Te.PlainDate.compare(C.with({day:1}).add({months:1}),k)>0;return A("div",{className:Dm("anta-calendar",m),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:p,...f,children:[A("div",{"data-part":"header",children:[h(ve,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:an,onClick:()=>q(-1)}),h(ve,{id:T,"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${V.heading} \u2014 choose month and year`,disabled:s||an&&It,children:V.heading}),h(je,{placement:"bottom",open:ne,onStateChange:(L,{next:H})=>O(H),children:qe}),h(ve,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:It,onClick:()=>q(1)})]}),A("a-calendar",{role:"group","aria-labelledby":T,"aria-label":b,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":W?`${W.iso}#${W.n}`:void 0,onstatechange:ft,onchange:Mt,onnavigate:xe,children:[V.weekdays.map((L,H)=>h("span",{"data-part":"weekday","data-weekend":L.weekend?"":void 0,"aria-hidden":"true",children:L.narrow},`wd${H}`)),V.weeks.flat().map(L=>{let H=L.today&&!L.selected?{priority:"secondary"}:{priority:"tertiary",selected:L.selected,tone:L.selected?"brand":void 0};return A(ve,{...H,size:i,disabled:s||L.disabled,tabIndex:L.iso===he?0:-1,"aria-label":L.label,"aria-current":L.today?"date":void 0,"data-part":"day-cell","data-date":L.iso,"data-today":L.today?"":void 0,"data-outside":L.outside?"":void 0,children:[L.day,L.today&&h(At,{children:"Today"})]},L.iso)})]})]})};var bc=t=>t?"":void 0,fv=t=>typeof t=="string"||typeof t=="number",Nm=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??""}},gv={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},fc=({label:t,hint:e,status:n,statusIcon:a,tone:r,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:m,name:p,disabled:b,required:f,icon:g,clearable:x,dimActions:y,trailing:k,autoFocus:S,onValueChange:M,onClearInput:N,children:B,className:C,style:I,...R})=>{let U=n&&n!=="neutral"?n:void 0,Y=a===void 0?U?gv[U]:void 0:a;return A("a-input-time",{size:o&&o!=="medium"?o:void 0,round:K(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:m,status:U,tone:r||void 0,name:p,disabled:bc(b),required:bc(f),"dim-actions":bc(y),autofocus:S?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,oninput:M?W=>M(W,Nm(W)):void 0,onchange:M?W=>M(W,Nm(W)):void 0,onclearinput:N?W=>N(J(W).event):void 0,class:C,style:Q(i,"--input-time-round",F(r,"--input-time-tone-source",I)),...R,children:[t!=null&&(fv(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(ge,{shape:g??"clock"})}),x&&h("span",{slot:"clear",style:{display:"contents"},children:h(ve,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),k!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:k}),e!=null&&A("span",{slot:"hint",style:{display:"contents"},children:[Y&&h(ge,{shape:Y,"aria-hidden":"true"}),h("span",{children:e})]}),B]})};var vv=({value:t,defaultValue:e,min:n,max:a,locale:r,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:m,placement:p,offset:b,clearable:f,icon:g,time:x,hour12:y,onValueChange:k,className:S,style:M,...N})=>{let B=r||(typeof navigator<"u"?navigator.language:"en-US"),C=Ye(n),I=Ye(a),R=x?y??Pr(B):!1,U=We(()=>d??(x?pc(B,R):yi(B)),[d,x,B,R]),Y=v=>{if(!v)return"";let _=Ye(v.slice(0,10));if(!_)return"";if(!x)return wi(_,B);let j=v.length>=16&&v[10]==="T",X=_.toPlainDateTime(Te.PlainTime.from(j?v.slice(11,16):"00:00"));return hc(X,B,R)},W=v=>!v||!x?v:v.length<=10?`${v}T00:00`:v.slice(0,16),z=t!==void 0,[ne,O]=$(()=>W(e)),T=z?t:ne,V=T?T.slice(0,10):"",he=!!T&&T.length>=16&&T[10]==="T",Ae=he&&parseInt(T.slice(11,13),10)||0,Me=he?T.slice(14,16):"00",[ce,de]=$(()=>Y(T)),[Oe,ee]=$(!1),[Ce,q]=$(!1),[Ee,qe]=$(0),[ft,Mt]=$(T);T!==ft&&(Mt(T),de(Y(T)),q(!1));let xe=v=>{z||O(v||void 0),k?.(v,{value:v,name:o})},an=v=>`${v}T${String(Ae).padStart(2,"0")}:${Me}`,It=v=>{q(!1),v===(T??"")?de(Y(v)):xe(v)},L=v=>{let _=v.trim();if(!_)return q(!1),T?xe(""):de(""),!0;let j=x?ki(_,B,{min:C,max:I}):Or(_,B,{min:C,max:I});if(!j)return q(!0),!1;let X=x?j.toString({smallestUnit:"minute"}):j.toString();return It(X),!0},H=We(()=>{let v=ce.trim();if(!v)return V;let _=x?ki(v,B,{min:C,max:I}):Or(v,B,{min:C,max:I});return _?_.toString().slice(0,10):null},[ce,x,B,V,n,a]),[oe,w]=$(V);return H!==null&&H!==oe&&w(H),A(me,{children:[h(bt,{label:l,hint:Ce?`Unrecognized date. Try ${U}.`:c,status:Ce?"critical":u,size:i,round:m,disabled:s,clearable:f,leading:g===!1?void 0:h(ge,{shape:g??"calendar-days"}),value:ce,placeholder:U,inputMode:x?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":Oe?"true":"false",onInput:v=>{de(v.currentTarget.value),Ce&&q(!1)},onChange:v=>L(v.currentTarget.value),onKeyDown:v=>{(v.key==="ArrowDown"||v.key==="ArrowUp")&&!s&&(v.preventDefault(),qe(_=>_+1)),v.key==="Enter"&&!s&&(v.preventDefault(),L(v.currentTarget.value)&&ee(!1))},truncate:!0,className:S,style:M,...N}),h(je,{open:Oe,placement:p??"bottom-start",offset:b,autoWidth:!0,inset:8,onStateChange:(v,{next:_})=>ee(_),children:A("div",{"data-menu-open":"",children:[h(mc,{value:oe,min:n,max:a,locale:r,size:i,disabled:s,focusSignal:Ee,onStateChange:(v,{next:_,reason:j})=>{if(j!=="user")return;let X=_??"";It(x&&X?an(X):X),x||ee(!1)}}),x&&A("a-input-date-time-container",{children:[h(fc,{size:i,locale:r,hour12:y,disabled:s,"aria-label":"Time",value:he?`${String(Ae).padStart(2,"0")}:${Me}`:"",onValueChange:(v,{value:_})=>{if(("nativeEvent"in v?v.nativeEvent:v)?.type!=="change")return;let X=V||Te.Now.plainDateISO().toString();xe(_?`${X}T${_}`:X)}}),h(ve,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>ee(!1)})]})]})}),o?h("input",{type:"hidden",name:o,value:T??""}):null]})};var An=t=>typeof t=="string"?{value:t,label:t}:t;function Ha(t){let e=t.trim();if(!e)return null;let n=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var Va=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),ja=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),a=[],r=0,o;for(;(o=n.exec(t))!==null;)o.index>r&&a.push(t.slice(r,o.index)),a.push(h("b",{children:o[0]},a.length)),r=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return a.length===0?t:(r<t.length&&a.push(t.slice(r)),a)};var xv=t=>{let{suggestions:e,value:n,defaultValue:a,onValueChange:r,onSelect:o,filter:i=!0,...s}=t,l=qt(),c=n!==void 0,[d,u]=$(a??""),m=c?n:d,[p,b]=$(!1),[f,g]=$(null),x=We(()=>e.map(An),[e]),y=typeof i=="function",k=i!==!1&&!y?Ha(m):null,S=y?x.filter(C=>i(C,m)):x.filter(C=>Va(C,k)),M=p&&S.length>0,N=C=>{c||u(C),r?.(C)},B=C=>{N(C.value),o?.(C),b(!1)};return A(me,{children:[h(bt,{...s,value:m,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-controls":`${l}-list`,"aria-expanded":M?"true":"false","aria-autocomplete":"list","aria-activedescendant":M&&f?f:void 0,onFocus:()=>b(!0),onInput:C=>{N(C.currentTarget.value),b(!0)},onKeyDown:C=>{C.key==="Enter"&&!C.defaultPrevented&&b(!1)}}),h(je,{id:`${l}-list`,role:"listbox",open:M,onStateChange:(C,{next:I})=>{b(I),I||g(null)},onactivedescendant:C=>g(J(C).detail?.id??null),children:S.map((C,I)=>{let{className:R,style:U,...Y}=ot(C,!0);return h(ke,{...Y,id:`${l}-o${I}`,role:"option","aria-selected":f===`${l}-o${I}`?"true":"false",icon:C.icon,label:ja(C.label??C.value,k),hint:C.hint?ja(C.hint,k):C.hint,tone:C.tone,disabled:C.disabled,value:C.value,onMouseDown:W=>W.preventDefault(),onSelect:()=>B(C),className:R,style:U},`${l}-${C.value}-${I}`)})})]})};var yv=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),wv=({options:t,value:e,defaultValue:n,onStateChange:a,onChange:r,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:m,toneSelected:p,size:b,disabled:f,orientation:g,className:x,style:y,...k})=>{let S=e!==void 0,[M,N]=$(n),B=S?e:M,C=new Set;for(let z of t)C.has(z.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(z.value)} \u2014 values must be unique.`),C.add(z.value);let I=qt(),R=qt(),U=f?void 0:t.find(z=>z.value===B)?.value??t.find(z=>!z.disabled)?.value;return A("a-radio-group",{role:"radiogroup","aria-disabled":f?"true":void 0,"aria-labelledby":c?I:void 0,"aria-describedby":d?R:void 0,...k,state:S?e:void 0,"default-state":S?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:m&&m!=="neutral"?m:void 0,"tone-selected":p||void 0,size:b&&b!=="medium"?b:void 0,disabled:f?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:z=>{let{event:ne,detail:O}=J(z);O&&(a?.(ne,O),!S&&(O.reason==="user"&&ne.defaultPrevented||N(O.next??void 0)))},onchange:r||o?z=>{r?.(z),o?.(z,yv(z.currentTarget))}:void 0,onfocusin:i,onfocusout:s,class:x,style:F(p,"--radio-tone-source",F(m,"--radio-off-tone-source",p==null?F(m,"--radio-tone-source",y):y)),children:[c&&h("a-radio-group-label",{id:I,children:c}),d&&h("a-radio-group-hint",{id:R,children:d}),h("a-radio-list",{children:t.map(z=>{let ne=f||z.disabled,{className:O,style:T,...V}=ot(z);return A("a-radio",{...V,role:"radio",value:z.value,"aria-disabled":ne?"true":void 0,tabIndex:z.value===U?0:-1,tone:z.tone||void 0,"tone-selected":z.toneSelected||void 0,size:z.size&&z.size!=="medium"?z.size:void 0,disabled:z.disabled?"":void 0,class:O,style:F(z.toneSelected,"--radio-tone-source",F(z.tone,"--radio-off-tone-source",z.toneSelected==null?F(z.tone,"--radio-tone-source",T):T)),children:[h("a-radio-label",{children:z.label}),z.hint!=null&&h("a-radio-hint",{children:z.hint})]},z.value)})})]})};function kv(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),a=(o,i)=>o===0?"none":o===i?"all":"some",r=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=r(c.submenu),u=d.reduce((p,b)=>p+b.on,0),m=d.reduce((p,b)=>p+b.total,0);return{node:{...c,submenu:d.map(p=>p.node),selectionState:a(u,m)},on:u,total:m}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=r(c.options),u=d.reduce((p,b)=>p+b.on,0),m=d.reduce((p,b)=>p+b.total,0);return{node:{...c,options:d.map(p=>p.node),selectionState:a(u,m)},on:u,total:m}}let s=An(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return r(t).map(o=>o.node)}var Cv=t=>{let{options:e,placement:n,offset:a,selection:r,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:m,hint:p,size:b,status:f,statusIcon:g,round:x,disabled:y,toneSelected:k,filter:S,selectAll:M=!0,selectAllLabel:N="Select all",clearable:B,clearLabel:C="Clear",renderOption:I,renderIndicator:R,verbose:U,renderSummary:Y,renderTrigger:W,renderEmpty:z,className:ne,style:O,...T}=t,V=r==="multiple",he=f&&f!=="neutral"?`var(--text-2-${f})`:void 0,Ae=V?"checkbox":o??"none",Me=Ae==="none"?void 0:Ae,ce=l,de=i!==void 0,[Oe,ee]=$(s),Ce=de?i:Oe,[q,Ee]=$(!1),[qe,ft]=$(""),[Mt,xe]=$(null),an=qt(),It=E=>typeof E=="object"&&Array.isArray(E.submenu),L=E=>typeof E=="object"&&Array.isArray(E.options),H=(E,ie,te,ae)=>{for(let pe of E)if(typeof pe!="string"&&It(pe))H(pe.submenu,pe.label,te||!!pe.disabled,ae);else if(typeof pe!="string"&&L(pe))H(pe.options,pe.label,te||!!pe.disabled,ae);else{let gt=An(pe);ae.push({opt:gt,disabled:te||!!gt.disabled,group:ie})}},oe=[];H(e,void 0,!1,oe);let w=new Set;for(let E of oe){let ie=String(E.opt.value);w.has(ie)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(E.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),w.add(ie)}let v=new Map(oe.map(E=>[E.opt.value,E.opt])),_=S!==void 0&&S!==!1,j=qe.trim(),X=_&&typeof S!="function"?Ha(j):null,Vt=E=>typeof S=="function"?S(E,j):Va(E,X),rn=typeof S=="function"||_&&!!j?oe.filter(E=>Vt(E.opt)):oe,qa=_&&!!j,rt=Array.isArray(Ce)?Ce:Ce!=null?[Ce]:[],Za=E=>rt.includes(E),tt=rt.map(E=>v.get(E)).filter(Boolean),Nr=oe.filter(E=>!E.disabled).map(E=>E.opt.value),Hm=V&&Nr.length>1&&Nr.every(E=>rt.includes(E)),Ei=E=>E.label??String(E.value),Jn="";if(V){let E=tt.length>0?Y?.(tt):void 0;if(E!=null&&E!=="")Jn=E;else if(Hm)Jn="All";else if(tt.length===1)Jn=Ei(tt[0]);else if(tt.length>1){let ie=`${tt.length} selected`;Jn=U?`${ie}: ${tt.map(Ei).join(", ")}`:ie}}else if(Ce!=null){let E=v.get(Ce);Jn=E?Ei(E):""}let Vm=(E,ie)=>{if(V){if(M&&ie?.altKey){let pe=[E.value];de||ee(pe),ce?.(pe,{value:E.value,option:E,selected:!0});return}let te=rt.includes(E.value),ae=te?rt.filter(pe=>pe!==E.value):[...rt,E.value];de||ee(ae),ce?.(ae,{value:E.value,option:E,selected:!te})}else de||ee(E.value),ce?.(E.value,{value:E.value,option:E})},$a=V?rn.filter(E=>!E.disabled).map(E=>E.opt.value):[],yc=$a.filter(E=>rt.includes(E)),Br=$a.length>0&&yc.length===$a.length,jm=yc.length>0&&!Br,qm=()=>{let E=rt.filter(te=>!$a.includes(te)),ie=Br?E:[...E,...$a];de||ee(ie),ce?.(ie,{all:!0,selected:!Br})},Zm=()=>{let E=V?[]:void 0;de||ee(E),ce?.(E,{all:!0,selected:!1})},Si=(E,ie)=>{let{className:te,style:ae,...pe}=ot(E,!0),gt={value:E.value,selected:Za(E.value),disabled:ie},jt=I?.(E,gt),Mn=R?.(gt),Um=!V&&Ae==="none"?{role:"menuitemradio","aria-checked":Za(E.value)?"true":"false"}:void 0,wc=V&&M&&!ie?Rr:void 0,kc=E.tooltip??wc,Ym=E.tooltip==null&&wc!=null;return A(ke,{...pe,id:`${an}-opt-${E.value}`,selectionIndicator:Me,...Um,indicator:Mn??void 0,label:jt?void 0:ja(E.label??String(E.value),X),hint:jt?void 0:E.hint?ja(E.hint,X):E.hint,icon:jt?void 0:E.icon,tone:E.tone,toneSelected:k,selected:Za(E.value),disabled:ie||void 0,"data-menu-open":V?"":void 0,onSelect:Wm=>Vm(E,Wm),className:te,style:ae,children:[jt,kc&&h(At,{follow:!0,...Ym?{delay:700}:{},children:kc})]},String(E.value))},Ti=(E,ie)=>{let te=[];return E.forEach((ae,pe)=>{if(typeof ae!="string"&&It(ae)){let jt=ie||!!ae.disabled,Mn=Ti(ae.submenu,jt);Mn.length&&te.push(h(ke,{submenu:!0,label:ae.label,icon:ae.icon,disabled:jt||void 0,"data-menu-open":V?"":void 0,children:h(je,{children:Mn})},`sub-${pe}-${ae.label}`));return}if(typeof ae!="string"&&L(ae)){let jt=ie||!!ae.disabled,Mn=Ti(ae.options,jt);Mn.length&&te.push(h(La,{label:ae.label,children:Mn},`grp-${pe}-${ae.label}`));return}let gt=An(ae);typeof S=="function"&&!Vt(gt)||te.push(Si(gt,ie||!!gt.disabled))}),te},$m=()=>{let E=oe.filter(te=>Vt(te.opt)),ie=[];for(let te=0;te<E.length;){let ae=E[te].group;if(ae===void 0){ie.push(Si(E[te].opt,E[te].disabled)),te++;continue}let pe=[],gt=te;for(;te<E.length&&E[te].group===ae;)pe.push(Si(E[te].opt,E[te].disabled)),te++;ie.push(h(La,{label:ae,children:pe},`flat-${gt}-${ae}`))}return ie};return A(me,{children:[W?W({open:q,value:Ce,selected:tt,disabled:!!y,icon:d}):h(bt,{label:m,hint:p,placeholder:c,value:Jn,readOnly:!0,dimActions:!0,disabled:y,leading:u??(d?h(ge,{shape:d}):void 0),size:b,status:f,statusIcon:g,round:x,role:"combobox","aria-haspopup":"menu","aria-expanded":q?"true":"false",trailing:h("a-select-chevron",{open:q?"":void 0,style:he?{color:he}:void 0,children:h(ge,{shape:"chevron-down"})}),className:ne,style:O,...T}),A(je,{placement:n,offset:a,onStateChange:(E,{next:ie})=>{Ee(ie),ie||(ft(""),xe(null))},onactivedescendant:E=>xe((E.nativeEvent??E).detail?.id??null),children:[_&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(bt,{"data-menu-search":"",size:"small",value:qe,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list","aria-activedescendant":q&&Mt?Mt:void 0,onInput:E=>ft(E.currentTarget.value)})}),V&&M&&rn.length>0&&A(me,{children:[h(ke,{selectionIndicator:"checkbox",selected:Br,indeterminate:jm,label:N,"data-menu-open":"","data-menu-skip-active":"",onSelect:qm}),h(Sn,{})]}),rn.length===0?z?.({query:j}):qa?$m():Ti(e,!1),B&&rt.length>0&&A(me,{children:[h(Sn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(ke,{icon:"x",label:C,"data-menu-open":"",onSelect:Zm})})]})]})]})};var gc=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...gc(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...gc(n.options)):e.push(An(n));return e},Ci=t=>t==null||t===""||Array.isArray(t)&&t.length===0,Bm=(t,e)=>Va(t,Ha(e)),Ev=t=>{let{facets:e,placement:n,offset:a,value:r,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,toneSelected:m,searchable:p,searchPlaceholder:b="Filter\u2026",clearable:f=!0,clearAllLabel:g="Clear all",renderTrigger:x,className:y,style:k,...S}=t,M=r!==void 0,[N,B]=$(o??{}),C=M?r:N,[I,R]=$(!1),[U,Y]=$({}),[W,z]=$({});{let w=null,v=U;for(let _ of e)_.kind==="text"&&W[_.key]!==C[_.key]&&(w={...w??W,[_.key]:C[_.key]},v={...v,[_.key]:C[_.key]??""});w&&(z(w),Y(v))}let[ne,O]=$({}),[T,V]=$(""),[he,Ae]=$({}),Me=w=>v=>{let _=J(v).detail?.id??null;Ae(j=>j[w]===_?j:{...j,[w]:_})},ce=e.reduce((w,v)=>w+(Ci(C[v.key])?0:1),0),de=We(()=>new Map(e.map(w=>[w.key,w.kind==="single"||w.kind==="multiple"?gc(w.options):[]])),[e]),Oe=(w,v)=>{M||B(w),i?.(w,v)},ee=(w,v)=>{let _=Ci(v),j={...C};_?delete j[w.key]:j[w.key]=v,Oe(j,{facet:w.key,kind:w.kind,value:_?void 0:v})},Ce=()=>Oe({},{all:!0}),q=w=>{let v=de.get(w.key)??[];if(!w.filter)return v;let _=ne[w.key]??"",j=typeof w.filter=="function"?w.filter:Bm;return v.filter(X=>j(X,_))},Ee=w=>w.filter?h("a-select-header",{slot:"header","data-menu-open":"",children:h(bt,{"data-menu-search":"",size:"small",value:ne[w.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${w.label}`,"aria-autocomplete":"list","aria-activedescendant":he[w.key]??void 0,onInput:v=>O(_=>({..._,[w.key]:v.currentTarget.value}))})}):null,qe=(w,v,_="")=>{let{className:j,style:X,...Vt}=ot(v,!0),Ze={...Vt,icon:v.icon,label:v.label??String(v.value),hint:v.hint,tone:v.tone,toneSelected:m,disabled:v.disabled,className:j,style:X,"data-menu-open":""};if(w.kind==="single"){let tt=C[w.key];return h(ke,{...Ze,selectionIndicator:"check",selected:tt===v.value,onSelect:()=>ee(w,tt===v.value?void 0:v.value)},`${_}${v.value}`)}let rn=C[w.key]??[],qa=w.selectAll!==!1&&!v.disabled,rt=v.tooltip??(qa?Rr:void 0),Za=v.tooltip==null&&qa;return h(ke,{...Ze,selectionIndicator:"checkbox",selected:rn.includes(v.value),onSelect:tt=>qa&&tt?.altKey?ee(w,[v.value]):ee(w,rn.includes(v.value)?rn.filter(Nr=>Nr!==v.value):[...rn,v.value]),children:rt&&h(At,{follow:!0,...Za?{delay:700}:{},children:rt})},`${_}${v.value}`)},ft=w=>q(w).map(v=>qe(w,v)),Mt=w=>{let v=C[w.key]??[],_=q(w),j=_.filter(Ze=>!Ze.disabled).map(Ze=>Ze.value),X=j.length>0&&j.every(Ze=>v.includes(Ze)),Vt=j.some(Ze=>v.includes(Ze));return A(me,{children:[w.selectAll!==!1&&_.length>0&&A(me,{children:[h(ke,{selectionIndicator:"checkbox",selected:X,indeterminate:Vt&&!X,label:w.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>ee(w,X?v.filter(Ze=>!j.includes(Ze)):[...new Set([...v,...j])])}),h(Sn,{})]}),_.map(Ze=>qe(w,Ze))]})},xe=()=>e.filter(v=>v.kind==="single"||v.kind==="multiple").map(v=>{let _=typeof v.filter=="function"?v.filter:Bm;return{facet:v,matched:(de.get(v.key)??[]).filter(j=>_(j,T))}}).filter(v=>v.matched.length>0).map(({facet:v,matched:_})=>h(La,{label:v.label,children:_.map(j=>qe(v,j,`${v.key}:`))},v.key)),an=w=>{let v=C[w.key]??"",_=U[w.key]??v,j=()=>{let X=_.trim()===""?void 0:_;X!==(v||void 0)&&ee(w,X)};return h("div",{"data-menu-open":"",style:{padding:"4px"},children:h(bt,{size:"small",value:_,placeholder:w.placeholder,"aria-label":w.label,onInput:X=>Y(Vt=>({...Vt,[w.key]:X.currentTarget.value})),onKeyDown:X=>{X.key==="Enter"&&(X.preventDefault(),j())},onBlur:j})})},It=w=>h("div",{"data-menu-open":"",children:w.render({value:C[w.key],onChange:v=>ee(w,v),close:()=>R(!1)})}),L=w=>{let v=w.kind==="single"||w.kind==="multiple",_=w.kind==="single"?ft(w):w.kind==="multiple"?Mt(w):w.kind==="text"?an(w):It(w),j=!Ci(C[w.key]);return A(je,{onactivedescendant:v&&w.filter?Me(w.key):void 0,children:[v&&Ee(w),_,f&&j&&A(me,{children:[h(Sn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(ke,{icon:"x",label:"Clear","data-menu-open":"",onSelect:()=>ee(w,void 0)})})]})]})},H=w=>{let v=C[w.key];if(Ci(v))return null;switch(w.kind){case"single":return(de.get(w.key)??[]).find(j=>j.value===v)?.label??String(v);case"multiple":return String(v.length);case"text":return String(v);case"custom":return w.summary(v)}};return A(me,{children:[x?x({open:I,value:C,count:ce,disabled:!!u}):h(ve,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":"menu","aria-expanded":I?"true":"false",className:y,style:k,...S,children:ce>0&&h(fi,{size:"small",priority:"primary",tone:"brand",children:String(ce)})}),A(je,{placement:n,offset:a,open:I,onStateChange:(w,{next:v})=>{R(v),v||V("")},onactivedescendant:p?Me("__root__"):void 0,children:[p&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(bt,{"data-menu-search":"",size:"small",value:T,placeholder:b,"aria-label":"Filter all facets","aria-autocomplete":"list","aria-activedescendant":he.__root__??void 0,onInput:w=>V(w.currentTarget.value)})}),p&&T.trim()?xe():e.map(w=>A(ke,{submenu:!0,icon:w.icon,label:w.label,children:[(()=>{let v=H(w);return v!=null?h(fi,{size:"small",tone:"brand",children:h("a-select-faceted-summary",{children:v})}):null})(),L(w)]},w.key)),f&&A(me,{children:[h(Sn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(ke,{icon:"filter-x",label:g,disabled:ce===0,"data-menu-open":"",onSelect:Ce})})]})]})]})};var vc=({children:t,options:e,value:n,defaultValue:a,onStateChange:r,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:m,orientation:p,fill:b,noslide:f,round:g,disabled:x,className:y,style:k,id:S,...M})=>{let N=n!==void 0,[B,C]=$(a),I=N?n:B,R=e??[],U=new Set;for(let O of R)U.has(O.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(O.value)} \u2014 values must be unique.`),U.add(O.value);let Y=O=>{let{event:T,detail:V}=J(O);V&&(r?.(T,V),!N&&(T.defaultPrevented||C(V.next??void 0)))},W=o||i?O=>{o?.(O),i?.(O,{value:O.currentTarget?.value??null})}:void 0,z=p==="vertical",ne=h("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":z?"vertical":void 0,"aria-disabled":x?"true":void 0,state:N?n:void 0,"default-state":N?void 0:a,priority:d&&d!=="primary"?d:void 0,tone:u&&u!=="neutral"?u:void 0,size:m&&m!=="medium"?m:void 0,orientation:z?"vertical":void 0,fill:b?"":void 0,noslide:f?"":void 0,round:K(g),disabled:x?"":void 0,onstatechange:Y,onchange:W,onfocusin:s,onfocusout:l,class:y,id:S,style:Q(g,"--tabs-round",F(u,"--tabs-tone-source",k)),...M,children:R.map(O=>{let T=x||O.disabled,V=O.value===I,{className:he,style:Ae,...Me}=ot(O);return A("a-tab",{...Me,role:"tab",value:O.value,tone:O.tone||void 0,"aria-disabled":T?"true":void 0,tabIndex:T&&!V?-1:0,disabled:T?"":void 0,round:K(g)??K(O.round),class:he,style:F(O.tone,"--tabs-tone-source",Ae),children:[O.icon&&h("a-icon",{shape:O.icon,"aria-hidden":"true"}),Lr(O.label!=null?O.label:O.children,"a-tab-label"),O.iconTrailing&&h("a-icon",{shape:O.iconTrailing,"aria-hidden":"true"}),O.tooltip!=null&&O.tooltip!==""?h(At,{truncatedOnly:!0,children:O.tooltip}):null]},O.value)})});return A(me,{children:[ne,t]})};var Lm={incomplete:"circle-large",completed:"check",error:"x"},Sv=({options:t,value:e,defaultValue:n,onStateChange:a,onChange:r,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:m,orientation:p,fill:b,disabled:f,children:g,className:x,style:y,id:k,...S})=>{let M=e!==void 0,[N,B]=$(n),C=M?e:N??t[0]?.value,I=(T,V)=>{a?.(T,V),!(M||T.defaultPrevented)&&B(V.next??void 0)},R=t.map(T=>{let{className:V,style:he,...Ae}=ot(T),Me=T.tone||void 0,ce=T.disabled?"neutral":T.state==="error"?"critical":Me||d||"neutral",de=u?.(T,{state:T.state,selected:T.value===C,disabled:!!T.disabled}),Oe=T.disabled?h(ge,{shape:Lm.incomplete}):T.state==="loading"?h(rc,{tone:ce}):h(ge,{shape:Lm[T.state]}),ee=de!==void 0?de:T.marker!==void 0?typeof T.marker=="number"?T.marker:h(ge,{shape:T.marker}):Oe;return{...Ae,value:T.value,disabled:T.disabled,"data-step-state":T.state,tone:ce,tooltip:A(me,{children:[T.label,T.hint!=null&&A(me,{children:[" \u2014 ",T.hint]})]}),className:V,style:he,children:A(me,{children:[h("a-step-marker",{"aria-hidden":"true",children:ee}),A("a-step-desc",{children:[h("a-tab-label",{children:T.label}),T.hint!=null&&h("a-step-hint",{children:T.hint})]})]})}}),U=t.findIndex(T=>T.value===C),Y=p==="vertical",W=g!=null&&g!==!1,z=Y&&W,ne=(U>=0?U:t.length-1)+2,O=z?{...y,"--steps-panel-row":ne}:y;return h("a-steps",{class:x,style:O,id:k,...S,"data-orientation":Y?"vertical":void 0,children:h(vc,{options:R,value:C,onStateChange:I,onChange:r,onValueChange:o,onFocus:i,onBlur:s,label:l,size:m,orientation:p,fill:b,priority:c,noslide:!0,disabled:f,"data-steps":"",children:g})})};var Tv=({value:t,children:e,hideMode:n,className:a,style:r})=>h("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:a,style:r,children:e});var Av=new Set(["top","right","bottom","left"]),Mv=({header:t,footer:e,position:n,closable:a,persistent:r,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:m,...p})=>{let b=i!==void 0,f=typeof o=="string"&&Av.has(o)?o:void 0;return A("a-dialog",{state:b?i?"open":"closed":void 0,"default-state":!b&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:r?"":void 0,round:f??K(o),name:b?void 0:l,onstatechange:c?g=>{let{event:x,detail:y,isOwn:k}=J(g);k&&y&&c(x,{next:y.next==="open",prev:y.prev==="open"})}:void 0,class:d,style:Q(f?void 0:o,"--dialog-round",u),...p,children:[a!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(ve,{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 Iv=({header:t,subtitle:e,icon:n,footer:a,media:r,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:m,target:p,rel:b,ping:f,className:g,style:x,children:y,...k})=>{let S=i||void 0,M=Q(u,"--card-round",F(S,"--card-tone-source",x)),N=l==="small"?5:l==="large"?3:4;return A("a-card",{tone:S,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:K(u),href:m,target:m?p:void 0,rel:m?b:void 0,ping:m?f:void 0,class:g,style:M,...k,children:[r!=null&&h("div",{slot:"media",children:r}),n!=null&&(typeof n=="string"?h("a-card-icon-chip",{slot:"icon",children:h(ge,{shape:n})}):h("div",{slot:"icon",children:n})),t!=null&&(typeof t=="string"||typeof t=="number"?h(oc,{slot:"header",level:N,tone:S,children:t}):h("div",{slot:"header",children:t})),e!=null&&h(bi,{slot:"header",size:"small",priority:"tertiary",tone:S,children:e}),typeof y=="string"||typeof y=="number"?h(bi,{priority:"secondary",tone:S,size:l,children:y}):y,a!=null&&h("span",{slot:"footer",style:{display:"contents"},children:a})]})};var xc=({message:t,actions:e,tone:n,round:a,closable:r,role:o="status",dismissed:i,defaultDismissed:s,onDismiss:l,className:c,style:d,children:u,...m})=>{let p=i!=null,b=Q(a,"--banner-round",F(n,"--banner-tone-source",d)),f=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 A("a-banner",{state:p?i?"closed":"open":void 0,"default-state":p?void 0:s?"closed":"open",tone:n&&n!=="neutral"?n:void 0,round:K(a),role:o,onstatechange:l?g=>{let{detail:x,isOwn:y}=J(g);y&&x?.next==="closed"&&l()}:void 0,class:c,style:b,...m,children:[f,u,e!=null&&h("span",{slot:"actions",style:{display:"contents"},children:e}),r!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(ve,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var Dv=({entry:t,store:e})=>{let n=We(()=>t.render(t.id),[t.id,t.rev]),a=typeof Node<"u"&&n instanceof Node,r=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 a?h("a-toast",{...o,content:n}):r?h("a-toast",{...o,children:h(xc,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):h("a-toast",{...o,children:n})},zv=({toaster:t,label:e="Notifications",className:n,style:a,children:r,...o})=>{let i=t??Rm(),s=Ac(i.subscribe,i.getSnapshot,i.getServerSnapshot);return h("a-toaster",{role:"region","aria-label":e,class:n,style:a,...o,children:s.map(l=>h(Dv,{entry:l,store:i},l.id))})},_v,Rm=()=>_v??=hi(),Fm=zv;Object.defineProperty(Fm,"manager",{get:Rm,enumerable:!0});export{$g as Avatar,xc as Banner,Xg as Breadcrumbs,ve as Button,ic as ButtonCopy,mc as Calendar,Iv as Card,tv as Checkbox,Dn as DEFAULT_CONFIG,Mv as Dialog,rv as Expander,Jg as ICON_SHAPES,Qg as ICON_SYNONYMS,ge as Icon,bt as Input,xv as InputAutocomplete,vv as InputDate,fc as InputTime,rc as Loader,je as Menu,La as MenuGroup,ke as MenuItem,sc as MenuItemCopy,Sn as MenuSeparator,Ug as Progress,wv as RadioGroup,Cv as Select,Ev as SelectFaceted,uv as Slider,Sv as Steps,av as Switch,Tv as TabPanel,vc as Tabs,fi as Tag,bi as Text,oc as Title,Fm as Toaster,At as Tooltip,Bi as avatarToSvg,dc as buildMonth,Tn as clampDate,zi as colorLightness,Gm as configure,hi as createToaster,yi as dateFormatPattern,pc as dateTimeFormatPattern,lc as firstDayOfWeek,wi as formatDateInput,hc as formatDateTimeInput,Oi as getInitials,_m as getWeekdays,Rc as hasFigure,Pc as hashSeed,cc as isOutOfRange,Lc as maxChroma,Nc as mulberry32,jr as oklchString,kv as optionsWithSelection,Or as parseDateInput,ki as parseDateTimeInput,Ye as parseISODate,Pm as parseTimeInput,Ni as resolveAvatar,Bc as rngFromSeed,Pr as usesHour12};
1246
+ `;function Cm(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",mi)}Cm();var Ug=({seed:t,name:e,src:n,size:a,badge:r,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof a=="number",u=d?on(a,"--avatar-size",l):l,m=Q(o,"--avatar-radius",u),p=F(r,"--avatar-badge-tone-source",m);return h("a-avatar",{seed:t,name:e,src:n,size:!d&&a&&a!=="medium"?a:void 0,badge:r,round:K(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 Yg=({value:t,max:e=100,tone:n,size:a,round:r,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,b=e>0?Math.min(e,Math.max(0,m)):0,f=[o,!u&&`${p}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return h("a-progress",{value:u?!1:m,max:e,tone:n&&n!=="neutral"?n:void 0,size:a&&a!=="medium"?a:void 0,round:K(r),role:"progressbar","aria-valuenow":u?void 0:b,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":f,class:s,style:Q(r,"--progress-round",F(n,"--progress-tone-source",l)),...d,children:Ic(c)?c:T("a-progress-label",{children:[!u&&T("a-progress-number",{children:[p,"%"]}),o!=null&&h("a-progress-text",{children:o}),i!=null&&h("a-progress-hint",{children:i})]})})};var rc=({tone:t,value:e,max:n=100,size:a,speed:r,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,...a!=null?{"--loader-size":`${a}px`}:{},...!c&&r!=null&&Number.isFinite(r)&&r>0?{"--loader-speed":`${r}s`}:{},...m!=null?{"--loader-value":`${m}%`}:{}},b=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:t,...c?{value:u}:{},class:i,style:p,...b,...l})};var At=({delay:t,placement:e,round:n,follow:a,interactive:r,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>h("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"?"top":void 0,round:K(n),follow:a?"":void 0,interactive:r?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:Q(n,"--tooltip-round",l),...d,children:c});var bi=({priority:t,tone:e,size:n,inline:a,truncate:r,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=typeof r=="number"?r:r?1:null,m=u!=null&&u>=1?u:null,p=e||void 0,b=F(p,"--text-tone-source",m!=null?{...l,"--line-clamp":m}:l),f=o&&m!=null;return T("a-text",{priority:t,tone:p,size:n,inline:a?"":void 0,truncate:m!=null?String(m):void 0,expandable:f?"":void 0,collapsible:f&&i?"":void 0,class:s,style:b,...d,children:[c,m!=null&&!f&&h(At,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var oc=({level:t=2,priority:e,tone:n,className:a,style:r,children:o,...i})=>{let s=n||void 0;return h("a-title",{level:String(t),priority:e,tone:s,role:"heading","aria-level":t,class:a,style:F(s,"--title-tone-source",r),...i,children:o})};var ve=({shape:t,size:e,label:n,className:a,style:r,...o})=>{let i=e!=null?{...r,"--icon-size":`${e}px`}:r,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return h("a-icon",{shape:t,class:a,style:i,...s,...o})};var fi=({icon:t,iconTrailing:e,label:n,value:a,tone:r,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let m=r||void 0,p=F(m,"--tag-tone-source",c),b=a!=null,f=t!=null&&n==null&&a==null&&d==null&&e==null;return T("a-tag",{tone:m,"aria-label":f?`${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&&(b?h("a-tag-label",{children:n}):h("a-tag-value",{children:n})),b&&h("a-tag-value",{children:a}),d,e&&h(ve,{shape:e})]})};var xe=({priority:t,tone:e,underline:n,underlineOnHover:a,icon:r,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:m,onClick:p,href:b,target:f,rel:g,download:x,ping:y,type:w,form:S,className:A,style:P,children:N,...C})=>{let I=e||void 0,R=d||c,U=Q(m,"--button-round",F(I,"--button-tone-source",P)),Y=r!=null&&s==null&&N==null&&o==null,W={role:"button",priority:t,tone:I,underline:n,"underline-on-hover":a?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:K(m),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:R?-1:0,"aria-disabled":R?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":Y?r:void 0,class:A,style:U,onClick:R?void 0:p},z=T(be,{children:[r&&h("a-icon",{shape:r,"aria-hidden":"true"}),s!=null&&h("a-button-label",{children:s}),Lr(N,"a-button-label"),o&&h("a-icon",{shape:o,"aria-hidden":"true"})]});if(b!=null){let ne={...W,disabled:R||void 0};return h("a",{href:R?void 0:b,"data-anta":"",target:f,rel:g,download:x,ping:y,...ne,...C,children:z})}return h("a-button",{type:w,form:S,...W,...C,children:z})};function gi(t){let{copy:e,copyNode:n,copyUrl:a,copyWithUrl:r,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":a?"":void 0,"copy-with-url":r?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(J(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function vi(t){return t.copyNode!=null&&t.copyNode!==!1}var ic=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:a,onCopied:r,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":m,...p})=>{let b=e==="none"?void 0:t??"copy",{shownIcon:f,shownTone:g,handleCopied:x}=Vr(b,a,r),y=e==="trailing"?{iconTrailing:f}:e==="none"?{}:{icon:f},w=d!=null||u!=null,S=gi({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:x,toast:e==="none",copiedLabel:n});return T(xe,{...y,label:d,tone:e==="none"?a:g,"aria-label":m??(w?void 0:"Copy"),"data-copy-node-button":vi({copyNode:s})?"":void 0,...p,children:[u,h("a-copy",{...S})]})};var je=({placement:t,context:e,coord:n,nohover:a,offset:r,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:m,style:p,children:b,...f})=>h("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:a?"":void 0,offset:r!=null?String(r):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:x,detail:y,isOwn:w}=J(g);w&&y&&l(x,{next:y.next==="open",prev:y.prev==="open"})}:void 0,round:K(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":"vertical",class:m,style:on(i,"--menu-padding",Q(c,"--menu-round",p)),...f,children:b});var sc={"\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 Wg(t){let e=[],n="",a=()=>{n&&(e.push(sc[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)),n="")};for(let r of t)sc[r]?(a(),e.push(sc[r])):r==="+"?a():n+=r;return a(),e.length?e.join("+"):void 0}function Gg(t){let e=t.trim().replace(/\s*\+\s*/g,"+").split(/\s+/).map(Wg).filter(n=>n!==void 0);return e.length?e.join(" "):void 0}var Ce=({icon:t,label:e,hint:n,kbd:a,iconTrailing:r,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneSelected:u,submenu:m,value:p,onSelect:b,href:f,target:g,rel:x,download:y,ping:w,role:S,className:A,style:P,children:N,...C})=>{let I=t,R=s==="checkbox"||s==="radio"||s==="check",U=s==="checkbox"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",Y=R?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,W=i&&(s===void 0||s==="check"),z=i&&u||d,ne=z&&z!=="neutral"?z:void 0,B=C["aria-keyshortcuts"],M=a?Gg(a):void 0,H=a?h("kbd",{"aria-hidden":B??M?"true":void 0,children:a}):null,oe=e!=null&&(n!=null?T("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(f!=null){let ie={"data-anta-menu-item":"",role:S??"menuitem",href:o?void 0:f,target:g,rel:x,download:y===!0?"":y||void 0,ping:w,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,"aria-keyshortcuts":M,tone:ne,style:F(z,"--menu-item-tone-source",P),onClick:b&&!o?Ee=>b(Ee,{value:p,label:e}):void 0,class:A};return T("a",{...ie,...C,children:[t&&h("a-icon",{shape:t,"aria-hidden":"true"}),oe,N,H,r&&h("a-icon",{shape:r,"aria-hidden":"true"})]})}return T("a-menu-item",{role:S??U,tabIndex:0,disabled:o?"":void 0,selected:W?"":void 0,"aria-checked":Y,tone:ne,style:F(z,"--menu-item-tone-source",P),submenu:m?"":void 0,"aria-haspopup":m?"menu":void 0,"aria-disabled":o?"true":void 0,"aria-keyshortcuts":M,onmenuselect:b?ie=>b(ie,{value:p,label:e}):void 0,class:A,...C,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:ne,style:F(z,"--checkbox-tone-source")}):s==="radio"?h("a-radio",{"aria-hidden":"true",selected:!!i,tone:ne,style:F(z,"--radio-tone-source")}):null,I&&h("a-icon",{shape:I,"aria-hidden":"true"}),oe,N,H,(()=>{let ie=m?r??"chevron-right":r;return!m&&!r&&s==="check"&&c==null&&(ie=i?"check":"blank"),ie?h("a-icon",{shape:ie,"aria-hidden":"true"}):null})()]})};var lc=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:a,tone:r,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...m})=>{let p=n==="none"?void 0:e,{shownIcon:b,shownTone:f,handleCopied:g}=Vr(p,r,o),x=n==="trailing"?{iconTrailing:b}:n==="none"?{}:{icon:b},y=gi({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:g,toast:n==="none",copiedLabel:a});return T(Ce,{label:t,tone:f,...x,"data-menu-open":"","data-copy-node-button":vi({copyNode:l})?"":void 0,...m,children:[u,h("a-copy",{...y})]})};var Kg=new Set(["\u2192","/","\u2022","\u25B8"]);function Em(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function Xg(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let a=Math.max(1,Math.floor(e));if(t.length<=a)return t.map(s=>({kind:"item",item:s}));let r=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),a-1),o=a-r,i=t.slice(r,t.length-o);return[...t.slice(0,r).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function Sm(t){return t.current?{"aria-current":"page"}:{}}function Jg(t,e,n,a,r,o,i){let{label:s,current:l,...c}=t,d=Sm(t);if(Em(t)){let m={...c,priority:e,size:n,underline:a,underlineOnHover:r,paddingless:o,...d};return h(ic,{...m,children:s},i)}let u={...c,priority:e,size:n,underline:a,underlineOnHover:r,paddingless:o,...d};return h(xe,{...u,children:s},i)}function Qg(t,e){let{label:n,current:a,onClick:r,...o}=t,i=Sm(t);return Em(t)?h(lc,{...o,label:n,onSelect:r,...i},e):h(Ce,{...o,label:n,onSelect:r,...i},e)}var ev=({items:t,priority:e="quaternary",size:n="medium",separator:a="chevron-right",maxItems:r,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":m,...p})=>{let b=Xg(t,r,o),f=Kg.has(a),g=f?a:h(ve,{shape:a});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":f?void 0:"",class:d,style:u,...p,children:b.flatMap((x,y)=>{let w=x.kind==="overflow"?[h(xe,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${y}`),h(je,{autoWidth:!0,children:x.items.map((S,A)=>Qg(S,A))},`menu-${y}`)]:[Jg(x.item,e,n,s,l,c,y)];return y<b.length-1&&w.push(h("a-breadcrumb-separator",{"aria-hidden":"true",children:g},`separator-${y}`)),w})})};var tv=["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"],nv={"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 Tm=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",Am=t=>t==="indeterminate"?"indeterminate":t==="checked",av=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),rv=({checked:t,defaultChecked:e,disabled:n,tone:a,toneSelected:r,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:m,style:p,children:b,tabIndex:f,...g})=>{let x=Q(i,"--checkbox-round",F(r,"--checkbox-tone-source",F(a,"--checkbox-off-tone-source",r==null?F(a,"--checkbox-tone-source",p):p))),y=g["aria-label"],w=(typeof y=="string"?y:void 0)??d??(typeof b=="string"?b:void 0),S=s?I=>{let{event:R,detail:U}=J(I);U&&s(R,{next:Am(U.next),prev:Am(U.prev)})}:void 0,A=l||c?I=>{l?.(I),c?.(I,av(I.currentTarget))}:void 0,P=t!==void 0?Tm(t):void 0,N=t===void 0&&e!==void 0?Tm(e):void 0,C=d!=null||b!=null;return T("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":w,...g,state:P,"default-state":N,disabled:n?"":void 0,tone:a&&a!=="neutral"?a:void 0,"tone-selected":r||void 0,size:o&&o!=="medium"?o:void 0,round:K(i),tabIndex:n?-1:f??0,onstatechange:S,onchange:A,class:m,style:x,children:[C&&T("a-checkbox-label",{children:[d,b]}),u!=null&&h("a-checkbox-hint",{children:u})]})};var ov=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),iv=({checked:t,defaultChecked:e,disabled:n,tone:a,toneSelected:r,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:m,className:p,style:b,children:f,tabIndex:g,...x})=>{let y=Q(i,"--switch-round",F(r,"--switch-tone-source",F(a,"--switch-off-tone-source",r==null?F(a,"--switch-tone-source",b):b))),w=x["aria-label"],S=(typeof w=="string"?w:void 0)??u??(typeof f=="string"?f:void 0),A=l?R=>{let{event:U,detail:Y}=J(R);Y&&l(U,{next:Y.next==="checked",prev:Y.prev==="checked"})}:void 0,P=c||d?R=>{c?.(R),d?.(R,ov(R.currentTarget))}:void 0,N=t===void 0?void 0:t?"checked":"unchecked",C=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,I=u!=null||f!=null;return T("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":S,...x,state:N,"default-state":C,disabled:n?"":void 0,tone:a,"tone-selected":r,size:o&&o!=="medium"?o:void 0,round:K(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:A,onchange:P,class:p,style:y,children:[I&&T("a-switch-label",{children:[u,f]}),m!=null&&h("a-switch-hint",{children:m})]})};var Sn=({className:t,children:e,...n})=>{let a=!!e&&!(typeof e=="string"&&e.trim()==="");return h("a-menu-separator",{role:a?"status":"separator","aria-live":a?"polite":void 0,class:t,...n,children:a?e:null})};var La=({label:t,className:e,children:n,...a})=>T("a-menu-group",{role:"group","aria-label":t,class:e,...a,children:[t!=null&&h("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var sv=({title:t,level:e,tone:n,priority:a,outdent:r,actions:o,disabled:i,round:s,open:l,defaultOpen:c,onStateChange:d,className:u,style:m,children:p,...b})=>{let f=l!==void 0,g=Q(s,"--expander-round",F(n,"--expander-tone-source",m)),x=typeof t=="object"&&t!==null?h("span",{slot:"title",style:{display:"contents"},children:t}):h("a-expander-summary",{slot:"title",children:t});return T("a-expander",{state:f?l?"open":"closed":void 0,"default-state":!f&&c?"open":void 0,level:e!=null?String(e):void 0,tone:n&&n!=="neutral"?n:void 0,priority:a&&a!=="secondary"?a:void 0,outdent:r?"":void 0,round:K(s),disabled:i?"":void 0,onstatechange:d?y=>{let{event:w,detail:S,isOwn:A}=J(y);A&&S&&d(w,{next:S.next==="open",prev:S.prev==="open"})}:void 0,class:u,style:g,...b,children:[x,o!=null&&h("span",{slot:"actions",children:o}),h("a-expander-details",{children:p})]})};var Ra=t=>t?"":void 0,lv=t=>typeof t=="string"||typeof t=="number",Mm=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??""}},cv={email:"email",tel:"tel",url:"url"},dv={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},uv={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},bt=({label:t,hint:e,status:n,statusIcon:a,tone:r,size:o,round:i,value:s,defaultValue:l,multiline:c,rows:d,maxRows:u,clearable:m,leading:p,trailing:b,type:f,autoComplete:g,inputMode:x,autoFocus:y,name:w,placeholder:S,truncate:A=!0,disabled:P,readOnly:N,required:C,dimActions:I,spellCheck:R,maxLength:U,minLength:Y,pattern:W,min:z,max:ne,step:B,onInput:M,onChange:H,onValueChange:oe,onClearClick:ie,onClearInput:Ee,children:ue,className:he,style:Oe,...ee})=>{let Se=n&&n!=="neutral"?n:void 0,q=a===void 0?Se?uv[Se]:void 0:a,Te=f==="search",qe=Te?void 0:f,ft=p??(Te?h(ve,{shape:"search"}):void 0),Mt=Te?m??!0:m;return T("a-input",{size:o&&o!=="medium"?o:void 0,round:K(i),value:s,defaultvalue:l,multiline:Ra(c||d!=null),rows:d!=null?String(d):void 0,maxrows:u!=null?String(u):void 0,status:Se,tone:r||void 0,type:!c&&d==null?qe:void 0,name:w,placeholder:S,truncate:Ra(A),disabled:Ra(P),readonly:Ra(N),required:Ra(C),"dim-actions":Ra(I),autocomplete:g??(!c&&d==null&&f?cv[f]:void 0),inputmode:x??(!c&&d==null&&f?dv[f]:void 0),autofocus:y?!0:void 0,spellcheck:R!=null?R?"true":"false":void 0,maxlength:U!=null?String(U):void 0,minlength:Y!=null?String(Y):void 0,pattern:W,min:z,max:ne,step:B,"aria-invalid":n==="critical"?"true":void 0,oninput:M||oe?ye=>{M?.(ye),oe?.(ye,Mm(ye))}:void 0,onchange:H||oe?ye=>{H?.(ye),oe?.(ye,Mm(ye))}:void 0,onclearclick:ie?ye=>ie(J(ye).event):void 0,onclearinput:Ee?ye=>Ee(J(ye).event):void 0,class:he,style:Q(i,"--input-round",F(r,"--input-tone-source",Oe)),...ee,children:[t!=null&&(lv(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),ft!=null&&h("span",{slot:"leading",style:{display:"contents"},children:ft}),Mt&&h("span",{slot:"clear",style:{display:"contents"},children:h(xe,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),b!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:b}),e!=null&&T("span",{slot:"hint",style:{display:"contents"},children:[q&&h(ve,{shape:q,"aria-hidden":"true"}),h("span",{children:e})]}),ue]})};var xi=(t,e)=>Number.isFinite(t)?t:e,hv=t=>typeof t=="string"||typeof t=="number",pv=(t,e)=>{let n=xi(t,0);return{min:n,max:Math.max(n,xi(e,100))}},Im=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}},mv=({label:t,value:e,defaultValue:n,min:a,max:r,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:m,thumbFill:p,round:b,valueDisplay:f="end",valuePrefix:g,valueSuffix:x,markers:y,trackClick:w="drag-only",onInput:S,onChange:A,onValueChange:P,onValueCommit:N,className:C,style:I,children:R,tabIndex:U,...Y})=>{let W=Hr(u),z=Hr(m),ne=on(m,"--anta-slider-thumb-size",on(u,"--anta-slider-track-size",Q(b,"--slider-round",F(c,"--slider-thumb-tone-source",F(l,"--slider-tone-source",I))))),{min:B,max:M}=pv(a,r),H=xi(o,1)>0?xi(o,1):1,oe=Y["aria-label"],ie=(typeof oe=="string"?oe:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),Ee=f==="inline"&&t==null?"end":f,ue=q=>q.value<=B?"0%":q.value>=M?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(q.value-B)/(M-B)} + var(--anta-slider-thumb-size) / 2)`,he=q=>q.value<=B?"start":q.value>=M?"end":void 0,Oe=q=>{let Te={};return Object.assign(Te,{"--slider-marker-position":ue(q)}),Te},ee=S||P?q=>{let Te=Im(q);S?.(q),P?.(q,Te)}:void 0,Se=A||N?q=>{let Te=Im(q);A?.(q),N?.(q,Te)}:void 0;return T("a-slider",{value:e,defaultvalue:n,min:B,max:M,step:H,name:i,disabled:s?"":void 0,tone:l&&l!=="neutral"?l:void 0,"thumb-tone":c&&c!=="neutral"?c:void 0,size:d&&d!=="medium"?d:void 0,"track-size":W,"thumb-size":z,"thumb-fill":p?"":void 0,round:K(b),"track-click":w==="jump"?"jump":void 0,"value-display":Ee==="end"?void 0:Ee,"value-prefix":g,"value-suffix":x,role:"slider","aria-label":ie,tabIndex:s?-1:U??0,oninput:ee,onchange:Se,class:C,style:ne,...Y,children:[t!=null&&(hv(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),y?.map((q,Te)=>{let qe=he(q);return h("span",{slot:"markers",style:Oe(q),"data-slider-marker-start":qe==="start"?"":void 0,"data-slider-marker-end":qe==="end"?"":void 0,children:q.label},`${q.value}-${Te}`)}),R]})};function Dm(t){var e,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=Dm(t[e]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}function bv(){for(var t,e,n=0,a="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=Dm(t))&&(a&&(a+=" "),a+=e);return a}var zm=bv;var Fa=Me.PlainDate.compare,_m=new Map;function Ht(t,e){let n=`${t}|${JSON.stringify(e)}`,a=_m.get(n);return a||(a=new Intl.DateTimeFormat(t,e),_m.set(n,a)),a}var _r=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function Ye(t){if(!t)return null;try{return Me.PlainDate.from(t)}catch{return null}}function cc(t){try{let e=new Intl.Locale(t),a=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof a=="number"&&a>=1&&a<=7)return a}catch{}return 1}function Tn(t,e,n){return e&&Fa(t,e)<0?e:n&&Fa(t,n)>0?n:t}function dc(t,e,n){return e!=null&&Fa(t,e)<0||n!=null&&Fa(t,n)>0}var fv=t=>Array.from(t).slice(0,2).join("");function Om(t,e=cc(t)){let n=Me.PlainDate.from("2021-02-01"),a=n.add({days:(e-n.dayOfWeek+7)%7}),r=Ht(t,{weekday:"short",timeZone:"UTC"}),o=Ht(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=a.add({days:s}),c=r.format(_r(l));i.push({short:c,narrow:fv(c),long:o.format(_r(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function uc(t){let{anchor:e,locale:n="en-US",min:a=null,max:r=null,selected:o=null,today:i=Me.Now.plainDateISO(),weeks:s=6}=t,l=cc(n),c=e.year,d=e.month,u=e.with({day:1}),m=(u.dayOfWeek-l+7)%7,p=u.subtract({days:m}),b=Ht(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),f=[];for(let g=0;g<s;g++){let x=[];for(let y=0;y<7;y++){let w=p.add({days:g*7+y});x.push({date:w,iso:w.toString(),day:w.day,weekday:w.dayOfWeek,outside:w.month!==d||w.year!==c,disabled:dc(w,a,r),today:i!=null&&Fa(w,i)===0,selected:o!=null&&Fa(w,o)===0,label:b.format(_r(w))})}f.push(x)}return{year:c,month:d,heading:Ht(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(_r(e)),weekdays:Om(n,l),weeks:f}}var Pm=new Date(Date.UTC(2026,5,15)),hc={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function gv(t){try{return Ht(t,hc).formatToParts(Pm).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function yi(t){try{return Ht(t,hc).formatToParts(Pm).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function ki(t,e){return Ht(e,hc).format(_r(t))}function vv(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let a=Ht(e,{month:"long",timeZone:"UTC"}),r=Ht(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=a.format(i).toLowerCase(),l=r.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function Or(t,e,n={}){let a=u=>dc(u,n.min??null,n.max??null)?null:u,r=(t??"").trim();if(!r)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(r)){let u=Ye(r);return u?a(u):null}let o=gv(e),i=vv(r,e),s=(r.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=r.replace(/\D/g,"");if(u.length!==8)return null;let m=0,p={};for(let b of o){let f=b==="year"?4:2;p[b]=Number(u.slice(m,m+f)),m+=f}({year:l,month:c,day:d}=p)}else if(s.length===2){let u=o.filter(p=>p!=="year"),m={};u.forEach((p,b)=>m[p]=s[b]),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 a(Me.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function Nm(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,a=e.match(/([ap])\.?m?\.?$/);a&&(n=a[1]==="p"?"pm":"am",e=e.slice(0,a.index).trim());let r,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);r=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)r=Number(i),o=0;else{let s=i.length-2;r=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&r<12&&(r+=12),n==="am"&&r===12&&(r=0);try{return Me.PlainTime.from({hour:r,minute:o},{overflow:"reject"})}catch{return null}}function wi(t,e,n={}){let a=(t??"").trim();if(!a)return null;let r=a.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=a,i=null;r&&(i=Nm(r[1]),i&&(o=a.slice(0,r.index).trim()));let s=Or(o,e,n);return s?s.toPlainDateTime(i??Me.PlainTime.from("00:00")):null}function Pr(t){try{let e=Ht(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function pc(t,e,n=Pr(e)){let a=ki(t.toPlainDate(),e),r=String(t.minute).padStart(2,"0");if(!n)return`${a} ${String(t.hour).padStart(2,"0")}:${r}`;let o=(t.hour+11)%12+1;return`${a} ${String(o).padStart(2,"0")}:${r} ${t.hour<12?"AM":"PM"}`}function mc(t,e=Pr(t)){return`${yi(t)} HH:MM${e?" AM":""}`}var bc=({value:t,defaultValue:e,min:n,max:a,locale:r,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:m,style:p,"aria-label":b,...f})=>{let g=t!==void 0,x=r||(typeof navigator<"u"?navigator.language:"en-US"),y=Ye(n),w=Ye(a),S=Me.Now.plainDateISO(),[A,P]=$(()=>Ye(e)),N=g?Ye(t):A,[C,I]=$(()=>Tn(Ye(t??e)??S,y,w)),[R,U]=$(t),Y=C;if(t!==R){U(t);let L=Ye(t);L&&(Y=Tn(L,y,w),I(Y))}let[W,z]=$(null),[ne,B]=$(!1),M=qt(),H=uc({anchor:Y,locale:x,min:y,max:w,selected:N,today:S}),oe=Y.toString(),[ie,Ee]=$(l);l!==ie&&(Ee(l),l!==void 0&&z({iso:oe,n:l}));let ue=y?y.year:S.year-3,he=w?w.year:S.year+3,Oe=[];for(let L=ue;L<=he;L++)Oe.push(L);let ee=We(()=>Array.from({length:12},(L,V)=>Me.PlainDate.from({year:2e3,month:V+1,day:1}).toLocaleString(x,{month:"long"})),[x]),Se=(L,V)=>y!=null&&(L<y.year||L===y.year&&V<y.month)||w!=null&&(L>w.year||L===w.year&&V>w.month),q=L=>{s||I(V=>Tn(V.add({months:L}),y,w))},Te=(L,V)=>{s||I(se=>Tn(se.with({year:L,month:V}),y,w))},qe=We(()=>{let L=(V,se)=>{let k=se+1,v=V===C.year&&k===C.month;return h(Ce,{label:ee[se],selected:v,disabled:Se(V,k)||void 0,"data-menu-open":"",onSelect:()=>{Te(V,k),B(!1)},children:v&&h("span",{className:"jump-dot","aria-hidden":"true"})},`${V}-${k}`)};return Oe.length===1?ee.map((V,se)=>L(Oe[0],se)):Oe.map(V=>T(Ce,{submenu:!0,label:String(V),selected:V===C.year,children:[V===C.year&&h("span",{className:"jump-dot","aria-hidden":"true"}),h(je,{children:ee.map((se,k)=>L(V,k))})]},V))},[ee,C.year,C.month,ue,he,n,a,s]),ft=L=>{let{event:V,detail:se}=J(L);if(!se||(c?.(V,se),se.reason==="user"&&(g||V.defaultPrevented)))return;let k=Ye(se.next);g||P(k),I(Tn(k??C,y,w))},Mt=L=>{let V="nativeEvent"in L?L.nativeEvent:L;d?.(V),u?.(V,{value:V?.target?.value||null,name:o})},ye=L=>{if(s)return;let{detail:V}=J(L),se=Ye(V?.date??null);if(!se)return;let k=Tn(se,y,w);I(k),z(v=>({iso:k.toString(),n:(v?.n??0)+1}))},an=s||y!=null&&Me.PlainDate.compare(C.with({day:1}).subtract({days:1}),y)<0,It=s||w!=null&&Me.PlainDate.compare(C.with({day:1}).add({months:1}),w)>0;return T("div",{className:zm("anta-calendar",m),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:p,...f,children:[T("div",{"data-part":"header",children:[h(xe,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:an,onClick:()=>q(-1)}),h(xe,{id:M,"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${H.heading} \u2014 choose month and year`,disabled:s||an&&It,children:H.heading}),h(je,{placement:"bottom",open:ne,onStateChange:(L,{next:V})=>B(V),children:qe}),h(xe,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:It,onClick:()=>q(1)})]}),T("a-calendar",{role:"group","aria-labelledby":M,"aria-label":b,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":W?`${W.iso}#${W.n}`:void 0,onstatechange:ft,onchange:Mt,onnavigate:ye,children:[H.weekdays.map((L,V)=>h("span",{"data-part":"weekday","data-weekend":L.weekend?"":void 0,"aria-hidden":"true",children:L.narrow},`wd${V}`)),H.weeks.flat().map(L=>{let V=L.today&&!L.selected?{priority:"secondary"}:{priority:"tertiary",selected:L.selected,tone:L.selected?"brand":void 0};return T(xe,{...V,size:i,disabled:s||L.disabled,tabIndex:L.iso===oe?0:-1,"aria-label":L.label,"aria-current":L.today?"date":void 0,"data-part":"day-cell","data-date":L.iso,"data-today":L.today?"":void 0,"data-outside":L.outside?"":void 0,children:[L.day,L.today&&h(At,{children:"Today"})]},L.iso)})]})]})};var fc=t=>t?"":void 0,xv=t=>typeof t=="string"||typeof t=="number",Bm=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??""}},yv={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},gc=({label:t,hint:e,status:n,statusIcon:a,tone:r,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:m,name:p,disabled:b,required:f,icon:g,clearable:x,dimActions:y,trailing:w,autoFocus:S,onValueChange:A,onClearInput:P,children:N,className:C,style:I,...R})=>{let U=n&&n!=="neutral"?n:void 0,Y=a===void 0?U?yv[U]:void 0:a;return T("a-input-time",{size:o&&o!=="medium"?o:void 0,round:K(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:m,status:U,tone:r||void 0,name:p,disabled:fc(b),required:fc(f),"dim-actions":fc(y),autofocus:S?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,oninput:A?W=>A(W,Bm(W)):void 0,onchange:A?W=>A(W,Bm(W)):void 0,onclearinput:P?W=>P(J(W).event):void 0,class:C,style:Q(i,"--input-time-round",F(r,"--input-time-tone-source",I)),...R,children:[t!=null&&(xv(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"})}),x&&h("span",{slot:"clear",style:{display:"contents"},children:h(xe,{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&&T("span",{slot:"hint",style:{display:"contents"},children:[Y&&h(ve,{shape:Y,"aria-hidden":"true"}),h("span",{children:e})]}),N]})};var kv=({value:t,defaultValue:e,min:n,max:a,locale:r,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:m,placement:p,offset:b,clearable:f,icon:g,time:x,hour12:y,onValueChange:w,className:S,style:A,...P})=>{let N=r||(typeof navigator<"u"?navigator.language:"en-US"),C=Ye(n),I=Ye(a),R=x?y??Pr(N):!1,U=We(()=>d??(x?mc(N,R):yi(N)),[d,x,N,R]),Y=v=>{if(!v)return"";let _=Ye(v.slice(0,10));if(!_)return"";if(!x)return ki(_,N);let j=v.length>=16&&v[10]==="T",X=_.toPlainDateTime(Me.PlainTime.from(j?v.slice(11,16):"00:00"));return pc(X,N,R)},W=v=>!v||!x?v:v.length<=10?`${v}T00:00`:v.slice(0,16),z=t!==void 0,[ne,B]=$(()=>W(e)),M=z?t:ne,H=M?M.slice(0,10):"",oe=!!M&&M.length>=16&&M[10]==="T",ie=oe&&parseInt(M.slice(11,13),10)||0,Ee=oe?M.slice(14,16):"00",[ue,he]=$(()=>Y(M)),[Oe,ee]=$(!1),[Se,q]=$(!1),[Te,qe]=$(0),[ft,Mt]=$(M);M!==ft&&(Mt(M),he(Y(M)),q(!1));let ye=v=>{z||B(v||void 0),w?.(v,{value:v,name:o})},an=v=>`${v}T${String(ie).padStart(2,"0")}:${Ee}`,It=v=>{q(!1),v===(M??"")?he(Y(v)):ye(v)},L=v=>{let _=v.trim();if(!_)return q(!1),M?ye(""):he(""),!0;let j=x?wi(_,N,{min:C,max:I}):Or(_,N,{min:C,max:I});if(!j)return q(!0),!1;let X=x?j.toString({smallestUnit:"minute"}):j.toString();return It(X),!0},V=We(()=>{let v=ue.trim();if(!v)return H;let _=x?wi(v,N,{min:C,max:I}):Or(v,N,{min:C,max:I});return _?_.toString().slice(0,10):null},[ue,x,N,H,n,a]),[se,k]=$(H);return V!==null&&V!==se&&k(V),T(be,{children:[h(bt,{label:l,hint:Se?`Unrecognized date. Try ${U}.`:c,status:Se?"critical":u,size:i,round:m,disabled:s,clearable:f,leading:g===!1?void 0:h(ve,{shape:g??"calendar-days"}),value:ue,placeholder:U,inputMode:x?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":Oe?"true":"false",onInput:v=>{he(v.currentTarget.value),Se&&q(!1)},onChange:v=>L(v.currentTarget.value),onKeyDown:v=>{(v.key==="ArrowDown"||v.key==="ArrowUp")&&!s&&(v.preventDefault(),qe(_=>_+1)),v.key==="Enter"&&!s&&(v.preventDefault(),L(v.currentTarget.value)&&ee(!1))},truncate:!0,className:S,style:A,...P}),h(je,{open:Oe,placement:p??"bottom-start",offset:b,autoWidth:!0,inset:8,onStateChange:(v,{next:_})=>ee(_),children:T("div",{"data-menu-open":"",children:[h(bc,{value:se,min:n,max:a,locale:r,size:i,disabled:s,focusSignal:Te,onStateChange:(v,{next:_,reason:j})=>{if(j!=="user")return;let X=_??"";It(x&&X?an(X):X),x||ee(!1)}}),x&&T("a-input-date-time-container",{children:[h(gc,{size:i,locale:r,hour12:y,disabled:s,"aria-label":"Time",value:oe?`${String(ie).padStart(2,"0")}:${Ee}`:"",onValueChange:(v,{value:_})=>{if(("nativeEvent"in v?v.nativeEvent:v)?.type!=="change")return;let X=H||Me.Now.plainDateISO().toString();ye(_?`${X}T${_}`:X)}}),h(xe,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>ee(!1)})]})]})}),o?h("input",{type:"hidden",name:o,value:M??""}):null]})};var An=t=>typeof t=="string"?{value:t,label:t}:t;function Ha(t){let e=t.trim();if(!e)return null;let n=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var Va=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),ja=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),a=[],r=0,o;for(;(o=n.exec(t))!==null;)o.index>r&&a.push(t.slice(r,o.index)),a.push(h("b",{children:o[0]},a.length)),r=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return a.length===0?t:(r<t.length&&a.push(t.slice(r)),a)};var wv=t=>{let{suggestions:e,value:n,defaultValue:a,onValueChange:r,onSelect:o,filter:i=!0,...s}=t,l=qt(),c=n!==void 0,[d,u]=$(a??""),m=c?n:d,[p,b]=$(!1),[f,g]=$(null),x=We(()=>e.map(An),[e]),y=typeof i=="function",w=i!==!1&&!y?Ha(m):null,S=y?x.filter(C=>i(C,m)):x.filter(C=>Va(C,w)),A=p&&S.length>0,P=C=>{c||u(C),r?.(C)},N=C=>{P(C.value),o?.(C),b(!1)};return T(be,{children:[h(bt,{...s,value:m,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-controls":`${l}-list`,"aria-expanded":A?"true":"false","aria-autocomplete":"list","aria-activedescendant":A&&f?f:void 0,onFocus:()=>b(!0),onInput:C=>{P(C.currentTarget.value),b(!0)},onKeyDown:C=>{C.key==="Enter"&&!C.defaultPrevented&&b(!1)}}),h(je,{id:`${l}-list`,role:"listbox",open:A,onStateChange:(C,{next:I})=>{b(I),I||g(null)},onactivedescendant:C=>g(J(C).detail?.id??null),children:S.map((C,I)=>{let{className:R,style:U,...Y}=ot(C,!0);return h(Ce,{...Y,id:`${l}-o${I}`,role:"option","aria-selected":f===`${l}-o${I}`?"true":"false",icon:C.icon,label:ja(C.label??C.value,w),hint:C.hint?ja(C.hint,w):C.hint,tone:C.tone,disabled:C.disabled,value:C.value,onMouseDown:W=>W.preventDefault(),onSelect:()=>N(C),className:R,style:U},`${l}-${C.value}-${I}`)})})]})};var Cv=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),Ev=({options:t,value:e,defaultValue:n,onStateChange:a,onChange:r,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:m,toneSelected:p,size:b,disabled:f,orientation:g,className:x,style:y,...w})=>{let S=e!==void 0,[A,P]=$(n),N=S?e:A,C=new Set;for(let z of t)C.has(z.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(z.value)} \u2014 values must be unique.`),C.add(z.value);let I=qt(),R=qt(),U=f?void 0:t.find(z=>z.value===N)?.value??t.find(z=>!z.disabled)?.value;return T("a-radio-group",{role:"radiogroup","aria-disabled":f?"true":void 0,"aria-labelledby":c?I:void 0,"aria-describedby":d?R:void 0,...w,state:S?e:void 0,"default-state":S?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:m&&m!=="neutral"?m:void 0,"tone-selected":p||void 0,size:b&&b!=="medium"?b:void 0,disabled:f?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:z=>{let{event:ne,detail:B}=J(z);B&&(a?.(ne,B),!S&&(B.reason==="user"&&ne.defaultPrevented||P(B.next??void 0)))},onchange:r||o?z=>{r?.(z),o?.(z,Cv(z.currentTarget))}:void 0,onfocusin:i,onfocusout:s,class:x,style:F(p,"--radio-tone-source",F(m,"--radio-off-tone-source",p==null?F(m,"--radio-tone-source",y):y)),children:[c&&h("a-radio-group-label",{id:I,children:c}),d&&h("a-radio-group-hint",{id:R,children:d}),h("a-radio-list",{children:t.map(z=>{let ne=f||z.disabled,{className:B,style:M,...H}=ot(z);return T("a-radio",{...H,role:"radio",value:z.value,"aria-disabled":ne?"true":void 0,tabIndex:z.value===U?0:-1,tone:z.tone||void 0,"tone-selected":z.toneSelected||void 0,size:z.size&&z.size!=="medium"?z.size:void 0,disabled:z.disabled?"":void 0,class:B,style:F(z.toneSelected,"--radio-tone-source",F(z.tone,"--radio-off-tone-source",z.toneSelected==null?F(z.tone,"--radio-tone-source",M):M)),children:[h("a-radio-label",{children:z.label}),z.hint!=null&&h("a-radio-hint",{children:z.hint})]},z.value)})})]})};function Sv(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),a=(o,i)=>o===0?"none":o===i?"all":"some",r=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=r(c.submenu),u=d.reduce((p,b)=>p+b.on,0),m=d.reduce((p,b)=>p+b.total,0);return{node:{...c,submenu:d.map(p=>p.node),selectionState:a(u,m)},on:u,total:m}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=r(c.options),u=d.reduce((p,b)=>p+b.on,0),m=d.reduce((p,b)=>p+b.total,0);return{node:{...c,options:d.map(p=>p.node),selectionState:a(u,m)},on:u,total:m}}let s=An(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return r(t).map(o=>o.node)}var Tv=t=>{let{options:e,placement:n,offset:a,selection:r,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:m,hint:p,size:b,status:f,statusIcon:g,round:x,disabled:y,toneSelected:w,filter:S,selectAll:A=!0,selectAllLabel:P="Select all",clearable:N,clearLabel:C="Clear",renderOption:I,renderIndicator:R,verbose:U,renderSummary:Y,renderTrigger:W,renderEmpty:z,className:ne,style:B,...M}=t,H=r==="multiple",oe=f&&f!=="neutral"?`var(--text-2-${f})`:void 0,ie=H?"checkbox":o??"none",Ee=ie==="none"?void 0:ie,ue=l,he=i!==void 0,[Oe,ee]=$(s),Se=he?i:Oe,[q,Te]=$(!1),[qe,ft]=$(""),[Mt,ye]=$(null),an=qt(),It=E=>typeof E=="object"&&Array.isArray(E.submenu),L=E=>typeof E=="object"&&Array.isArray(E.options),V=(E,le,te,ae)=>{for(let me of E)if(typeof me!="string"&&It(me))V(me.submenu,me.label,te||!!me.disabled,ae);else if(typeof me!="string"&&L(me))V(me.options,me.label,te||!!me.disabled,ae);else{let gt=An(me);ae.push({opt:gt,disabled:te||!!gt.disabled,group:le})}},se=[];V(e,void 0,!1,se);let k=new Set;for(let E of se){let le=String(E.opt.value);k.has(le)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(E.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),k.add(le)}let v=new Map(se.map(E=>[E.opt.value,E.opt])),_=S!==void 0&&S!==!1,j=qe.trim(),X=_&&typeof S!="function"?Ha(j):null,Vt=E=>typeof S=="function"?S(E,j):Va(E,X),rn=typeof S=="function"||_&&!!j?se.filter(E=>Vt(E.opt)):se,qa=_&&!!j,rt=Array.isArray(Se)?Se:Se!=null?[Se]:[],Za=E=>rt.includes(E),tt=rt.map(E=>v.get(E)).filter(Boolean),Nr=se.filter(E=>!E.disabled).map(E=>E.opt.value),Vm=H&&Nr.length>1&&Nr.every(E=>rt.includes(E)),Ei=E=>E.label??String(E.value),Jn="";if(H){let E=tt.length>0?Y?.(tt):void 0;if(E!=null&&E!=="")Jn=E;else if(Vm)Jn="All";else if(tt.length===1)Jn=Ei(tt[0]);else if(tt.length>1){let le=`${tt.length} selected`;Jn=U?`${le}: ${tt.map(Ei).join(", ")}`:le}}else if(Se!=null){let E=v.get(Se);Jn=E?Ei(E):""}let jm=(E,le)=>{if(H){if(A&&le?.altKey){let me=[E.value];he||ee(me),ue?.(me,{value:E.value,option:E,selected:!0});return}let te=rt.includes(E.value),ae=te?rt.filter(me=>me!==E.value):[...rt,E.value];he||ee(ae),ue?.(ae,{value:E.value,option:E,selected:!te})}else he||ee(E.value),ue?.(E.value,{value:E.value,option:E})},$a=H?rn.filter(E=>!E.disabled).map(E=>E.opt.value):[],kc=$a.filter(E=>rt.includes(E)),Br=$a.length>0&&kc.length===$a.length,qm=kc.length>0&&!Br,Zm=()=>{let E=rt.filter(te=>!$a.includes(te)),le=Br?E:[...E,...$a];he||ee(le),ue?.(le,{all:!0,selected:!Br})},$m=()=>{let E=H?[]:void 0;he||ee(E),ue?.(E,{all:!0,selected:!1})},Si=(E,le)=>{let{className:te,style:ae,...me}=ot(E,!0),gt={value:E.value,selected:Za(E.value),disabled:le},jt=I?.(E,gt),Mn=R?.(gt),Ym=!H&&ie==="none"?{role:"menuitemradio","aria-checked":Za(E.value)?"true":"false"}:void 0,wc=H&&A&&!le?Rr:void 0,Cc=E.tooltip??wc,Wm=E.tooltip==null&&wc!=null;return T(Ce,{...me,id:`${an}-opt-${E.value}`,selectionIndicator:Ee,...Ym,indicator:Mn??void 0,label:jt?void 0:ja(E.label??String(E.value),X),hint:jt?void 0:E.hint?ja(E.hint,X):E.hint,icon:jt?void 0:E.icon,tone:E.tone,toneSelected:w,selected:Za(E.value),disabled:le||void 0,"data-menu-open":H?"":void 0,onSelect:Gm=>jm(E,Gm),className:te,style:ae,children:[jt,Cc&&h(At,{follow:!0,...Wm?{delay:700}:{},children:Cc})]},String(E.value))},Ti=(E,le)=>{let te=[];return E.forEach((ae,me)=>{if(typeof ae!="string"&&It(ae)){let jt=le||!!ae.disabled,Mn=Ti(ae.submenu,jt);Mn.length&&te.push(h(Ce,{submenu:!0,label:ae.label,icon:ae.icon,disabled:jt||void 0,"data-menu-open":H?"":void 0,children:h(je,{children:Mn})},`sub-${me}-${ae.label}`));return}if(typeof ae!="string"&&L(ae)){let jt=le||!!ae.disabled,Mn=Ti(ae.options,jt);Mn.length&&te.push(h(La,{label:ae.label,children:Mn},`grp-${me}-${ae.label}`));return}let gt=An(ae);typeof S=="function"&&!Vt(gt)||te.push(Si(gt,le||!!gt.disabled))}),te},Um=()=>{let E=se.filter(te=>Vt(te.opt)),le=[];for(let te=0;te<E.length;){let ae=E[te].group;if(ae===void 0){le.push(Si(E[te].opt,E[te].disabled)),te++;continue}let me=[],gt=te;for(;te<E.length&&E[te].group===ae;)me.push(Si(E[te].opt,E[te].disabled)),te++;le.push(h(La,{label:ae,children:me},`flat-${gt}-${ae}`))}return le};return T(be,{children:[W?W({open:q,value:Se,selected:tt,disabled:!!y,icon:d}):h(bt,{label:m,hint:p,placeholder:c,value:Jn,readOnly:!0,dimActions:!0,disabled:y,leading:u??(d?h(ve,{shape:d}):void 0),size:b,status:f,statusIcon:g,round:x,role:"combobox","aria-haspopup":"menu","aria-expanded":q?"true":"false",trailing:h("a-select-chevron",{open:q?"":void 0,style:oe?{color:oe}:void 0,children:h(ve,{shape:"chevron-down"})}),className:ne,style:B,...M}),T(je,{placement:n,offset:a,onStateChange:(E,{next:le})=>{Te(le),le||(ft(""),ye(null))},onactivedescendant:E=>ye((E.nativeEvent??E).detail?.id??null),children:[_&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(bt,{"data-menu-search":"",size:"small",value:qe,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list","aria-activedescendant":q&&Mt?Mt:void 0,onInput:E=>ft(E.currentTarget.value)})}),H&&A&&rn.length>0&&T(be,{children:[h(Ce,{selectionIndicator:"checkbox",selected:Br,indeterminate:qm,label:P,"data-menu-open":"","data-menu-skip-active":"",onSelect:Zm}),h(Sn,{})]}),rn.length===0?z?.({query:j}):qa?Um():Ti(e,!1),N&&rt.length>0&&T(be,{children:[h(Sn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Ce,{icon:"x",label:C,"data-menu-open":"",onSelect:$m})})]})]})]})};var vc=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...vc(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...vc(n.options)):e.push(An(n));return e},Ci=t=>t==null||t===""||Array.isArray(t)&&t.length===0,Lm=(t,e)=>Va(t,Ha(e)),Av=t=>{let{facets:e,placement:n,offset:a,value:r,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,toneSelected:m,searchable:p,searchPlaceholder:b="Filter\u2026",clearable:f=!0,clearAllLabel:g="Clear all",renderTrigger:x,className:y,style:w,...S}=t,A=r!==void 0,[P,N]=$(o??{}),C=A?r:P,[I,R]=$(!1),[U,Y]=$({}),[W,z]=$({});{let k=null,v=U;for(let _ of e)_.kind==="text"&&W[_.key]!==C[_.key]&&(k={...k??W,[_.key]:C[_.key]},v={...v,[_.key]:C[_.key]??""});k&&(z(k),Y(v))}let[ne,B]=$({}),[M,H]=$(""),[oe,ie]=$({}),Ee=k=>v=>{let _=J(v).detail?.id??null;ie(j=>j[k]===_?j:{...j,[k]:_})},ue=e.reduce((k,v)=>k+(Ci(C[v.key])?0:1),0),he=We(()=>new Map(e.map(k=>[k.key,k.kind==="single"||k.kind==="multiple"?vc(k.options):[]])),[e]),Oe=(k,v)=>{A||N(k),i?.(k,v)},ee=(k,v)=>{let _=Ci(v),j={...C};_?delete j[k.key]:j[k.key]=v,Oe(j,{facet:k.key,kind:k.kind,value:_?void 0:v})},Se=()=>Oe({},{all:!0}),q=k=>{let v=he.get(k.key)??[];if(!k.filter)return v;let _=ne[k.key]??"",j=typeof k.filter=="function"?k.filter:Lm;return v.filter(X=>j(X,_))},Te=k=>k.filter?h("a-select-header",{slot:"header","data-menu-open":"",children:h(bt,{"data-menu-search":"",size:"small",value:ne[k.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${k.label}`,"aria-autocomplete":"list","aria-activedescendant":oe[k.key]??void 0,onInput:v=>B(_=>({..._,[k.key]:v.currentTarget.value}))})}):null,qe=(k,v,_="")=>{let{className:j,style:X,...Vt}=ot(v,!0),Ze={...Vt,icon:v.icon,label:v.label??String(v.value),hint:v.hint,tone:v.tone,toneSelected:m,disabled:v.disabled,className:j,style:X,"data-menu-open":""};if(k.kind==="single"){let tt=C[k.key];return h(Ce,{...Ze,selectionIndicator:"check",selected:tt===v.value,onSelect:()=>ee(k,tt===v.value?void 0:v.value)},`${_}${v.value}`)}let rn=C[k.key]??[],qa=k.selectAll!==!1&&!v.disabled,rt=v.tooltip??(qa?Rr:void 0),Za=v.tooltip==null&&qa;return h(Ce,{...Ze,selectionIndicator:"checkbox",selected:rn.includes(v.value),onSelect:tt=>qa&&tt?.altKey?ee(k,[v.value]):ee(k,rn.includes(v.value)?rn.filter(Nr=>Nr!==v.value):[...rn,v.value]),children:rt&&h(At,{follow:!0,...Za?{delay:700}:{},children:rt})},`${_}${v.value}`)},ft=k=>q(k).map(v=>qe(k,v)),Mt=k=>{let v=C[k.key]??[],_=q(k),j=_.filter(Ze=>!Ze.disabled).map(Ze=>Ze.value),X=j.length>0&&j.every(Ze=>v.includes(Ze)),Vt=j.some(Ze=>v.includes(Ze));return T(be,{children:[k.selectAll!==!1&&_.length>0&&T(be,{children:[h(Ce,{selectionIndicator:"checkbox",selected:X,indeterminate:Vt&&!X,label:k.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>ee(k,X?v.filter(Ze=>!j.includes(Ze)):[...new Set([...v,...j])])}),h(Sn,{})]}),_.map(Ze=>qe(k,Ze))]})},ye=()=>e.filter(v=>v.kind==="single"||v.kind==="multiple").map(v=>{let _=typeof v.filter=="function"?v.filter:Lm;return{facet:v,matched:(he.get(v.key)??[]).filter(j=>_(j,M))}}).filter(v=>v.matched.length>0).map(({facet:v,matched:_})=>h(La,{label:v.label,children:_.map(j=>qe(v,j,`${v.key}:`))},v.key)),an=k=>{let v=C[k.key]??"",_=U[k.key]??v,j=()=>{let X=_.trim()===""?void 0:_;X!==(v||void 0)&&ee(k,X)};return h("div",{"data-menu-open":"",style:{padding:"4px"},children:h(bt,{size:"small",value:_,placeholder:k.placeholder,"aria-label":k.label,onInput:X=>Y(Vt=>({...Vt,[k.key]:X.currentTarget.value})),onKeyDown:X=>{X.key==="Enter"&&(X.preventDefault(),j())},onBlur:j})})},It=k=>h("div",{"data-menu-open":"",children:k.render({value:C[k.key],onChange:v=>ee(k,v),close:()=>R(!1)})}),L=k=>{let v=k.kind==="single"||k.kind==="multiple",_=k.kind==="single"?ft(k):k.kind==="multiple"?Mt(k):k.kind==="text"?an(k):It(k),j=!Ci(C[k.key]);return T(je,{onactivedescendant:v&&k.filter?Ee(k.key):void 0,children:[v&&Te(k),_,f&&j&&T(be,{children:[h(Sn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Ce,{icon:"x",label:"Clear","data-menu-open":"",onSelect:()=>ee(k,void 0)})})]})]})},V=k=>{let v=C[k.key];if(Ci(v))return null;switch(k.kind){case"single":return(he.get(k.key)??[]).find(j=>j.value===v)?.label??String(v);case"multiple":return String(v.length);case"text":return String(v);case"custom":return k.summary(v)}};return T(be,{children:[x?x({open:I,value:C,count:ue,disabled:!!u}):h(xe,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":"menu","aria-expanded":I?"true":"false",className:y,style:w,...S,children:ue>0&&h(fi,{size:"small",priority:"primary",tone:"brand",children:String(ue)})}),T(je,{placement:n,offset:a,open:I,onStateChange:(k,{next:v})=>{R(v),v||H("")},onactivedescendant:p?Ee("__root__"):void 0,children:[p&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(bt,{"data-menu-search":"",size:"small",value:M,placeholder:b,"aria-label":"Filter all facets","aria-autocomplete":"list","aria-activedescendant":oe.__root__??void 0,onInput:k=>H(k.currentTarget.value)})}),p&&M.trim()?ye():e.map(k=>T(Ce,{submenu:!0,icon:k.icon,label:k.label,children:[(()=>{let v=V(k);return v!=null?h(fi,{size:"small",tone:"brand",children:h("a-select-faceted-summary",{children:v})}):null})(),L(k)]},k.key)),f&&T(be,{children:[h(Sn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Ce,{icon:"filter-x",label:g,disabled:ue===0,"data-menu-open":"",onSelect:Se})})]})]})]})};var xc=({children:t,options:e,value:n,defaultValue:a,onStateChange:r,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:m,orientation:p,fill:b,noslide:f,round:g,disabled:x,className:y,style:w,id:S,...A})=>{let P=n!==void 0,[N,C]=$(a),I=P?n:N,R=e??[],U=new Set;for(let B of R)U.has(B.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(B.value)} \u2014 values must be unique.`),U.add(B.value);let Y=B=>{let{event:M,detail:H}=J(B);H&&(r?.(M,H),!P&&(M.defaultPrevented||C(H.next??void 0)))},W=o||i?B=>{o?.(B),i?.(B,{value:B.currentTarget?.value??null})}:void 0,z=p==="vertical",ne=h("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":z?"vertical":void 0,"aria-disabled":x?"true":void 0,state:P?n:void 0,"default-state":P?void 0:a,priority:d&&d!=="primary"?d:void 0,tone:u&&u!=="neutral"?u:void 0,size:m&&m!=="medium"?m:void 0,orientation:z?"vertical":void 0,fill:b?"":void 0,noslide:f?"":void 0,round:K(g),disabled:x?"":void 0,onstatechange:Y,onchange:W,onfocusin:s,onfocusout:l,class:y,id:S,style:Q(g,"--tabs-round",F(u,"--tabs-tone-source",w)),...A,children:R.map(B=>{let M=x||B.disabled,H=B.value===I,{className:oe,style:ie,...Ee}=ot(B);return T("a-tab",{...Ee,role:"tab",value:B.value,tone:B.tone||void 0,"aria-disabled":M?"true":void 0,tabIndex:M&&!H?-1:0,disabled:M?"":void 0,round:K(g)??K(B.round),class:oe,style:F(B.tone,"--tabs-tone-source",ie),children:[B.icon&&h("a-icon",{shape:B.icon,"aria-hidden":"true"}),Lr(B.label!=null?B.label:B.children,"a-tab-label"),B.iconTrailing&&h("a-icon",{shape:B.iconTrailing,"aria-hidden":"true"}),B.tooltip!=null&&B.tooltip!==""?h(At,{truncatedOnly:!0,children:B.tooltip}):null]},B.value)})});return T(be,{children:[ne,t]})};var Rm={incomplete:"circle-large",completed:"check",error:"x"},Mv=({options:t,value:e,defaultValue:n,onStateChange:a,onChange:r,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:m,orientation:p,fill:b,disabled:f,children:g,className:x,style:y,id:w,...S})=>{let A=e!==void 0,[P,N]=$(n),C=A?e:P??t[0]?.value,I=(M,H)=>{a?.(M,H),!(A||M.defaultPrevented)&&N(H.next??void 0)},R=t.map(M=>{let{className:H,style:oe,...ie}=ot(M),Ee=M.tone||void 0,ue=M.disabled?"neutral":M.state==="error"?"critical":Ee||d||"neutral",he=u?.(M,{state:M.state,selected:M.value===C,disabled:!!M.disabled}),Oe=M.disabled?h(ve,{shape:Rm.incomplete}):M.state==="loading"?h(rc,{tone:ue}):h(ve,{shape:Rm[M.state]}),ee=he!==void 0?he:M.marker!==void 0?typeof M.marker=="number"?M.marker:h(ve,{shape:M.marker}):Oe;return{...ie,value:M.value,disabled:M.disabled,"data-step-state":M.state,tone:ue,tooltip:T(be,{children:[M.label,M.hint!=null&&T(be,{children:[" \u2014 ",M.hint]})]}),className:H,style:oe,children:T(be,{children:[h("a-step-marker",{"aria-hidden":"true",children:ee}),T("a-step-desc",{children:[h("a-tab-label",{children:M.label}),M.hint!=null&&h("a-step-hint",{children:M.hint})]})]})}}),U=t.findIndex(M=>M.value===C),Y=p==="vertical",W=g!=null&&g!==!1,z=Y&&W,ne=(U>=0?U:t.length-1)+2,B=z?{...y,"--steps-panel-row":ne}:y;return h("a-steps",{class:x,style:B,id:w,...S,"data-orientation":Y?"vertical":void 0,children:h(xc,{options:R,value:C,onStateChange:I,onChange:r,onValueChange:o,onFocus:i,onBlur:s,label:l,size:m,orientation:p,fill:b,priority:c,noslide:!0,disabled:f,"data-steps":"",children:g})})};var Iv=({value:t,children:e,hideMode:n,className:a,style:r})=>h("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:a,style:r,children:e});var Dv=new Set(["top","right","bottom","left"]),zv=({header:t,footer:e,position:n,closable:a,persistent:r,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:m,...p})=>{let b=i!==void 0,f=typeof o=="string"&&Dv.has(o)?o:void 0;return T("a-dialog",{state:b?i?"open":"closed":void 0,"default-state":!b&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:r?"":void 0,round:f??K(o),name:b?void 0:l,onstatechange:c?g=>{let{event:x,detail:y,isOwn:w}=J(g);w&&y&&c(x,{next:y.next==="open",prev:y.prev==="open"})}:void 0,class:d,style:Q(f?void 0:o,"--dialog-round",u),...p,children:[a!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(xe,{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 _v=({header:t,subtitle:e,icon:n,footer:a,media:r,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:m,target:p,rel:b,ping:f,className:g,style:x,children:y,...w})=>{let S=i||void 0,A=Q(u,"--card-round",F(S,"--card-tone-source",x)),P=l==="small"?5:l==="large"?3:4;return T("a-card",{tone:S,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:K(u),href:m,target:m?p:void 0,rel:m?b:void 0,ping:m?f:void 0,class:g,style:A,...w,children:[r!=null&&h("div",{slot:"media",children:r}),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(oc,{slot:"header",level:P,tone:S,children:t}):h("div",{slot:"header",children:t})),e!=null&&h(bi,{slot:"header",size:"small",priority:"tertiary",tone:S,children:e}),typeof y=="string"||typeof y=="number"?h(bi,{priority:"secondary",tone:S,size:l,children:y}):y,a!=null&&h("span",{slot:"footer",style:{display:"contents"},children:a})]})};var yc=({message:t,actions:e,tone:n,align:a,round:r,closable:o,role:i="status",dismissed:s,defaultDismissed:l,onDismiss:c,className:d,style:u,children:m,...p})=>{let b=s!=null,f=Q(r,"--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 T("a-banner",{state:b?s?"closed":"open":void 0,"default-state":b?void 0:l?"closed":"open",tone:n&&n!=="neutral"?n:void 0,align:a==="center"?"center":void 0,round:K(r),role:i,onstatechange:c?x=>{let{detail:y,isOwn:w}=J(x);w&&y?.next==="closed"&&c()}:void 0,class:d,style:f,...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(xe,{priority:"quaternary",icon:"x",round:r,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var Ov=({entry:t,store:e})=>{let n=We(()=>t.render(t.id),[t.id,t.rev]),a=typeof Node<"u"&&n instanceof Node,r=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 a?h("a-toast",{...o,content:n}):r?h("a-toast",{...o,children:h(yc,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):h("a-toast",{...o,children:n})},Pv=({toaster:t,label:e="Notifications",className:n,style:a,children:r,...o})=>{let i=t??Fm(),s=Mc(i.subscribe,i.getSnapshot,i.getServerSnapshot);return h("a-toaster",{role:"region","aria-label":e,class:n,style:a,...o,children:s.map(l=>h(Ov,{entry:l,store:i},l.id))})},Nv,Fm=()=>Nv??=hi(),Hm=Pv;Object.defineProperty(Hm,"manager",{get:Fm,enumerable:!0});export{Ug as Avatar,yc as Banner,ev as Breadcrumbs,xe as Button,ic as ButtonCopy,bc as Calendar,_v as Card,rv as Checkbox,Dn as DEFAULT_CONFIG,zv as Dialog,sv as Expander,tv as ICON_SHAPES,nv as ICON_SYNONYMS,ve as Icon,bt as Input,wv as InputAutocomplete,kv as InputDate,gc as InputTime,rc as Loader,je as Menu,La as MenuGroup,Ce as MenuItem,lc as MenuItemCopy,Sn as MenuSeparator,Yg as Progress,Ev as RadioGroup,Tv as Select,Av as SelectFaceted,mv as Slider,Mv as Steps,iv as Switch,Iv as TabPanel,xc as Tabs,fi as Tag,bi as Text,oc as Title,Hm as Toaster,At as Tooltip,Bi as avatarToSvg,uc as buildMonth,Tn as clampDate,zi as colorLightness,Km as configure,hi as createToaster,yi as dateFormatPattern,mc as dateTimeFormatPattern,cc as firstDayOfWeek,ki as formatDateInput,pc as formatDateTimeInput,Oi as getInitials,Om as getWeekdays,Fc as hasFigure,Nc as hashSeed,dc as isOutOfRange,Rc as maxChroma,Bc as mulberry32,jr as oklchString,Sv as optionsWithSelection,Or as parseDateInput,wi as parseDateTimeInput,Ye as parseISODate,Nm as parseTimeInput,Ni as resolveAvatar,Lc as rngFromSeed,Pr as usesHour12};