fidelity-kit 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,54 @@
1
+ import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"./index-D3r8erGw.js";var C=e(i()),w=b();function T({as:e,id:t,anchor:n,className:r=``,children:i}){return(0,w.jsxs)(e,{className:`group flex scroll-mt-20 items-baseline gap-2 ${r}`,id:t,children:[i,(0,w.jsx)(`span`,{className:`text-muted-foreground opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100`,children:n})]})}var E=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),D=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),O=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),k=e=>{let t=O(e);return t.charAt(0).toUpperCase()+t.slice(1)},A={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},j=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},M=(0,C.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,C.createElement)(`svg`,{ref:c,...A,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:E(`lucide`,i),...!a&&!j(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(a)?a:[a]])),N=(e,t)=>{let n=(0,C.forwardRef)(({className:n,...r},i)=>(0,C.createElement)(M,{ref:i,iconNode:t,className:E(`lucide-${D(k(e))}`,`lucide-${e}`,n),...r}));return n.displayName=k(e),n},P=N(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),ee=N(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),F=N(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),te=N(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ne=N(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),re=N(`github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]);function ie(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ie(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function I(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ie(e))&&(r&&(r+=` `),r+=t);return r}var L=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ae=(e,t)=>({classGroupId:e,validator:t}),oe=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),R=`-`,se=[],ce=`arbitrary..`,le=e=>{let t=fe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return de(e);let n=e.split(R);return ue(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?L(i,t):t:i||se}return n[e]||se}}},ue=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ue(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(R):e.slice(t).join(R),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},de=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ce+r:void 0})(),fe=e=>{let{theme:t,classGroups:n}=e;return pe(n,t)},pe=(e,t)=>{let n=oe();for(let r in e){let i=e[r];me(i,n,r,t)}return n},me=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];he(i,t,n,r)}},he=(e,t,n,r)=>{if(typeof e==`string`){ge(e,t,n);return}if(typeof e==`function`){_e(e,t,n,r);return}ve(e,t,n,r)},ge=(e,t,n)=>{let r=e===``?t:ye(t,e);r.classGroupId=n},_e=(e,t,n,r)=>{if(be(e)){me(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ae(n,e))},ve=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];me(o,ye(t,a),n,r)}},ye=(e,t)=>{let n=e,r=t.split(R),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=oe(),n.nextPart.set(t,i)),n=i}return n},be=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,xe=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Se=`!`,Ce=`:`,we=[],Te=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ee=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Ce){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Se)?(c=s.slice(0,-1),l=!0):s.startsWith(Se)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Te(t,l,c,u)};if(t){let e=t+Ce,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Te(we,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},De=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Oe=e=>({cache:xe(e.cacheSize),parseClassName:Ee(e),sortModifiers:De(e),postfixLookupClassGroupIds:ke(e),...le(e)}),ke=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Ae=/\s+/,je=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Ae),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Se:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Me=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ne(n))&&(i&&(i+=` `),i+=r);return i},Ne=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ne(e[r]))&&(n&&(n+=` `),n+=t);return n},Pe=(e,...t)=>{let n,r,i,a,o=o=>(n=Oe(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=je(e,n);return i(e,a),a};return a=o,(...e)=>a(Me(...e))},Fe=[],z=e=>{let t=t=>t[e]||Fe;return t.isThemeGetter=!0,t.themeKey=e,t},Ie=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Le=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Re=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ze=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Be=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,He=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,We=e=>Re.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>!!e&&Number.isInteger(Number(e)),Ke=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),qe=e=>ze.test(e),Je=()=>!0,Ye=e=>Be.test(e)&&!Ve.test(e),Xe=()=>!1,Ze=e=>He.test(e),Qe=e=>Ue.test(e),$e=e=>!V(e)&&!H(e),et=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),tt=e=>gt(e,bt,Xe),V=e=>Ie.test(e),nt=e=>gt(e,xt,Ye),rt=e=>gt(e,St,B),it=e=>gt(e,wt,Je),at=e=>gt(e,Ct,Xe),ot=e=>gt(e,vt,Xe),st=e=>gt(e,yt,Qe),ct=e=>gt(e,Tt,Ze),H=e=>Le.test(e),lt=e=>_t(e,xt),ut=e=>_t(e,Ct),dt=e=>_t(e,vt),ft=e=>_t(e,bt),pt=e=>_t(e,yt),mt=e=>_t(e,Tt,!0),ht=e=>_t(e,wt,!0),gt=(e,t,n)=>{let r=Ie.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_t=(e,t,n=!1)=>{let r=Le.exec(e);return r?r[1]?t(r[1]):n:!1},vt=e=>e===`position`||e===`percentage`,yt=e=>e===`image`||e===`url`,bt=e=>e===`length`||e===`size`||e===`bg-size`,xt=e=>e===`length`,St=e=>e===`number`,Ct=e=>e===`family-name`,wt=e=>e===`number`||e===`weight`,Tt=e=>e===`shadow`,Et=Pe(()=>{let e=z(`color`),t=z(`font`),n=z(`text`),r=z(`font-weight`),i=z(`tracking`),a=z(`leading`),o=z(`breakpoint`),s=z(`container`),c=z(`spacing`),l=z(`radius`),u=z(`shadow`),d=z(`inset-shadow`),f=z(`text-shadow`),p=z(`drop-shadow`),m=z(`blur`),h=z(`perspective`),g=z(`aspect`),_=z(`ease`),v=z(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[We,`full`,`auto`,...w()],E=()=>[Ge,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,Ge,H,V]},Ge,H,V],O=()=>[Ge,`auto`,H,V],k=()=>[`auto`,`min`,`max`,`fr`,H,V],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[We,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,We,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[We,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,H,V],te=()=>[...b(),dt,ot,{position:[H,V]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,ft,tt,{size:[H,V]}],ie=()=>[Ke,lt,nt],I=()=>[``,`none`,`full`,l,H,V],L=()=>[``,B,lt,nt],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[B,Ke,dt,ot],se=()=>[``,`none`,m,H,V],ce=()=>[`none`,B,H,V],le=()=>[`none`,B,H,V],ue=()=>[B,H,V],de=()=>[We,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[qe],breakpoint:[qe],color:[Je],container:[qe],"drop-shadow":[qe],ease:[`in`,`out`,`in-out`],font:[$e],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[qe],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[qe],shadow:[qe],spacing:[`px`,B],text:[qe],"text-shadow":[qe],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,We,V,H,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,H,V]}],"container-named":[et],columns:[{columns:[B,`auto`,V,H,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ge,`auto`,H,V]}],basis:[{basis:[We,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,We,`auto`,`initial`,`none`,V]}],grow:[{grow:[``,B,H,V]}],shrink:[{shrink:[``,B,H,V]}],order:[{order:[Ge,`first`,`last`,`none`,H,V]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,lt,nt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ht,it]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ke,V]}],"font-family":[{font:[ut,at,t]}],"font-features":[{"font-features":[V]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,H,V]}],"line-clamp":[{"line-clamp":[B,`none`,H,rt]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,H,nt]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[B,`auto`,H,V]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Ge,H,V]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,H,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ge,H,V],radial:[``,H,V],conic:[``,Ge,H,V]},pt,st]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,H,V]}],"outline-w":[{outline:[``,B,lt,nt]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`inner`,`none`,u,mt,ct]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,mt,ct]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[B,nt]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,mt,ct]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[B,H,V]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[B]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[B]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:se()}],brightness:[{brightness:[B,H,V]}],contrast:[{contrast:[B,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,mt,ct]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,B,H,V]}],"hue-rotate":[{"hue-rotate":[B,H,V]}],invert:[{invert:[``,B,H,V]}],saturate:[{saturate:[B,H,V]}],sepia:[{sepia:[``,B,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[B,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[B,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,B,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[B,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[B,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,H,V]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[B,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],zoom:[{zoom:[Ge,H,V]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,H,V]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,H,V]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[B,lt,nt,rt]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Dt(...e){return Et(I(e))}var Ot=Object.defineProperty,kt=(e,t)=>Ot(e,`name`,{value:t,configurable:!0});function At(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}kt(At,`setRef`);function jt(...e){return t=>{let n=!1,r=e.map(e=>{let r=At(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():At(e[t],null)}}}}kt(jt,`composeRefs`);function U(...e){return C.useCallback(jt(...e),e)}kt(U,`useComposedRefs`);var Mt=Object.defineProperty,Nt=(e,t)=>Mt(e,`name`,{value:t,configurable:!0});function Pt(e){let t=C.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Ut(r)&&typeof qt==`function`&&(r=qt(r._payload)),C.Children.forEach(r,e=>{if(Vt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ut(n)&&typeof qt==`function`&&(n=qt(n._payload)),a=Rt(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=C.cloneElement(a,void 0,s):!o&&C.Children.count(r)===1&&C.isValidElement(r)&&(a=r);let c=a?Bt(a):void 0,l=U(n,c);if(!a){if(r||r===0)throw Error(o?Kt(e):Gt(e));return r}let u=zt(i,a.props??{});return a.type!==C.Fragment&&(u.ref=n?l:c),C.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Nt(Pt,`createSlot`);var Ft=Pt(`Slot`),It=Symbol.for(`radix.slottable`);function Lt(e){let t=Nt(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=It,t}Nt(Lt,`createSlottable`);var Rt=Nt((e,t)=>{if(`child`in e.props){let t=e.props.child;return C.isValidElement(t)?C.cloneElement(t,void 0,e.props.children(t.props.children)):null}return C.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function zt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Nt(zt,`mergeProps`);function Bt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Nt(Bt,`getElementRef`);function Vt(e){return C.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===It}Nt(Vt,`isSlottable`);var Ht=Symbol.for(`react.lazy`);function Ut(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ht&&`_payload`in e&&Wt(e._payload)}Nt(Ut,`isLazyComponent`);function Wt(e){return typeof e==`object`&&!!e&&`then`in e}Nt(Wt,`isPromiseLike`);var Gt=Nt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Kt=Nt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),qt=C.use,Jt=e(f(),1),Yt=Object.defineProperty,Xt=(e,t)=>Yt(e,`name`,{value:t,configurable:!0}),W=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Pt(`Primitive.${t}`),r=C.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,w.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zt(e,t){e&&Jt.flushSync(()=>e.dispatchEvent(t))}Xt(Zt,`dispatchDiscreteCustomEvent`);var Qt=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),$t=Object.defineProperty,en=(e,t)=>$t(e,`name`,{value:t,configurable:!0});function tn(e,t){let n=C.createContext(t);n.displayName=e+`Context`;let r=en(e=>{let{children:t,...r}=e,i=C.useMemo(()=>r,Object.values(r));return(0,w.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=C.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return en(i,`useContext`),[r,i]}en(tn,`createContext`);function nn(e,t=[]){let n=[];function r(t,r){let i=C.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=en(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=C.useMemo(()=>o,Object.values(o));return(0,w.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=C.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return en(s,`useContext`),[o,s]}en(r,`createContext`);let i=en(()=>{let t=n.map(e=>C.createContext(e));return en(function(n){let r=n?.[e]||t;return C.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,rn(i,...t)]}en(nn,`createContextScope`);function rn(...e){let t=e[0];if(e.length===1)return t;let n=en(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return en(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}en(rn,`composeContextScopes`);var an=Object.defineProperty,on=(e,t)=>an(e,`name`,{value:t,configurable:!0});function sn(e){let t=e+`CollectionProvider`,[n,r]=nn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=on(e=>{let{scope:t,children:n}=e,r=C.useRef(null),a=C.useRef(new Map).current;return(0,w.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Pt(s),l=C.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=U(t,a(s,n).collectionRef);return(0,w.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Pt(u),p=C.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=C.useRef(null),s=U(t,o),c=a(u,n);return C.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,w.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return C.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return on(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}on(sn,`createCollection`);var cn=new WeakMap,ln=class e extends Map{static{on(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],cn.set(this,!0)}set(e,t){return cn.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=fn(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=un(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=un(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return un(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function un(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=dn(e,t);return n===-1?void 0:e[n]}on(un,`at`);function dn(e,t){let n=e.length,r=fn(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}on(dn,`toSafeIndex`);function fn(e){return e!==e||e===0?0:Math.trunc(e)}on(fn,`toSafeInteger`);function pn(e){let t=e+`CollectionProvider`,[n,r]=nn(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new ln,setItemMap:on(()=>void 0,`setItemMap`)}),o=on(({state:e,...t})=>e?(0,w.jsx)(c,{...t,state:e}):(0,w.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=on(e=>{let t=h();return(0,w.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=on(e=>{let{scope:t,children:n,state:r}=e,a=C.useRef(null),[o,s]=C.useState(null),c=U(a,s),[l,u]=r;return C.useEffect(()=>{if(!o)return;let e=_n(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,w.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Pt(l),d=C.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=U(t,a(l,n).collectionRef);return(0,w.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Pt(f),m=C.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=C.useRef(null),[s,c]=C.useState(null),l=U(t,o,c),{setItemMap:u}=a(f,n),d=C.useRef(i);mn(d.current,i)||(d.current=i);let m=d.current;return C.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(gn):(t.set(s,{...e,element:s}),t.toSorted(gn)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new ln(e)))}},[s,m,u]),(0,w.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return C.useState(new ln)}on(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return on(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}on(pn,`createCollection`);function mn(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}on(mn,`shallowEqual`);function hn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}on(hn,`isElementPreceding`);function gn(e,t){return!e[1].element||!t[1].element?0:hn(e[1].element,t[1].element)?-1:1}on(gn,`sortByDocumentPosition`);function _n(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}on(_n,`getChildListObserver`);var vn=Object.defineProperty,yn=(e,t)=>vn(e,`name`,{value:t,configurable:!0}),bn=!!(typeof window<`u`&&window.document&&window.document.createElement);function G(e,t,{checkForDefaultPrevented:n=!0}={}){return yn(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}yn(G,`composeEventHandlers`);function xn(e){if(!bn)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}yn(xn,`getOwnerWindow`);function Sn(e){if(!bn)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}yn(Sn,`getOwnerDocument`);function Cn(e,t=!1){let{activeElement:n}=Sn(e);if(!n?.nodeName)return null;if(wn(n)&&n.contentDocument)return Cn(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Sn(n).getElementById(e);if(t)return t}}return n}yn(Cn,`getActiveElement`);function wn(e){return e.tagName===`IFRAME`}yn(wn,`isFrame`);var Tn=globalThis?.document?C.useLayoutEffect:()=>{},En=Object.defineProperty,Dn=(e,t)=>En(e,`name`,{value:t,configurable:!0}),On=C.useEffectEvent,kn=C.useInsertionEffect;function An(e){if(typeof On==`function`)return On(e);let t=C.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof kn==`function`?kn(()=>{t.current=e}):Tn(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}Dn(An,`useEffectEvent`);var jn=Object.defineProperty,Mn=(e,t)=>jn(e,`name`,{value:t,configurable:!0}),Nn=C.useInsertionEffect||Tn;function Pn({prop:e,defaultProp:t,onChange:n=Mn(()=>{},`onChange`),caller:r}){let[i,a,o]=Fn({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,C.useCallback(t=>{if(s){let n=In(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Mn(Pn,`useControllableState`);function Fn({defaultProp:e,onChange:t}){let[n,r]=C.useState(e),i=C.useRef(n),a=C.useRef(t);return Nn(()=>{a.current=t},[t]),C.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Mn(Fn,`useUncontrolledState`);function In(e){return typeof e==`function`}Mn(In,`isFunction`);var Ln=Symbol(`RADIX:SYNC_STATE`);function Rn(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=An(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=C.useReducer((t,n)=>{if(n.type===Ln)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=C.useRef(p);C.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=C.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return C.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Ln,state:i})},[i,d.state,c]),[h,f]}Mn(Rn,`useControllableStateReducer`);var zn=Object.defineProperty,Bn=(e,t)=>zn(e,`name`,{value:t,configurable:!0});function Vn(e,t){return C.useReducer((e,n)=>t[e][n]??e,e)}Bn(Vn,`useStateMachine`);var Hn=Bn(e=>{let{present:t,children:n}=e,r=Un(t),i=typeof n==`function`?n({present:r.isPresent}):C.Children.only(n),a=Gn(r.ref,qn(i));return typeof n==`function`||r.isPresent?C.cloneElement(i,{ref:a}):null},`Presence`);function Un(e){let[t,n]=C.useState(),r=C.useRef(null),i=C.useRef(e),a=C.useRef(`none`),o=C.useRef(void 0),[s,c]=Vn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return C.useEffect(()=>{s===`mounted`?(a.current=o.current??Kn(r.current),o.current=void 0):a.current=`none`},[s]),Tn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Kn(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Tn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Bn(a=>{let o=Kn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Bn(e=>{e.target===t&&(a.current=Kn(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:C.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Kn(t)}else r.current=null;n(e)},[])}}Bn(Un,`usePresence`);function Wn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Bn(Wn,`setRef`);function Gn(...e){let t=C.useRef(e);return t.current=e,C.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Wn(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Wn(n[e],null)}}},[])}Bn(Gn,`useStableComposedRefs`);function Kn(e){return e?.animationName||`none`}Bn(Kn,`getAnimationName`);function qn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Bn(qn,`getElementRef`);var Jn=Object.defineProperty,Yn=(e,t)=>Jn(e,`name`,{value:t,configurable:!0}),Xn=C.useId||(()=>void 0),Zn=0;function Qn(e){let[t,n]=C.useState(Xn());return Tn(()=>{e||n(e=>e??String(Zn++))},[e]),e||(t?`radix-${t}`:``)}Yn(Qn,`useId`);var $n=Object.defineProperty,er=(e,t)=>$n(e,`name`,{value:t,configurable:!0}),tr=C.createContext(void 0);function nr(e){let t=C.useContext(tr);return e||t||`ltr`}er(nr,`useDirection`);var rr=Object.defineProperty,ir=(e,t)=>rr(e,`name`,{value:t,configurable:!0});function ar(e){let t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}ir(ar,`useCallbackRef`);var or=Object.defineProperty,sr=(e,t)=>or(e,`name`,{value:t,configurable:!0}),cr=`dismissableLayer.update`,lr=`dismissableLayer.pointerDownOutside`,ur=`dismissableLayer.focusOutside`,dr,fr=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),pr=C.forwardRef(sr(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=C.useContext(fr),[d,f]=C.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=C.useState({}),h=U(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=C.useRef(!1),T=gr(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:C.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),E=_r(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),D=d?y===g.length-1:!1,O=ar(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return C.useEffect(()=>{if(D)return p.addEventListener(`keydown`,O,{capture:!0}),()=>p.removeEventListener(`keydown`,O,{capture:!0})},[p,D,O]),C.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(dr=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),vr(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=dr))}},[d,p,n,u]),C.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),vr())},[d,u]),C.useEffect(()=>{let e=sr(()=>m({}),`handleUpdate`);return document.addEventListener(cr,e),()=>document.removeEventListener(cr,e)},[]),(0,w.jsx)(W.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:G(e.onFocusCapture,E.onFocusCapture),onBlurCapture:G(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function mr(){let e=C.useContext(fr),[t,n]=C.useState(null);return C.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}sr(mr,`useDismissableLayerSurface`);var hr=sr(()=>!0,`IS_TRUE`);function gr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=hr}=t,s=ar(e),c=C.useRef(!1),l=C.useRef(!1),u=C.useRef(new Map),d=C.useRef(()=>{});return C.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}sr(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}sr(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}sr(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}sr(p,`handleInteractionBubble`);let m=sr(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||yr(lr,s,p,{discrete:!0})};if(sr(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:sr(()=>c.current=!0,`onPointerDownCapture`)}}sr(gr,`usePointerDownOutside`);function _r(e,t=globalThis?.document){let n=ar(e),r=C.useRef(!1);return C.useEffect(()=>{let e=sr(e=>{e.target&&!r.current&&yr(ur,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:sr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:sr(()=>r.current=!1,`onBlurCapture`)}}sr(_r,`useFocusOutside`);function vr(){let e=new CustomEvent(cr);document.dispatchEvent(e)}sr(vr,`dispatchUpdate`);function yr(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Zt(i,a):i.dispatchEvent(a)}sr(yr,`handleAndDispatchCustomEvent`);var br=Object.defineProperty,xr=(e,t)=>br(e,`name`,{value:t,configurable:!0}),Sr=`focusScope.autoFocusOnMount`,Cr=`focusScope.autoFocusOnUnmount`,wr={bubbles:!1,cancelable:!0},Tr=C.forwardRef(xr(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=C.useState(null),l=ar(i),u=ar(a),d=C.useRef(null),f=U(t,c),p=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Mr(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Mr(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Mr(s)};xr(e,`handleFocusIn`),xr(t,`handleFocusOut`),xr(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),C.useEffect(()=>{if(s){Nr.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Sr,wr);s.addEventListener(Sr,l),s.dispatchEvent(t),t.defaultPrevented||(Er(Ir(Or(s)),{select:!0}),document.activeElement===e&&Mr(s))}return()=>{s.removeEventListener(Sr,l),setTimeout(()=>{let t=new CustomEvent(Cr,wr);s.addEventListener(Cr,u),s.dispatchEvent(t),t.defaultPrevented||Mr(e??document.body,{select:!0}),s.removeEventListener(Cr,u),Nr.remove(p)},0)}}},[s,l,u,p]);let m=C.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Dr(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Mr(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Mr(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,w.jsx)(W.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Er(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Mr(r,{select:t}),document.activeElement!==n)return}xr(Er,`focusFirst`);function Dr(e){let t=Or(e);return[kr(t,e),kr(t.reverse(),e)]}xr(Dr,`getTabbableEdges`);function Or(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:xr(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}xr(Or,`getTabbableCandidates`);function kr(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ar(r,{upTo:t})))return r}xr(kr,`findVisible`);function Ar(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}xr(Ar,`isHidden`);function jr(e){return e instanceof HTMLInputElement&&`select`in e}xr(jr,`isSelectableInput`);function Mr(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&jr(e)&&t&&e.select()}}xr(Mr,`focus`);var Nr=Pr();function Pr(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Fr(e,t),e.unshift(t)},remove(t){e=Fr(e,t),e[0]?.resume()}}}xr(Pr,`createFocusScopesStack`);function Fr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}xr(Fr,`arrayRemove`);function Ir(e){return e.filter(e=>e.tagName!==`A`)}xr(Ir,`removeLinks`);var Lr=Object.defineProperty,Rr=C.forwardRef(((e,t)=>Lr(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=C.useState(!1);Tn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Jt.createPortal((0,w.jsx)(W.div,{...r,ref:t}),o):null},`Portal`)),zr=Object.defineProperty,Br=(e,t)=>zr(e,`name`,{value:t,configurable:!0}),Vr=0,Hr=null;function Ur(e){return Wr(),e.children}Br(Ur,`FocusGuards`);function Wr(){C.useEffect(()=>{Hr||={start:Gr(),end:Gr()};let{start:e,end:t}=Hr;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Vr++,()=>{Vr===1&&(Hr?.start.remove(),Hr?.end.remove(),Hr=null),Vr=Math.max(0,Vr-1)}},[])}Br(Wr,`useFocusGuards`);function Gr(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}Br(Gr,`createFocusGuard`);var Kr=function(){return Kr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Kr.apply(this,arguments)};function qr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Yr=`right-scroll-bar-position`,Xr=`width-before-scroll-bar`,Zr=`with-scroll-bars-hidden`,Qr=`--removed-body-scroll-bar-size`;function $r(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function ei(e,t){var n=(0,C.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ti=typeof window<`u`?C.useLayoutEffect:C.useEffect,ni=new WeakMap;function ri(e,t){var n=ei(t||null,function(t){return e.forEach(function(e){return $r(e,t)})});return ti(function(){var t=ni.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$r(e,null)}),i.forEach(function(e){r.has(e)||$r(e,a)})}ni.set(n,e)},[e]),n}function ii(e){return e}function ai(e,t){t===void 0&&(t=ii);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function oi(e){e===void 0&&(e={});var t=ai(null);return t.options=Kr({async:!0,ssr:!1},e),t}var si=function(e){var t=e.sideCar,n=qr(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return C.createElement(r,Kr({},n))};si.isSideCarExport=!0;function ci(e,t){return e.useMedium(t),si}var li=oi(),ui=function(){},di=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:ui,onWheelCapture:ui,onTouchMoveCapture:ui}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=qr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=ri([n,t]),w=Kr(Kr({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:li,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),Kr(Kr({},w),{ref:S})):C.createElement(v,Kr({},w,{className:c,ref:S}),s))});di.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},di.classNames={fullWidth:Xr,zeroRight:Yr};var fi=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function pi(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=fi();return t&&e.setAttribute(`nonce`,t),e}function mi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hi(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var gi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pi())&&(mi(t,n),hi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_i=function(){var e=gi();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vi=function(){var e=_i();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},yi={left:0,top:0,right:0,gap:0},bi=function(e){return parseInt(e||``,10)||0},xi=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[bi(n),bi(r),bi(i)]},Si=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return yi;var t=xi(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ci=vi(),wi=`data-scroll-locked`,Ti=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${Zr} {
3
+ overflow: hidden ${r};
4
+ padding-right: ${s}px ${r};
5
+ }
6
+ body[${wi}] {
7
+ overflow: hidden ${r};
8
+ overscroll-behavior: contain;
9
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
10
+ padding-left: ${i}px;
11
+ padding-top: ${a}px;
12
+ padding-right: ${o}px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: ${s}px ${r};
16
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
+ }
18
+
19
+ .${Yr} {
20
+ right: ${s}px ${r};
21
+ }
22
+
23
+ .${Xr} {
24
+ margin-right: ${s}px ${r};
25
+ }
26
+
27
+ .${Yr} .${Yr} {
28
+ right: 0 ${r};
29
+ }
30
+
31
+ .${Xr} .${Xr} {
32
+ margin-right: 0 ${r};
33
+ }
34
+
35
+ body[${wi}] {
36
+ ${Qr}: ${s}px;
37
+ }
38
+ `},Ei=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Di=function(){C.useEffect(function(){return document.body.setAttribute(wi,(Ei()+1).toString()),function(){var e=Ei()-1;e<=0?document.body.removeAttribute(wi):document.body.setAttribute(wi,e.toString())}},[])},Oi=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Di();var a=C.useMemo(function(){return Si(i)},[i]);return C.createElement(Ci,{styles:Ti(a,!t,i,n?``:`!important`)})},ki=!1;if(typeof window<`u`)try{var Ai=Object.defineProperty({},"passive",{get:function(){return ki=!0,!0}});window.addEventListener(`test`,Ai,Ai),window.removeEventListener(`test`,Ai,Ai)}catch{ki=!1}var ji=ki?{passive:!1}:!1,Mi=function(e){return e.tagName===`TEXTAREA`},Ni=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Mi(e)&&n[t]===`visible`)},Pi=function(e){return Ni(e,`overflowY`)},Fi=function(e){return Ni(e,`overflowX`)},Ii=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),zi(e,r)){var i=Bi(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Li=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ri=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},zi=function(e,t){return e===`v`?Pi(t):Fi(t)},Bi=function(e,t){return e===`v`?Li(t):Ri(t)},Vi=function(e,t){return e===`h`&&t===`rtl`?-1:1},Hi=function(e,t,n,r,i){var a=Vi(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Bi(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&zi(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ui=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wi=function(e){return[e.deltaX,e.deltaY]},Gi=function(e){return e&&`current`in e?e.current:e},Ki=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qi=function(e){return`
39
+ .block-interactivity-${e} {pointer-events: none;}
40
+ .allow-interactivity-${e} {pointer-events: all;}
41
+ `},Ji=0,Yi=[];function Xi(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(Ji++)[0],a=C.useState(vi)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Jr([e.lockRef.current],(e.shards||[]).map(Gi),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ui(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ii(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ii(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Hi(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(Yi.length&&Yi[Yi.length-1]===a){var r=`deltaY`in n?Wi(n):Ui(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ki(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Gi).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Zi(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=Ui(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,Wi(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,Ui(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return Yi.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,ji),document.addEventListener(`touchmove`,c,ji),document.addEventListener(`touchstart`,u,ji),function(){Yi=Yi.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,ji),document.removeEventListener(`touchmove`,c,ji),document.removeEventListener(`touchstart`,u,ji)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:qi(i)}):null,p?C.createElement(Oi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Qi=ci(li,Xi),$i=C.forwardRef(function(e,t){return C.createElement(di,Kr({},e,{ref:t,sideCar:Qi}))});$i.classNames=di.classNames;var ea=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ta=new WeakMap,na=new WeakMap,ra={},ia=0,aa=function(e){return e&&(e.host||aa(e.parentNode))},oa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=aa(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},sa=function(e,t,n,r){var i=oa(t,Array.isArray(e)?e:[e]);ra[n]||(ra[n]=new WeakMap);var a=ra[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ta.get(e)||0)+1,l=(a.get(e)||0)+1;ta.set(e,c),a.set(e,l),o.push(e),c===1&&i&&na.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),ia++,function(){o.forEach(function(e){var t=ta.get(e)-1,i=a.get(e)-1;ta.set(e,t),a.set(e,i),t||(na.has(e)||e.removeAttribute(r),na.delete(e)),i||e.removeAttribute(n)}),ia--,ia||(ta=new WeakMap,ta=new WeakMap,na=new WeakMap,ra={})}},ca=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ea(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),sa(r,i,n,`aria-hidden`)):function(){return null}},la=Object.defineProperty,ua=(e,t)=>la(e,`name`,{value:t,configurable:!0});function da(e){let[t,n]=C.useState(void 0);return Tn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}ua(da,`useSize`);var fa=[`top`,`right`,`bottom`,`left`],pa=Math.min,ma=Math.max,ha=Math.round,ga=Math.floor,_a=e=>({x:e,y:e}),va={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ya(e,t,n){return ma(e,pa(t,n))}function ba(e,t){return typeof e==`function`?e(t):e}function xa(e){return e.split(`-`)[0]}function Sa(e){return e.split(`-`)[1]}function Ca(e){return e===`x`?`y`:`x`}function wa(e){return e===`y`?`height`:`width`}function Ta(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ea(e){return Ca(Ta(e))}function Da(e,t,n){n===void 0&&(n=!1);let r=Sa(e),i=Ea(e),a=wa(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ia(o)),[o,Ia(o)]}function Oa(e){let t=Ia(e);return[ka(e),t,ka(t)]}function ka(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Aa=[`left`,`right`],ja=[`right`,`left`],Ma=[`top`,`bottom`],Na=[`bottom`,`top`];function Pa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ja:Aa:t?Aa:ja;case`left`:case`right`:return t?Ma:Na;default:return[]}}function Fa(e,t,n,r){let i=Sa(e),a=Pa(xa(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ka)))),a}function Ia(e){let t=xa(e);return va[t]+e.slice(t.length)}function La(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ra(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:La(e)}function za(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ba(e,t,n){let{reference:r,floating:i}=e,a=Ta(t),o=Ea(t),s=wa(o),c=xa(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Sa(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Va(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ba(t,e),p=Ra(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=za(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=za(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ha=50,Ua=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Va},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ba(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ha&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ba(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Wa=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ba(e,t)||{};if(l==null)return{};let d=Ra(u),f={x:n,y:r},p=Ea(i),m=wa(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=pa(d[_],T),D=pa(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=ya(E,k,O),j=!c.arrow&&Sa(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Ga=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ba(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=xa(r),_=Ta(o),v=xa(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ia(o)]:Oa(o)),x=p!==`none`;!d&&x&&b.push(...Fa(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Da(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ta(t)||T.every(e=>Ta(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ta(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ka(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qa(e){return fa.some(t=>e[t]>=0)}var Ja=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ba(e,t);switch(i){case`referenceHidden`:{let e=Ka(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:qa(e)}}}case`escaped`:{let e=Ka(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:qa(e)}}}default:return{}}}}},Ya=new Set([`left`,`top`]);async function Xa(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=xa(n),s=Sa(n),c=Ta(n)===`y`,l=Ya.has(o)?-1:1,u=a&&c?-1:1,d=ba(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Za=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Xa(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Qa=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ba(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ta(i),p=Ca(f),m=u[p],h=u[f],g=(e,t)=>ya(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},$a=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ba(e,t),u={x:n,y:r},d=Ta(i),f=Ca(d),p=u[f],m=u[d],h=ba(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ya.has(xa(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},eo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ba(e,t),c=await i.detectOverflow(t,s),l=xa(n),u=Sa(n),d=Ta(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=pa(p-c[m],g),y=pa(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ma(c.left,c.right):S=p-2*ma(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function to(){return typeof window<`u`}function no(e){return ao(e)?(e.nodeName||``).toLowerCase():`#document`}function ro(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function io(e){return((ao(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ao(e){return to()?e instanceof Node||e instanceof ro(e).Node:!1}function oo(e){return to()?e instanceof Element||e instanceof ro(e).Element:!1}function so(e){return to()?e instanceof HTMLElement||e instanceof ro(e).HTMLElement:!1}function co(e){return!to()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ro(e).ShadowRoot}function lo(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=xo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function uo(e){return/^(table|td|th)$/.test(no(e))}function fo(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var po=/transform|translate|scale|rotate|perspective|filter/,mo=/paint|layout|strict|content/,ho=e=>!!e&&e!==`none`,go;function _o(e){let t=oo(e)?xo(e):e;return ho(t.transform)||ho(t.translate)||ho(t.scale)||ho(t.rotate)||ho(t.perspective)||!yo()&&(ho(t.backdropFilter)||ho(t.filter))||po.test(t.willChange||``)||mo.test(t.contain||``)}function vo(e){let t=Co(e);for(;so(t)&&!bo(t);){if(_o(t))return t;if(fo(t))return null;t=Co(t)}return null}function yo(){return go??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),go}function bo(e){return/^(html|body|#document)$/.test(no(e))}function xo(e){return ro(e).getComputedStyle(e)}function So(e){return oo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(no(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||co(e)&&e.host||io(e);return co(t)?t.host:t}function wo(e){let t=Co(e);return bo(t)?(e.ownerDocument||e).body:so(t)&&lo(t)?t:wo(t)}function To(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=wo(e),i=r===e.ownerDocument?.body,a=ro(r);if(i){let e=Eo(a);return t.concat(a,a.visualViewport||[],lo(r)?r:[],e&&n?To(e):[])}return t.concat(r,To(r,[],n))}function Eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Do(e){let t=xo(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=so(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ha(n)!==a||ha(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Oo(e){return oo(e)?e:e.contextElement}function ko(e){let t=Oo(e);if(!so(t))return _a(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Do(t),o=(a?ha(n.width):n.width)/r,s=(a?ha(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ao=_a(0);function jo(e){let t=ro(e);return!yo()||!t.visualViewport?Ao:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mo(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ro(e)}function No(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Oo(e),o=_a(1);t&&(r?oo(r)&&(o=ko(r)):o=ko(e));let s=Mo(a,n,r)?jo(a):_a(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ro(a),t=oo(r)?ro(r):r,n=e,i=Eo(n);for(;i&&t!==n;){let e=ko(i),t=i.getBoundingClientRect(),r=xo(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ro(i),i=Eo(n)}}return za({width:u,height:d,x:c,y:l})}function Po(e,t){let n=So(e).scrollLeft;return t?t.left+n:No(io(e)).left+n}function Fo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Po(e,n),y:n.top+t.scrollTop}}function Io(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=io(r),s=t?fo(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=_a(1),u=_a(0),d=so(r);if((d||!a)&&((no(r)!==`body`||lo(o))&&(c=So(r)),d)){let e=No(r);l=ko(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Fo(o,c):_a(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Lo(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ro(e){let t=So(e),n=e.ownerDocument.body,r=ma(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ma(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Po(e),o=-t.scrollTop;return xo(n).direction===`rtl`&&(a+=ma(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var zo=25;function Bo(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ro(e),a=io(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!yo()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Po(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=zo&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Vo(e,t){let n=No(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ko(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ho(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Bo(e,n,t);else if(t===`document`)r=Ro(io(e));else if(oo(t))r=Vo(t,n);else{let n=jo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return za(r)}function Uo(e,t){let n=t.get(e);if(n)return n;let r=To(e,[],!1).filter(e=>oo(e)&&no(e)!==`body`),i=null,a=xo(e).position===`fixed`,o=a?Co(e):e;for(;oo(o)&&!bo(o);){let e=xo(o),t=_o(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Co(o)}return t.set(e,r),r}function Wo(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?fo(t)?[]:Uo(t,this._c):[].concat(n),r],o=Ho(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ho(t,a[e],i);s=ma(n.top,s),c=pa(n.right,c),l=pa(n.bottom,l),u=ma(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Go(e){let{width:t,height:n}=Do(e);return{width:t,height:n}}function Ko(e,t,n){let r=so(t),i=io(t),a=n===`fixed`,o=No(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=_a(0);if((r||!a)&&((no(t)!==`body`||lo(i))&&(s=So(t)),r)){let e=No(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Po(i));let l=i&&!r&&!a?Fo(i,s):_a(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function qo(e){return xo(e).position===`static`}function Jo(e,t){if(!so(e)||xo(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return io(e)===n&&(n=n.ownerDocument.body),n}function Yo(e,t){let n=ro(e);if(fo(e))return n;if(!so(e)){let t=Co(e);for(;t&&!bo(t);){if(oo(t)&&!qo(t))return t;t=Co(t)}return n}let r=Jo(e,t);for(;r&&uo(r)&&qo(r);)r=Jo(r,t);return r&&bo(r)&&qo(r)&&!_o(r)?n:r||vo(e)||n}var Xo=async function(e){let t=this.getOffsetParent||Yo,n=this.getDimensions,r=await n(e.floating);return{reference:Ko(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Zo(e){return xo(e).direction===`rtl`}var Qo={convertOffsetParentRelativeRectToViewportRelativeRect:Io,getDocumentElement:io,getClippingRect:Wo,getOffsetParent:Yo,getElementRects:Xo,getClientRects:Lo,getDimensions:Go,getScale:ko,isElement:oo,isRTL:Zo};function $o(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function es(e,t,n){let r=null,i,a=io(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ga(d),h=ga(a.clientWidth-(u+f)),g=ga(a.clientHeight-(d+p)),_=ga(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ma(0,pa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!$o(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ro(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ts(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Oo(e),u=i||a?[...l?To(l):[],...t?To(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?es(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?No(e):null;c&&g();function g(){let t=No(e);h&&!$o(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ns=Za,rs=Qa,is=Ga,as=eo,os=Ja,ss=Wa,cs=$a,ls=(e,t,n)=>{let r=new Map,i=n??{},a={...Qo,...i.platform,_c:r};return Ua(e,t,{...i,platform:a})},us=typeof document<`u`?C.useLayoutEffect:function(){};function ds(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ds(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ds(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function fs(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ps(e,t){let n=fs(e);return Math.round(t*n)/n}function ms(e){let t=C.useRef(e);return us(()=>{t.current=e}),t}function hs(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);ds(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=ms(c),O=ms(i),k=ms(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),ls(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ds(T.current,t)&&(T.current=t,Jt.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);us(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);us(()=>(j.current=!0,()=>{j.current=!1}),[]),us(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),P=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ps(N.floating,u.x),r=ps(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...fs(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var gs=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ss({element:r.current,padding:i}).fn(n):r?ss({element:r,padding:i}).fn(n):{}}}},_s=(e,t)=>{let n=ns(e);return{name:n.name,fn:n.fn,options:[e,t]}},vs=(e,t)=>{let n=rs(e);return{name:n.name,fn:n.fn,options:[e,t]}},ys=(e,t)=>({fn:cs(e).fn,options:[e,t]}),bs=(e,t)=>{let n=is(e);return{name:n.name,fn:n.fn,options:[e,t]}},xs=(e,t)=>{let n=as(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ss=(e,t)=>{let n=os(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cs=(e,t)=>{let n=gs(e);return{name:n.name,fn:n.fn,options:[e,t]}},ws=Object.defineProperty,Ts=(e,t)=>ws(e,`name`,{value:t,configurable:!0}),Es=`Popper`,[Ds,Os]=nn(Es),[ks,As]=Ds(Es),js=Ts(e=>{let{__scopePopper:t,children:n}=e,[r,i]=C.useState(null),[a,o]=C.useState(void 0);return(0,w.jsx)(ks,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Ms=`PopperAnchor`,Ns=C.forwardRef(Ts(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=As(Ms,n),o=C.useRef(null),s=a.onAnchorChange,c=U(t,C.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=C.useRef(null);C.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Bs(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,w.jsx)(W.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Ps=`PopperContent`,[Fs,Is]=Ds(Ps),Ls=C.forwardRef(Ts(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=As(Ps,n),[_,v]=C.useState(null),y=U(t,v),[b,x]=C.useState(null),S=da(b),T=S?.width??0,E=S?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(Rs),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:ee,middlewareData:F}=hs({strategy:`fixed`,placement:D,whileElementsMounted:Ts((...e)=>ts(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[_s({mainAxis:i+E,alignmentAxis:o}),c&&vs({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?ys():void 0,...j}),c&&bs({...j}),xs({...j,apply:Ts(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&Cs({element:b,padding:s}),zs({arrowWidth:T,arrowHeight:E}),f&&Ss({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),te=g.setPlacementState;Tn(()=>(te(P),()=>{te(void 0)}),[P,te]);let[ne,re]=Bs(P),ie=ar(m);Tn(()=>{ee&&ie?.()},[ee,ie]);let I=F.arrow?.x,L=F.arrow?.y,ae=F.arrow?.centerOffset!==0,[oe,R]=C.useState();return Tn(()=>{_&&R(window.getComputedStyle(_).zIndex)},[_]),(0,w.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:ee?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(Fs,{scope:n,placedSide:ne,placedAlign:re,onArrowChange:x,arrowX:I,arrowY:L,shouldHideArrow:ae,children:(0,w.jsx)(W.div,{"data-side":ne,"data-align":re,...h,ref:y,style:{...h.style,animation:ee?h.style?.animation:`none`}})})})},`PopperContent`));function Rs(e){return e!==null}Ts(Rs,`isNotNull`);var zs=Ts(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Bs(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Bs(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Ts(Bs,`getSideAndAlignFromPlacement`);var Vs=js,Hs=Ns,Us=Ls,Ws=Object.defineProperty,Gs=(e,t)=>Ws(e,`name`,{value:t,configurable:!0});function Ks(e){let t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Gs(Ks,`usePrevious`);var qs=Object.defineProperty,Js=(e,t)=>qs(e,`name`,{value:t,configurable:!0});function Ys(e,[t,n]){return Math.min(n,Math.max(t,e))}Js(Ys,`clamp`);var Xs=Object.defineProperty,K=(e,t)=>Xs(e,`name`,{value:t,configurable:!0}),Zs=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Qs=[` `,`Enter`],$s=`Select`,[ec,tc,nc]=sn($s),[rc,ic]=nn($s,[nc,Os]),ac=Os(),[oc,sc]=rc($s),[cc,lc]=rc($s);function uc(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=ac(t),[_,v]=C.useState(null),[y,b]=C.useState(null),[x,S]=C.useState(!1),T=nr(l),[E,D]=Pn({prop:r,defaultProp:i??!1,onChange:a,caller:$s}),[O,k]=Pn({prop:o,defaultProp:s,onChange:c,caller:$s}),A=C.useRef(null),j=C.useRef(O);C.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=K(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,k]);let M=!_||!!m||!!_.closest(`form`),[N,P]=C.useState(new Set),ee=Qn(),F=Array.from(N).map(e=>e.props.value).join(`;`),te=C.useCallback(e=>{P(t=>new Set(t).add(e))},[]),ne=C.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),re={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:ee,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:N,nativeSelectKey:F,isFormControl:M};return(0,w.jsx)(Vs,{...g,children:(0,w.jsx)(oc,{scope:t,...re,children:(0,w.jsx)(ec.Provider,{scope:t,children:(0,w.jsx)(cc,{scope:t,onNativeOptionAdd:te,onNativeOptionRemove:ne,children:Zc(h)?h(re):n})})})})}K(uc,`SelectProvider`);var dc=K(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,w.jsx)(uc,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,w.jsxs)(w.Fragment,{children:[n,e?(0,w.jsx)(Xc,{__scopeSelect:t}):null]})})},`Select`),fc=`SelectTrigger`,pc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=ac(n),o=sc(fc,n),s=o.disabled||r,c=U(t,o.onTriggerChange),l=tc(n),u=C.useRef(`touch`),[d,f,p]=$c(e=>{let t=l().filter(e=>!e.disabled),n=el(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=K(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,w.jsx)(Hs,{asChild:!0,...a,children:(0,w.jsx)(W.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Qc(o.value)?``:void 0,...i,ref:c,onClick:G(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:G(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:G(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Zs.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),mc=`SelectValue`,hc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=sc(mc,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=U(t,c.onValueNodeChange);Tn(()=>{l(u)},[l,u]);let f=Qc(c.value);return(0,w.jsx)(W.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,w.jsx)(C.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),gc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,w.jsx)(W.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[_c,vc]=rc(`SelectPortal`,{forceMount:void 0}),yc=K(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,w.jsx)(_c,{scope:e.__scopeSelect,forceMount:n,children:(0,w.jsx)(Rr,{asChild:!0,...r})})},`SelectPortal`),bc=`SelectContent`,xc=C.forwardRef(K(function(e,t){let n=vc(bc,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=sc(bc,e.__scopeSelect),[o,s]=C.useState();return Tn(()=>{s(new DocumentFragment)},[]),(0,w.jsx)(Hn,{present:r||a.open,children:({present:e})=>e?(0,w.jsx)(Dc,{...i,ref:t}):(0,w.jsx)(Sc,{...i,fragment:o})})},`SelectContent`)),Sc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Jt.createPortal((0,w.jsx)(wc,{scope:n,children:(0,w.jsx)(ec.Slot,{scope:n,children:(0,w.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Cc=10,[wc,Tc]=rc(bc),Ec=Pt(`SelectContent.RemoveScroll`),Dc=C.forwardRef(K(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=sc(bc,n),[y,b]=C.useState(null),[x,S]=C.useState(null),T=U(t,b),[E,D]=C.useState(null),[O,k]=C.useState(null),A=tc(n),[j,M]=C.useState(!1),N=C.useRef(!1);C.useEffect(()=>{if(y)return ca(y)},[y]),Wr();let P=C.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,x]),ee=C.useCallback(()=>P([E,y]),[P,E,y]);C.useEffect(()=>{j&&ee()},[j,ee]);let{onOpenChange:F,triggerPointerDownPosRef:te}=v;C.useEffect(()=>{if(y){let e={x:0,y:0},t=K(t=>{e={x:Math.abs(Math.round(t.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(te.current?.y??0))}},`handlePointerMove`),n=K(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||F(!1),document.removeEventListener(`pointermove`,t),te.current=null},`handlePointerUp`);return te.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,F,te]),C.useEffect(()=>{let e=K(()=>F(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[ne,re]=$c(e=>{let t=A().filter(e=>!e.disabled),n=el(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ie=C.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&(D(e),r&&(N.current=!0))},[v.value]),I=C.useCallback(()=>y?.focus(),[y]),L=C.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&k(e)},[v.value]),ae=r===`popper`?kc:Oc,oe=ae===kc?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,w.jsx)(wc,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ie,selectedItem:E,onItemLeave:I,itemTextRefCallback:L,focusSelectedItem:ee,selectedItemText:O,position:r,isPositioned:j,searchRef:ne,children:(0,w.jsx)($i,{as:Ec,allowPinchZoom:!0,children:(0,w.jsx)(Tr,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:G(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,w.jsx)(pr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,w.jsx)(ae,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...oe,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:G(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),Oc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=sc(bc,n),o=Tc(bc,n),[s,c]=C.useState(null),[l,u]=C.useState(null),d=U(t,u),f=tc(n),p=C.useRef(!1),m=C.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=C.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Cc,d=Ys(a,[Cc,Math.max(Cc,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Cc,d=Ys(a,[Cc,Math.max(Cc,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Cc*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Cc,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Cc}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Tn(()=>y(),[y]);let[b,x]=C.useState();Tn(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]);let S=C.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]);return(0,w.jsx)(Ac,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,w.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,w.jsx)(W.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),kc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Cc,...a}=e,o=ac(n);return(0,w.jsx)(Us,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[Ac,jc]=rc(bc,{}),Mc=`SelectViewport`,Nc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Tc(Mc,n),o=jc(Mc,n),s=U(t,a.onViewportChange),c=C.useRef(0);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,w.jsx)(ec.Slot,{scope:n,children:(0,w.jsx)(W.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:G(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Cc*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Pc,Fc]=rc(`SelectGroup`),Ic=`SelectItem`,[Lc,Rc]=rc(Ic),zc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=sc(Ic,n),c=Tc(Ic,n),l=s.value===r,[u,d]=C.useState(a??``),[f,p]=C.useState(!1),m=U(t,ar(e=>c.itemRefCallback?.(e,r,i))),h=Qn(),g=C.useRef(`touch`),_=K(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,w.jsx)(Lc,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:C.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,w.jsx)(ec.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,w.jsx)(W.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:G(o.onFocus,()=>p(!0)),onBlur:G(o.onBlur,()=>p(!1)),onClick:G(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:G(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:G(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:G(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:G(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Qs.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Bc=`SelectItemText`,Vc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=sc(Bc,n),s=Tc(Bc,n),c=Rc(Bc,n),l=lc(Bc,n),[u,d]=C.useState(null),f=ar(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=U(t,d,c.onItemTextChange,f),m=u?.textContent,h=C.useMemo(()=>(0,w.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Tn(()=>(g(h),()=>_(h)),[g,_,h]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(W.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Qc(o.value)?Jt.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Hc=`SelectItemIndicator`,Uc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,...r}=e;return Rc(Hc,n).isSelected?(0,w.jsx)(W.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Wc=`SelectScrollUpButton`,Gc=C.forwardRef(K(function(e,t){let n=Tc(Wc,e.__scopeSelect),r=jc(Wc,e.__scopeSelect),[i,a]=C.useState(!1),o=U(t,r.onScrollButtonChange);return Tn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};K(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,w.jsx)(Jc,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Kc=`SelectScrollDownButton`,qc=C.forwardRef(K(function(e,t){let n=Tc(Kc,e.__scopeSelect),r=jc(Kc,e.__scopeSelect),[i,a]=C.useState(!1),o=U(t,r.onScrollButtonChange);return Tn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};K(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,w.jsx)(Jc,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Jc=C.forwardRef(K(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Tc(`SelectScrollButton`,n),o=C.useRef(null),s=tc(n),c=C.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return C.useEffect(()=>()=>c(),[c]),Tn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,w.jsx)(W.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:G(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:G(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:G(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Yc=`SelectBubbleInput`,Xc=C.forwardRef(K(function({__scopeSelect:e,...t},n){let r=sc(Yc,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=C.useRef(null),m=U(n,p),h=i??``,g=Ks(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return C.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,w.jsxs)(W.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Qt,...t.style},ref:m,defaultValue:h,children:[Qc(i)&&!_?(0,w.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function Zc(e){return typeof e==`function`}K(Zc,`isFunction`);function Qc(e){return e===``||e===void 0}K(Qc,`shouldShowPlaceholder`);function $c(e){let t=ar(e),n=C.useRef(``),r=C.useRef(0),i=C.useCallback(e=>{let i=n.current+e;t(i),K((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=C.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}K($c,`useTypeaheadSearch`);function el(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=tl(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}K(el,`findNextItem`);function tl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}K(tl,`wrapArray`);var nl=Object.defineProperty,rl=(e,t)=>nl(e,`name`,{value:t,configurable:!0}),il=`Switch`,[al,ol]=nn(il),[sl,cl]=al(il);function ll(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Pn({prop:n,defaultProp:i??!1,onChange:c,caller:il}),[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useRef(!1),[y,b]=C.useReducer(e=>e+1,0),x={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:b,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,w.jsx)(sl,{scope:t,...x,children:_l(d)?d(x):r})}rl(ll,`SwitchProvider`);var ul=`SwitchTrigger`,dl=C.forwardRef(rl(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=cl(ul,e),g=U(r,u),_=C.useRef(c);return C.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=rl(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,w.jsx)(W.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":vl(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:g,onClick:G(t,e=>{p(),d(e=>!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),fl=C.forwardRef(rl(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,w.jsx)(ll,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(dl,{...d,ref:t,__scopeSwitch:n}),e&&(0,w.jsx)(gl,{__scopeSwitch:n})]})})},`Switch`)),pl=`SwitchThumb`,ml=C.forwardRef(rl(function(e,t){let{__scopeSwitch:n,...r}=e,i=cl(pl,n);return(0,w.jsx)(W.span,{"data-state":vl(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),hl=`SwitchBubbleInput`,gl=C.forwardRef(rl(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=cl(hl,e),g=U(r,h),_=da(i),v=C.useRef(!1),y=C.useRef(s),b=C.useRef(o);C.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==b.current;b.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});n.call(e,s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let x=C.useRef(s);return(0,w.jsx)(W.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??x.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:G(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function _l(e){return typeof e==`function`}rl(_l,`isFunction`);function vl(e){return e?`checked`:`unchecked`}rl(vl,`getState`);function yl({...e}){return(0,w.jsx)(`nav`,{"aria-label":`breadcrumb`,"data-slot":`breadcrumb`,...e})}function bl({className:e,...t}){return(0,w.jsx)(`ol`,{"data-slot":`breadcrumb-list`,className:Dt(`flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5`,e),...t})}function xl({className:e,...t}){return(0,w.jsx)(`li`,{"data-slot":`breadcrumb-item`,className:Dt(`inline-flex items-center gap-1.5`,e),...t})}function Sl({asChild:e,className:t,...n}){let r=e?Ft:`a`;return(0,w.jsx)(r,{"data-slot":`breadcrumb-link`,className:Dt(`transition-colors hover:text-foreground`,t),...n})}function Cl({className:e,...t}){return(0,w.jsx)(`span`,{"data-slot":`breadcrumb-page`,"aria-current":`page`,className:Dt(`font-normal text-foreground`,e),...t})}function wl({children:e,className:t,...n}){return(0,w.jsx)(`li`,{"data-slot":`breadcrumb-separator`,role:`presentation`,"aria-hidden":`true`,className:Dt(`[&>svg]:size-3.5`,t),...n,children:e??(0,w.jsx)(te,{})})}function Tl({title:e,logo:t,scenePath:n,search:r,children:i}){return(0,w.jsx)(`header`,{className:`sticky top-0 z-40 border-b border-border bg-card/95 py-3 shadow-sm backdrop-blur`,children:(0,w.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1120px] flex-col gap-2 px-4 sm:px-6 md:flex-row md:items-center`,children:[(0,w.jsx)(yl,{children:(0,w.jsxs)(bl,{className:`text-base sm:text-lg`,children:[(0,w.jsx)(xl,{children:n?(0,w.jsx)(Sl,{asChild:!0,children:(0,w.jsx)(c,{search:{...r,scene:void 0},to:`/`,children:e})}):(0,w.jsx)(Cl,{className:`font-semibold`,children:e})}),n?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(wl,{}),(0,w.jsx)(xl,{children:(0,w.jsx)(Cl,{children:n.split(`/`).join(` / `)})})]}):null]})}),(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 md:ml-auto`,children:[i,(0,w.jsx)(`a`,{"aria-label":`fidelity-kit repository`,className:`ml-1 inline-flex items-center text-muted-foreground transition-colors hover:text-foreground`,href:`https://github.com/bhouston/fidelity-kit`,rel:`noopener noreferrer`,target:`_blank`,children:(0,w.jsx)(re,{className:`size-4`})}),t?(0,w.jsx)(`img`,{alt:`${e} logo`,className:`ml-2 h-8 max-w-32 object-contain`,src:h(t)}):null]})]})})}function El(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Dl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ol=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kl={};function Al(e,t){return((t||kl).jsx?Ol:Dl).test(e)}var jl=/[ \t\n\f\r]/g;function Ml(e){return typeof e==`object`?e.type===`text`&&Nl(e.value):Nl(e)}function Nl(e){return e.replace(jl,``)===``}var Pl=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Pl.prototype.normal={},Pl.prototype.property={},Pl.prototype.space=void 0;function Fl(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Pl(n,r,t)}function Il(e){return e.toLowerCase()}var Ll=class{constructor(e,t){this.attribute=t,this.property=e}};Ll.prototype.attribute=``,Ll.prototype.booleanish=!1,Ll.prototype.boolean=!1,Ll.prototype.commaOrSpaceSeparated=!1,Ll.prototype.commaSeparated=!1,Ll.prototype.defined=!1,Ll.prototype.mustUseProperty=!1,Ll.prototype.number=!1,Ll.prototype.overloadedBoolean=!1,Ll.prototype.property=``,Ll.prototype.spaceSeparated=!1,Ll.prototype.space=void 0;var Rl=t({boolean:()=>q,booleanish:()=>J,commaOrSpaceSeparated:()=>Hl,commaSeparated:()=>Vl,number:()=>Y,overloadedBoolean:()=>Bl,spaceSeparated:()=>X}),zl=0,q=Ul(),J=Ul(),Bl=Ul(),Y=Ul(),X=Ul(),Vl=Ul(),Hl=Ul();function Ul(){return 2**++zl}var Wl=Object.keys(Rl),Gl=class extends Ll{constructor(e,t,n,r){let i=-1;if(super(e,t),Kl(this,`space`,r),typeof n==`number`)for(;++i<Wl.length;){let e=Wl[i];Kl(this,Wl[i],(n&Rl[e])===Rl[e])}}};Gl.prototype.defined=!0;function Kl(e,t,n){n&&(e[t]=n)}function ql(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Gl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Il(r)]=r,n[Il(a.attribute)]=r}return new Pl(t,n,e.space)}var Jl=ql({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:X,ariaCurrent:null,ariaDescribedBy:X,ariaDetails:null,ariaDisabled:J,ariaDropEffect:X,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:X,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:X,ariaLevel:Y,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:X,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:X,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:J,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Yl(e,t){return t in e?e[t]:t}function Xl(e,t){return Yl(e,t.toLowerCase())}var Zl=ql({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Vl,acceptCharset:X,accessKey:X,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alpha:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:X,autoFocus:q,autoPlay:q,blocking:X,capture:null,charSet:null,checked:q,cite:null,className:X,closedBy:null,colorSpace:null,cols:Y,colSpan:Y,command:null,commandFor:null,content:null,contentEditable:J,controls:q,controlsList:X,coords:Y|Vl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Bl,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:X,height:Y,hidden:Bl,high:Y,href:null,hrefLang:null,htmlFor:X,httpEquiv:X,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:X,itemRef:X,itemScope:q,itemType:X,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:Y,pattern:null,ping:X,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:X,required:q,reversed:q,rows:Y,rowSpan:Y,sandbox:X,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootCustomElementRegistry:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shadowRootSerializable:q,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:J,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:X,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:q,disablePictureInPicture:q,disableRemotePlayback:q,exportParts:Vl,part:X,prefix:null,property:null,results:Y,security:null,unselectable:null},space:`html`,transform:Xl}),Ql=ql({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Hl,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:X,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Vl,g2:Vl,glyphName:Vl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Hl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:X,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hl,rev:Hl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hl,requiredFeatures:Hl,requiredFonts:Hl,requiredFormats:Hl,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Hl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hl,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Yl}),$l=ql({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),eu=ql({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Xl}),tu=ql({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),nu={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ru=/[A-Z]/g,iu=/-[a-z]/g,au=/^data[-\w.:]+$/i;function ou(e,t){let n=Il(t),r=t,i=Ll;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&au.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(iu,cu);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!iu.test(e)){let n=e.replace(ru,su);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Gl}return new i(r,t)}function su(e){return`-`+e.toLowerCase()}function cu(e){return e.charAt(1).toUpperCase()}var lu=Fl([Jl,Zl,$l,eu,tu],`html`),uu=Fl([Jl,Ql,$l,eu,tu],`svg`);function du(e){return e.join(` `).trim()}var fu=x(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
42
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pu=x((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(fu());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),mu=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),hu=x(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pu()),r=mu();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),gu=vu(`end`),_u=vu(`start`);function vu(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function yu(e){let t=_u(e),n=gu(e);if(t&&n)return{start:t,end:n}}function bu(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Su(e.position):`start`in e||`end`in e?Su(e):`line`in e||`column`in e?xu(e):``}function xu(e){return Cu(e&&e.line)+`:`+Cu(e&&e.column)}function Su(e){return xu(e&&e.start)+`-`+xu(e&&e.end)}function Cu(e){return e&&typeof e==`number`?e:1}var wu=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=bu(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};wu.prototype.file=``,wu.prototype.name=``,wu.prototype.reason=``,wu.prototype.message=``,wu.prototype.stack=``,wu.prototype.column=void 0,wu.prototype.line=void 0,wu.prototype.ancestors=void 0,wu.prototype.cause=void 0,wu.prototype.fatal=void 0,wu.prototype.place=void 0,wu.prototype.ruleId=void 0,wu.prototype.source=void 0;var Tu=e(hu(),1),Eu={}.hasOwnProperty,Du=new Map,Ou=/[A-Z]/g,ku=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Au=new Set([`td`,`th`]),ju=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Mu(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Uu(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Hu(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?uu:lu,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nu(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nu(e,t,n){if(t.type===`element`)return Pu(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Fu(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Lu(e,t,n);if(t.type===`mdxjsEsm`)return Iu(e,t);if(t.type===`root`)return Ru(e,t,n);if(t.type===`text`)return zu(e,t)}function Pu(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=uu,e.schema=i),e.ancestors.push(t);let a=Yu(e,t.tagName,!1),o=Wu(e,t),s=Ku(e,t);return ku.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ml(e)})),Bu(e,o,a,t),Vu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Fu(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Xu(e,t.position)}function Iu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xu(e,t.position)}function Lu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=uu,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Yu(e,t.name,!0),o=Gu(e,t),s=Ku(e,t);return Bu(e,o,a,t),Vu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ru(e,t,n){let r={};return Vu(r,Ku(e,t)),e.create(t,e.Fragment,r,n)}function zu(e,t){return t.value}function Bu(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vu(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Hu(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Uu(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_u(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Wu(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Eu.call(t.properties,i)){let a=qu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Au.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Gu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Xu(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Xu(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Ku(e,t){let n=[],r=-1,i=e.passKeys?new Map:Du;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Nu(e,a,o);s!==void 0&&n.push(s)}return n}function qu(e,t,n){let r=ou(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?El(n):du(n)),r.property===`style`){let t=typeof n==`object`?n:Ju(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Zu(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?nu[r.property]||r.property:r.attribute,n]}}function Ju(e,t){try{return(0,Tu.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new wu("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=ju+`#cannot-parse-style-attribute`,r}}function Yu(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Al(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Al(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Eu.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xu(e)}function Xu(e,t){let n=new wu("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=ju+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Zu(e){let t={},n;for(n in e)Eu.call(e,n)&&(t[Qu(n)]=e[n]);return t}function Qu(e){let t=e.replace(Ou,$u);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $u(e){return`-`+e.toLowerCase()}var ed={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},td={};function nd(e,t){let n=t||td;return rd(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function rd(e,t,n){if(ad(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return id(e.children,t,n)}return Array.isArray(e)?id(e,t,n):``}function id(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rd(e[i],t,n);return r.join(``)}function ad(e){return!!(e&&typeof e==`object`)}var od=document.createElement(`i`);function sd(e){let t=`&`+e+`;`;od.innerHTML=t;let n=od.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function cd(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ld(e,t){return e.length>0?(cd(e,e.length,0,t),e):t}var ud={}.hasOwnProperty;function dd(e){let t={},n=-1;for(;++n<e.length;)fd(t,e[n]);return t}function fd(e,t){let n;for(n in t){let r=(ud.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ud.call(r,a)||(r[a]=[]);let e=i[a];pd(r[a],Array.isArray(e)?e:e?[e]:[])}}}function pd(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);cd(e,0,0,r)}function md(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function hd(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var gd=Ed(/[A-Za-z]/),_d=Ed(/[\dA-Za-z]/),vd=Ed(/[#-'*+\--9=?A-Z^-~]/);function yd(e){return e!==null&&(e<32||e===127)}var bd=Ed(/\d/),xd=Ed(/[\dA-Fa-f]/),Sd=Ed(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function Cd(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var wd=Ed(/\p{P}|\p{S}/u),Td=Ed(/\s/);function Ed(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Dd(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&_d(e.charCodeAt(n+1))&&_d(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Od(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Q(t)?(e.enter(r),c(t)):l(t)}function c(t){return Q(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var kd={tokenize:Ad};function Ad(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Z(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var jd=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Md(this,e,t,n,!1)}addBefore(e,t,n){Md(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Md(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Nd={tokenize:Fd},Pd={tokenize:Id};function Fd(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new jd;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Pd,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Pd,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Z(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new jd;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Id(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ld(e){if(e===null||Cd(e)||Td(e))return 1;if(wd(e))return 2}function Rd(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var zd={name:`attention`,resolveAll:Bd,tokenize:Vd};function Bd(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Hd(o,-a),Hd(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ld(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=ld(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=ld(r,Rd(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=ld(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=ld(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),cd(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Vd(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ld(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Ld(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Hd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ud={name:`autolink`,tokenize:Wd};function Wd(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return gd(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||_d(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||_d(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||yd(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):vd(t)?(e.consume(t),l):n(t)}function u(e){return _d(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||_d(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Gd={partial:!0,tokenize:Kd};function Kd(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var qd={continuation:{tokenize:Yd},exit:Xd,name:`blockQuote`,tokenize:Jd};function Jd(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Yd(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(qd,t,n)(r)}}function Xd(e){e.exit(`blockQuote`)}var Zd={name:`characterEscape`,tokenize:Qd};function Qd(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Sd(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var $d={name:`characterReference`,tokenize:ef};function ef(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=_d,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=xd,u):(e.enter(`characterReferenceValue`),a=7,o=bd,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===_d&&!sd(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var tf={partial:!0,tokenize:nf};function nf(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var rf={concrete:!0,name:`codeFenced`,tokenize:af};function af(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(tf,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Z(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(tf,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var of={name:`codeIndented`,tokenize:cf},sf={partial:!0,tokenize:lf};function cf(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Od(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Z(t)?e.attempt(sf,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function lf(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Z(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Od(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Z(e)?i(e):n(e)}}var uf={name:`codeText`,previous:ff,resolve:df,tokenize:pf};function df(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ff(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function pf(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Z(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var mf=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&hf(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),hf(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hf(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);hf(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);hf(this.left,t.reverse())}}}};function hf(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gf(e){let t={},n=-1,r,i,a,o,s,c,l,u=new mf(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,_f(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return cd(e,0,1/0,u.slice(0)),!l}function _f(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var vf={resolve:bf,tokenize:xf},yf={partial:!0,tokenize:Sf};function bf(e){return gf(e),e}function xf(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Z(t)?e.check(yf,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Sf(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||Z(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Cf(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||yd(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Z(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Cd(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||yd(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function wf(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Z(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Z(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Tf(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Z(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Ef(e,t){let n;return r;function r(i){return Z(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Df={name:`definition`,tokenize:kf},Of={partial:!0,tokenize:Af};function kf(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return wf.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=hd(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Cd(t)?Ef(e,l)(t):l(t)}function l(t){return Cf(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Of,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Z(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Af(e,t,n){return r;function r(t){return Cd(t)?Ef(e,i)(t):n(t)}function i(t){return Tf(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var jf={name:`hardBreakEscape`,tokenize:Mf};function Mf(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Z(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Nf={name:`headingAtx`,resolve:Pf,tokenize:Ff};function Pf(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};cd(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Ff(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Cd(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Z(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Cd(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var If=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Lf=[`pre`,`script`,`style`,`textarea`],Rf={concrete:!0,name:`htmlFlow`,resolveTo:Bf,tokenize:Vf},zf={partial:!0,tokenize:Hf};function Bf(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Vf(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):gd(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):gd(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return gd(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Cd(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Lf.includes(l)?(i=1,r.interrupt?t(s):O(s)):If.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||_d(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||gd(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||_d(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Z(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Cd(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Z(t)?O(t):Q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(zf,ne,k)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(tf,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Z(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Lf.includes(n)?(e.consume(t),te):O(t)}return gd(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),F):O(t)}function te(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),te)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function Hf(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Gd,t,n)}}var Uf={name:`htmlText`,tokenize:Wf};function Wf(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):gd(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):gd(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Z(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Z(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Z(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return gd(t)?(e.consume(t),S):n(t)}function S(t){return t===45||_d(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,N(t)):Q(t)?(e.consume(t),C):M(t)}function w(t){return t===45||_d(t)?(e.consume(t),w):t===47||t===62||Cd(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||gd(t)?(e.consume(t),E):Z(t)?(o=T,N(t)):Q(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||_d(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Z(t)?(o=D,N(t)):Q(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Z(t)?(o=O,N(t)):Q(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Z(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Cd(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Cd(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Q(t)?$(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var Gf={name:`labelEnd`,resolveAll:Yf,resolveTo:Xf,tokenize:Zf},Kf={tokenize:Qf},qf={tokenize:$f},Jf={tokenize:ep};function Yf(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&cd(e,0,e.length,n),e}function Xf(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=ld(o,e.slice(i+1,i+r+3)),o=ld(o,[[`enter`,l,t]]),o=ld(o,Rd(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=ld(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=ld(o,e.slice(a+1)),o=ld(o,[[`exit`,s,t]]),cd(e,i,e.length,o),e}function Zf(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(hd(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Kf,u,o?u:d)(t):t===91?e.attempt(qf,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Jf,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Qf(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Cd(t)?Ef(e,a)(t):a(t)}function a(t){return t===41?u(t):Cf(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Cd(t)?Ef(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Tf(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Cd(t)?Ef(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $f(e,t,n){let r=this;return i;function i(t){return wf.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(hd(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ep(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var tp={name:`labelStartImage`,resolveAll:Gf.resolveAll,tokenize:np};function np(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var rp={name:`labelStartLink`,resolveAll:Gf.resolveAll,tokenize:ip};function ip(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var ap={name:`lineEnding`,tokenize:op};function op(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var sp={name:`thematicBreak`,tokenize:cp};function cp(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Z(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var lp={continuation:{tokenize:pp},exit:hp,name:`list`,tokenize:fp},up={partial:!0,tokenize:gp},dp={partial:!0,tokenize:mp};function fp(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:bd(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(sp,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return bd(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Gd,r.interrupt?n:u,e.attempt(up,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function pp(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Gd,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dp,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(lp,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function mp(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function hp(e){e.exit(this.containerState.type)}function gp(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var _p={name:`setextUnderline`,resolveTo:vp,tokenize:yp};function vp(e,t){let n=new jd,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function yp(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var bp={tokenize:xp};function xp(e){let t=this,n=e.attempt(Gd,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(vf,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Sp={resolveAll:Ep()},Cp=Tp(`string`),wp=Tp(`text`);function Tp(e){return{resolveAll:Ep(e===`text`?Dp:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ep(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Dp(e,t){let n=new jd,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Op=t({attentionMarkers:()=>Ip,contentInitial:()=>Ap,disable:()=>Lp,document:()=>kp,flow:()=>Mp,flowInitial:()=>jp,insideSpan:()=>Fp,string:()=>Np,text:()=>Pp}),kp={42:lp,43:lp,45:lp,48:lp,49:lp,50:lp,51:lp,52:lp,53:lp,54:lp,55:lp,56:lp,57:lp,62:qd},Ap={91:Df},jp={[-2]:of,[-1]:of,32:of},Mp={35:Nf,42:sp,45:[_p,sp],60:Rf,61:_p,95:sp,96:rf,126:rf},Np={38:$d,92:Zd},Pp={[-5]:ap,[-4]:ap,[-3]:ap,33:tp,38:$d,42:zd,60:[Ud,Uf],91:rp,92:[jf,Zd],93:Gf,95:zd,96:uf},Fp={null:[zd,Sp]},Ip={null:[42,95]},Lp={null:[]};function Rp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ld(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Rd(a,l.events,l),l.events):[]}function f(e,t){return Bp(p(e),t)}function p(e){return zp(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Z(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&cd(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function zp(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Bp(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
43
+ `;break;case-3:o=`\r
44
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Vp(e){let t={constructs:dd([Op,...(e||{}).extensions||[]]),content:n(kd),defined:[],document:n(Nd),flow:n(bp),lazy:{},string:n(Cp),text:n(wp)};return t;function n(e){return n;function n(n){return Rp(t,e,n)}}}function Hp(e){for(;!gf(e););return e}var Up=/[\0\t\n\r]/g;function Wp(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Up.lastIndex=c;let n=Up.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Gp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kp(e){return e.replace(Gp,qp)}function qp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return md(n.slice(t?2:1),t?16:10)}return sd(n)||e}var Jp={}.hasOwnProperty;function Yp(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Xp(n)(Hp(Vp(n).document().write(Wp()(e,t,!0))))}function Xp(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(se),characterEscape:T,characterReference:T,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(le,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(ye),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:R,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:I,characterReferenceMarkerNumeric:I,characterReferenceValue:L,characterReference:ae,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:ee,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:F,resourceTitleString:te,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Qp(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Jp.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||em).call(a,void 0,e[0])}for(r.position={start:Zp(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Zp(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Zp(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||em).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+bu({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Zp(e.end)}function u(){return nd(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hd(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:Zp(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Zp(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Zp(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Kp(t),n.identifier=hd(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hd(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function I(e){this.data.characterReferenceType=e.type}function L(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=md(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=sd(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=Zp(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function R(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function Zp(e){return{line:e.line,column:e.column,offset:e.offset}}function Qp(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Qp(e,r):$p(e,r)}}function $p(e,t){let n;for(n in t)if(Jp.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function em(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+bu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bu({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+bu({start:t.start,end:t.end})+`) is still open`)}function tm(e){let t=this;t.parser=n;function n(n){return Yp(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function nm(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rm(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
45
+ `}]}function im(e,t){let n=t.value?t.value+`
46
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function am(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function om(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sm(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Dd(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function cm(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lm(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function um(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function dm(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return um(e,t);let i={src:Dd(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fm(e,t){let n={src:Dd(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function pm(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mm(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return um(e,t);let i={href:Dd(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hm(e,t){let n={href:Dd(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gm(e,t,n){let r=e.all(t),i=n?_m(n):vm(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
47
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
48
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function _m(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=vm(n[r])}return t}function vm(e){return e.spread??e.children.length>1}function ym(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function bm(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xm(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Sm(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cm(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=_u(t.children[1]),o=gu(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function wm(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Tm(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Em=9,Dm=32;function Om(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(km(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(km(t.slice(i),i>0,!1)),a.join(``)}function km(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Em||t===Dm;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Em||t===Dm;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Am(e,t){let n={type:`text`,value:Om(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jm(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Mm={blockquote:nm,break:rm,code:im,delete:am,emphasis:om,footnoteReference:sm,heading:cm,html:lm,imageReference:dm,image:fm,inlineCode:pm,linkReference:mm,link:hm,listItem:gm,list:ym,paragraph:bm,root:xm,strong:Sm,table:Cm,tableCell:Tm,tableRow:wm,text:Am,thematicBreak:jm,toml:Nm,yaml:Nm,definition:Nm,footnoteDefinition:Nm};function Nm(){}var{defineProperty:Pm}=Object,Fm=typeof self==`object`?self:globalThis,Im=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Fm[e](t)},Lm=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Pm(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Fm[e]==`function`?Im(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Im(a,o),i)};return r},Rm=e=>Lm(new Map,e)(0),zm=``,{toString:Bm}={},{keys:Vm,is:Hm}=Object,Um=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Bm.call(e).slice(8,-1);switch(n){case`Array`:return[1,zm];case`Object`:return[2,zm];case`Date`:return[3,zm];case`RegExp`:return[4,zm];case`Map`:return[5,zm];case`Set`:return[6,zm];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Wm=([e,t])=>e===0&&(t===`function`||t===`symbol`),Gm=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Um(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Hm(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Vm(o))(e||!Wm(Um(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?zm:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Wm(Um(n))||Wm(Um(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Wm(Um(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Km=(e,{json:t,lossy:n}={})=>{let r=[];return Gm(!(t||n),!!t,new Map,r)(e),r},qm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Rm(Km(e,t)):structuredClone(e):(e,t)=>Rm(Km(e,t));function Jm(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ym(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Xm(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Jm,r=e.options.footnoteBackLabel||Ym,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Dd(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...qm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
49
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
50
+ `}]}}var Zm=(function(e){if(e==null)return nh;if(typeof e==`function`)return th(e);if(typeof e==`object`)return Array.isArray(e)?Qm(e):$m(e);if(typeof e==`string`)return eh(e);throw Error(`Expected function, string, or object as test`)});function Qm(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Zm(e[n]);return th(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function $m(e){let t=e;return th(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function eh(e){return th(t);function t(t){return t&&t.type===e}}function th(e){return t;function t(t,n,r){return!!(rh(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function nh(){return!0}function rh(e){return typeof e==`object`&&!!e&&`type`in e}function ih(e){return e}var ah=[];function oh(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Zm(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+ih(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ah,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=sh(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function sh(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ah:[e]}function ch(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),oh(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var lh={}.hasOwnProperty,uh={};function dh(e,t){let n=t||uh,r=new Map,i=new Map,a={all:s,applyData:ph,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Mm,...n.handlers},one:o,options:n,patch:fh,wrap:hh};return ch(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(lh.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=qm(n);return r.children=a.all(e),r}return qm(e)}return(a.options.unknownHandler||mh)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=gh(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=gh(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function fh(e,t){e.position&&(t.position=yu(e))}function ph(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,qm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function mh(e,t){let n=t.data||{},r=`value`in t&&!(lh.call(n,`hProperties`)||lh.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function hh(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
51
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
52
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
53
+ `}),n}function gh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _h(e,t){let n=dh(e,t),r=n.one(e,void 0),i=Xm(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
54
+ `},i)),a}function vh(e,t){return e&&`run`in e?async function(n,r){let i=_h(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _h(n,{file:r,...e||t})}}function yh(e){if(e)throw e}var bh=x(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function xh(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Sh(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ch(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ch(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var wh={basename:Th,dirname:Eh,extname:Dh,join:Oh,sep:`/`};function Th(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);jh(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Eh(e){if(jh(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Dh(e){jh(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Oh(...e){let t=-1,n;for(;++t<e.length;)jh(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:kh(n)}function kh(e){jh(e);let t=e.codePointAt(0)===47,n=Ah(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ah(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function jh(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Mh={cwd:Nh};function Nh(){return`/`}function Ph(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Fh(e){if(typeof e==`string`)e=new URL(e);else if(!Ph(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Ih(e)}function Ih(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Lh=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Rh=class{constructor(e){let t;t=e?Ph(e)?{path:e}:typeof e==`string`||Hh(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Mh.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Lh.length;){let e=Lh[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Lh.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?wh.basename(this.path):void 0}set basename(e){Bh(e,`basename`),zh(e,`basename`),this.path=wh.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?wh.dirname(this.path):void 0}set dirname(e){Vh(this.basename,`dirname`),this.path=wh.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?wh.extname(this.path):void 0}set extname(e){if(zh(e,`extname`),Vh(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=wh.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Ph(e)&&(e=Fh(e)),Bh(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?wh.basename(this.path,this.extname):void 0}set stem(e){Bh(e,`stem`),zh(e,`stem`),this.path=wh.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new wu(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function zh(e,t){if(e&&e.includes(wh.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+wh.sep+"`")}function Bh(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Vh(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Hh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Uh=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Wh=e(bh(),1),Gh={}.hasOwnProperty,Kh=new class e extends Uh{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Sh()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Wh.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Yh(`data`,this.frozen),this.namespace[e]=t,this):Gh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Yh(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Qh(e),n=this.parser||this.Parser;return qh(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),qh(`process`,this.parser||this.Parser),Jh(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Qh(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);eg(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),qh(`processSync`,this.parser||this.Parser),Jh(`processSync`,this.compiler||this.Compiler),this.process(e,r),Zh(`processSync`,`process`,t),n;function r(e,r){t=!0,yh(e),n=r}}run(e,t,n){Xh(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Qh(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Zh(`runSync`,`run`,n),r;function i(e,t){yh(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Qh(t),r=this.compiler||this.Compiler;return Jh(`stringify`,r),Xh(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Yh(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Wh.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];xh(o)&&xh(r)&&(r=(0,Wh.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function qh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Jh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Yh(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xh(e){if(!xh(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Zh(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qh(e){return $h(e)?e:new Rh(e)}function $h(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function eg(e){return typeof e==`string`||tg(e)}function tg(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ng=[],rg={allowDangerousHtml:!0},ig=/^(https?|ircs?|mailto|xmpp)$/i,ag=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function og(e){let t=sg(e),n=cg(e);return lg(t.runSync(t.parse(n),n),e)}function sg(e){let t=e.rehypePlugins||ng,n=e.remarkPlugins||ng,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rg}:rg;return Kh().use(tm).use(n).use(vh,r).use(t)}function cg(e){let t=e.children||``,n=new Rh;return typeof t==`string`?n.value=t:``+t,n}function lg(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||ug;for(let e of ag)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return ch(e,l),Mu(e,{Fragment:w.Fragment,components:i,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in ed)if(Object.hasOwn(ed,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=ed[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function ug(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ig.test(e.slice(0,t))?e:``}function dg({children:e}){return(0,w.jsx)(`div`,{className:`prose prose-sm max-w-none dark:prose-invert sm:prose-base`,children:(0,w.jsx)(og,{children:e})})}function fg({src:e,alt:t,size:n,notApplicable:r=!1,className:i=``}){let a={aspectRatio:n?`${n.width} / ${n.height}`:`1 / 1`};return e&&!r?(0,w.jsx)(`img`,{alt:t,className:`w-full border border-border object-contain ${i}`,decoding:`async`,fetchPriority:`low`,height:n?.height,loading:`lazy`,src:e,style:a,width:n?.width}):(0,w.jsx)(`div`,{className:`flex w-full items-center justify-center border border-dashed border-border text-xs font-semibold uppercase tracking-wide ${r?`text-muted-foreground`:`text-destructive`} ${i}`,style:a,children:r?(0,w.jsxs)(`span`,{className:`text-center`,children:[`not`,(0,w.jsx)(`br`,{}),`applicable`]}):`missing`})}var pg=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,mg=I,hg=((e,t)=>n=>{if(t?.variants==null)return mg(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=pg(t)||pg(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return mg(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`inline-flex shrink-0 items-center justify-center gap-2 rounded-none text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-none px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-none px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-none px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-none [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function gg({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Ft:`button`;return(0,w.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Dt(hg({variant:t,size:n,className:e})),...i})}function _g({className:e,type:t,...n}){return(0,w.jsx)(`input`,{type:t,"data-slot":`input`,className:Dt(`h-9 w-full min-w-0 rounded-none border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}function vg({...e}){return(0,w.jsx)(dc,{"data-slot":`select`,...e})}function yg({...e}){return(0,w.jsx)(hc,{"data-slot":`select-value`,...e})}function bg({className:e,size:t=`default`,children:n,...r}){return(0,w.jsxs)(pc,{"data-slot":`select-trigger`,"data-size":t,className:Dt(`flex w-fit items-center justify-between gap-2 rounded-none border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,w.jsx)(gc,{asChild:!0,children:(0,w.jsx)(F,{className:`size-4 opacity-50`})})]})}function xg({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,w.jsx)(yc,{children:(0,w.jsxs)(xc,{"data-slot":`select-content`,className:Dt(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-none border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,w.jsx)(Cg,{}),(0,w.jsx)(Nc,{className:Dt(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,w.jsx)(wg,{})]})})}function Sg({className:e,children:t,...n}){return(0,w.jsxs)(zc,{"data-slot":`select-item`,className:Dt(`relative flex w-full cursor-default items-center gap-2 rounded-none py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,w.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,w.jsx)(Uc,{children:(0,w.jsx)(ee,{className:`size-4`})})}),(0,w.jsx)(Vc,{children:t})]})}function Cg({className:e,...t}){return(0,w.jsx)(Gc,{"data-slot":`select-scroll-up-button`,className:Dt(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,w.jsx)(ne,{className:`size-4`})})}function wg({className:e,...t}){return(0,w.jsx)(qc,{"data-slot":`select-scroll-down-button`,className:Dt(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,w.jsx)(F,{className:`size-4`})})}function Tg({className:e,...t}){return(0,w.jsx)(fl,{className:Dt(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent bg-input outline-none transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50 data-[state=checked]:bg-primary`,e),...t,children:(0,w.jsx)(ml,{className:`pointer-events-none block size-4 rounded-full bg-background transition-transform data-[state=checked]:translate-x-[1.05rem] data-[state=unchecked]:translate-x-0.5`})})}function Eg({index:e,view:t,onChange:n}){let{outputs:r}=e.config,i=e.config.renderers.filter(e=>e.id!==t.ref),a=new Set(t.compared),o=i.filter(e=>e.enabled!==!1).map(e=>e.id),s=e=>{let t=i.filter(t=>e.has(t.id)).map(e=>e.id);n({renderers:t.join(`,`)===o.join(`,`)?void 0:t.join(`,`)||`-`})},c=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),s(t)};return(0,w.jsxs)(w.Fragment,{children:[i.length>0?(0,w.jsxs)(`details`,{className:`relative shrink-0 text-sm`,children:[(0,w.jsxs)(`summary`,{className:`cursor-pointer rounded-md border border-input px-3 py-2`,children:[`Renderers (`,a.size,`/`,i.length,`)`]}),(0,w.jsxs)(`div`,{className:`absolute right-0 z-50 mt-1 min-w-48 space-y-1 rounded-md border border-border bg-card p-2 shadow-lg`,children:[(0,w.jsx)(`button`,{className:`block w-full px-2 py-1 text-left hover:bg-muted`,onClick:()=>s(new Set(i.map(e=>e.id))),type:`button`,children:`All renderers`}),i.map(e=>(0,w.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1 hover:bg-muted`,children:[(0,w.jsx)(`input`,{checked:a.has(e.id),onChange:()=>c(e.id),type:`checkbox`}),e.label??e.id]},e.id))]})]}):null,r.length>1?(0,w.jsx)(Og,{label:`Output`,value:t.output,options:r.map(e=>({value:e.id,label:e.label??e.id})),onChange:e=>n({output:e})}):null,t.references.length>1?(0,w.jsx)(Og,{label:`Reference`,value:t.ref,options:t.references.map(e=>({value:e,label:t.label(e)})),onChange:e=>n({ref:e})}):null,(0,w.jsxs)(`label`,{htmlFor:`show-deltas`,className:`flex shrink-0 items-center gap-2 text-sm text-muted-foreground`,children:[(0,w.jsx)(Tg,{"aria-label":`Show delta images`,checked:t.showDeltas,onCheckedChange:e=>n({deltas:e})}),`Deltas`]})]})}function Dg({value:e,onChange:t}){return(0,w.jsxs)(vg,{onValueChange:e=>t(s({sort:e}).sort),value:e,children:[(0,w.jsxs)(bg,{"aria-label":`Sort scenes`,className:`shrink-0`,title:`Sort`,children:[(0,w.jsx)(P,{}),(0,w.jsx)(yg,{children:p.find(t=>t.value===e)?.label})]}),(0,w.jsx)(xg,{children:p.map(e=>(0,w.jsx)(Sg,{value:e.value,children:e.label},e.value))})]})}function Og({label:e,value:t,options:n,onChange:r}){return(0,w.jsxs)(vg,{onValueChange:r,value:t,children:[(0,w.jsx)(bg,{"aria-label":e,className:`shrink-0`,title:e,children:(0,w.jsx)(yg,{children:n.find(e=>e.value===t)?.label})}),(0,w.jsx)(xg,{children:n.map(e=>(0,w.jsx)(Sg,{value:e.value,children:e.label},e.value))})]})}var kg=l(`__root__`),Ag=l(`/`);function jg({path:e,readme:t}){let{index:r,hashes:i,scenes:o}=kg.useLoaderData(),s=Ag.useSearch(),l=o.find(t=>t.path===e),f=n({from:`/`});if(!l)throw S();let p=d(r,s,i),h=p.compared,g=y(r,l,p);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Tl,{logo:r.config.logo,scenePath:l.path,search:s,title:r.config.title,children:(0,w.jsx)(Eg,{index:r,onChange:e=>void f({replace:!0,search:t=>({...t,...e})}),view:p})}),(0,w.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1120px] flex-col gap-6 px-4 py-6 sm:px-6`,children:[(0,w.jsx)(`h1`,{className:`text-xl font-semibold`,children:l.title}),t?(0,w.jsx)(dg,{children:t}):null,(0,w.jsx)(`section`,{className:`grid gap-4 md:grid-cols-4`,children:[p.ref,...h].map(e=>(0,w.jsxs)(`figure`,{children:[e===p.ref?(0,w.jsx)(fg,{alt:e,size:g,src:a(l,p,e)}):(0,w.jsx)(c,{hash:`vs-${e}`,search:{...s,scene:l.path},to:`/`,children:(0,w.jsx)(fg,{alt:e,size:g,src:a(l,p,e)})}),(0,w.jsxs)(`figcaption`,{className:`mt-1 text-center text-sm text-muted-foreground`,children:[p.label(e),e===p.ref?` (reference)`:``]})]},e))}),h.map(e=>(0,w.jsx)(Mg,{delta:p.showDeltas?u(r,l,p,e):void 0,image:a(l,p,e),id:`vs-${e}`,label:p.label(e),metrics:m(r,l,p,e),reference:a(l,p,p.ref),refLabel:p.label(p.ref),scenePath:l.path,search:s,showDelta:p.showDeltas,size:g},e))]})]})}function Mg({id:e,scenePath:t,search:n,label:i,refLabel:a,reference:o,image:s,delta:l,showDelta:u,metrics:d,size:f}){let[p,m]=(0,C.useState)(50);return(0,w.jsxs)(`section`,{children:[(0,w.jsxs)(T,{anchor:(0,w.jsx)(c,{"aria-label":`Link to ${a} vs ${i}`,hash:e,search:{...n,scene:t},to:`/`,children:`#`}),as:`h2`,className:`mb-2 font-semibold`,id:e,children:[a,` vs `,i]}),(0,w.jsxs)(`div`,{className:`grid gap-4 ${u?`md:grid-cols-2`:``}`,children:[(0,w.jsxs)(`figure`,{children:[o&&s?(0,w.jsxs)(`div`,{className:`relative select-none`,children:[(0,w.jsx)(`img`,{alt:i,className:`block w-full border border-border`,decoding:`async`,loading:`lazy`,src:s}),(0,w.jsx)(`img`,{alt:a,className:`absolute inset-0 block w-full border border-border`,decoding:`async`,height:f?.height,loading:`lazy`,src:o,width:f?.width,style:{clipPath:`inset(0 ${100-p}% 0 0)`}}),(0,w.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 w-[3px] -translate-x-1/2 bg-blue-500`,style:{left:`${p}%`}}),(0,w.jsx)(`input`,{"aria-label":`Compare split for ${i}`,className:`absolute inset-0 h-full w-full cursor-ew-resize opacity-0`,max:100,min:0,onChange:e=>m(Number(e.currentTarget.value)),type:`range`,value:p})]}):(0,w.jsx)(fg,{alt:`${i} comparison`,size:f}),(0,w.jsxs)(`figcaption`,{className:`mt-1 text-center text-sm text-muted-foreground`,children:[a,` (left) / `,i,` (right) — drag to swipe`]})]}),u?(0,w.jsxs)(`figure`,{children:[(0,w.jsx)(fg,{alt:`${i} delta`,notApplicable:!o,size:f,src:l}),(0,w.jsxs)(`figcaption`,{className:`mt-1 text-center text-sm text-muted-foreground`,children:[i,` delta`]})]}):null]}),(0,w.jsx)(`div`,{className:`mt-3`,children:d?(0,w.jsxs)(`dl`,{className:`grid max-w-md grid-cols-2 gap-x-4 gap-y-1 p-2 font-mono text-sm ${_(d)}`,children:[(0,w.jsx)(`dt`,{children:`PSNR (dB)`}),(0,w.jsx)(`dd`,{children:r(d.psnr)})]}):(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:"No metrics yet. Run `fidelity-kit process`."})})]})}var Ng=l(`__root__`);function Pg(){let e=v.useLoaderData(),{scene:t}=v.useSearch();return t?(0,w.jsx)(jg,{path:t,readme:e}):(0,w.jsx)(Fg,{preamble:e})}function Fg({preamble:e}){let{index:t,hashes:r,scenes:i}=Ng.useLoaderData(),a=v.useSearch(),s=n({from:v.fullPath}),c=e=>void s({replace:!0,search:t=>({...t,...e})}),l=d(t,a,r),u=o(t,i,a,l),[f,p]=(0,C.useState)(a.q??``),m=g(i),h=a.tags?.split(`,`)??[];(0,C.useEffect)(()=>{let e=window.setTimeout(()=>{let e=f.trim()?f:void 0;e!==a.q&&c({q:e})},300);return()=>window.clearTimeout(e)});let _=e=>{let t=h.includes(e)?h.filter(t=>t!==e):[...h,e];c({tags:t.length?t.join(`,`):void 0})};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(Tl,{logo:t.config.logo,search:a,title:t.config.title,children:[(0,w.jsx)(_g,{"aria-label":`Filter scenes`,className:`md:w-64`,onChange:e=>p(e.currentTarget.value),placeholder:`Scene Filter`,type:`text`,value:f}),(0,w.jsx)(Dg,{onChange:e=>c({sort:e}),value:a.sort??`name`}),(0,w.jsx)(Eg,{index:t,onChange:c,view:l}),(0,w.jsxs)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:[u.length,`/`,i.length]})]}),(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-6 px-4 py-6 sm:px-6`,children:[e?(0,w.jsx)(dg,{children:e}):null,m.length?(0,w.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:m.map(e=>(0,w.jsx)(gg,{onClick:()=>_(e),size:`sm`,variant:h.includes(e)?`default`:`outline`,children:e},e))}):null,(0,w.jsx)(`section`,{children:u.length?u.map((e,n)=>(0,w.jsxs)(`div`,{children:[Ig(e)===Ig(u[n-1])?null:(0,w.jsx)(`h2`,{className:`mt-6 border-b border-border pb-1 text-sm font-semibold uppercase tracking-wide text-muted-foreground`,children:Ig(e)||`Scenes`}),(0,w.jsx)(Lg,{index:t,scene:e,search:a,view:l})]},e.path)):(0,w.jsx)(`div`,{className:`border border-border bg-muted/20 px-4 py-8 text-center text-sm text-muted-foreground`,children:i.length===0?"No scenes found. Run `fidelity-kit process <root>`.":`No scenes match.`})})]})]})}var Ig=e=>e?e.path.split(`/`).slice(0,-1).join(` / `):void 0;function Lg({index:e,scene:t,search:n,view:i}){let o=i.compared,s=y(e,t,i);return(0,w.jsxs)(`article`,{className:`border-b border-border py-4 last:border-b-0`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 420px`},children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,w.jsx)(T,{anchor:(0,w.jsx)(c,{"aria-label":`Link to ${t.title}`,hash:t.path,search:n,to:`/`,children:`#`}),as:`h3`,className:`text-base font-semibold`,id:t.path,children:(0,w.jsx)(c,{search:{...n,scene:t.path},to:`/`,children:t.title})}),t.tags.map(e=>(0,w.jsx)(`span`,{className:`rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground`,children:e},e))]}),(0,w.jsxs)(`div`,{className:`mt-3 grid items-center gap-x-2 gap-y-1 text-xs text-muted-foreground`,style:{gridTemplateColumns:`auto repeat(${o.length+1}, minmax(0, 1fr))`},children:[(0,w.jsx)(`span`,{}),(0,w.jsxs)(`span`,{className:`truncate text-center`,children:[i.label(i.ref),` (reference)`]}),o.map(e=>(0,w.jsx)(`span`,{className:`truncate text-center`,children:i.label(e)},e)),(0,w.jsx)(`span`,{className:`text-right`,children:`Render`}),(0,w.jsx)(Rg,{scene:t,search:n,children:(0,w.jsx)(fg,{alt:`${t.title}: ${i.ref}`,size:s,src:a(t,i,i.ref)})}),o.map(e=>(0,w.jsx)(Rg,{scene:t,search:n,hash:`vs-${e}`,children:(0,w.jsx)(fg,{alt:`${t.title}: ${e}`,size:s,src:a(t,i,e)})},e)),i.showDeltas?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`text-right`,children:`Delta`}),(0,w.jsx)(`span`,{}),o.map(r=>(0,w.jsx)(Rg,{scene:t,search:n,hash:`vs-${r}`,children:(0,w.jsx)(fg,{alt:`${t.title}: ${r} delta`,notApplicable:!a(t,i,i.ref),size:s,src:u(e,t,i,r)})},r))]}):null,(0,w.jsx)(`span`,{className:`text-right`,children:`Metrics`}),(0,w.jsx)(`span`,{}),o.map(n=>{let a=m(e,t,i,n);return(0,w.jsxs)(`dl`,{className:`grid grid-cols-2 gap-x-2 self-stretch p-2 font-mono text-xs ${_(a)}`,children:[(0,w.jsx)(`dt`,{children:`PSNR`}),(0,w.jsx)(`dd`,{className:`text-right`,children:a?r(a.psnr):`–`})]},n)})]})]})}function Rg({scene:e,search:t,hash:n,children:r}){return(0,w.jsx)(c,{hash:n,search:{...t,scene:e.path},to:`/`,children:r})}export{Pg as component};