burne-ui 0.0.1
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.
- package/README.md +117 -0
- package/dist/components/composite/Accordion/Accordion.d.ts +20 -0
- package/dist/components/composite/Accordion/index.d.ts +1 -0
- package/dist/components/composite/AlertDialog/AlertDialog.d.ts +83 -0
- package/dist/components/composite/AlertDialog/index.d.ts +1 -0
- package/dist/components/composite/ButtonGroup/ButtonGroup.d.ts +42 -0
- package/dist/components/composite/ButtonGroup/index.d.ts +2 -0
- package/dist/components/composite/CheckboxGroup/CheckboxGroup.d.ts +49 -0
- package/dist/components/composite/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/composite/Form/Form.d.ts +4 -0
- package/dist/components/composite/Form/index.d.ts +1 -0
- package/dist/components/core/Alert/Alert.d.ts +34 -0
- package/dist/components/core/Alert/index.d.ts +1 -0
- package/dist/components/core/Avatar/Avatar.d.ts +40 -0
- package/dist/components/core/Avatar/index.d.ts +1 -0
- package/dist/components/core/Badge/Badge.d.ts +77 -0
- package/dist/components/core/Badge/index.d.ts +1 -0
- package/dist/components/core/Breadcrumbs/Breadcrumbs.d.ts +19 -0
- package/dist/components/core/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/core/Button/Button.d.ts +86 -0
- package/dist/components/core/Button/index.d.ts +1 -0
- package/dist/components/core/Card/Card.d.ts +49 -0
- package/dist/components/core/Card/index.d.ts +1 -0
- package/dist/components/core/Checkbox/Checkbox.d.ts +32 -0
- package/dist/components/core/Checkbox/index.d.ts +1 -0
- package/dist/components/core/CloseButton/CloseButton.d.ts +10 -0
- package/dist/components/core/CloseButton/index.d.ts +1 -0
- package/dist/components/core/Dialog/Dialog.d.ts +39 -0
- package/dist/components/core/Dialog/index.d.ts +1 -0
- package/dist/components/core/Dropdown/Dropdown.d.ts +147 -0
- package/dist/components/core/Dropdown/index.d.ts +1 -0
- package/dist/components/core/Expandable/Expandable.d.ts +44 -0
- package/dist/components/core/Expandable/index.d.ts +1 -0
- package/dist/components/core/GlassSurface/GlassBackdrop.d.ts +7 -0
- package/dist/components/core/GlassSurface/GlassShaderLayer.d.ts +14 -0
- package/dist/components/core/GlassSurface/GlassSurface.d.ts +16 -0
- package/dist/components/core/GlassSurface/glassLensOgl.d.ts +11 -0
- package/dist/components/core/GlassSurface/index.d.ts +3 -0
- package/dist/components/core/Input/Input.d.ts +71 -0
- package/dist/components/core/Input/index.d.ts +1 -0
- package/dist/components/core/Ripple/Ripple.d.ts +40 -0
- package/dist/components/core/Ripple/index.d.ts +1 -0
- package/dist/components/core/SearchInput/SearchInput.d.ts +54 -0
- package/dist/components/core/SearchInput/index.d.ts +1 -0
- package/dist/components/core/Selector/Selector.d.ts +48 -0
- package/dist/components/core/Selector/index.d.ts +1 -0
- package/dist/components/core/Separator/Separator.d.ts +13 -0
- package/dist/components/core/Separator/index.d.ts +1 -0
- package/dist/components/core/Text/Text.d.ts +19 -0
- package/dist/components/core/Text/index.d.ts +1 -0
- package/dist/components/core/Tooltip/Tooltip.d.ts +38 -0
- package/dist/components/core/Tooltip/index.d.ts +1 -0
- package/dist/components/core/utils/buttonGroupSegment.d.ts +10 -0
- package/dist/components/core/utils/hoverInteractiveLift.d.ts +60 -0
- package/dist/components/core/utils/motionTokens.d.ts +24 -0
- package/dist/components/core/utils/pressRipple.d.ts +19 -0
- package/dist/components/core/utils/semanticStatusIcons.d.ts +5 -0
- package/dist/components/core/utils/useConvergeRipples.d.ts +13 -0
- package/dist/index.cjs +169 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +11863 -0
- package/dist/tokens/config.d.ts +70 -0
- package/dist/tokens/index.d.ts +12 -0
- package/dist/ui.css +3724 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/mockImages.d.ts +5 -0
- package/package.json +58 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),u=require("react"),Oe=require("react-icons/io5"),jt=require("react-dom");function js(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=js(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function oo(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=js(t))&&(r&&(r+=" "),r+=e);return r}const ao=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},lo=(t,e)=>({classGroupId:t,validator:e}),Ds=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),fn="-",Er=[],co="arbitrary..",uo=t=>{const e=ho(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return fo(o);const a=o.split(fn),l=a[0]===""&&a.length>1?1:0;return zs(a,l,e)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=r[o],c=n[o];return l?c?ao(c,l):l:c||Er}return n[o]||Er}}},zs=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const s=t[e],i=n.nextPart.get(s);if(i){const c=zs(t,e+1,i);if(c)return c}const o=n.validators;if(o===null)return;const a=e===0?t.join(fn):t.slice(e).join(fn),l=o.length;for(let c=0;c<l;c++){const d=o[c];if(d.validator(a))return d.classGroupId}},fo=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?co+r:void 0})(),ho=t=>{const{theme:e,classGroups:n}=t;return mo(n,e)},mo=(t,e)=>{const n=Ds();for(const r in t){const s=t[r];Wn(s,n,r,e)}return n},Wn=(t,e,n,r)=>{const s=t.length;for(let i=0;i<s;i++){const o=t[i];po(o,e,n,r)}},po=(t,e,n,r)=>{if(typeof t=="string"){go(t,e,n);return}if(typeof t=="function"){bo(t,e,n,r);return}xo(t,e,n,r)},go=(t,e,n)=>{const r=t===""?e:Fs(e,t);r.classGroupId=n},bo=(t,e,n,r)=>{if(vo(t)){Wn(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(lo(n,t))},xo=(t,e,n,r)=>{const s=Object.entries(t),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Wn(l,Fs(e,a),n,r)}},Fs=(t,e)=>{let n=t;const r=e.split(fn),s=r.length;for(let i=0;i<s;i++){const o=r[i];let a=n.nextPart.get(o);a||(a=Ds(),n.nextPart.set(o,a)),n=a}return n},vo=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,yo=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const s=(i,o)=>{n[i]=o,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let o=n[i];if(o!==void 0)return o;if((o=r[i])!==void 0)return s(i,o),o},set(i,o){i in n?n[i]=o:s(i,o)}}},Fn="!",kr=":",wo=[],Rr=(t,e,n,r,s)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),_o=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=s=>{const i=[];let o=0,a=0,l=0,c;const d=s.length;for(let b=0;b<d;b++){const x=s[b];if(o===0&&a===0){if(x===kr){i.push(s.slice(l,b)),l=b+1;continue}if(x==="/"){c=b;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const f=i.length===0?s:s.slice(l);let p=f,h=!1;f.endsWith(Fn)?(p=f.slice(0,-1),h=!0):f.startsWith(Fn)&&(p=f.slice(1),h=!0);const g=c&&c>l?c-l:void 0;return Rr(i,h,p,g)};if(e){const s=e+kr,i=r;r=o=>o.startsWith(s)?i(o.slice(s.length)):Rr(wo,!1,o,void 0,!0)}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},To=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let i=0;i<n.length;i++){const o=n[i],a=o[0]==="[",l=e.has(o);a||l?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(o)):s.push(o)}return s.length>0&&(s.sort(),r.push(...s)),r}},Co=t=>({cache:yo(t.cacheSize),parseClassName:_o(t),sortModifiers:To(t),postfixLookupClassGroupIds:Eo(t),...uo(t)}),Eo=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},ko=/\s+/,Ro=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:o}=e,a=[],l=t.trim().split(ko);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:h,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:x}=n(f);if(p){c=f+(c.length>0?" "+c:c);continue}let v=!!x,T;if(v){const S=b.substring(0,x);T=r(S);const w=T&&o[T]?r(b):void 0;w&&w!==T&&(T=w,v=!1)}else T=r(b);if(!T){if(!v){c=f+(c.length>0?" "+c:c);continue}if(T=r(b),!T){c=f+(c.length>0?" "+c:c);continue}v=!1}const _=h.length===0?"":h.length===1?h[0]:i(h).join(":"),C=g?_+Fn:_,k=C+T;if(a.indexOf(k)>-1)continue;a.push(k);const y=s(T,v);for(let S=0;S<y.length;++S){const w=y[S];a.push(C+w)}c=f+(c.length>0?" "+c:c)}return c},Ao=(...t)=>{let e=0,n,r,s="";for(;e<t.length;)(n=t[e++])&&(r=Ps(n))&&(s&&(s+=" "),s+=r);return s},Ps=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Ps(t[r]))&&(n&&(n+=" "),n+=e);return n},Ar=(t,...e)=>{let n,r,s,i;const o=l=>{const c=e.reduce((d,f)=>f(d),t());return n=Co(c),r=n.cache.get,s=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const d=Ro(l,n);return s(l,d),d};return i=o,(...l)=>i(Ao(...l))},No=[],Ie=t=>{const e=n=>n[t]||No;return e.isThemeGetter=!0,e},Bs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Us=/^\((?:(\w[\w-]*):)?(.+)\)$/i,So=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Io=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mo=/\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$/,Lo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Oo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=t=>So.test(t),se=t=>!!t&&!Number.isNaN(Number(t)),nt=t=>!!t&&Number.isInteger(Number(t)),En=t=>t.endsWith("%")&&se(t.slice(0,-1)),it=t=>Io.test(t),Gs=()=>!0,Do=t=>Mo.test(t)&&!Lo.test(t),Xn=()=>!1,zo=t=>Oo.test(t),Fo=t=>jo.test(t),Po=t=>!B(t)&&!U(t),Bo=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Uo=t=>mt(t,Hs,Xn),B=t=>Bs.test(t),bt=t=>mt(t,Ws,Do),Nr=t=>mt(t,Yo,se),Go=t=>mt(t,qs,Gs),$o=t=>mt(t,Xs,Xn),Sr=t=>mt(t,$s,Xn),Vo=t=>mt(t,Vs,Fo),Zt=t=>mt(t,Ys,zo),U=t=>Us.test(t),Dt=t=>yt(t,Ws),Ho=t=>yt(t,Xs),Ir=t=>yt(t,$s),Wo=t=>yt(t,Hs),Xo=t=>yt(t,Vs),Qt=t=>yt(t,Ys,!0),qo=t=>yt(t,qs,!0),mt=(t,e,n)=>{const r=Bs.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},yt=(t,e,n=!1)=>{const r=Us.exec(t);return r?r[1]?e(r[1]):n:!1},$s=t=>t==="position"||t==="percentage",Vs=t=>t==="image"||t==="url",Hs=t=>t==="length"||t==="size"||t==="bg-size",Ws=t=>t==="length",Yo=t=>t==="number",Xs=t=>t==="family-name",qs=t=>t==="number"||t==="weight",Ys=t=>t==="shadow",Mr=()=>{const t=Ie("color"),e=Ie("font"),n=Ie("text"),r=Ie("font-weight"),s=Ie("tracking"),i=Ie("leading"),o=Ie("breakpoint"),a=Ie("container"),l=Ie("spacing"),c=Ie("radius"),d=Ie("shadow"),f=Ie("inset-shadow"),p=Ie("text-shadow"),h=Ie("drop-shadow"),g=Ie("blur"),b=Ie("perspective"),x=Ie("aspect"),v=Ie("ease"),T=Ie("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),U,B],y=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],w=()=>[U,B,l],M=()=>[ct,"full","auto",...w()],N=()=>[nt,"none","subgrid",U,B],j=()=>["auto",{span:["full",nt,U,B]},nt,U,B],O=()=>[nt,"auto",U,B],z=()=>["auto","min","max","fr",U,B],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...w()],H=()=>[ct,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],Y=()=>[ct,"screen","full","dvw","lvw","svw","min","max","fit",...w()],D=()=>[ct,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],I=()=>[t,U,B],ue=()=>[...C(),Ir,Sr,{position:[U,B]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ee=()=>["auto","cover","contain",Wo,Uo,{size:[U,B]}],oe=()=>[En,Dt,bt],V=()=>["","none","full",c,U,B],Q=()=>["",se,Dt,bt],te=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[se,En,Ir,Sr],F=()=>["","none",g,U,B],K=()=>["none",se,U,B],ce=()=>["none",se,U,B],ye=()=>[se,U,B],pe=()=>[ct,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[it],breakpoint:[it],color:[Gs],container:[it],"drop-shadow":[it],ease:["in","out","in-out"],font:[Po],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[it],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[it],shadow:[it],spacing:["px",se],text:[it],"text-shadow":[it],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ct,B,U,x]}],container:["container"],"container-type":[{"@container":["","normal","size",U,B]}],"container-named":[Bo],columns:[{columns:[se,B,U,a]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:k()}],overflow:[{overflow:y()}],"overflow-x":[{"overflow-x":y()}],"overflow-y":[{"overflow-y":y()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[nt,"auto",U,B]}],basis:[{basis:[ct,"full","auto",a,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[se,ct,"auto","initial","none",B]}],grow:[{grow:["",se,U,B]}],shrink:[{shrink:["",se,U,B]}],order:[{order:[nt,"first","last","none",U,B]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:j()}],"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":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],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:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mbs:[{mbs:$()}],mbe:[{mbe:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...D()]}],"min-block-size":[{"min-block":["auto",...D()]}],"max-block-size":[{"max-block":["none",...D()]}],w:[{w:[a,"screen",...H()]}],"min-w":[{"min-w":[a,"screen","none",...H()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,Dt,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,qo,Go]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",En,B]}],"font-family":[{font:[Ho,$o,e]}],"font-features":[{"font-features":[B]}],"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:[s,U,B]}],"line-clamp":[{"line-clamp":[se,"none",U,Nr]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",U,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[se,"from-font","auto",U,bt]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[se,"auto",U,B]}],"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:[nt,U,B]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U,B]}],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",U,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:Ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nt,U,B],radial:["",U,B],conic:[nt,U,B]},Xo,Vo]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[se,U,B]}],"outline-w":[{outline:["",se,Dt,bt]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",d,Qt,Zt]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",f,Qt,Zt]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[se,bt]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",p,Qt,Zt]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[se,U,B]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":[se]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[U,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[se]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:Ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,B]}],filter:[{filter:["","none",U,B]}],blur:[{blur:F()}],brightness:[{brightness:[se,U,B]}],contrast:[{contrast:[se,U,B]}],"drop-shadow":[{"drop-shadow":["","none",h,Qt,Zt]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",se,U,B]}],"hue-rotate":[{"hue-rotate":[se,U,B]}],invert:[{invert:["",se,U,B]}],saturate:[{saturate:[se,U,B]}],sepia:[{sepia:["",se,U,B]}],"backdrop-filter":[{"backdrop-filter":["","none",U,B]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[se,U,B]}],"backdrop-contrast":[{"backdrop-contrast":[se,U,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",se,U,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[se,U,B]}],"backdrop-invert":[{"backdrop-invert":["",se,U,B]}],"backdrop-opacity":[{"backdrop-opacity":[se,U,B]}],"backdrop-saturate":[{"backdrop-saturate":[se,U,B]}],"backdrop-sepia":[{"backdrop-sepia":["",se,U,B]}],"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",U,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[se,"initial",U,B]}],ease:[{ease:["linear","initial",v,U,B]}],delay:[{delay:[se,U,B]}],animate:[{animate:["none",T,U,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,U,B]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[U,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],zoom:[{zoom:[nt,U,B]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",U,B]}],"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":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"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",U,B]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[se,Dt,bt,Nr]}],stroke:[{stroke:["none",...I()]}],"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":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["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-r","border-w-l"],"border-w-y":["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-r","border-color-l"],"border-color-y":["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-mr","scroll-ml"],"scroll-my":["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-pr","scroll-pl"],"scroll-py":["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"]}},Zo=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:s={},override:i={}})=>(Ct(t,"cacheSize",e),Ct(t,"prefix",n),Ct(t,"experimentalParseClassName",r),Kt(t.theme,i.theme),Kt(t.classGroups,i.classGroups),Kt(t.conflictingClassGroups,i.conflictingClassGroups),Kt(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Ct(t,"postfixLookupClassGroups",i.postfixLookupClassGroups),Ct(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),Jt(t.theme,s.theme),Jt(t.classGroups,s.classGroups),Jt(t.conflictingClassGroups,s.conflictingClassGroups),Jt(t.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Pn(t,s,"postfixLookupClassGroups"),Pn(t,s,"orderSensitiveModifiers"),t),Ct=(t,e,n)=>{n!==void 0&&(t[e]=n)},Kt=(t,e)=>{if(e)for(const n in e)Ct(t,n,e[n])},Jt=(t,e)=>{if(e)for(const n in e)Pn(t,e,n)},Pn=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},Qo=(t,...e)=>typeof t=="function"?Ar(Mr,t,...e):Ar(()=>Zo(Mr(),t),...e),Ko=Qo({extend:{theme:{text:["small","mid","tools","accent-header","header-1","header-2","large"]}}});function E(...t){return Ko(oo(t))}/**
|
|
2
|
+
* Anime.js - core - ESM
|
|
3
|
+
* @version v4.4.1
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - Julian Garnier
|
|
6
|
+
*/const pt=typeof window<"u",kn=pt?window:null,Gt=pt?document:null,ve={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},le={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Qe={NONE:0,AUTO:1,FORCE:2},Pe={replace:0,none:1,blend:2},Lr=Symbol(),$t=Symbol(),Zs=Symbol(),xn=Symbol(),Jo=Symbol(),be=1e-11,Bn=1e12,St=1e3,Un=240,It="",ea="var(",Qs=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),hn=["perspective","translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],ta=hn.reduce((t,e)=>({...t,[e]:e+"("}),{}),Ze=()=>{},na=/\)\s*[-.\d]/,ra=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,sa=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,ia=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,oa=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,aa=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,Or=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,la=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,ca=/([a-z])([A-Z])/g,ua=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/;/**
|
|
7
|
+
* Anime.js - core - ESM
|
|
8
|
+
* @version v4.4.1
|
|
9
|
+
* @license MIT
|
|
10
|
+
* @copyright 2026 - Julian Garnier
|
|
11
|
+
*/const mn={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:Un,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:St,delay:0,loopDelay:0,ease:"out(2)",composition:Pe.replace,modifier:t=>t,onBegin:Ze,onBeforeUpdate:Ze,onUpdate:Ze,onLoop:Ze,onPause:Ze,onComplete:Ze,onRender:Ze},da={root:Gt},De={defaults:mn,precision:4,timeScale:1,tickThreshold:200},Ks={version:"4.4.1",engine:null};pt&&(kn.AnimeJS||(kn.AnimeJS=[]),kn.AnimeJS.push(Ks));/**
|
|
12
|
+
* Anime.js - core - ESM
|
|
13
|
+
* @version v4.4.1
|
|
14
|
+
* @license MIT
|
|
15
|
+
* @copyright 2026 - Julian Garnier
|
|
16
|
+
*/const Js=t=>t.replace(ca,"$1-$2").toLowerCase(),ht=(t,e)=>t.indexOf(e)===0,Mt=Date.now,Lt=Array.isArray,Rn=t=>t&&t.constructor===Object,fa=t=>typeof t=="number"&&!isNaN(t),Vt=t=>typeof t=="string",Ht=t=>typeof t=="function",Ce=t=>typeof t>"u",Pt=t=>Ce(t)||t===null,ei=t=>pt&&t instanceof SVGElement,ti=t=>ra.test(t),ni=t=>ht(t,"rgb"),ri=t=>ht(t,"hsl"),ha=t=>ti(t)||(ni(t)||ri(t))&&(t[t.length-1]===")"||!na.test(t)),on=t=>!De.defaults.hasOwnProperty(t),ma=["opacity","rotate","overflow","color"],pa=(t,e)=>{if(ma.includes(e))return!1;if(t.getAttribute(e)||e in t){if(e==="scale"){const n=t.parentNode;return n&&n.tagName==="filter"}return!0}},Et=Math.pow,ga=Math.sqrt,ba=Math.sin,xa=Math.cos,va=Math.abs,ya=Math.floor,wa=Math.asin,qn=Math.PI,jr=Math.round,Ve=(t,e,n)=>t<e?e:t>n?n:t,Se=(t,e)=>{if(e<0)return t;if(!e)return jr(t);const n=10**e;return jr(t*n)/n},vt=(t,e,n)=>t+(e-t)*n,Yn=t=>t===1/0?Bn:t===-1/0?-Bn:t,Bt=t=>t<=be?be:Yn(Se(t,11)),$e=t=>Lt(t)?[...t]:t,_a=(t,e)=>{const n={...t};for(let r in e){const s=t[r];n[r]=Ce(s)?e[r]:s}return n},Ne=(t,e,n,r="_prev",s="_next")=>{let i=t._head,o=s;for(n&&(i=t._tail,o=r);i;){const a=i[o];e(i),i=a}},ft=(t,e,n="_prev",r="_next")=>{const s=e[n],i=e[r];s?s[r]=i:t._head=i,i?i[n]=s:t._tail=s,e[n]=null,e[r]=null},Rt=(t,e,n,r="_prev",s="_next")=>{let i=t._tail;for(;i&&n&&n(i,e);)i=i[r];const o=i?i[s]:t._head;i?i[s]=e:t._head=e,o?o[r]=e:t._tail=e,e[r]=i,e[s]=o};/**
|
|
17
|
+
* Anime.js - core - ESM
|
|
18
|
+
* @version v4.4.1
|
|
19
|
+
* @license MIT
|
|
20
|
+
* @copyright 2026 - Julian Garnier
|
|
21
|
+
*/const Ta=(t,e,n)=>{const r=t.style.transform;if(r){const s=t[xn];let i=0;const o=r.length;let a;for(;i<o;){for(;i<o&&r.charCodeAt(i)===32;)i++;if(i>=o)break;const c=i;for(;i<o&&r.charCodeAt(i)!==40;)i++;if(i>=o)break;const d=r.substring(c,i);let f=1;const p=i+1;let h=-1,g=-1;for(i++;i<o&&f>0;){const x=r.charCodeAt(i);x===40?f++:x===41?f--:x===44&&f===1&&(h===-1?h=i:g===-1&&(g=i)),i++}const b=i-1;d==="translate"||d==="translate3d"?(h===-1?s.translateX=r.substring(p,b).trim():(s.translateX=r.substring(p,h).trim(),g===-1?s.translateY=r.substring(h+1,b).trim():(s.translateY=r.substring(h+1,g).trim(),s.translateZ=r.substring(g+1,b).trim())),a=r.substring(p,b)):d==="scale"||d==="scale3d"?h===-1?s.scale=r.substring(p,b).trim():(s.scaleX=r.substring(p,h).trim(),g===-1?s.scaleY=r.substring(h+1,b).trim():(s.scaleY=r.substring(h+1,g).trim(),s.scaleZ=r.substring(g+1,b).trim())):s[d]=r.substring(p,b)}if(e==="translate3d"&&a)return n&&(n[e]=a),a;const l=s[e];if(!Ce(l))return n&&(n[e]=l),l}return e==="translate3d"?"0px, 0px, 0px":e==="rotate3d"?"0, 0, 0, 0deg":ht(e,"scale")?"1":ht(e,"rotate")||ht(e,"skew")?"0deg":"0px"},si=t=>{let e=It;for(let n=0,r=hn.length;n<r;n++){const s=hn[n],i=t[s];if(i!==void 0){if(s==="translateX"){const o=t.translateY;if(o!==void 0){const a=t.translateZ;a!==void 0?(e+=`translate3d(${i},${o},${a}) `,n+=2):(e+=`translate(${i},${o}) `,n+=1);continue}}if(s==="scaleX"&&t.scale===void 0){const o=t.scaleY;if(o!==void 0){const a=t.scaleZ;a!==void 0?(e+=`scale3d(${i},${o},${a}) `,n+=2):(e+=`scale(${i},${o}) `,n+=1);continue}}e+=`${ta[s]}${i}) `}s==="rotateZ"&&t.rotate3d!==void 0&&(e+=`rotate3d(${t.rotate3d}) `)}return t.matrix!==void 0&&(e+=`matrix(${t.matrix}) `),t.matrix3d!==void 0&&(e+=`matrix3d(${t.matrix3d}) `),e};/**
|
|
22
|
+
* Anime.js - core - ESM
|
|
23
|
+
* @version v4.4.1
|
|
24
|
+
* @license MIT
|
|
25
|
+
* @copyright 2026 - Julian Garnier
|
|
26
|
+
*/const Ca=t=>{const e=sa.exec(t)||ia.exec(t),n=Ce(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],n]},Ea=t=>{const e=t.length,n=e===4||e===5;return[+("0x"+t[1]+t[n?1:2]),+("0x"+t[n?2:3]+t[n?2:4]),+("0x"+t[n?3:5]+t[n?3:6]),e===5||e===9?+(+("0x"+t[n?4:7]+t[n?4:8])/255).toFixed(3):1]},An=(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t),ka=t=>{const e=oa.exec(t)||aa.exec(t),n=+e[1]/360,r=+e[2]/100,s=+e[3]/100,i=Ce(e[4])?1:+e[4];let o,a,l;if(r===0)o=a=l=s;else{const c=s<.5?s*(1+r):s+r-s*r,d=2*s-c;o=Se(An(d,c,n+1/3)*255,0),a=Se(An(d,c,n)*255,0),l=Se(An(d,c,n-1/3)*255,0)}return[o,a,l,i]},Ra=t=>ni(t)?Ca(t):ti(t)?Ea(t):ri(t)?ka(t):[0,0,0,1];/**
|
|
27
|
+
* Anime.js - core - ESM
|
|
28
|
+
* @version v4.4.1
|
|
29
|
+
* @license MIT
|
|
30
|
+
* @copyright 2026 - Julian Garnier
|
|
31
|
+
*/const ze=(t,e)=>Ce(t)?e:t,ot=(t,e,n,r,s,i)=>{let o;if(Ht(t))o=()=>{const a=t(e,n,r,i);return isNaN(+a)?a||0:+a};else if(Vt(t)&&ht(t,ea))o=()=>{var f;const a=t.match(ua),l=a[1],c=a[2];let d=(f=getComputedStyle(e))==null?void 0:f.getPropertyValue(l);return(!d||d.trim()===It)&&c&&(d=c.trim()),d||0};else return t;return s&&(s.func=o),o()},ii=(t,e)=>t[$t]?t[Zs]&&pa(t,e)?ve.ATTRIBUTE:hn.includes(e)||Qs.get(e)?ve.TRANSFORM:ht(e,"--")?ve.CSS_VAR:e in t.style?ve.CSS:e in t?ve.OBJECT:ve.ATTRIBUTE:ve.OBJECT,Dr=(t,e,n)=>{const r=t.style[e];r&&n&&(n[e]=r);const s=r||getComputedStyle(t[Jo]||t).getPropertyValue(e);return s==="auto"?"0":s},zt=(t,e,n,r)=>{const s=Ce(n)?ii(t,e):n;if(s===ve.OBJECT){const i=t[e];return i&&r&&(r[e]=i),i||0}if(s===ve.ATTRIBUTE){const i=t.getAttribute(e);return i&&r&&(r[e]=i),i}return s===ve.TRANSFORM?Ta(t,e,r):s===ve.CSS_VAR?Dr(t,e,r).trimStart():Dr(t,e,r)},Nn=(t,e,n)=>n==="-"?t-e:n==="+"?t+e:t*e,Zn=()=>({t:le.NUMBER,n:0,u:null,o:null,d:null,s:null}),Je=(t,e)=>{if(e.t=le.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const n=+t;if(isNaN(n)){let r=t;r[1]==="="&&(e.o=r[0],r=r.slice(2));const s=r.includes(" ")?!1:la.exec(r);if(s)return e.t=le.UNIT,e.n=+s[1],e.u=s[2],e;if(e.o)return e.n=+r,e;if(ha(r))return e.t=le.COLOR,e.d=Ra(r),e;{const i=r.match(Or);return e.t=le.COMPLEX,e.d=i?i.map(Number):[],e.s=r.split(Or)||[],e}}else return e.n=n,e},zr=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=$e(t._toNumbers),e.s=$e(t._strings),e),xt=Zn(),oi=(t,e,n)=>{const r=t._modifier,s=t._fromNumbers,i=t._toNumbers,o=Se(Ve(r(vt(s[0],i[0],e)),0,255),0),a=Se(Ve(r(vt(s[1],i[1],e)),0,255),0),l=Se(Ve(r(vt(s[2],i[2],e)),0,255),0),c=Ve(r(Se(vt(s[3],i[3],e),n)),0,1);if(t._composition!==Pe.none){const d=t._numbers;d[0]=o,d[1]=a,d[2]=l,d[3]=c}return`rgba(${o},${a},${l},${c})`},ai=(t,e,n)=>{const r=t._modifier,s=t._fromNumbers,i=t._toNumbers,o=t._strings,a=t._composition!==Pe.none;let l=o[0];for(let c=0,d=i.length;c<d;c++){const f=r(Se(vt(s[c],i[c],e),n)),p=o[c+1];l+=`${p?f+p:f}`,a&&(t._numbers[c]=f)}return l};/**
|
|
32
|
+
* Anime.js - core - ESM
|
|
33
|
+
* @version v4.4.1
|
|
34
|
+
* @license MIT
|
|
35
|
+
* @copyright 2026 - Julian Garnier
|
|
36
|
+
*/const an=(t,e,n,r,s)=>{const i=t.parent,o=t.duration,a=t.completed,l=t.iterationDuration,c=t.iterationCount,d=t._currentIteration,f=t._loopDelay,p=t._reversed,h=t._alternate,g=t._hasChildren,b=t._delay,x=t._currentTime,v=b+l,T=e-b,_=Ve(x,-b,o),C=Ve(T,-b,o),k=T-x,y=C>0,S=C>=o,w=o<=be,M=s===Qe.FORCE;let N=0,j=T,O=0;if(c>1){const H=~~(C/(l+(S?0:f)));t._currentIteration=Ve(H,0,c),S&&t._currentIteration--,N=t._currentIteration%2,j=C%(l+f)||0}const z=p^(h&&N),L=t._ease;let G=S?z?0:o:z?l-j:j;L&&(G=l*L(G/l)||0);const $=(i?i.backwards:T<x)?!z:!!z;if(t._currentTime=T,t._iterationTime=G,t.backwards=$,y&&!t.began?(t.began=!0,!n&&!(i&&($||!i.began))&&t.onBegin(t)):T<=0&&(t.began=!1),!n&&!g&&y&&t._currentIteration!==d&&t.onLoop(t),M||s===Qe.AUTO&&(e>=b&&e<=v||e<=b&&_>b||e>=v&&_!==o)||G>=v&&_!==o||G<=b&&_>0||e<=_&&_===o&&a||S&&!a&&w){if(y&&(t.computeDeltaTime(_),n||t.onBeforeUpdate(t)),!g){const H=M||($?k*-1:k)>=De.tickThreshold,Y=t._offset+(i?i._offset:0)+b+G;let D=t._head,I,ue,X,Ee,oe=0;for(;D;){const V=D._composition,Q=D._currentTime,te=D._changeDuration,de=D._absoluteStartTime+D._changeDuration,A=D._nextRep,F=D._prevRep,K=V!==Pe.none;if((H||(Q!==te||Y<=de+(A?A._delay:0))&&(Q!==0||Y>=D._absoluteStartTime))&&(!K||!D._isOverridden&&(!D._isOverlapped||Y<=de)&&(!A||A._isOverridden||Y<=A._absoluteStartTime)&&(!F||F._isOverridden||Y>=F._absoluteStartTime+F._changeDuration+D._delay))){const ce=D._currentTime=Ve(G-D._startTime,0,te),ye=D._ease(ce/D._updateDuration),pe=D._modifier,ke=D._valueType,we=D._tweenType,_e=we===ve.OBJECT,Me=ke===le.NUMBER,Ae=Me&&_e||ye===0||ye===1?-1:De.precision;let xe,Ue;if(Me?xe=Ue=pe(Se(vt(D._fromNumber,D._toNumber,ye),Ae)):ke===le.UNIT?(Ue=pe(Se(vt(D._fromNumber,D._toNumber,ye),Ae)),xe=`${Ue}${D._unit}`):ke===le.COLOR?xe=oi(D,ye,Ae):ke===le.COMPLEX&&(xe=ai(D,ye,Ae)),K&&(D._number=Ue),!r&&V!==Pe.blend){const Re=D.property;I=D.target,_e?I[Re]=xe:we===ve.ATTRIBUTE?I.setAttribute(Re,xe):(ue=I.style,we===ve.TRANSFORM?(I!==X&&(X=I,Ee=I[xn]),Ee[Re]=xe,oe=1):we===ve.CSS?ue[Re]=xe:we===ve.CSS_VAR&&ue.setProperty(Re,xe)),y&&(O=1)}else D._value=xe}oe&&D._renderTransforms&&(ue.transform=si(Ee),oe=0),D=D._next}!n&&O&&t.onRender(t)}!n&&y&&t.onUpdate(t)}return i&&w?!n&&(i.began&&!$&&T>0&&!a||$&&T<=be&&a)&&(t.onComplete(t),t.completed=!$):y&&S?c===1/0?t._startTime+=t.duration:t._currentIteration>=c-1&&(t.paused=!0,!a&&!g&&(t.completed=!0,!n&&!(i&&($||!i.began))&&(t.onComplete(t),t._resolve(t)))):t.completed=!1,O},kt=(t,e,n,r,s)=>{const i=t._currentIteration;if(an(t,e,n,r,s),t._hasChildren){const o=t,a=o.backwards,l=r?e:o._iterationTime,c=Mt();let d=0,f=!0;if(!r&&o._currentIteration!==i){const p=o.iterationDuration;Ne(o,h=>{if(!a)!h.completed&&!h.backwards&&h._currentTime<h.iterationDuration&&an(h,p,n,1,Qe.FORCE),h.began=!1,h.completed=!1;else{const g=h.duration,b=h._offset+h._delay,x=b+g;!n&&g<=be&&(!b||x===p)&&h.onComplete(h)}}),n||o.onLoop(o)}Ne(o,p=>{const h=Se((l-p._offset)*p._speed,12),g=p._fps<o._fps?p.requestTick(c):s;d+=an(p,h,n,r,g),!p.completed&&f&&(f=!1)},a),!n&&d&&o.onRender(o),(f||a)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}};/**
|
|
37
|
+
* Anime.js - core - ESM
|
|
38
|
+
* @version v4.4.1
|
|
39
|
+
* @license MIT
|
|
40
|
+
* @copyright 2026 - Julian Garnier
|
|
41
|
+
*/const Fr={},li=(t,e,n)=>{if(n===ve.TRANSFORM){const r=Qs.get(t);return r||t}else if(n===ve.CSS||n===ve.ATTRIBUTE&&ei(e)&&t in e.style){const r=Fr[t];if(r)return r;{const s=t&&Js(t);return Fr[t]=s,s}}else return t},ci=(t,e=!1)=>{if(t._hasChildren)Ne(t,n=>ci(n,e),!0);else{const n=t;n.pause(),Ne(n,r=>{const s=r.property,i=r.target,o=r._tweenType,a=r._inlineValue,l=Pt(a)||a===It;if(o===ve.OBJECT)!e&&!l&&(i[s]=a);else if(i[$t])if(o===ve.ATTRIBUTE)e||(l?i.removeAttribute(s):i.setAttribute(s,a));else{const c=i.style;if(o===ve.TRANSFORM){const d=i[xn];l?delete d[s]:d[s]=a,r._renderTransforms&&(Object.keys(d).length?c.transform=si(d):c.removeProperty("transform"))}else l?c.removeProperty(Js(s)):c[s]=a}i[$t]&&n._tail===r&&n.targets.forEach(c=>{c.getAttribute&&c.getAttribute("style")===It&&c.removeAttribute("style")})})}return t};/**
|
|
42
|
+
* Anime.js - core - ESM
|
|
43
|
+
* @version v4.4.1
|
|
44
|
+
* @license MIT
|
|
45
|
+
* @copyright 2026 - Julian Garnier
|
|
46
|
+
*/class ui{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=St/Un,this._fps=Un,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const n=this._frameDuration,r=+e,s=r<be?be:r,i=St/s;s>mn.frameRate&&(mn.frameRate=s),this._fps=s,this._frameDuration=i,this._scheduledTime+=i-n}get speed(){return this._speed}set speed(e){const n=+e;this._speed=n<be?be:n}requestTick(e){const n=this._scheduledTime;if(this._lastTickTime=e,e<n)return Qe.NONE;const r=this._frameDuration,s=e-n;return this._scheduledTime+=s<r?r:s,Qe.AUTO}computeDeltaTime(e){const n=e-this._lastTime;return this.deltaTime=n,this._lastTime=e,n}}/**
|
|
47
|
+
* Anime.js - animation - ESM
|
|
48
|
+
* @version v4.4.1
|
|
49
|
+
* @license MIT
|
|
50
|
+
* @copyright 2026 - Julian Garnier
|
|
51
|
+
*/const At={animation:null,update:Ze},Aa=t=>{let e=At.animation;return e||(e={duration:be,computeDeltaTime:Ze,_offset:0,_delay:0,_head:null,_tail:null},At.animation=e,At.update=()=>{t.forEach(n=>{for(let r in n){const s=n[r],i=s._head;if(i){const o=i._valueType,a=o===le.COMPLEX||o===le.COLOR?$e(i._fromNumbers):null;let l=i._fromNumber,c=s._tail;for(;c&&c!==i;){if(a)for(let d=0,f=c._numbers.length;d<f;d++)a[d]+=c._numbers[d];else l+=c._number;c=c._prevAdd}i._toNumber=l,i._toNumbers=a}}}),an(e,1,1,0,Qe.FORCE)}),e};/**
|
|
52
|
+
* Anime.js - engine - ESM
|
|
53
|
+
* @version v4.4.1
|
|
54
|
+
* @license MIT
|
|
55
|
+
* @copyright 2026 - Julian Garnier
|
|
56
|
+
*/const di=pt?requestAnimationFrame:setImmediate,Na=pt?cancelAnimationFrame:clearImmediate;class Sa extends ui{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=mn,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=Mt();if(this.requestTick(e)){this.computeDeltaTime(e);const n=this._speed,r=this._fps;let s=this._head;for(;s;){const i=s._next;s.paused?(ft(this,s),this._hasChildren=!!this._tail,s._running=!1,s.completed&&!s._cancelled&&s.cancel()):kt(s,(e-s._startTime)*s._speed*n,0,0,s._fps<r?s.requestTick(e):Qe.AUTO),s=i}At.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Mt()),this.reqId=di(fi)),this}pause(){if(this.reqId)return this.paused=!0,Ia()}resume(){if(this.paused)return this.paused=!1,Ne(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(De.timeScale===1?1:St)}set speed(e){this._speed=e*De.timeScale,Ne(this,n=>n.speed=n._speed)}get timeUnit(){return De.timeScale===1?"ms":"s"}set timeUnit(e){const r=e==="s",s=r?.001:1;if(De.timeScale!==s){De.timeScale=s,De.tickThreshold=200*s;const i=r?.001:St;this.defaults.duration*=i,this._speed*=i}}get precision(){return De.precision}set precision(e){De.precision=e}}const je=(()=>{const t=new Sa(Mt());return pt&&(Ks.engine=t,Gt.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(Gt.hidden?t.pause():t.resume())})),t})(),fi=()=>{je._head?(je.reqId=di(fi),je.update()):je.reqId=0},Ia=()=>(Na(je.reqId),je.reqId=0,je);/**
|
|
57
|
+
* Anime.js - animation - ESM
|
|
58
|
+
* @version v4.4.1
|
|
59
|
+
* @license MIT
|
|
60
|
+
* @copyright 2026 - Julian Garnier
|
|
61
|
+
*/const pn={_rep:new WeakMap,_add:new Map},Qn=(t,e,n="_rep")=>{const r=pn[n];let s=r.get(t);return s||(s={},r.set(t,s)),s[e]?s[e]:s[e]={_head:null,_tail:null}},Ma=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,ln=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=be,t._currentTime=be},hi=(t,e)=>{const n=t._composition;if(n===Pe.replace){const r=t._absoluteStartTime;Rt(e,t,Ma,"_prevRep","_nextRep");const s=t._prevRep;if(s){const i=s.parent,o=s._absoluteStartTime+s._changeDuration;if(t.parent.id!==i.id&&i.iterationCount>1&&o+(i.duration-i.iterationDuration)>r){ln(s);let c=s._prevRep;for(;c&&c.parent.id===i.id;)ln(c),c=c._prevRep}const a=r-t._delay;if(o>a){const c=s._startTime,d=o-(c+s._updateDuration),f=Se(a-d-c,12);s._changeDuration=f,s._currentTime=f,s._isOverlapped=1,f<be&&ln(s)}let l=!0;if(Ne(i,c=>{c._isOverlapped||(l=!1)}),l){const c=i.parent;if(c){let d=!0;Ne(c,f=>{f!==i&&Ne(f,p=>{p._isOverlapped||(d=!1)})}),d&&c.cancel()}else i.cancel()}}}else if(n===Pe.blend){const r=Qn(t.target,t.property,"_add"),s=Aa(pn._add);let i=r._head;i||(i={...t},i._composition=Pe.replace,i._updateDuration=be,i._startTime=0,i._numbers=$e(t._fromNumbers),i._number=0,i._next=null,i._prev=null,Rt(r,i),Rt(s,i));const o=t._toNumber;if(t._fromNumber=i._fromNumber-o,t._toNumber=0,t._numbers=$e(t._fromNumbers),t._number=0,i._fromNumber=o,t._toNumbers){const a=$e(t._toNumbers);a&&a.forEach((l,c)=>{t._fromNumbers[c]=i._fromNumbers[c]-l,t._toNumbers[c]=0}),i._fromNumbers=a}Rt(r,t,null,"_prevAdd","_nextAdd")}return t},mi=t=>{const e=t._composition;if(e!==Pe.none){const n=t.target,r=t.property,o=pn._rep.get(n)[r];if(ft(o,t,"_prevRep","_nextRep"),e===Pe.blend){const a=pn._add,l=a.get(n);if(!l)return;const c=l[r],d=At.animation;ft(c,t,"_prevAdd","_nextAdd");const f=c._head;if(f&&f===c._tail){ft(c,f,"_prevAdd","_nextAdd"),ft(d,f);let p=!0;for(let h in l)if(l[h]._head){p=!1;break}p&&a.delete(n)}}}return t},Pr=(t,e,n)=>{let r=!1;return Ne(e,s=>{const i=s.target;if(t.includes(i)){const o=s.property,a=s._tweenType,l=li(n,i,a);(!l||l&&l===o)&&(s.parent._tail===s&&s._tweenType===ve.TRANSFORM&&s._prev&&s._prev._tweenType===ve.TRANSFORM&&(s._prev._renderTransforms=1),ft(e,s),mi(s),r=!0)}},!0),r},pi=(t,e,n)=>{const r=e||je;let s;if(r._hasChildren){let i=0;Ne(r,o=>{if(!o._hasChildren)if(s=Pr(t,o,n),s&&!o._head)o.cancel(),ft(r,o);else{const l=o._offset+o._delay+o.duration;l>i&&(i=l)}o._head?pi(t,o,n):o._hasChildren=!1},!0),Ce(r.iterationDuration)||(r.iterationDuration=i)}else s=Pr(t,r,n);s&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())};/**
|
|
62
|
+
* Anime.js - timer - ESM
|
|
63
|
+
* @version v4.4.1
|
|
64
|
+
* @license MIT
|
|
65
|
+
* @copyright 2026 - Julian Garnier
|
|
66
|
+
*/const Br=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),Gn=t=>(t._cancelled&&(t._hasChildren?Ne(t,Gn):Ne(t,e=>{e._composition!==Pe.none&&hi(e,Qn(e.target,e.property))}),t._cancelled=0),t);let Ur=0;const La=(t,e)=>t._priority>e._priority;class Oa extends ui{constructor(e={},n=null,r=0){super(0),++Ur;const{id:s,delay:i,duration:o,reversed:a,alternate:l,loop:c,loopDelay:d,autoplay:f,frameRate:p,playbackRate:h,priority:g,onComplete:b,onLoop:x,onPause:v,onBegin:T,onBeforeUpdate:_,onUpdate:C}=e,k=n?0:je._lastTickTime,y=n?n.defaults:De.defaults,S=Ht(i)||Ce(i)?y.delay:+i,w=Ht(o)||Ce(o)?1/0:+o,M=ze(c,y.loop),N=ze(d,y.loopDelay);let j=M===!0||M===1/0||M<0?1/0:M+1,O=0;n?O=r:(je.reqId||je.requestTick(Mt()),O=(je._lastTickTime-je._startTime)*De.timeScale),this.id=Ce(s)?Ur:s,this.parent=n,this.duration=Yn((w+N)*j-N)||be,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=T||y.onBegin,this.onBeforeUpdate=_||y.onBeforeUpdate,this.onUpdate=C||y.onUpdate,this.onLoop=x||y.onLoop,this.onPause=v||y.onPause,this.onComplete=b||y.onComplete,this.iterationDuration=w,this.iterationCount=j,this._autoplay=n?!1:ze(f,y.autoplay),this._offset=O,this._delay=S,this._loopDelay=N,this._iterationTime=0,this._currentIteration=0,this._resolve=Ze,this._running=!1,this._reversed=+ze(a,y.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=ze(l,y.alternate),this._prev=null,this._next=null,this._lastTickTime=k,this._startTime=k,this._lastTime=k,this._fps=ze(p,y.frameRate),this._speed=ze(h,y.playbackRate),this._priority=+ze(g,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Ve(Se(this._currentTime,De.precision),-this._delay,this.duration)}set currentTime(e){const n=this.paused;this.pause().seek(+e),n||this.resume()}get iterationCurrentTime(){return Ve(Se(this._iterationTime,De.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Ve(Se(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Ve(Se(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const n=this.iterationDuration;this.currentTime=n*this._currentIteration+n*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Ve(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return Gn(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,kt(this,0,1,~~e,Qe.FORCE),Br(this),this._hasChildren&&Ne(this,Br),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&kt(this,this.duration,1,~~e,Qe.FORCE),this.reset(e);const n=this._autoplay;return n===!0?this.resume():n&&!Ce(n.linked)&&n.link(this),this}resetTime(){const e=1/(this._speed*je._speed);return this._startTime=Mt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=be&&!this._hasChildren?kt(this,be,0,0,Qe.FORCE):(this._running||(Rt(je,this,La),je._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,je.wake()),this):this}restart(){return this.reset().resume()}seek(e,n=0,r=0){Gn(this),this.completed=!1;const s=this.paused;return this.paused=!0,kt(this,e+this._delay,~~n,~~r,Qe.AUTO),s?this:this.resume()}alternate(){const e=this._reversed,n=this.iterationCount,r=this.iterationDuration,s=n===1/0?ya(Bn/r):n;return this._reversed=+(this._alternate&&!(s%2)?e:!e),n===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(r*s-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Ne(this,e=>e.cancel(),!0):Ne(this,mi),this._cancelled=1,this.pause()}stretch(e){const n=this.duration,r=Bt(e);if(n===r)return this;const s=e/n,i=e<=be;return this.duration=i?be:r,this.iterationDuration=i?be:Bt(this.iterationDuration*s),this._offset*=s,this._delay*=s,this._loopDelay*=s,this}revert(){kt(this,0,1,0,Qe.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=Ze){const n=this.then,r=()=>{this.then=null,e(this),this.then=n,this._resolve=Ze};return new Promise(s=>(this._resolve=()=>s(r()),this.completed&&this._resolve(),this))}}/**
|
|
67
|
+
* Anime.js - core - ESM
|
|
68
|
+
* @version v4.4.1
|
|
69
|
+
* @license MIT
|
|
70
|
+
* @copyright 2026 - Julian Garnier
|
|
71
|
+
*/function Gr(t){const e=Vt(t)?da.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function gi(t){if(Pt(t))return[];if(!pt)return Lt(t)&&t.flat(1/0)||[t];if(Lt(t)){const n=t.flat(1/0),r=[];for(let s=0,i=n.length;s<i;s++){const o=n[s];if(!Pt(o)){const a=Gr(o);if(a)for(let l=0,c=a.length;l<c;l++){const d=a[l];if(!Pt(d)){let f=!1;for(let p=0,h=r.length;p<h;p++)if(r[p]===d){f=!0;break}f||r.push(d)}}else{let l=!1;for(let c=0,d=r.length;c<d;c++)if(r[c]===o){l=!0;break}l||r.push(o)}}}return r}const e=Gr(t);return e?Array.from(e):[t]}function ja(t){const e=gi(t),n=e.length;if(n)for(let r=0;r<n;r++){const s=e[r];if(!s[Lr]){s[Lr]=!0;const i=ei(s);(s.nodeType||i)&&(s[$t]=!0,s[Zs]=i,s[xn]={})}}return e}/**
|
|
72
|
+
* Anime.js - core - ESM
|
|
73
|
+
* @version v4.4.1
|
|
74
|
+
* @license MIT
|
|
75
|
+
* @copyright 2026 - Julian Garnier
|
|
76
|
+
*/const Sn={deg:1,rad:180/qn,turn:360},$r={},Vr=(t,e,n,r=!1)=>{const s=e.u,i=e.n;if(e.t===le.UNIT&&s===n)return e;const o=i+s+n,a=$r[o];if(!Ce(a)&&!r)e.n=a;else{let l;if(s in Sn)l=i*Sn[s]/Sn[n];else{const d=t.cloneNode(),f=t.parentNode,p=f&&f!==Gt?f:Gt.body;p.appendChild(d);const h=d.style;h.width=100+s;const g=d.offsetWidth||100;h.width=100+n;const b=d.offsetWidth||100,x=g/b;p.removeChild(d),l=x*i}e.n=l,$r[o]=l}return e.t,le.UNIT,e.u=n,e};/**
|
|
77
|
+
* Anime.js - easings - ESM
|
|
78
|
+
* @version v4.4.1
|
|
79
|
+
* @license MIT
|
|
80
|
+
* @copyright 2026 - Julian Garnier
|
|
81
|
+
*/const at=t=>t;/**
|
|
82
|
+
* Anime.js - easings - ESM
|
|
83
|
+
* @version v4.4.1
|
|
84
|
+
* @license MIT
|
|
85
|
+
* @copyright 2026 - Julian Garnier
|
|
86
|
+
*/const Ft=(t=1.68)=>e=>Et(e,+t),$n={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(e*2)/2:1-t(e*-2+2)/2,outIn:t=>e=>e<.5?(1-t(1-e*2))/2:(t(e*2-1)+1)/2},Da=qn/2,Hr=qn*2,Wr={[It]:Ft,Quad:Ft(2),Cubic:Ft(3),Quart:Ft(4),Quint:Ft(5),Sine:t=>1-xa(t*Da),Circ:t=>1-ga(1-t*t),Expo:t=>t?Et(2,10*t-10):0,Bounce:t=>{let e,n=4;for(;t<((e=Et(2,--n))-1)/11;);return 1/Et(4,3-n)-7.5625*Et((e*3-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const n=Ve(+t,1,10),r=Ve(+e,be,2),s=r/Hr*wa(1/n),i=Hr/r;return o=>o===0||o===1?o:-n*Et(2,-10*(1-o))*ba((1-o-s)*i)}},In=(()=>{const t={linear:at,none:at};for(let e in $n)for(let n in Wr){const r=Wr[n],s=$n[e];t[e+n]=n===It||n==="Back"||n==="Elastic"?(i,o)=>s(r(i,o)):s(r)}return t})(),en={linear:at,none:at},za=t=>{if(en[t])return en[t];if(t.indexOf("(")<=-1){const n=$n[t]||t.includes("Back")||t.includes("Elastic")?In[t]():In[t];return n?en[t]=n:at}else{const e=t.slice(0,-1).split("("),n=In[e[0]];return n?en[t]=n(...e[1].split(",")):at}},Xr=["steps(","irregular(","linear(","cubicBezier("],qr=t=>{if(Vt(t)){for(let n=0,r=Xr.length;n<r;n++)if(ht(t,Xr[n]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),at}return Ht(t)?t:Vt(t)?za(t):at};/**
|
|
87
|
+
* Anime.js - animation - ESM
|
|
88
|
+
* @version v4.4.1
|
|
89
|
+
* @license MIT
|
|
90
|
+
* @copyright 2026 - Julian Garnier
|
|
91
|
+
*/const Z=Zn(),re=Zn(),_t={},tn={func:null},Mn={func:null},nn=[null],Tt=[null,null],rn={to:null};let Fa=0,Yr=0,ut,rt;const Pa=(t,e)=>{const n={};if(Lt(t)){const r=[].concat(...t.map(s=>Object.keys(s))).filter(on);for(let s=0,i=r.length;s<i;s++){const o=r[s],a=t.map(l=>{const c={};for(let d in l){const f=l[d];on(d)?d===o&&(c.to=f):c[d]=f}return c});n[o]=a}}else{const r=ze(e.duration,De.defaults.duration);Object.keys(t).map(i=>({o:parseFloat(i)/100,p:t[i]})).sort((i,o)=>i.o-o.o).forEach(i=>{const o=i.o,a=i.p;for(let l in a)if(on(l)){let c=n[l];c||(c=n[l]=[]);const d=o*r;let f=c.length,p=c[f-1];const h={to:a[l]};let g=0;for(let b=0;b<f;b++)g+=c[b].duration;f===1&&(h.from=p.to),a.ease&&(h.ease=a.ease),h.duration=d-(f?g:0),c.push(h)}return i});for(let i in n){const o=n[i];let a;for(let l=0,c=o.length;l<c;l++){const d=o[l],f=d.ease;d.ease=a||void 0,a=f}o[0].duration||o.shift()}}return n};class Ba extends Oa{constructor(e,n,r,s,i=!1,o=0,a){super(n,r,s),++Yr;const l=ja(e),c=l.length,d=n.keyframes,f=d?_a(Pa(d,n),n):n,{id:p,delay:h,duration:g,ease:b,playbackEase:x,modifier:v,composition:T,onRender:_}=f,C=r?r.defaults:De.defaults,k=ze(b,C.ease),y=ze(x,C.playbackEase),S=y?qr(y):null,w=!Ce(k.ease),M=w?k.ease:ze(b,S?"linear":C.ease),N=w?k.settlingDuration:ze(g,C.duration),j=ze(h,C.delay),O=v||C.modifier,z=Ce(T)&&c>=St?Pe.none:Ce(T)?C.composition:T,L=this._offset+(r?r._offset:0);w&&(k.parent=this);let G=NaN,$=NaN,H=0,Y=0;for(let D=0;D<c;D++){const I=l[D],ue=o||D,X=a||l;let Ee=NaN,oe=NaN;for(let V in f)if(on(V)){const Q=ii(I,V),te=li(V,I,Q);let de=f[V];const A=Lt(de);if(i&&!A&&(Tt[0]=de,Tt[1]=de,de=Tt),A){const ke=de.length,we=!Rn(de[0]);ke===2&&we?(rn.to=de,nn[0]=rn,ut=nn):ke>2&&we?(ut=[],de.forEach((_e,Me)=>{Me?Me===1?(Tt[1]=_e,ut.push(Tt)):ut.push(_e):Tt[0]=_e})):ut=de}else nn[0]=de,ut=nn;let F=null,K=null,ce=NaN,ye=0,pe=0;for(let ke=ut.length;pe<ke;pe++){const we=ut[pe];Rn(we)?rt=we:(rn.to=we,rt=rn),tn.func=null,Mn.func=null;const _e=ot(ze(rt.composition,z),I,ue,X,null,null),Me=fa(_e)?_e:Pe[_e];!F&&Me!==Pe.none&&(F=Qn(I,te));const Ae=F?F._tail:null,xe=r&&Ae&&Ae.parent.parent===r?Ae:K,Ue=ot(rt.to,I,ue,X,tn,xe);let Re;Rn(Ue)&&!Ce(Ue.to)?(rt=Ue,Re=Ue.to):Re=Ue;const J=ot(rt.from,I,ue,X,null,xe),Te=rt.ease||M,qe=ot(Te,I,ue,X,null,xe),Ke=Ht(qe)||Vt(qe)?qe:Te,W=!Ce(Ke)&&!Ce(Ke.ease),R=W?Ke.ease:Ke,P=W?Ke.settlingDuration:ot(ze(rt.duration,ke>1?ot(N,I,ue,X,null,xe)/ke:N),I,ue,X,null,xe),ae=ot(ze(rt.delay,pe?0:j),I,ue,X,null,xe),he=rt.modifier||O,ie=!Ce(J),Le=!Ce(Re),Yt=Lt(Re),io=Yt||ie&&Le,wn=K?ye+ae:ae,_n=Se(L+wn,12);!Y&&(ie||Yt)&&(Y=1);let Ye=K;if(Me!==Pe.none){let ge=F._head;for(;ge&&!ge._isOverridden&&ge._absoluteStartTime<=_n;)if(Ye=ge,ge=ge._nextRep,ge&&ge._absoluteStartTime>=_n)for(;ge;)ln(ge),ge=ge._nextRep}if(io){Je(Yt?ot(Re[0],I,ue,X,Mn,xe):J,Z),Je(Yt?ot(Re[1],I,ue,X,tn,xe):Re,re);const ge=zt(I,te,Q,_t);Z.t===le.NUMBER&&(Ye?Ye._valueType===le.UNIT&&(Z.t=le.UNIT,Z.u=Ye._unit):(Je(ge,xt),xt.t===le.UNIT&&(Z.t=le.UNIT,Z.u=xt.u)))}else Le?Je(Re,re):K?zr(K,re):Je(r&&Ye&&Ye.parent.parent===r?Ye._value:zt(I,te,Q,_t),re),ie?Je(J,Z):K?zr(K,Z):Je(r&&Ye&&Ye.parent.parent===r?Ye._value:zt(I,te,Q,_t),Z);if(Z.o&&(Z.n=Nn(Ye?Ye._toNumber:Je(zt(I,te,Q,_t),xt).n,Z.n,Z.o)),re.o&&(re.n=Nn(Z.n,re.n,re.o)),Z.t!==re.t){if(Z.t===le.COMPLEX||re.t===le.COMPLEX){const ge=Z.t===le.COMPLEX?Z:re,Ge=Z.t===le.COMPLEX?re:Z;Ge.t=le.COMPLEX,Ge.s=$e(ge.s),Ge.d=ge.d.map(()=>Ge.n)}else if(Z.t===le.UNIT||re.t===le.UNIT){const ge=Z.t===le.UNIT?Z:re,Ge=Z.t===le.UNIT?re:Z;Ge.t=le.UNIT,Ge.u=ge.u}else if(Z.t===le.COLOR||re.t===le.COLOR){const ge=Z.t===le.COLOR?Z:re,Ge=Z.t===le.COLOR?re:Z;Ge.t=le.COLOR,Ge.s=ge.s,Ge.d=[0,0,0,1]}}if(Z.u!==re.u){let ge=re.u?Z:re;ge=Vr(I,ge,re.u?re.u:Z.u,!1)}if(re.d&&Z.d&&re.d.length!==Z.d.length){const ge=Z.d.length>re.d.length?Z:re,Ge=ge===Z?re:Z;Ge.d=ge.d.map((uf,Cr)=>Ce(Ge.d[Cr])?0:Ge.d[Cr]),Ge.s=$e(ge.s)}const Tn=Se(+P||be,12);let Tr=_t[te];Pt(Tr)||(_t[te]=null);const We={parent:this,id:Fa++,property:te,target:I,_value:null,_toFunc:tn.func,_fromFunc:Mn.func,_ease:qr(R),_fromNumbers:$e(Z.d),_toNumbers:$e(re.d),_strings:$e(re.s),_fromNumber:Z.n,_toNumber:re.n,_numbers:$e(Z.d),_number:Z.n,_unit:re.u,_modifier:he,_currentTime:0,_startTime:wn,_delay:+ae,_updateDuration:Tn,_changeDuration:Tn,_absoluteStartTime:_n,_tweenType:Q,_valueType:re.t,_composition:Me,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Tr,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};Me!==Pe.none&&hi(We,F);const Cn=We._valueType;Cn===le.COMPLEX?We._value=ai(We,1,-1):Cn===le.COLOR?We._value=oi(We,1,-1):Cn===le.UNIT?We._value=`${he(We._toNumber)}${We._unit}`:We._value=he(We._toNumber),isNaN(ce)&&(ce=We._startTime),ye=Se(wn+Tn,12),K=We,H++,Rt(this,We)}(isNaN($)||ce<$)&&($=ce),(isNaN(G)||ye>G)&&(G=ye),Q===ve.TRANSFORM&&(Ee=H-pe,oe=H)}if(!isNaN(Ee)){let V=0;Ne(this,Q=>{V>=Ee&&V<oe&&(Q._renderTransforms=1,Q._composition===Pe.blend&&Ne(At.animation,te=>{te.id===Q.id&&(te._renderTransforms=1)})),V++})}}c||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),$?(Ne(this,D=>{D._startTime-D._delay||(D._delay-=$),D._startTime-=$}),G-=$):$=0,G||(G=be,this.iterationCount=0),this.targets=l,this.id=Ce(p)?Yr:p,this.duration=G===be?be:Yn((G+this._loopDelay)*this.iterationCount-this._loopDelay)||be,this.onRender=_||C.onRender,this._ease=S,this._delay=$,this.iterationDuration=G,!this._autoplay&&Y&&this.onRender(this)}stretch(e){const n=this.duration;if(n===Bt(e))return this;const r=e/n;return Ne(this,s=>{s._updateDuration=Bt(s._updateDuration*r),s._changeDuration=Bt(s._changeDuration*r),s._currentTime*=r,s._startTime*=r,s._absoluteStartTime*=r}),super.stretch(e)}refresh(){return Ne(this,e=>{const n=e._toFunc,r=e._fromFunc;(n||r)&&(r?(Je(r(),Z),Z.u!==e._unit&&e.target[$t]&&Vr(e.target,Z,e._unit,!0),e._fromNumbers=$e(Z.d),e._fromNumber=Z.n):n&&(Je(zt(e.target,e.property,e._tweenType),xt),e._fromNumbers=$e(xt.d),e._fromNumber=xt.n),n&&(Je(n(),re),e._toNumbers=$e(re.d),e._strings=$e(re.s),e._toNumber=re.o?Nn(e._fromNumber,re.n,re.o):re.n))}),this.duration===be&&this.restart(),this}revert(){return super.revert(),ci(this)}then(e){return super.then(e)}}const fe=(t,e)=>new Ba(t,e,null,0,!1).init();/**
|
|
92
|
+
* Anime.js - waapi - ESM
|
|
93
|
+
* @version v4.4.1
|
|
94
|
+
* @license MIT
|
|
95
|
+
* @copyright 2026 - Julian Garnier
|
|
96
|
+
*/const Zr={_head:null,_tail:null},Ua=(t,e,n)=>{let r=Zr._head,s;for(;r;){const i=r._next,o=r.$el===t,a=!e||r.property===e,l=!n||r.parent===n;if(o&&a&&l){s=r.animation;try{s.commitStyles()}catch{}s.cancel(),ft(Zr,r);const c=r.parent;c&&(c._completed++,c.animations.length===c._completed&&(c.completed=!0,c.paused=!0,c.muteCallbacks||(c.onComplete(c),c._resolve(c))))}r=i}return s};/**
|
|
97
|
+
* Anime.js - utils - ESM
|
|
98
|
+
* @version v4.4.1
|
|
99
|
+
* @license MIT
|
|
100
|
+
* @copyright 2026 - Julian Garnier
|
|
101
|
+
*/const q=(t,e,n)=>{const r=gi(t);for(let s=0,i=r.length;s<i;s++)Ua(r[s],n,e&&e.controlAnimation&&e);return pi(r,e,n),r};/**
|
|
102
|
+
* Anime.js - easings - ESM
|
|
103
|
+
* @version v4.4.1
|
|
104
|
+
* @license MIT
|
|
105
|
+
* @copyright 2026 - Julian Garnier
|
|
106
|
+
*/const bi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ga=(t,e,n)=>{let r=0,s=1,i,o,a=0;do o=r+(s-r)/2,i=bi(o,e,n)-t,i>0?s=o:r=o;while(va(i)>1e-7&&++a<100);return o},$a=(t=.5,e=0,n=.5,r=1)=>t===e&&n===r?at:s=>s===0||s===1?s:bi(Ga(s,t,n),e,r),Be=280,me="out(2)",lt=200,Nt=1.015,xi=1.052,vi=[1,.98,1],cn=.12,Wt=540,Kn=.42,Va=700,Ha=.34,yi="cubic-bezier(0.25, 0.55, 0.35, 0.95)",Wa=$a(.25,.55,.35,.95),wi=720;function Jn(t){return typeof window>"u"?"none":getComputedStyle(document.documentElement).getPropertyValue(t).trim()||"none"}const Xa=()=>Jn("--shadow-none"),st=()=>Jn("--shadow-sm"),er=()=>Jn("--shadow-md");function tr(t,e){t&&t.style.setProperty("--el-shadow",e)}function ne(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function He(t,e,n=Nt,r){if(q(t),fe(t,{scale:e?n:1,duration:Be,ease:me}),r){const s=r.idle??Xa();t.style.setProperty("--el-shadow",e?r.hover:s)}}function tt(t){return q(t),fe(t,{scale:[...vi],duration:Be,ease:me})}function qa(t,e){return e==null||!(e instanceof Node)?!0:!t.contains(e)}function wt(t,e,n,r=Nt,s){return u.useEffect(()=>()=>{const i=t.current;i&&q(i)},[t]),u.useMemo(()=>({onPointerOver:a=>{if(!e||a.defaultPrevented)return;const l=a.currentTarget;if(!(a.target instanceof Node)||!l.contains(a.target)||!qa(l,a.relatedTarget)||ne())return;const c=t.current;c&&(n&&(n.current=!0),He(c,!0,r,s))},onPointerOut:a=>{const l=a.currentTarget,c=a.relatedTarget;if(c instanceof Node&&l.contains(c)||(n&&(n.current=!1),!e)||ne())return;const d=t.current;d&&He(d,!1,r,s)}}),[t,e,n,r,s])}function Ya(t,e,n,r,s){return wt(e,n,r,s)}function Za(t,e,n,r){return Math.max(...[[0,0],[n,0],[0,r],[n,r]].map(([i,o])=>Math.hypot(i-t,o-e)))}function nr(t,e,n,r){const s=t.getBoundingClientRect(),i=e-s.left,o=n-s.top,a=Za(i,o,s.width,s.height)*2;return{id:r,x:i,y:o,size:a}}function Qa(t,e){const n=t.currentTarget;return n?nr(n,t.clientX,t.clientY,e):null}function Ka({id:t,x:e,y:n,size:r,durationMs:s,opacityFrom:i,background:o,direction:a,onDone:l}){const c=u.useRef(null),d=u.useRef(l);return d.current=l,u.useLayoutEffect(()=>{const f=c.current;if(!f)return;let p=!1;q(f);const b=fe(f,{scale:[a==="out"?cn:1,a==="out"?1:cn],opacity:[i,0],duration:s,ease:Wa});return b.then(()=>{p||d.current(t)}),()=>{p=!0,q(f),b.revert()}},[t,e,n,r,s,i,o,a]),m.jsx("span",{ref:c,className:"pointer-events-none absolute z-0 rounded-full",style:{left:e-r/2,top:n-r/2,width:r,height:r,background:o,transformOrigin:"center center",transform:`scale(${a==="out"?cn:1})`},"aria-hidden":!0})}function _i({ripples:t,tone:e,onDone:n,durationMs:r=Wt,opacityFrom:s=Kn,direction:i="in"}){return m.jsx(m.Fragment,{children:t.map(o=>m.jsx(Ka,{...o,background:e,durationMs:r,opacityFrom:s,direction:i,onDone:n},o.id))})}function Ti(){const t=u.useRef(0),[e,n]=u.useState([]),r=u.useCallback(o=>{n(a=>a.filter(l=>l.id!==o))},[]),s=u.useCallback((o,a,l)=>{const c=++t.current,d=nr(o,a,l,c);n(f=>[...f,d])},[]),i=u.useCallback(o=>{const a=o.currentTarget;a&&s(a,o.clientX,o.clientY)},[s]);return{ripples:e,pushFromPointer:i,pushAtClientCoords:s,dismiss:r}}const Ja={namespace:"burne",tailwindBridge:{"font-sans":"font-family-sans","font-mono":"font-family-mono","spacing-xsmall":"space-xsmall","spacing-small":"space-small","spacing-base":"space-base","spacing-plus":"space-plus","spacing-mid":"space-mid","spacing-large":"space-large","spacing-xlarge":"space-xlarge","radius-xsmall":"radius-value-xsmall","radius-small":"radius-value-small","radius-base":"radius-value-base","radius-mid":"radius-value-mid","radius-large":"radius-value-large","color-background":"color-background","color-foreground":"color-foreground","color-muted":"color-muted","color-surface":"color-surface","border-base":"color-border","color-accent":"color-accent","color-accent-foreground":"color-accent-foreground","color-accent-fill-hover":"color-accent-fill-hover","color-accent-solid-hover":"color-accent-solid-hover","color-secondary-fill-hover":"color-secondary-fill-hover","color-converge-ripple-accent-fill":"color-converge-ripple-accent-fill","color-converge-ripple-accent-soft":"color-converge-ripple-accent-soft","color-converge-ripple-accent-muted":"color-converge-ripple-accent-muted","color-converge-ripple-danger":"color-converge-ripple-danger","color-converge-ripple-info":"color-converge-ripple-info","color-converge-ripple-success":"color-converge-ripple-success","color-converge-ripple-secondary":"color-converge-ripple-secondary","color-converge-ripple-warning":"color-converge-ripple-warning","color-danger":"color-danger","color-danger-foreground":"color-danger-foreground","color-danger-fill-hover":"color-danger-fill-hover","color-success":"color-success","color-success-foreground":"color-success-foreground","color-success-fill-hover":"color-success-fill-hover","color-info":"color-info","color-info-foreground":"color-info-foreground","color-info-fill-hover":"color-info-fill-hover","color-warning":"color-warning","color-warning-foreground":"color-warning-foreground","color-warning-fill-hover":"color-warning-fill-hover","color-surface-tint-danger":"color-surface-tint-danger","color-surface-tint-success":"color-surface-tint-success","color-surface-tint-info":"color-surface-tint-info","color-surface-tint-warning":"color-surface-tint-warning","color-surface-tint-accent":"color-surface-tint-accent","color-surface-tint-danger-strong":"color-surface-tint-danger-strong","color-surface-tint-success-strong":"color-surface-tint-success-strong","color-surface-tint-warning-strong":"color-surface-tint-warning-strong","icon-xsmall":"icon-size-xsmall","icon-small":"icon-size-small","icon-base":"icon-size-base","icon-mid":"icon-size-mid","icon-large":"icon-size-large","icon-xlarge":"icon-size-xlarge","icon-2xlarge":"icon-size-2xlarge"}},el=["--color-background","--color-surface","--color-border","--color-foreground","--color-muted","--color-accent","--color-accent-foreground","--color-accent-fill-hover","--color-accent-solid-hover","--color-secondary-fill-hover","--color-converge-ripple-accent-fill","--color-converge-ripple-accent-soft","--color-converge-ripple-accent-muted","--color-converge-ripple-danger","--color-converge-ripple-info","--color-converge-ripple-success","--color-converge-ripple-secondary","--color-converge-ripple-warning","--color-danger","--color-danger-fill-hover","--color-danger-foreground","--color-success","--color-success-foreground","--color-success-fill-hover","--color-info","--color-info-foreground","--color-info-fill-hover","--color-warning","--color-warning-foreground","--color-warning-fill-hover","--color-surface-tint-danger","--color-surface-tint-success","--color-surface-tint-info","--color-surface-tint-warning","--color-surface-tint-accent","--color-surface-tint-danger-strong","--color-surface-tint-success-strong","--color-surface-tint-warning-strong","--font-family-sans","--font-family-mono","--space-xsmall","--space-small","--space-base","--space-plus","--space-mid","--space-large","--space-xlarge","--radius-value-xsmall","--radius-value-small","--radius-value-base","--radius-value-mid","--radius-value-large","--text-accent-header-size","--text-accent-header-line-height","--text-accent-header-weight","--text-header-1-size","--text-header-1-line-height","--text-header-1-weight","--text-header-2-size","--text-header-2-line-height","--text-header-2-weight","--text-large-size","--text-large-line-height","--text-large-weight","--text-base-size","--text-base-line-height","--text-base-weight","--text-small-size","--text-small-line-height","--text-small-weight","--text-mid-size","--text-mid-line-height","--text-mid-weight","--text-tools-size","--text-tools-line-height","--text-tools-weight","--max-component-small","--max-component-base","--max-component-mid","--max-component-large","--button-min-width-s","--button-min-width-m","--button-min-width-l","--button-min-width-xl","--icon-size-xsmall","--icon-size-small","--icon-size-base","--icon-size-mid","--icon-size-large","--icon-size-xlarge","--icon-size-2xlarge","--ease-out","--duration-fast","--duration-normal","--glass-blur","--glass-blur-edge","--glass-saturate","--glass-tint","--glass-tint-veil","--glass-border","--glass-highlight","--glass-edge-falloff"];function Fe(t){return`var(--color-${t})`}const un={accentSolid:Fe("converge-ripple-accent-fill"),accentSoft:Fe("converge-ripple-accent-soft"),secondary:Fe("converge-ripple-secondary"),danger:Fe("converge-ripple-danger"),success:Fe("converge-ripple-success"),info:Fe("converge-ripple-info"),warning:Fe("converge-ripple-warning"),accentMuted:Fe("converge-ripple-accent-muted")};function tl(t){return t==null||t===""?un.accentSoft:Object.hasOwn(un,t)?un[t]:t}function nl(t){return t.closest("button,a[href],[role='button']")??t.parentElement}function Xt({color:t,tone:e,disabled:n=!1,duration:r=Wt,direction:s="in",className:i=""}){const o=u.useRef(null),{ripples:a,pushAtClientCoords:l,dismiss:c}=Ti(),d=tl(t??e);return u.useLayoutEffect(()=>{const f=o.current;if(!f||n)return;const p=nl(f);if(!p)return;const h=g=>{n||ne()||g.defaultPrevented||g.pointerType==="mouse"&&g.button!==0||l(p,g.clientX,g.clientY)};return p.addEventListener("pointerdown",h),()=>p.removeEventListener("pointerdown",h)},[n,l]),m.jsx("span",{ref:o,className:E("pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]",i),"aria-hidden":!0,children:m.jsx(_i,{ripples:a,tone:d,onDone:c,durationMs:r,opacityFrom:Kn,direction:s})})}function gn(t){if(t==null)return"";const{orientation:e,position:n}=t;return n==="only"?"rounded-base":e==="horizontal"?n==="first"?"rounded-l-base rounded-r-none":n==="middle"?"rounded-none":"rounded-r-base rounded-l-none":n==="first"?"rounded-t-base rounded-b-none":n==="middle"?"rounded-none":"rounded-b-base rounded-t-none"}function rr(t){if(t==null||t.position==="only")return"";const{orientation:e,position:n}=t;return e==="horizontal"?n==="first"?"":"border-l-0":n==="first"?"":"border-t-0"}function rl(t){return E("inline-flex shrink-0 select-none items-center justify-center border border-base bg-surface text-muted",gn(t),rr(t),"z-0")}const sl={"accent-header":"text-accent-header","header-1":"text-header-1","header-2":"text-header-2",large:"text-large",mid:"text-mid",base:"text-base",small:"text-small",tools:"text-tools"},il={"accent-header":"h1","header-1":"h2","header-2":"h3",large:"p",mid:"p",base:"p",small:"p",tools:"p"},ee=u.forwardRef(function({variant:e,as:n,inheritColor:r,className:s,children:i,...o},a){const l=n??il[e];return u.createElement(l,{...o,ref:a,className:E(sl[e],!r&&"text-foreground",s),children:i})}),ol=new Set(["default","outline","secondary","ghost","danger","success","info","warning"]),Ci={default:{root:"bg-accent text-accent-foreground border border-base",focusOutline:"focus-visible:outline-accent",convergeBg:Fe("converge-ripple-accent-fill"),loaderText:"text-accent-foreground",hoverIdle:"hover:bg-accent-solid-hover"},outline:{root:"surface-outline text-accent",focusOutline:"focus-visible:outline-accent",convergeBg:Fe("converge-ripple-accent-soft"),loaderText:"text-accent",hoverIdle:"hover:bg-accent-fill-hover"},secondary:{root:"surface-secondary text-accent",focusOutline:"focus-visible:outline-accent",convergeBg:Fe("converge-ripple-secondary"),loaderText:"text-accent",hoverIdle:"hover:bg-secondary-fill-hover"},ghost:{root:"bg-transparent text-accent border border-transparent",focusOutline:"focus-visible:outline-accent",convergeBg:Fe("converge-ripple-accent-soft"),loaderText:"text-accent",hoverIdle:"hover:bg-accent-fill-hover"},danger:{root:"bg-danger text-danger-foreground border border-transparent",focusOutline:"focus-visible:outline-danger",convergeBg:Fe("converge-ripple-danger"),loaderText:"text-danger-foreground",hoverIdle:"hover:bg-danger-fill-hover"},success:{root:"bg-success text-success-foreground border border-transparent",focusOutline:"focus-visible:outline-success",convergeBg:Fe("converge-ripple-success"),loaderText:"text-success-foreground",hoverIdle:"hover:bg-success-fill-hover"},info:{root:"bg-info text-info-foreground border border-transparent",focusOutline:"focus-visible:outline-info",convergeBg:Fe("converge-ripple-info"),loaderText:"text-info-foreground",hoverIdle:"hover:bg-info-fill-hover"},warning:{root:"bg-warning text-warning-foreground border border-transparent",focusOutline:"focus-visible:outline-warning",convergeBg:Fe("converge-ripple-warning"),loaderText:"text-warning-foreground",hoverIdle:"hover:bg-warning-fill-hover"}};function al(t){return Ci[t].convergeBg}const ll={small:"small",base:"base",large:"mid",xlarge:"mid"},cl={small:{root:"min-h-7 min-w-button-small px-base py-xsmall",rootIconOnly:"min-h-7 min-w-fit px-base py-xsmall",spinner:"icon-small border-2",icon:"icon-small"},base:{root:"min-h-8 min-w-button-base px-plus py-small",rootIconOnly:"min-h-8 min-w-fit px-plus py-small",spinner:"icon-base border-2",icon:"icon-base"},large:{root:"min-h-10 min-w-button-large px-mid py-base",rootIconOnly:"min-h-10 min-w-fit px-mid py-base",spinner:"icon-large border-2",icon:"icon-large"},xlarge:{root:"min-h-12 min-w-button-xlarge px-large py-base",rootIconOnly:"min-h-12 min-w-fit px-large py-base",spinner:"icon-large border-[2.5px]",icon:"icon-large"}};function ul(t,e,n,r){return Math.max(...[[0,0],[n,0],[0,r],[n,r]].map(([i,o])=>Math.hypot(i-t,o-e)))}function dl(t,e){return 2*ul(t/2,e/2,t,e)}function fl({className:t}){return m.jsx("span",{className:`box-border inline-block rounded-full border-current border-t-transparent ${t??""}`,"aria-hidden":!0})}function hl({className:t}){return m.jsx("svg",{className:`shrink-0 ${t??""}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:m.jsx("path",{d:"M20 6L9 17l-5-5"})})}function ml({className:t}){return m.jsx("svg",{className:`shrink-0 ${t??""}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":!0,children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}const vn=u.forwardRef(function({className:e="",variant:n="default",size:r="base",type:s="button",animated:i=!0,asyncState:o,onAsyncStateChange:a,onAsyncClick:l,asyncFeedbackMs:c=2e3,onPointerDown:d,onPointerEnter:f,onPointerLeave:p,onMouseDown:h,onClick:g,disabled:b,leftIcon:x,ripple:v=!1,iconOnly:T=!1,groupSegment:_,children:C,...k},y){const S=!!b,w=u.useRef(null),M=u.useRef(!1),N=u.useRef("idle"),j=u.useRef(0),O=u.useRef("idle"),z=u.useRef(!1),[L,G]=u.useState("idle"),$=o!==void 0,H=$?o:L;N.current=H;const[Y,D]=u.useState([]),I=u.useCallback(J=>{w.current=J,typeof y=="function"?y(J):y&&(y.current=J)},[y]),ue=u.useCallback(J=>{const Te=w.current;if(!Te)return;const qe=Te.getBoundingClientRect(),Ke=dl(qe.width,qe.height),W=++j.current;D(R=>[...R,{id:W,size:Ke,tone:J}])},[]),X=u.useRef(!0);u.useEffect(()=>{if(!$){if(X.current){X.current=!1;return}a==null||a(L)}},[L,$,a]),u.useEffect(()=>{const J=O.current;(H==="success"||H==="error")&&J==="loading"&&ue(H==="success"?"success":"error"),O.current=H},[H,ue]),u.useEffect(()=>{if($||H!=="success"&&H!=="error")return;const J=window.setTimeout(()=>{G("idle")},c);return()=>window.clearTimeout(J)},[H,$,c]);const oe=S||(H==="loading"||H==="success"||H==="error");u.useEffect(()=>{const J=w.current;!oe||!J||(M.current=!1,q(J))},[oe]);const V=ol.has(n)?{hover:st()}:void 0,Q=u.useCallback(J=>{if(f==null||f(J),J.defaultPrevented||oe||ne())return;const Te=w.current;Te&&(M.current=!0,He(Te,!0,void 0,V))},[oe,f,V]),te=u.useCallback(J=>{if(p==null||p(J),M.current=!1,ne())return;const Te=w.current;!Te||oe||He(Te,!1,void 0,V)},[oe,p,V]);function de(){if(!i||!w.current||H!=="idle"||ne())return;const J=w.current;tt(J).then(()=>{const Te=w.current;!Te||Te.disabled||N.current!=="idle"||ne()||M.current&&He(Te,!0,void 0,V)})}const A=u.useCallback(J=>{D(Te=>Te.filter(qe=>qe.id!==J))},[]),F=u.useCallback(J=>{g==null||g(J),!($||!l||J.defaultPrevented)&&(z.current||L!=="idle"||(z.current=!0,G("loading"),Promise.resolve(l(J)).then(Te=>{G(Te?"success":"error")}).catch(()=>{G("error")}).finally(()=>{z.current=!1})))},[g,l,$,L]),K="relative overflow-hidden inline-flex items-center justify-center font-medium outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",ce=Ci[n],ye=H!=="idle"?"opacity-0 scale-[0.92]":"opacity-100 scale-100",pe=H==="success"?"opacity-100 scale-100":"pointer-events-none opacity-0 scale-[0.85]",ke=H==="error"?"opacity-100 scale-100":"pointer-events-none opacity-0 scale-[0.85]",we="flex items-center justify-center transition-all duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none",_e=cl[r],Me=T?_e.rootIconOnly:_e.root,Ae=oe?"":E("button-idle-surface-transition motion-reduce:transition-none",ce.hoverIdle),xe=_?gn(_):"rounded-base",Ue=_?E(rr(_),"z-0 hover:z-[2] focus-visible:z-[2] active:z-[2]"):"",Re=_?gn(_):"rounded-base";return m.jsxs("button",{ref:I,...k,type:s,disabled:oe,"aria-busy":H==="loading",className:E(K,Ue,ce.focusOutline,Me,ce.root,"animate-shadow",S?"opacity-50":"",Ae,xe,e,"cursor-pointer rounded-base"),onPointerDown:J=>{de(),d==null||d(J)},onPointerEnter:Q,onPointerLeave:te,onMouseDown:h,onClick:F,children:[v?m.jsx(Xt,{color:ce.convergeBg,disabled:oe||H!=="idle",duration:Wt,className:Re}):null,m.jsx("span",{className:E("pointer-events-none absolute inset-0 z-0 overflow-hidden",Re),"aria-hidden":!0,children:Y.map(J=>m.jsx("span",{className:"pointer-events-none absolute left-1/2 top-1/2 z-0 rounded-full will-change-[transform,opacity]",style:{width:J.size,height:J.size,marginLeft:-J.size/2,marginTop:-J.size/2,background:J.tone==="success"?"color-mix(in oklab, var(--color-success) 55%, transparent)":"color-mix(in oklab, var(--color-danger) 55%, transparent)",animation:`button-ripple-expand ${wi}ms ${yi} forwards`},onAnimationEnd:()=>A(J.id)},J.id))}),m.jsxs("span",{className:"relative z-[1] grid place-items-center",children:[m.jsxs("span",{className:`${we} col-start-1 row-start-1 ${ye} inline-flex min-w-0 items-center justify-center gap-small`,children:[x!=null?m.jsx("span",{className:`inline-flex shrink-0 items-center justify-center ${_e.icon} [&_svg]:size-full`,"aria-hidden":!0,children:x}):null,m.jsx(ee,{variant:ll[r],as:"span",inheritColor:!0,className:"min-w-0 shrink",children:C})]}),H==="loading"?m.jsx("span",{className:`${we} col-start-1 row-start-1 ${ce.loaderText} opacity-100 scale-100`,"aria-hidden":!0,children:m.jsx(fl,{className:`${_e.spinner} animate-spin motion-reduce:animate-none`})}):null,m.jsx("span",{className:`${we} col-start-1 row-start-1 text-success ${pe}`,"aria-hidden":H!=="success",children:m.jsx(hl,{className:_e.icon})}),m.jsx("span",{className:`${we} col-start-1 row-start-1 text-danger ${ke}`,"aria-hidden":H!=="error",children:m.jsx(ml,{className:_e.icon})})]})]})}),pl={default:{root:"border border-base bg-[color-mix(in_oklab,var(--color-border)_30%,var(--color-surface))] text-foreground",focusOutline:"focus-visible:outline-accent",hoverIdle:"hover:bg-[color-mix(in_oklab,var(--color-border)_48%,var(--color-surface))]",ripple:"secondary"},outline:{root:"surface-outline text-accent",focusOutline:"focus-visible:outline-accent",hoverIdle:"hover:bg-accent-fill-hover",ripple:"accentSoft"}},Qr={idle:st(),hover:er()},yn=u.forwardRef(function({variant:e="default",className:n,disabled:r,type:s="button","aria-label":i="Закрыть",onPointerDown:o,onPointerOver:a,onPointerOut:l,...c},d){const f=u.useRef(null),p=u.useRef(!1),h=u.useCallback(v=>{f.current=v,typeof d=="function"?d(v):d&&(d.current=v)},[d]),g=pl[e],b=wt(f,!r,p,void 0,Qr);u.useEffect(()=>{const v=f.current;!v||r||tr(v,st())},[r]),u.useEffect(()=>{const v=f.current;v&&r&&(q(v),p.current=!1,v.style.removeProperty("--el-shadow"))},[r]);const x=u.useCallback(v=>{if(o==null||o(v),v.defaultPrevented||r||ne())return;const T=f.current;T&&tt(T).then(()=>{const _=f.current;!_||r||ne()||p.current&&He(_,!0,void 0,Qr)})},[r,o]);return m.jsxs("button",{ref:h,type:s,disabled:r,"aria-label":i,className:E("relative z-0 flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full outline-none","animate-shadow button-idle-surface-transition motion-reduce:transition-none","overflow-hidden will-change-transform origin-center",g.root,g.hoverIdle,g.focusOutline,r&&"cursor-not-allowed opacity-50",n),onPointerOver:v=>{a==null||a(v),!v.defaultPrevented&&!r&&b.onPointerOver(v)},onPointerOut:v=>{l==null||l(v),r||b.onPointerOut(v)},onPointerDown:x,...c,children:[m.jsx(Xt,{color:g.ripple,disabled:!!r,duration:Wt}),m.jsx(Oe.IoClose,{"aria-hidden":!0,className:"relative z-[1] icon-base shrink-0 text-current"})]})});yn.displayName="CloseButton";function Ut(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function Vn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function gl(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Kr(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Jr(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function bl(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function xl(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Ln(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function vl(t,e){let n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(n*n+r*r+s*s)}function yl(t,e){let n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return n*n+r*r+s*s}function es(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function wl(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function _l(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Hn(t,e){let n=e[0],r=e[1],s=e[2],i=n*n+r*r+s*s;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function Ei(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ts(t,e,n){let r=e[0],s=e[1],i=e[2],o=n[0],a=n[1],l=n[2];return t[0]=s*l-i*a,t[1]=i*o-r*l,t[2]=r*a-s*o,t}function Tl(t,e,n,r){let s=e[0],i=e[1],o=e[2];return t[0]=s+r*(n[0]-s),t[1]=i+r*(n[1]-i),t[2]=o+r*(n[2]-o),t}function Cl(t,e,n,r,s){const i=Math.exp(-r*s);let o=e[0],a=e[1],l=e[2];return t[0]=n[0]+(o-n[0])*i,t[1]=n[1]+(a-n[1])*i,t[2]=n[2]+(l-n[2])*i,t}function El(t,e,n){let r=e[0],s=e[1],i=e[2],o=n[3]*r+n[7]*s+n[11]*i+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*s+n[8]*i+n[12])/o,t[1]=(n[1]*r+n[5]*s+n[9]*i+n[13])/o,t[2]=(n[2]*r+n[6]*s+n[10]*i+n[14])/o,t}function kl(t,e,n){let r=e[0],s=e[1],i=e[2],o=n[3]*r+n[7]*s+n[11]*i+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*s+n[8]*i)/o,t[1]=(n[1]*r+n[5]*s+n[9]*i)/o,t[2]=(n[2]*r+n[6]*s+n[10]*i)/o,t}function Rl(t,e,n){let r=e[0],s=e[1],i=e[2];return t[0]=r*n[0]+s*n[3]+i*n[6],t[1]=r*n[1]+s*n[4]+i*n[7],t[2]=r*n[2]+s*n[5]+i*n[8],t}function Al(t,e,n){let r=e[0],s=e[1],i=e[2],o=n[0],a=n[1],l=n[2],c=n[3],d=a*i-l*s,f=l*r-o*i,p=o*s-a*r,h=a*p-l*f,g=l*d-o*p,b=o*f-a*d,x=c*2;return d*=x,f*=x,p*=x,h*=2,g*=2,b*=2,t[0]=r+d+h,t[1]=s+f+g,t[2]=i+p+b,t}const Nl=(function(){const t=[0,0,0],e=[0,0,0];return function(n,r){Vn(t,n),Vn(e,r),Hn(t,t),Hn(e,e);let s=Ei(t,e);return s>1?0:s<-1?Math.PI:Math.acos(s)}})();function Sl(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}class et extends Array{constructor(e=0,n=e,r=e){return super(e,n,r),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this[0]=e}set y(e){this[1]=e}set z(e){this[2]=e}set(e,n=e,r=e){return e.length?this.copy(e):(gl(this,e,n,r),this)}copy(e){return Vn(this,e),this}add(e,n){return n?Kr(this,e,n):Kr(this,this,e),this}sub(e,n){return n?Jr(this,e,n):Jr(this,this,e),this}multiply(e){return e.length?bl(this,this,e):Ln(this,this,e),this}divide(e){return e.length?xl(this,this,e):Ln(this,this,1/e),this}inverse(e=this){return _l(this,e),this}len(){return Ut(this)}distance(e){return e?vl(this,e):Ut(this)}squaredLen(){return es(this)}squaredDistance(e){return e?yl(this,e):es(this)}negate(e=this){return wl(this,e),this}cross(e,n){return n?ts(this,e,n):ts(this,this,e),this}scale(e){return Ln(this,this,e),this}normalize(){return Hn(this,this),this}dot(e){return Ei(this,e)}equals(e){return Sl(this,e)}applyMatrix3(e){return Rl(this,this,e),this}applyMatrix4(e){return El(this,this,e),this}scaleRotateMatrix4(e){return kl(this,this,e),this}applyQuaternion(e){return Al(this,this,e),this}angle(e){return Nl(this,e)}lerp(e,n){return Tl(this,this,e,n),this}smoothLerp(e,n,r){return Cl(this,this,e,n,r),this}clone(){return new et(this[0],this[1],this[2])}fromArray(e,n=0){return this[0]=e[n],this[1]=e[n+1],this[2]=e[n+2],this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e}transformDirection(e){const n=this[0],r=this[1],s=this[2];return this[0]=e[0]*n+e[4]*r+e[8]*s,this[1]=e[1]*n+e[5]*r+e[9]*s,this[2]=e[2]*n+e[6]*r+e[10]*s,this.normalize()}}const ns=new et;let Il=1,Ml=1,rs=!1;class Ll{constructor(e,n={}){e.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=e,this.attributes=n,this.id=Il++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let r in n)this.addAttribute(r,n[r])}addAttribute(e,n){if(this.attributes[e]=n,n.id=Ml++,n.size=n.size||1,n.type=n.type||(n.data.constructor===Float32Array?this.gl.FLOAT:n.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),n.target=e==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,n.normalized=n.normalized||!1,n.stride=n.stride||0,n.offset=n.offset||0,n.count=n.count||(n.stride?n.data.byteLength/n.stride:n.data.length/n.size),n.divisor=n.instanced||0,n.needsUpdate=!1,n.usage=n.usage||this.gl.STATIC_DRAW,n.buffer||this.updateAttribute(n),n.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==n.count*n.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,n.count*n.divisor);this.instancedCount=n.count*n.divisor}else e==="index"?this.drawRange.count=n.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,n.count))}updateAttribute(e){const n=!e.buffer;n&&(e.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==e.buffer&&(this.gl.bindBuffer(e.target,e.buffer),this.glState.boundBuffer=e.buffer),n?this.gl.bufferData(e.target,e.data,e.usage):this.gl.bufferSubData(e.target,0,e.data),e.needsUpdate=!1}setIndex(e){this.addAttribute("index",e)}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}setInstancedCount(e){this.instancedCount=e}createVAO(e){this.VAOs[e.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.bindAttributes(e)}bindAttributes(e){e.attributeLocations.forEach((n,{name:r,type:s})=>{if(!this.attributes[r]){console.warn(`active attribute ${r} not being supplied`);return}const i=this.attributes[r];this.gl.bindBuffer(i.target,i.buffer),this.glState.boundBuffer=i.buffer;let o=1;s===35674&&(o=2),s===35675&&(o=3),s===35676&&(o=4);const a=i.size/o,l=o===1?0:o*o*4,c=o===1?0:o*4;for(let d=0;d<o;d++)this.gl.vertexAttribPointer(n+d,a,i.type,i.normalized,i.stride+l,i.offset+d*c),this.gl.enableVertexAttribArray(n+d),this.gl.renderer.vertexAttribDivisor(n+d,i.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:e,mode:n=this.gl.TRIANGLES}){var s;this.gl.renderer.currentGeometry!==`${this.id}_${e.attributeOrder}`&&(this.VAOs[e.attributeOrder]||this.createVAO(e),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${e.attributeOrder}`),e.attributeLocations.forEach((i,{name:o})=>{const a=this.attributes[o];a.needsUpdate&&this.updateAttribute(a)});let r=2;((s=this.attributes.index)==null?void 0:s.type)===this.gl.UNSIGNED_INT&&(r=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r,this.instancedCount):this.gl.renderer.drawArraysInstanced(n,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r):this.gl.drawArrays(n,this.drawRange.start,this.drawRange.count)}getPosition(){const e=this.attributes.position;if(e.data)return e;if(!rs)return console.warn("No position buffer data found to compute bounds"),rs=!0}computeBoundingBox(e){e||(e=this.getPosition());const n=e.data,r=e.size;this.bounds||(this.bounds={min:new et,max:new et,center:new et,scale:new et,radius:1/0});const s=this.bounds.min,i=this.bounds.max,o=this.bounds.center,a=this.bounds.scale;s.set(1/0),i.set(-1/0);for(let l=0,c=n.length;l<c;l+=r){const d=n[l],f=n[l+1],p=n[l+2];s.x=Math.min(d,s.x),s.y=Math.min(f,s.y),s.z=Math.min(p,s.z),i.x=Math.max(d,i.x),i.y=Math.max(f,i.y),i.z=Math.max(p,i.z)}a.sub(i,s),o.add(s,i).divide(2)}computeBoundingSphere(e){e||(e=this.getPosition());const n=e.data,r=e.size;this.bounds||this.computeBoundingBox(e);let s=0;for(let i=0,o=n.length;i<o;i+=r)ns.fromArray(n,i),s=Math.max(s,this.bounds.center.squaredDistance(ns));this.bounds.radius=Math.sqrt(s)}remove(){for(let e in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[e]),delete this.VAOs[e];for(let e in this.attributes)this.gl.deleteBuffer(this.attributes[e].buffer),delete this.attributes[e]}}let Ol=1;const ss={};class jl{constructor(e,{vertex:n,fragment:r,uniforms:s={},transparent:i=!1,cullFace:o=e.BACK,frontFace:a=e.CCW,depthTest:l=!0,depthWrite:c=!0,depthFunc:d=e.LEQUAL}={}){e.canvas||console.error("gl not passed as first argument to Program"),this.gl=e,this.uniforms=s,this.id=Ol++,n||console.warn("vertex shader not supplied"),r||console.warn("fragment shader not supplied"),this.transparent=i,this.cullFace=o,this.frontFace=a,this.depthTest=l,this.depthWrite=c,this.depthFunc=d,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=e.createShader(e.VERTEX_SHADER),this.fragmentShader=e.createShader(e.FRAGMENT_SHADER),this.program=e.createProgram(),e.attachShader(this.program,this.vertexShader),e.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:n,fragment:r})}setShaders({vertex:e,fragment:n}){if(e&&(this.gl.shaderSource(this.vertexShader,e),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}
|
|
107
|
+
Vertex Shader
|
|
108
|
+
${is(e)}`)),n&&(this.gl.shaderSource(this.fragmentShader,n),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}
|
|
109
|
+
Fragment Shader
|
|
110
|
+
${is(n)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let o=0;o<r;o++){let a=this.gl.getActiveUniform(this.program,o);this.uniformLocations.set(a,this.gl.getUniformLocation(this.program,a.name));const l=a.name.match(/(\w+)/g);a.uniformName=l[0],a.nameComponents=l.slice(1)}this.attributeLocations=new Map;const s=[],i=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let o=0;o<i;o++){const a=this.gl.getActiveAttrib(this.program,o),l=this.gl.getAttribLocation(this.program,a.name);l!==-1&&(s[l]=a.name,this.attributeLocations.set(a,l))}this.attributeOrder=s.join("")}setBlendFunc(e,n,r,s){this.blendFunc.src=e,this.blendFunc.dst=n,this.blendFunc.srcAlpha=r,this.blendFunc.dstAlpha=s,e&&(this.transparent=!0)}setBlendEquation(e,n){this.blendEquation.modeRGB=e,this.blendEquation.modeAlpha=n}setStencilFunc(e,n,r){this.stencilRef=n,this.stencilFunc.func=e,this.stencilFunc.ref=n,this.stencilFunc.mask=r}setStencilOp(e,n,r){this.stencilOp.stencilFail=e,this.stencilOp.depthFail=n,this.stencilOp.depthPass=r}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:e=!1}={}){let n=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((s,i)=>{let o=this.uniforms[i.uniformName];for(const a of i.nameComponents){if(!o)break;if(a in o)o=o[a];else{if(Array.isArray(o.value))break;o=void 0;break}}if(!o)return os(`Active uniform ${i.name} has not been supplied`);if(o&&o.value===void 0)return os(`${i.name} uniform is missing a value parameter`);if(o.value.texture)return n=n+1,o.value.update(n),On(this.gl,i.type,s,n);if(o.value.length&&o.value[0].texture){const a=[];return o.value.forEach(l=>{n=n+1,l.update(n),a.push(n)}),On(this.gl,i.type,s,a)}On(this.gl,i.type,s,o.value)}),this.applyState(),e&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function On(t,e,n,r){r=r.length?Dl(r):r;const s=t.renderer.state.uniformLocations.get(n);if(r.length)if(s===void 0||s.length!==r.length)t.renderer.state.uniformLocations.set(n,r.slice(0));else{if(zl(s,r))return;s.set?s.set(r):Fl(s,r),t.renderer.state.uniformLocations.set(n,s)}else{if(s===r)return;t.renderer.state.uniformLocations.set(n,r)}switch(e){case 5126:return r.length?t.uniform1fv(n,r):t.uniform1f(n,r);case 35664:return t.uniform2fv(n,r);case 35665:return t.uniform3fv(n,r);case 35666:return t.uniform4fv(n,r);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return r.length?t.uniform1iv(n,r):t.uniform1i(n,r);case 35671:case 35667:return t.uniform2iv(n,r);case 35672:case 35668:return t.uniform3iv(n,r);case 35673:case 35669:return t.uniform4iv(n,r);case 35674:return t.uniformMatrix2fv(n,!1,r);case 35675:return t.uniformMatrix3fv(n,!1,r);case 35676:return t.uniformMatrix4fv(n,!1,r)}}function is(t){let e=t.split(`
|
|
111
|
+
`);for(let n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join(`
|
|
112
|
+
`)}function Dl(t){const e=t.length,n=t[0].length;if(n===void 0)return t;const r=e*n;let s=ss[r];s||(ss[r]=s=new Float32Array(r));for(let i=0;i<e;i++)s.set(t[i],i*n);return s}function zl(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Fl(t,e){for(let n=0,r=t.length;n<r;n++)t[n]=e[n]}let jn=0;function os(t){jn>100||(console.warn(t),jn++,jn>100&&console.warn("More than 100 program warnings - stopping logs."))}const Dn=new et;let Pl=1;class Bl{constructor({canvas:e=document.createElement("canvas"),width:n=300,height:r=150,dpr:s=1,alpha:i=!1,depth:o=!0,stencil:a=!1,antialias:l=!1,premultipliedAlpha:c=!1,preserveDrawingBuffer:d=!1,powerPreference:f="default",autoClear:p=!0,webgl:h=2}={}){const g={alpha:i,depth:o,stencil:a,antialias:l,premultipliedAlpha:c,preserveDrawingBuffer:d,powerPreference:f};this.dpr=s,this.alpha=i,this.color=!0,this.depth=o,this.stencil=a,this.premultipliedAlpha=c,this.autoClear=p,this.id=Pl++,h===2&&(this.gl=e.getContext("webgl2",g)),this.isWebgl2=!!this.gl,this.gl||(this.gl=e.getContext("webgl",g)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(n,r),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(e,n){this.width=e,this.height=n,this.gl.canvas.width=e*this.dpr,this.gl.canvas.height=n*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:e+"px",height:n+"px"})}setViewport(e,n,r=0,s=0){this.state.viewport.width===e&&this.state.viewport.height===n||(this.state.viewport.width=e,this.state.viewport.height=n,this.state.viewport.x=r,this.state.viewport.y=s,this.gl.viewport(r,s,e,n))}setScissor(e,n,r=0,s=0){this.gl.scissor(r,s,e,n)}enable(e){this.state[e]!==!0&&(this.gl.enable(e),this.state[e]=!0)}disable(e){this.state[e]!==!1&&(this.gl.disable(e),this.state[e]=!1)}setBlendFunc(e,n,r,s){this.state.blendFunc.src===e&&this.state.blendFunc.dst===n&&this.state.blendFunc.srcAlpha===r&&this.state.blendFunc.dstAlpha===s||(this.state.blendFunc.src=e,this.state.blendFunc.dst=n,this.state.blendFunc.srcAlpha=r,this.state.blendFunc.dstAlpha=s,r!==void 0?this.gl.blendFuncSeparate(e,n,r,s):this.gl.blendFunc(e,n))}setBlendEquation(e,n){e=e||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===e&&this.state.blendEquation.modeAlpha===n)&&(this.state.blendEquation.modeRGB=e,this.state.blendEquation.modeAlpha=n,n!==void 0?this.gl.blendEquationSeparate(e,n):this.gl.blendEquation(e))}setCullFace(e){this.state.cullFace!==e&&(this.state.cullFace=e,this.gl.cullFace(e))}setFrontFace(e){this.state.frontFace!==e&&(this.state.frontFace=e,this.gl.frontFace(e))}setDepthMask(e){this.state.depthMask!==e&&(this.state.depthMask=e,this.gl.depthMask(e))}setDepthFunc(e){this.state.depthFunc!==e&&(this.state.depthFunc=e,this.gl.depthFunc(e))}setStencilMask(e){this.state.stencilMask!==e&&(this.state.stencilMask=e,this.gl.stencilMask(e))}setStencilFunc(e,n,r){this.state.stencilFunc===e&&this.state.stencilRef===n&&this.state.stencilFuncMask===r||(this.state.stencilFunc=e||this.gl.ALWAYS,this.state.stencilRef=n||0,this.state.stencilFuncMask=r||0,this.gl.stencilFunc(e||this.gl.ALWAYS,n||0,r||0))}setStencilOp(e,n,r){this.state.stencilFail===e&&this.state.stencilDepthFail===n&&this.state.stencilDepthPass===r||(this.state.stencilFail=e,this.state.stencilDepthFail=n,this.state.stencilDepthPass=r,this.gl.stencilOp(e,n,r))}activeTexture(e){this.state.activeTextureUnit!==e&&(this.state.activeTextureUnit=e,this.gl.activeTexture(this.gl.TEXTURE0+e))}bindFramebuffer({target:e=this.gl.FRAMEBUFFER,buffer:n=null}={}){this.state.framebuffer!==n&&(this.state.framebuffer=n,this.gl.bindFramebuffer(e,n))}getExtension(e,n,r){return n&&this.gl[n]?this.gl[n].bind(this.gl):(this.extensions[e]||(this.extensions[e]=this.gl.getExtension(e)),n?this.extensions[e]?this.extensions[e][r].bind(this.extensions[e]):null:this.extensions[e])}sortOpaque(e,n){return e.renderOrder!==n.renderOrder?e.renderOrder-n.renderOrder:e.program.id!==n.program.id?e.program.id-n.program.id:e.zDepth!==n.zDepth?e.zDepth-n.zDepth:n.id-e.id}sortTransparent(e,n){return e.renderOrder!==n.renderOrder?e.renderOrder-n.renderOrder:e.zDepth!==n.zDepth?n.zDepth-e.zDepth:n.id-e.id}sortUI(e,n){return e.renderOrder!==n.renderOrder?e.renderOrder-n.renderOrder:e.program.id!==n.program.id?e.program.id-n.program.id:n.id-e.id}getRenderList({scene:e,camera:n,frustumCull:r,sort:s}){let i=[];if(n&&r&&n.updateFrustum(),e.traverse(o=>{if(!o.visible)return!0;o.draw&&(r&&o.frustumCulled&&n&&!n.frustumIntersectsMesh(o)||i.push(o))}),s){const o=[],a=[],l=[];i.forEach(c=>{c.program.transparent?c.program.depthTest?a.push(c):l.push(c):o.push(c),c.zDepth=0,!(c.renderOrder!==0||!c.program.depthTest||!n)&&(c.worldMatrix.getTranslation(Dn),Dn.applyMatrix4(n.projectionViewMatrix),c.zDepth=Dn.z)}),o.sort(this.sortOpaque),a.sort(this.sortTransparent),l.sort(this.sortUI),i=o.concat(a,l)}return i}render({scene:e,camera:n,target:r=null,update:s=!0,sort:i=!0,frustumCull:o=!0,clear:a}){r===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(r),this.setViewport(r.width,r.height)),(a||this.autoClear&&a!==!1)&&(this.depth&&(!r||r.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!r||r.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),s&&e.updateMatrixWorld(),n&&n.updateMatrixWorld(),this.getRenderList({scene:e,camera:n,frustumCull:o,sort:i}).forEach(c=>{c.draw({camera:n})})}}function Ul(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Gl(t,e,n,r,s){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t}function $l(t,e){let n=e[0],r=e[1],s=e[2],i=e[3],o=n*n+r*r+s*s+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=s*o,t[3]=i*o,t}function Vl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Hl(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Wl(t,e,n){n=n*.5;let r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function as(t,e,n){let r=e[0],s=e[1],i=e[2],o=e[3],a=n[0],l=n[1],c=n[2],d=n[3];return t[0]=r*d+o*a+s*c-i*l,t[1]=s*d+o*l+i*a-r*c,t[2]=i*d+o*c+r*l-s*a,t[3]=o*d-r*a-s*l-i*c,t}function Xl(t,e,n){n*=.5;let r=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l+o*a,t[1]=s*l+i*a,t[2]=i*l-s*a,t[3]=o*l-r*a,t}function ql(t,e,n){n*=.5;let r=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l-i*a,t[1]=s*l+o*a,t[2]=i*l+r*a,t[3]=o*l-s*a,t}function Yl(t,e,n){n*=.5;let r=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l+s*a,t[1]=s*l-r*a,t[2]=i*l+o*a,t[3]=o*l-i*a,t}function Zl(t,e,n,r){let s=e[0],i=e[1],o=e[2],a=e[3],l=n[0],c=n[1],d=n[2],f=n[3],p,h,g,b,x;return h=s*l+i*c+o*d+a*f,h<0&&(h=-h,l=-l,c=-c,d=-d,f=-f),1-h>1e-6?(p=Math.acos(h),g=Math.sin(p),b=Math.sin((1-r)*p)/g,x=Math.sin(r*p)/g):(b=1-r,x=r),t[0]=b*s+x*l,t[1]=b*i+x*c,t[2]=b*o+x*d,t[3]=b*a+x*f,t}function Ql(t,e){let n=e[0],r=e[1],s=e[2],i=e[3],o=n*n+r*r+s*s+i*i,a=o?1/o:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-s*a,t[3]=i*a,t}function Kl(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function Jl(t,e){let n=e[0]+e[4]+e[8],r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let s=0;e[4]>e[0]&&(s=1),e[8]>e[s*3+s]&&(s=2);let i=(s+1)%3,o=(s+2)%3;r=Math.sqrt(e[s*3+s]-e[i*3+i]-e[o*3+o]+1),t[s]=.5*r,r=.5/r,t[3]=(e[i*3+o]-e[o*3+i])*r,t[i]=(e[i*3+s]+e[s*3+i])*r,t[o]=(e[o*3+s]+e[s*3+o])*r}return t}function ec(t,e,n="YXZ"){let r=Math.sin(e[0]*.5),s=Math.cos(e[0]*.5),i=Math.sin(e[1]*.5),o=Math.cos(e[1]*.5),a=Math.sin(e[2]*.5),l=Math.cos(e[2]*.5);return n==="XYZ"?(t[0]=r*o*l+s*i*a,t[1]=s*i*l-r*o*a,t[2]=s*o*a+r*i*l,t[3]=s*o*l-r*i*a):n==="YXZ"?(t[0]=r*o*l+s*i*a,t[1]=s*i*l-r*o*a,t[2]=s*o*a-r*i*l,t[3]=s*o*l+r*i*a):n==="ZXY"?(t[0]=r*o*l-s*i*a,t[1]=s*i*l+r*o*a,t[2]=s*o*a+r*i*l,t[3]=s*o*l-r*i*a):n==="ZYX"?(t[0]=r*o*l-s*i*a,t[1]=s*i*l+r*o*a,t[2]=s*o*a-r*i*l,t[3]=s*o*l+r*i*a):n==="YZX"?(t[0]=r*o*l+s*i*a,t[1]=s*i*l+r*o*a,t[2]=s*o*a-r*i*l,t[3]=s*o*l-r*i*a):n==="XZY"&&(t[0]=r*o*l-s*i*a,t[1]=s*i*l-r*o*a,t[2]=s*o*a+r*i*l,t[3]=s*o*l+r*i*a),t}const tc=Ul,nc=Gl,rc=Vl,sc=$l;class ic extends Array{constructor(e=0,n=0,r=0,s=1){super(e,n,r,s),this.onChange=()=>{},this._target=this;const i=["0","1","2","3"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&i.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set w(e){this._target[3]=e,this.onChange()}identity(){return Hl(this._target),this.onChange(),this}set(e,n,r,s){return e.length?this.copy(e):(nc(this._target,e,n,r,s),this.onChange(),this)}rotateX(e){return Xl(this._target,this._target,e),this.onChange(),this}rotateY(e){return ql(this._target,this._target,e),this.onChange(),this}rotateZ(e){return Yl(this._target,this._target,e),this.onChange(),this}inverse(e=this._target){return Ql(this._target,e),this.onChange(),this}conjugate(e=this._target){return Kl(this._target,e),this.onChange(),this}copy(e){return tc(this._target,e),this.onChange(),this}normalize(e=this._target){return sc(this._target,e),this.onChange(),this}multiply(e,n){return n?as(this._target,e,n):as(this._target,this._target,e),this.onChange(),this}dot(e){return rc(this._target,e)}fromMatrix3(e){return Jl(this._target,e),this.onChange(),this}fromEuler(e,n){return ec(this._target,e,e.order),n||this.onChange(),this}fromAxisAngle(e,n){return Wl(this._target,e,n),this.onChange(),this}slerp(e,n){return Zl(this._target,this._target,e,n),this.onChange(),this}fromArray(e,n=0){return this._target[0]=e[n],this._target[1]=e[n+1],this._target[2]=e[n+2],this._target[3]=e[n+3],this.onChange(),this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e[n+3]=this[3],e}}const oc=1e-6;function ac(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function lc(t,e,n,r,s,i,o,a,l,c,d,f,p,h,g,b,x){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=i,t[5]=o,t[6]=a,t[7]=l,t[8]=c,t[9]=d,t[10]=f,t[11]=p,t[12]=h,t[13]=g,t[14]=b,t[15]=x,t}function cc(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uc(t,e){let n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],f=e[9],p=e[10],h=e[11],g=e[12],b=e[13],x=e[14],v=e[15],T=n*a-r*o,_=n*l-s*o,C=n*c-i*o,k=r*l-s*a,y=r*c-i*a,S=s*c-i*l,w=d*b-f*g,M=d*x-p*g,N=d*v-h*g,j=f*x-p*b,O=f*v-h*b,z=p*v-h*x,L=T*z-_*O+C*j+k*N-y*M+S*w;return L?(L=1/L,t[0]=(a*z-l*O+c*j)*L,t[1]=(s*O-r*z-i*j)*L,t[2]=(b*S-x*y+v*k)*L,t[3]=(p*y-f*S-h*k)*L,t[4]=(l*N-o*z-c*M)*L,t[5]=(n*z-s*N+i*M)*L,t[6]=(x*C-g*S-v*_)*L,t[7]=(d*S-p*C+h*_)*L,t[8]=(o*O-a*N+c*w)*L,t[9]=(r*N-n*O-i*w)*L,t[10]=(g*y-b*C+v*T)*L,t[11]=(f*C-d*y-h*T)*L,t[12]=(a*M-o*j-l*w)*L,t[13]=(n*j-r*M+s*w)*L,t[14]=(b*_-g*k-x*T)*L,t[15]=(d*k-f*_+p*T)*L,t):null}function ki(t){let e=t[0],n=t[1],r=t[2],s=t[3],i=t[4],o=t[5],a=t[6],l=t[7],c=t[8],d=t[9],f=t[10],p=t[11],h=t[12],g=t[13],b=t[14],x=t[15],v=e*o-n*i,T=e*a-r*i,_=e*l-s*i,C=n*a-r*o,k=n*l-s*o,y=r*l-s*a,S=c*g-d*h,w=c*b-f*h,M=c*x-p*h,N=d*b-f*g,j=d*x-p*g,O=f*x-p*b;return v*O-T*j+_*N+C*M-k*w+y*S}function ls(t,e,n){let r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],l=e[5],c=e[6],d=e[7],f=e[8],p=e[9],h=e[10],g=e[11],b=e[12],x=e[13],v=e[14],T=e[15],_=n[0],C=n[1],k=n[2],y=n[3];return t[0]=_*r+C*a+k*f+y*b,t[1]=_*s+C*l+k*p+y*x,t[2]=_*i+C*c+k*h+y*v,t[3]=_*o+C*d+k*g+y*T,_=n[4],C=n[5],k=n[6],y=n[7],t[4]=_*r+C*a+k*f+y*b,t[5]=_*s+C*l+k*p+y*x,t[6]=_*i+C*c+k*h+y*v,t[7]=_*o+C*d+k*g+y*T,_=n[8],C=n[9],k=n[10],y=n[11],t[8]=_*r+C*a+k*f+y*b,t[9]=_*s+C*l+k*p+y*x,t[10]=_*i+C*c+k*h+y*v,t[11]=_*o+C*d+k*g+y*T,_=n[12],C=n[13],k=n[14],y=n[15],t[12]=_*r+C*a+k*f+y*b,t[13]=_*s+C*l+k*p+y*x,t[14]=_*i+C*c+k*h+y*v,t[15]=_*o+C*d+k*g+y*T,t}function dc(t,e,n){let r=n[0],s=n[1],i=n[2],o,a,l,c,d,f,p,h,g,b,x,v;return e===t?(t[12]=e[0]*r+e[4]*s+e[8]*i+e[12],t[13]=e[1]*r+e[5]*s+e[9]*i+e[13],t[14]=e[2]*r+e[6]*s+e[10]*i+e[14],t[15]=e[3]*r+e[7]*s+e[11]*i+e[15]):(o=e[0],a=e[1],l=e[2],c=e[3],d=e[4],f=e[5],p=e[6],h=e[7],g=e[8],b=e[9],x=e[10],v=e[11],t[0]=o,t[1]=a,t[2]=l,t[3]=c,t[4]=d,t[5]=f,t[6]=p,t[7]=h,t[8]=g,t[9]=b,t[10]=x,t[11]=v,t[12]=o*r+d*s+g*i+e[12],t[13]=a*r+f*s+b*i+e[13],t[14]=l*r+p*s+x*i+e[14],t[15]=c*r+h*s+v*i+e[15]),t}function fc(t,e,n){let r=n[0],s=n[1],i=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function hc(t,e,n,r){let s=r[0],i=r[1],o=r[2],a=Math.hypot(s,i,o),l,c,d,f,p,h,g,b,x,v,T,_,C,k,y,S,w,M,N,j,O,z,L,G;return Math.abs(a)<oc?null:(a=1/a,s*=a,i*=a,o*=a,l=Math.sin(n),c=Math.cos(n),d=1-c,f=e[0],p=e[1],h=e[2],g=e[3],b=e[4],x=e[5],v=e[6],T=e[7],_=e[8],C=e[9],k=e[10],y=e[11],S=s*s*d+c,w=i*s*d+o*l,M=o*s*d-i*l,N=s*i*d-o*l,j=i*i*d+c,O=o*i*d+s*l,z=s*o*d+i*l,L=i*o*d-s*l,G=o*o*d+c,t[0]=f*S+b*w+_*M,t[1]=p*S+x*w+C*M,t[2]=h*S+v*w+k*M,t[3]=g*S+T*w+y*M,t[4]=f*N+b*j+_*O,t[5]=p*N+x*j+C*O,t[6]=h*N+v*j+k*O,t[7]=g*N+T*j+y*O,t[8]=f*z+b*L+_*G,t[9]=p*z+x*L+C*G,t[10]=h*z+v*L+k*G,t[11]=g*z+T*L+y*G,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function mc(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Ri(t,e){let n=e[0],r=e[1],s=e[2],i=e[4],o=e[5],a=e[6],l=e[8],c=e[9],d=e[10];return t[0]=Math.hypot(n,r,s),t[1]=Math.hypot(i,o,a),t[2]=Math.hypot(l,c,d),t}function pc(t){let e=t[0],n=t[1],r=t[2],s=t[4],i=t[5],o=t[6],a=t[8],l=t[9],c=t[10];const d=e*e+n*n+r*r,f=s*s+i*i+o*o,p=a*a+l*l+c*c;return Math.sqrt(Math.max(d,f,p))}const Ai=(function(){const t=[1,1,1];return function(e,n){let r=t;Ri(r,n);let s=1/r[0],i=1/r[1],o=1/r[2],a=n[0]*s,l=n[1]*i,c=n[2]*o,d=n[4]*s,f=n[5]*i,p=n[6]*o,h=n[8]*s,g=n[9]*i,b=n[10]*o,x=a+f+b,v=0;return x>0?(v=Math.sqrt(x+1)*2,e[3]=.25*v,e[0]=(p-g)/v,e[1]=(h-c)/v,e[2]=(l-d)/v):a>f&&a>b?(v=Math.sqrt(1+a-f-b)*2,e[3]=(p-g)/v,e[0]=.25*v,e[1]=(l+d)/v,e[2]=(h+c)/v):f>b?(v=Math.sqrt(1+f-a-b)*2,e[3]=(h-c)/v,e[0]=(l+d)/v,e[1]=.25*v,e[2]=(p+g)/v):(v=Math.sqrt(1+b-a-f)*2,e[3]=(l-d)/v,e[0]=(h+c)/v,e[1]=(p+g)/v,e[2]=.25*v),e}})();function gc(t,e,n,r){let s=Ut([t[0],t[1],t[2]]);const i=Ut([t[4],t[5],t[6]]),o=Ut([t[8],t[9],t[10]]);ki(t)<0&&(s=-s),n[0]=t[12],n[1]=t[13],n[2]=t[14];const l=t.slice(),c=1/s,d=1/i,f=1/o;l[0]*=c,l[1]*=c,l[2]*=c,l[4]*=d,l[5]*=d,l[6]*=d,l[8]*=f,l[9]*=f,l[10]*=f,Ai(e,l),r[0]=s,r[1]=i,r[2]=o}function bc(t,e,n,r){const s=t,i=e[0],o=e[1],a=e[2],l=e[3],c=i+i,d=o+o,f=a+a,p=i*c,h=i*d,g=i*f,b=o*d,x=o*f,v=a*f,T=l*c,_=l*d,C=l*f,k=r[0],y=r[1],S=r[2];return s[0]=(1-(b+v))*k,s[1]=(h+C)*k,s[2]=(g-_)*k,s[3]=0,s[4]=(h-C)*y,s[5]=(1-(p+v))*y,s[6]=(x+T)*y,s[7]=0,s[8]=(g+_)*S,s[9]=(x-T)*S,s[10]=(1-(p+b))*S,s[11]=0,s[12]=n[0],s[13]=n[1],s[14]=n[2],s[15]=1,s}function xc(t,e){let n=e[0],r=e[1],s=e[2],i=e[3],o=n+n,a=r+r,l=s+s,c=n*o,d=r*o,f=r*a,p=s*o,h=s*a,g=s*l,b=i*o,x=i*a,v=i*l;return t[0]=1-f-g,t[1]=d+v,t[2]=p-x,t[3]=0,t[4]=d-v,t[5]=1-c-g,t[6]=h+b,t[7]=0,t[8]=p+x,t[9]=h-b,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function vc(t,e,n,r,s){let i=1/Math.tan(e/2),o=1/(r-s);return t[0]=i/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(s+r)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*s*r*o,t[15]=0,t}function yc(t,e,n,r,s,i,o){let a=1/(e-n),l=1/(r-s),c=1/(i-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*a,t[13]=(s+r)*l,t[14]=(o+i)*c,t[15]=1,t}function wc(t,e,n,r){let s=e[0],i=e[1],o=e[2],a=r[0],l=r[1],c=r[2],d=s-n[0],f=i-n[1],p=o-n[2],h=d*d+f*f+p*p;h===0?p=1:(h=1/Math.sqrt(h),d*=h,f*=h,p*=h);let g=l*p-c*f,b=c*d-a*p,x=a*f-l*d;return h=g*g+b*b+x*x,h===0&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,g=l*p-c*f,b=c*d-a*p,x=a*f-l*d,h=g*g+b*b+x*x),h=1/Math.sqrt(h),g*=h,b*=h,x*=h,t[0]=g,t[1]=b,t[2]=x,t[3]=0,t[4]=f*x-p*b,t[5]=p*g-d*x,t[6]=d*b-f*g,t[7]=0,t[8]=d,t[9]=f,t[10]=p,t[11]=0,t[12]=s,t[13]=i,t[14]=o,t[15]=1,t}function cs(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function us(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function _c(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}class bn extends Array{constructor(e=1,n=0,r=0,s=0,i=0,o=1,a=0,l=0,c=0,d=0,f=1,p=0,h=0,g=0,b=0,x=1){return super(e,n,r,s,i,o,a,l,c,d,f,p,h,g,b,x),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(e){this[12]=e}set y(e){this[13]=e}set z(e){this[14]=e}set w(e){this[15]=e}set(e,n,r,s,i,o,a,l,c,d,f,p,h,g,b,x){return e.length?this.copy(e):(lc(this,e,n,r,s,i,o,a,l,c,d,f,p,h,g,b,x),this)}translate(e,n=this){return dc(this,n,e),this}rotate(e,n,r=this){return hc(this,r,e,n),this}scale(e,n=this){return fc(this,n,typeof e=="number"?[e,e,e]:e),this}add(e,n){return n?cs(this,e,n):cs(this,this,e),this}sub(e,n){return n?us(this,e,n):us(this,this,e),this}multiply(e,n){return e.length?n?ls(this,e,n):ls(this,this,e):_c(this,this,e),this}identity(){return cc(this),this}copy(e){return ac(this,e),this}fromPerspective({fov:e,aspect:n,near:r,far:s}={}){return vc(this,e,n,r,s),this}fromOrthogonal({left:e,right:n,bottom:r,top:s,near:i,far:o}){return yc(this,e,n,r,s,i,o),this}fromQuaternion(e){return xc(this,e),this}setPosition(e){return this.x=e[0],this.y=e[1],this.z=e[2],this}inverse(e=this){return uc(this,e),this}compose(e,n,r){return bc(this,e,n,r),this}decompose(e,n,r){return gc(this,e,n,r),this}getRotation(e){return Ai(e,this),this}getTranslation(e){return mc(e,this),this}getScaling(e){return Ri(e,this),this}getMaxScaleOnAxis(){return pc(this)}lookAt(e,n,r){return wc(this,e,n,r),this}determinant(){return ki(this)}fromArray(e,n=0){return this[0]=e[n],this[1]=e[n+1],this[2]=e[n+2],this[3]=e[n+3],this[4]=e[n+4],this[5]=e[n+5],this[6]=e[n+6],this[7]=e[n+7],this[8]=e[n+8],this[9]=e[n+9],this[10]=e[n+10],this[11]=e[n+11],this[12]=e[n+12],this[13]=e[n+13],this[14]=e[n+14],this[15]=e[n+15],this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e[n+3]=this[3],e[n+4]=this[4],e[n+5]=this[5],e[n+6]=this[6],e[n+7]=this[7],e[n+8]=this[8],e[n+9]=this[9],e[n+10]=this[10],e[n+11]=this[11],e[n+12]=this[12],e[n+13]=this[13],e[n+14]=this[14],e[n+15]=this[15],e}}function Tc(t,e,n="YXZ"){return n==="XYZ"?(t[1]=Math.asin(Math.min(Math.max(e[8],-1),1)),Math.abs(e[8])<.99999?(t[0]=Math.atan2(-e[9],e[10]),t[2]=Math.atan2(-e[4],e[0])):(t[0]=Math.atan2(e[6],e[5]),t[2]=0)):n==="YXZ"?(t[0]=Math.asin(-Math.min(Math.max(e[9],-1),1)),Math.abs(e[9])<.99999?(t[1]=Math.atan2(e[8],e[10]),t[2]=Math.atan2(e[1],e[5])):(t[1]=Math.atan2(-e[2],e[0]),t[2]=0)):n==="ZXY"?(t[0]=Math.asin(Math.min(Math.max(e[6],-1),1)),Math.abs(e[6])<.99999?(t[1]=Math.atan2(-e[2],e[10]),t[2]=Math.atan2(-e[4],e[5])):(t[1]=0,t[2]=Math.atan2(e[1],e[0]))):n==="ZYX"?(t[1]=Math.asin(-Math.min(Math.max(e[2],-1),1)),Math.abs(e[2])<.99999?(t[0]=Math.atan2(e[6],e[10]),t[2]=Math.atan2(e[1],e[0])):(t[0]=0,t[2]=Math.atan2(-e[4],e[5]))):n==="YZX"?(t[2]=Math.asin(Math.min(Math.max(e[1],-1),1)),Math.abs(e[1])<.99999?(t[0]=Math.atan2(-e[9],e[5]),t[1]=Math.atan2(-e[2],e[0])):(t[0]=0,t[1]=Math.atan2(e[8],e[10]))):n==="XZY"&&(t[2]=Math.asin(-Math.min(Math.max(e[4],-1),1)),Math.abs(e[4])<.99999?(t[0]=Math.atan2(e[6],e[5]),t[1]=Math.atan2(e[8],e[0])):(t[0]=Math.atan2(-e[9],e[10]),t[1]=0)),t}const ds=new bn;class Cc extends Array{constructor(e=0,n=e,r=e,s="YXZ"){super(e,n,r),this.order=s,this.onChange=()=>{},this._target=this;const i=["0","1","2"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&i.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set(e,n=e,r=e){return e.length?this.copy(e):(this._target[0]=e,this._target[1]=n,this._target[2]=r,this.onChange(),this)}copy(e){return this._target[0]=e[0],this._target[1]=e[1],this._target[2]=e[2],this.onChange(),this}reorder(e){return this._target.order=e,this.onChange(),this}fromRotationMatrix(e,n=this.order){return Tc(this._target,e,n),this.onChange(),this}fromQuaternion(e,n=this.order,r){return ds.fromQuaternion(e),this._target.fromRotationMatrix(ds,n),r||this.onChange(),this}fromArray(e,n=0){return this._target[0]=e[n],this._target[1]=e[n+1],this._target[2]=e[n+2],this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e}}class Ec{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new bn,this.worldMatrix=new bn,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new et,this.quaternion=new ic,this.scale=new et(1),this.rotation=new Cc,this.up=new et(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(e,n=!0){this.parent&&e!==this.parent&&this.parent.removeChild(this,!1),this.parent=e,n&&e&&e.addChild(this,!1)}addChild(e,n=!0){~this.children.indexOf(e)||this.children.push(e),n&&e.setParent(this,!1)}removeChild(e,n=!0){~this.children.indexOf(e)&&this.children.splice(this.children.indexOf(e),1),n&&e.setParent(null,!1)}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||e)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,e=!0);for(let n=0,r=this.children.length;n<r;n++)this.children[n].updateMatrixWorld(e)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(e){if(!e(this))for(let n=0,r=this.children.length;n<r;n++)this.children[n].traverse(e)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(e,n=!1){n?this.matrix.lookAt(this.position,e,this.up):this.matrix.lookAt(e,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function kc(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function Rc(t,e){let n=e[0],r=e[1],s=e[2],i=e[3],o=n+n,a=r+r,l=s+s,c=n*o,d=r*o,f=r*a,p=s*o,h=s*a,g=s*l,b=i*o,x=i*a,v=i*l;return t[0]=1-f-g,t[3]=d-v,t[6]=p+x,t[1]=d+v,t[4]=1-c-g,t[7]=h-b,t[2]=p-x,t[5]=h+b,t[8]=1-c-f,t}function Ac(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Nc(t,e,n,r,s,i,o,a,l,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=i,t[5]=o,t[6]=a,t[7]=l,t[8]=c,t}function Sc(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ic(t,e){let n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],f=d*o-a*c,p=-d*i+a*l,h=c*i-o*l,g=n*f+r*p+s*h;return g?(g=1/g,t[0]=f*g,t[1]=(-d*r+s*c)*g,t[2]=(a*r-s*o)*g,t[3]=p*g,t[4]=(d*n-s*l)*g,t[5]=(-a*n+s*i)*g,t[6]=h*g,t[7]=(-c*n+r*l)*g,t[8]=(o*n-r*i)*g,t):null}function fs(t,e,n){let r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],l=e[5],c=e[6],d=e[7],f=e[8],p=n[0],h=n[1],g=n[2],b=n[3],x=n[4],v=n[5],T=n[6],_=n[7],C=n[8];return t[0]=p*r+h*o+g*c,t[1]=p*s+h*a+g*d,t[2]=p*i+h*l+g*f,t[3]=b*r+x*o+v*c,t[4]=b*s+x*a+v*d,t[5]=b*i+x*l+v*f,t[6]=T*r+_*o+C*c,t[7]=T*s+_*a+C*d,t[8]=T*i+_*l+C*f,t}function Mc(t,e,n){let r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],l=e[5],c=e[6],d=e[7],f=e[8],p=n[0],h=n[1];return t[0]=r,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=l,t[6]=p*r+h*o+c,t[7]=p*s+h*a+d,t[8]=p*i+h*l+f,t}function Lc(t,e,n){let r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],l=e[5],c=e[6],d=e[7],f=e[8],p=Math.sin(n),h=Math.cos(n);return t[0]=h*r+p*o,t[1]=h*s+p*a,t[2]=h*i+p*l,t[3]=h*o-p*r,t[4]=h*a-p*s,t[5]=h*l-p*i,t[6]=c,t[7]=d,t[8]=f,t}function Oc(t,e,n){let r=n[0],s=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function jc(t,e){let n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],f=e[9],p=e[10],h=e[11],g=e[12],b=e[13],x=e[14],v=e[15],T=n*a-r*o,_=n*l-s*o,C=n*c-i*o,k=r*l-s*a,y=r*c-i*a,S=s*c-i*l,w=d*b-f*g,M=d*x-p*g,N=d*v-h*g,j=f*x-p*b,O=f*v-h*b,z=p*v-h*x,L=T*z-_*O+C*j+k*N-y*M+S*w;return L?(L=1/L,t[0]=(a*z-l*O+c*j)*L,t[1]=(l*N-o*z-c*M)*L,t[2]=(o*O-a*N+c*w)*L,t[3]=(s*O-r*z-i*j)*L,t[4]=(n*z-s*N+i*M)*L,t[5]=(r*N-n*O-i*w)*L,t[6]=(b*S-x*y+v*k)*L,t[7]=(x*C-g*S-v*_)*L,t[8]=(g*y-b*C+v*T)*L,t):null}class Dc extends Array{constructor(e=1,n=0,r=0,s=0,i=1,o=0,a=0,l=0,c=1){return super(e,n,r,s,i,o,a,l,c),this}set(e,n,r,s,i,o,a,l,c){return e.length?this.copy(e):(Nc(this,e,n,r,s,i,o,a,l,c),this)}translate(e,n=this){return Mc(this,n,e),this}rotate(e,n=this){return Lc(this,n,e),this}scale(e,n=this){return Oc(this,n,e),this}multiply(e,n){return n?fs(this,e,n):fs(this,this,e),this}identity(){return Sc(this),this}copy(e){return Ac(this,e),this}fromMatrix4(e){return kc(this,e),this}fromQuaternion(e){return Rc(this,e),this}fromBasis(e,n,r){return this.set(e[0],e[1],e[2],n[0],n[1],n[2],r[0],r[1],r[2]),this}inverse(e=this){return Ic(this,e),this}getNormalMatrix(e){return jc(this,e),this}}let zc=0;class Fc extends Ec{constructor(e,{geometry:n,program:r,mode:s=e.TRIANGLES,frustumCulled:i=!0,renderOrder:o=0}={}){super(),e.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=e,this.id=zc++,this.geometry=n,this.program=r,this.mode=s,this.frustumCulled=i,this.renderOrder=o,this.modelViewMatrix=new bn,this.normalMatrix=new Dc,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(e){return this.beforeRenderCallbacks.push(e),this}onAfterRender(e){return this.afterRenderCallbacks.push(e),this}draw({camera:e}={}){e&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=e.projectionMatrix,this.program.uniforms.cameraPosition.value=e.worldPosition,this.program.uniforms.viewMatrix.value=e.viewMatrix,this.modelViewMatrix.multiply(e.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:e}));let n=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:n}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:e}))}}const hs={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff",fuchsia:"#ff00ff",cyan:"#00ffff",yellow:"#ffff00",orange:"#ff8000"};function ms(t){t.length===4&&(t=t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e||console.warn(`Unable to convert hex string ${t} to rgb values`),[parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255]}function Pc(t){return t=parseInt(t),[(t>>16&255)/255,(t>>8&255)/255,(t&255)/255]}function ps(t){return t===void 0?[0,0,0]:arguments.length===3?arguments:isNaN(t)?t[0]==="#"?ms(t):hs[t.toLowerCase()]?ms(hs[t.toLowerCase()]):(console.warn("Color format not recognised"),[0,0,0]):Pc(t)}class Ni extends Array{constructor(e){return Array.isArray(e)?super(...e):super(...ps(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(e){this[0]=e}set g(e){this[1]=e}set b(e){this[2]=e}set(e){return Array.isArray(e)?this.copy(e):this.copy(ps(...arguments))}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this}}class Bc extends Ll{constructor(e,{attributes:n={}}={}){Object.assign(n,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(e,n)}}const Uc=`
|
|
113
|
+
attribute vec2 uv;
|
|
114
|
+
attribute vec2 position;
|
|
115
|
+
|
|
116
|
+
varying vec2 vUv;
|
|
117
|
+
|
|
118
|
+
void main() {
|
|
119
|
+
vUv = uv;
|
|
120
|
+
gl_Position = vec4(position, 0.0, 1.0);
|
|
121
|
+
}
|
|
122
|
+
`,Gc=`
|
|
123
|
+
precision highp float;
|
|
124
|
+
|
|
125
|
+
varying vec2 vUv;
|
|
126
|
+
|
|
127
|
+
uniform vec2 uResolution;
|
|
128
|
+
uniform float uIntensity;
|
|
129
|
+
uniform float uLensAmp;
|
|
130
|
+
uniform float uFresnelPower;
|
|
131
|
+
uniform vec3 uBaseColor;
|
|
132
|
+
uniform vec3 uFresnelColor;
|
|
133
|
+
uniform float uAlphaBody;
|
|
134
|
+
uniform float uAlphaRim;
|
|
135
|
+
|
|
136
|
+
void main() {
|
|
137
|
+
vec2 res = uResolution;
|
|
138
|
+
float ar = res.x / max(res.y, 1.0);
|
|
139
|
+
|
|
140
|
+
vec2 p = (vUv - 0.5) * 2.0;
|
|
141
|
+
p.x *= ar;
|
|
142
|
+
|
|
143
|
+
vec2 pn = vec2(p.x / ar, p.y);
|
|
144
|
+
|
|
145
|
+
if (abs(pn.x) >= 1.0 || abs(pn.y) >= 1.0) {
|
|
146
|
+
gl_FragColor = vec4(0.0);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
float r2 = dot(pn, pn);
|
|
151
|
+
float inner = max(0.0, 1.0 - r2);
|
|
152
|
+
|
|
153
|
+
vec2 dZd = -4.0 * uLensAmp * inner * pn;
|
|
154
|
+
vec3 N = normalize(vec3(-dZd.x, -dZd.y, 1.0));
|
|
155
|
+
vec3 V = vec3(0.0, 0.0, 1.0);
|
|
156
|
+
|
|
157
|
+
float facing = abs(dot(V, N));
|
|
158
|
+
float glancing = 1.0 - facing;
|
|
159
|
+
|
|
160
|
+
float fFace = pow(facing, uFresnelPower);
|
|
161
|
+
float fGlance = pow(glancing, uFresnelPower);
|
|
162
|
+
|
|
163
|
+
vec3 rgb = fFace * uBaseColor + fGlance * uFresnelColor;
|
|
164
|
+
float alpha = (fFace * uAlphaBody + fGlance * uAlphaRim) * uIntensity;
|
|
165
|
+
vec3 premul = rgb * alpha;
|
|
166
|
+
|
|
167
|
+
gl_FragColor = vec4(premul, alpha);
|
|
168
|
+
}
|
|
169
|
+
`,$c=new Ni("#8a8b90"),Vc=new Ni("#e6e6ea"),Hc=1.65,Wc=.28,Xc=.05,qc=.38;function Yc(t){const e=Math.min(typeof window<"u"&&window.devicePixelRatio||1,2),n=new Bl({canvas:t,width:1,height:1,dpr:e,alpha:!0,depth:!1,stencil:!1,premultipliedAlpha:!0,antialias:!1,webgl:1}),r=n.gl;if(!r)return null;r.clearColor(0,0,0,0);const s=new Bc(r),i=new jl(r,{vertex:Uc,fragment:Gc,uniforms:{uResolution:{value:[1,1]},uIntensity:{value:1},uLensAmp:{value:Wc},uFresnelPower:{value:Hc},uBaseColor:{value:$c},uFresnelColor:{value:Vc},uAlphaBody:{value:Xc},uAlphaRim:{value:qc}},transparent:!0,cullFace:!1,depthTest:!1,depthWrite:!1}),o=new Fc(r,{geometry:s,program:i,frustumCulled:!1});function a(){const f=r.drawingBufferWidth,p=r.drawingBufferHeight,h=i.uniforms.uResolution.value;h[0]=Math.max(1,f),h[1]=Math.max(1,p)}function l(f,p){const h=Math.max(1,Math.floor(f)),g=Math.max(1,Math.floor(p));n.setSize(h,g),a()}function c(f){i.uniforms.uIntensity.value=f,n.render({scene:o})}function d(){s.remove(),i.remove()}return{renderer:n,mesh:o,program:i,geometry:s,resize:l,render:c,dispose:d}}function Si({intensity:t,containerRef:e,className:n=""}){const r=u.useRef(null),s=u.useRef(null),i=u.useRef(t);i.current=t;const o=t>0;return u.useEffect(()=>{if(!o)return;const a=r.current,l=e.current;if(!a||!l)return;const c=Yc(a);if(!c)return;s.current=c;let d=0;function f(){const g=e.current,b=s.current;!g||!b||(b.resize(g.clientWidth,g.clientHeight),b.render(i.current))}function p(){cancelAnimationFrame(d),d=requestAnimationFrame(f)}const h=new ResizeObserver(p);return h.observe(l),p(),()=>{cancelAnimationFrame(d),h.disconnect(),c.dispose(),s.current=null}},[o,e]),u.useEffect(()=>{var a;t<=0||(a=s.current)==null||a.render(t)},[t]),t<=0?null:m.jsx("canvas",{ref:r,className:E("pointer-events-none absolute inset-0 z-[1] h-full w-full mix-blend-soft-light",n),"aria-hidden":!0})}function Zc(t){const e=`blur(var(--glass-blur)) saturate(var(--glass-saturate)) ${t}`;return{backdropFilter:e,WebkitBackdropFilter:e}}const Qc={backdropFilter:"blur(var(--glass-blur-edge)) saturate(var(--glass-saturate))",WebkitBackdropFilter:"blur(var(--glass-blur-edge)) saturate(var(--glass-saturate))",maskImage:"radial-gradient(ellipse var(--glass-edge-falloff) var(--glass-edge-falloff) at 50% 50%, transparent 0%, black 100%)",WebkitMaskImage:"radial-gradient(ellipse var(--glass-edge-falloff) var(--glass-edge-falloff) at 50% 50%, transparent 0%, black 100%)"};function Ii({containerRef:t,refractionIntensity:e=1}){const n=`bglass-disp-${u.useId().replace(/:/g,"")}`,r=`url(#${n})`;return m.jsxs(m.Fragment,{children:[m.jsx("svg",{className:"pointer-events-none absolute h-0 w-0 overflow-hidden","aria-hidden":!0,children:m.jsx("defs",{children:m.jsxs("filter",{id:n,x:"-30%",y:"-30%",width:"160%",height:"160%",colorInterpolationFilters:"sRGB",children:[m.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.014",numOctaves:"2",seed:"17",result:"noise"}),m.jsx("feDisplacementMap",{in:"SourceGraphic",in2:"noise",scale:"4",xChannelSelector:"R",yChannelSelector:"G"})]})})}),m.jsxs("div",{className:"pointer-events-none absolute inset-0 z-0","aria-hidden":!0,children:[m.jsx("div",{className:"absolute inset-0 rounded-[inherit]",style:{...Zc(r),background:["linear-gradient(145deg, var(--glass-highlight) 0%, transparent 44%)","linear-gradient(210deg, transparent 52%, color-mix(in srgb, var(--glass-tint-veil) 58%, transparent))","linear-gradient(to bottom, var(--glass-tint), transparent 65%)","var(--glass-tint)"].join(", ")}}),m.jsx("div",{className:"absolute inset-0 rounded-[inherit]",style:Qc}),m.jsx("div",{className:"absolute inset-0 rounded-[inherit] mix-blend-overlay",style:{background:"linear-gradient(125deg, var(--glass-highlight) 0%, transparent 38%, transparent 62%, color-mix(in srgb, var(--glass-border) 40%, transparent) 100%)",opacity:.85}})]}),m.jsx(Si,{intensity:e,containerRef:t})]})}function Kc({className:t="",contentClassName:e="",children:n,refractionIntensity:r=1,refractionAnimated:s,style:i,...o}){const a=u.useRef(null);return m.jsxs("div",{ref:a,className:E("relative isolate overflow-hidden rounded-base border shadow-token-sm","border-base/50 bg-transparent",t),style:{borderColor:"var(--glass-border)",boxShadow:"0 4px 28px rgb(0 0 0 / 0.18)",...i},...o,children:[m.jsx(Ii,{containerRef:a,refractionIntensity:r}),m.jsx("div",{className:E("relative z-[2] text-foreground",e),children:n})]})}const Mi=u.createContext(null);function sr(){const t=u.useContext(Mi);if(!t)throw new Error("Компоненты Expandable должны быть внутри <Expandable>.");return t}function Jc(t){const e=[],n=[];return u.Children.forEach(t,s=>{u.isValidElement(s)&&s.type===Xt?e.push(s):n.push(s)}),{rippleOverlay:e.length>0?m.jsx("span",{className:"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]","aria-hidden":!0,children:e}):null,rest:m.jsx(m.Fragment,{children:n})}}function Li({className:t=""}){return m.jsx("svg",{className:`shrink-0 ${t}`,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:m.jsx("path",{d:"m6 9 6 6 6-6"})})}const eu=u.forwardRef(function({hideChevron:e=!1,className:n="",onPointerDown:r,children:s,type:i="button",...o},a){const{open:l,disabled:c,hasPanel:d,toggle:f,headerId:p,panelId:h}=sr(),g=u.useRef(null),{rippleOverlay:b,rest:x}=Jc(s),v=u.useCallback(_=>{typeof a=="function"?a(_):a&&(a.current=_)},[a]),T=u.useCallback(_=>{if(!c){const C=g.current;C&&!ne()&&tt(C)}r==null||r(_)},[c,r]);return m.jsxs("button",{ref:v,type:i,id:p,className:E("relative flex w-full items-center gap-base overflow-hidden py-plus px-mid text-left outline-none","focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",c?"cursor-not-allowed opacity-50":"cursor-pointer",n),"aria-expanded":d?l:void 0,"aria-controls":d?h:void 0,disabled:c,onPointerDown:T,onClick:f,...o,children:[b,m.jsx("span",{ref:g,className:E("relative z-[1] flex w-fit max-w-full min-w-0 origin-center will-change-transform","items-start gap-base"),children:x}),!e&&d?m.jsx("span",{className:E("relative z-[1] ml-auto flex shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none",l?"rotate-180":"rotate-0"),children:m.jsx(Li,{})}):null]})});function tu({className:t="",...e}){return m.jsx("span",{className:E("flex shrink-0 items-center self-start text-accent [&_svg]:icon-base mt-[0.0575rem]",t),...e})}function nu({className:t="",...e}){return m.jsx("div",{className:E("flex min-w-0 max-w-full flex-col gap-xsmall",t),...e})}function ru({className:t="",...e}){return m.jsx(ee,{as:"span",variant:"base",className:E("block font-medium leading-snug",t),...e})}function su({className:t="",...e}){return m.jsx(ee,{as:"span",variant:"base",className:E("block leading-normal text-muted",t),...e})}function iu({className:t="",...e}){const{open:n,hasPanel:r}=sr();return r?m.jsx("span",{className:E("relative z-[1] flex shrink-0 self-center transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none",n?"rotate-180":"rotate-0",t),"aria-hidden":!0,...e,children:m.jsx(Li,{})}):null}const ou=u.forwardRef(function({className:e="",children:n,...r},s){const{open:i,headerId:o,panelId:a,setHasPanel:l}=sr();return u.useLayoutEffect(()=>(l(!0),()=>l(!1)),[l]),m.jsx("div",{className:E("grid transition-[grid-template-rows] duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none",i?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:m.jsx("div",{className:"min-h-0 overflow-hidden",children:m.jsx("div",{ref:s,id:a,role:"region","aria-labelledby":o,"aria-hidden":!i,inert:!i,className:E("px-mid pb-plus leading-normal",e),...r,children:n})})})}),au=u.forwardRef(function({children:e,defaultOpen:n=!1,open:r,onOpenChange:s,disabled:i=!1,className:o="",...a},l){const c=u.useId(),d=u.useId(),f=r!==void 0,[p,h]=u.useState(n),[g,b]=u.useState(!1),x=u.useCallback(C=>{b(C)},[]),v=f?r:p,T=u.useCallback(()=>{if(i||!g)return;const C=!v;f||h(C),s==null||s(C)},[f,i,g,v,s]),_={open:v,disabled:i,hasPanel:g,toggle:T,headerId:d,panelId:c,setHasPanel:x};return m.jsx(Mi.Provider,{value:_,children:m.jsx("div",{ref:l,className:E("rounded-mid border border-base bg-surface text-foreground",o),...a,children:e})})}),dt=Object.assign(au,{Trigger:eu,Icon:tu,Content:nu,Title:ru,Description:su,Chevron:iu,Panel:ou}),ir={danger:Oe.IoCloseCircleOutline,success:Oe.IoCheckmarkCircleOutline,info:Oe.IoInformationCircleOutline,warning:Oe.IoWarning},Xe={danger:"text-danger",success:"text-success",info:"text-info",warning:"text-warning"};function or(t,e){return t??e??"default"}function lu(t){return t!=="default"&&t!=="secondary"}const cu={default:"border border-base bg-surface text-foreground",outline:"surface-outline text-foreground",secondary:"surface-secondary text-foreground",danger:"bg-surface-tint-danger text-foreground",success:"bg-surface-tint-success text-foreground",info:"bg-surface-tint-info text-foreground",warning:"bg-surface-tint-warning text-foreground"};function uu(t){switch(t){case"danger":return Xe.danger;case"success":return Xe.success;case"info":return Xe.info;case"warning":return Xe.warning;default:return"text-accent"}}function du(t){return t==="default"||t==="secondary"?null:t==="outline"?Oe.IoHelpCircleOutline:ir[t]}const Oi=u.createContext("default");function fu({status:t,className:e="",children:n,...r}){const s=u.useContext(Oi),i=t??s;if(n===null)return null;const o=du(i),a=n!==void 0?n:lu(i)&&o!==null?m.jsx(o,{"aria-hidden":!0}):null;return a===null?null:m.jsx("span",{className:E("shrink-0 [&_svg]:icon-mid",uu(i),e),...r,children:a})}function hu({className:t="",...e}){return m.jsx("div",{className:E("flex min-w-0 flex-1 flex-col gap-xsmall",t),...e})}const mu=u.forwardRef(function({className:e="",...n},r){return m.jsx("div",{ref:r,className:E("flex min-w-0 flex-1 items-start gap-base",e),...n})});function pu({className:t="",...e}){return m.jsx(ee,{as:"div",variant:"base",className:E("font-medium leading-snug",t),...e})}function gu({className:t="",...e}){return m.jsx(ee,{as:"div",variant:"base",className:E("leading-normal text-muted",t),...e})}function bu({className:t="",...e}){return m.jsx("div",{className:E("shrink-0 self-start",t),...e})}const xu=u.forwardRef(function({variant:e,status:n,className:r="",children:s,onPointerOver:i,onPointerOut:o,...a},l){const c=or(n,e),d=u.useRef(null),f=u.useCallback(h=>{d.current=h,typeof l=="function"?l(h):l&&(l.current=h)},[l]);u.useEffect(()=>{tr(d.current,st())},[]);const p=wt(d,!0,void 0,void 0,{idle:st(),hover:er()});return m.jsx(Oi.Provider,{value:c,children:m.jsx("div",{ref:f,role:"status",className:E("flex w-fit max-w-component-base items-start gap-base rounded-mid py-plus px-mid animate-shadow",cu[c],r),onPointerOver:h=>{i==null||i(h),h.defaultPrevented||p.onPointerOver(h)},onPointerOut:h=>{o==null||o(h),p.onPointerOut(h)},...a,children:s})})}),vu=Object.assign(xu,{Indicator:fu,Message:mu,Content:hu,Title:pu,Description:gu,Action:bu});function yu({items:t,defaultOpenId:e=null,openId:n,onOpenIdChange:r,className:s="",...i}){const o=n!==void 0,[a,l]=u.useState(e),c=o?n:a;return m.jsx("div",{className:E("flex w-full flex-col",s),...i,children:t.map((d,f)=>{const p=c===d.id;return m.jsxs(dt,{disabled:d.disabled,open:p,onOpenChange:h=>{const g=h?d.id:null;o||l(g),r==null||r(g)},className:E("!rounded-none relative",f===0?"!rounded-t-mid":"-mt-px",f===t.length-1?"!rounded-b-mid":""),children:[m.jsxs(dt.Trigger,{children:[d.triggerBefore,d.icon?m.jsx(dt.Icon,{children:d.icon}):null,m.jsxs(dt.Content,{children:[m.jsx(dt.Title,{children:d.title}),d.description!=null?m.jsx(dt.Description,{children:d.description}):null]})]}),m.jsx(dt.Panel,{children:d.content})]},d.id)})})}const wu=u.forwardRef(function({className:e="",...n},r){return m.jsx("form",{ref:r,className:E("flex w-full max-w-full flex-col gap-mid",e),...n})}),gs=1.02,_u={default:"border border-base bg-surface",secondary:"surface-secondary",outline:"surface-outline"},Tu={small:{track:"h-4 w-4 min-h-4 min-w-4",checkWrap:"icon-xsmall",title:"small",desc:"tools",gridGapX:"gap-x-small"},base:{track:"h-4.5 w-4.5 min-h-4.5 min-w-4.5",checkWrap:"icon-small",title:"base",desc:"small",gridGapX:"gap-x-base"},medium:{track:"h-6 w-6 min-h-6 min-w-6",checkWrap:"icon-base",title:"mid",desc:"small",gridGapX:"gap-x-plus"},large:{track:"h-7 w-7 min-h-7 min-w-7",checkWrap:"icon-mid",title:"large",desc:"base",gridGapX:"gap-x-plus"}},Cu="absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]";function Eu(t,e){const n=t!==void 0,[r,s]=u.useState(!!e),i=n?!!t:r,o=u.useCallback(a=>{n||s(a)},[n]);return[i,o,n]}const ar=u.forwardRef(function({label:e,description:n,size:r="base",variant:s="default",checkIcon:i,danger:o=!1,className:a,disabled:l,checked:c,defaultChecked:d,onChange:f,id:p,name:h,value:g,required:b,form:x,autoFocus:v,tabIndex:T,readOnly:_,onBlur:C,onFocus:k,onPointerDown:y,...S},w){const M=u.useId(),N=p??`checkbox-${M}`,j=`${N}-description`,[O,z,L]=Eu(c,d),G=u.useRef(null),$=u.useRef(null),H=u.useRef(null),Y=u.useRef(null),D=u.useRef(!0),I=u.useRef(!0),ue=Tu[r],X=ne(),Ee=wt(Y,!l,void 0,gs);u.useEffect(()=>()=>{const A=[G.current,$.current,H.current,Y.current];for(const F of A)F&&q(F)},[]),u.useLayoutEffect(()=>{const A=G.current,F=$.current;if(!(!A||!F)){if(X){q(A),q(F),A.style.transform=`scale(${O?1:0})`,A.style.opacity=O?"1":"0",F.style.opacity=O?"1":"0",F.style.transform="scale(1)";return}if(D.current){D.current=!1,q(A),q(F),A.style.transform=`scale(${O?1:0})`,A.style.opacity=O?"1":"0",F.style.opacity=O?"1":"0",F.style.transform="scale(1)";return}q(A),q(F),fe(A,{scale:O?[0,1]:[1,0],opacity:O?[0,1]:[1,0],duration:Be,ease:me}),fe(F,{opacity:O?[0,1]:[1,0],scale:O?[.88,1]:[1,.92],duration:Be,ease:me})}},[O,X]),u.useLayoutEffect(()=>{const A=H.current;if(!A)return;if(X){q(A),A.style.opacity=l?"0.48":"1";return}if(I.current){I.current=!1,A.style.opacity=l?"0.48":"1";return}q(A);const F=Number.parseFloat(getComputedStyle(A).opacity),K=Number.isFinite(F)?F:1;fe(A,{opacity:l?[K,.48]:[K,1],duration:Be,ease:me})},[l,X]),u.useEffect(()=>{const A=Y.current;A&&l&&(q(A),X?A.style.transform="":He(A,!1,gs))},[l,X]);const oe=u.useCallback(A=>{const F=A.target.checked;L||z(F),f==null||f(A)},[L,f,z]),V=u.useCallback(A=>{if(y==null||y(A),A.defaultPrevented||l||X)return;const F=Y.current;F&&tt(F)},[l,y,X]),Q=n!=null,te=u.useMemo(()=>E("relative inline-flex shrink-0 items-center justify-center rounded-full",_u[s],O&&"border-accent"),[O,s]),de=m.jsx(Oe.IoCheckmarkSharp,{"aria-hidden":!0,className:"icon-base"});return m.jsxs("label",{ref:w,className:E("relative grid cursor-pointer select-none rounded-small","grid-cols-[auto_minmax(0,1fr)]",Q?"grid-rows-[auto_auto] gap-y-xsmall":"grid-rows-[auto]",ue.gridGapX,l&&"cursor-not-allowed","has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-accent",a),...S,...Ee,onPointerDown:V,children:[m.jsx("input",{id:N,type:"checkbox",className:Cu,checked:L?O:void 0,defaultChecked:L?void 0:d,disabled:l,name:h,value:g,required:b,form:x,autoFocus:v,tabIndex:T,readOnly:_,onBlur:C,onFocus:k,"aria-describedby":n!=null?j:void 0,onChange:oe}),m.jsxs("span",{ref:H,className:E("relative col-start-1 row-start-1 inline-flex shrink-0 origin-center justify-self-start self-center",ue.track,te),children:[m.jsx("span",{ref:G,"aria-hidden":!0,className:"pointer-events-none absolute inset-[1px] z-[0] flex origin-center items-center justify-center rounded-full bg-accent text-accent-foreground",style:{transform:"scale(0)",opacity:0}}),m.jsx("span",{ref:$,"aria-hidden":!0,className:E("pointer-events-none relative z-[1] inline-flex items-center justify-center text-accent-foreground [&_svg]:size-full",ue.checkWrap),style:{opacity:0},children:i??de})]}),Q?m.jsxs("span",{ref:Y,className:E("col-start-2 row-span-2 row-start-1 grid min-w-0 max-w-full origin-center will-change-transform [grid-template-rows:subgrid] [width:fit-content] justify-self-start"),children:[m.jsx(ee,{as:"span",variant:ue.title,inheritColor:!0,className:E("min-w-0 self-center",l&&"text-muted",!l&&o&&"text-danger"),children:e}),m.jsx(ee,{as:"span",id:j,variant:ue.desc,inheritColor:!0,className:E("min-w-0 text-muted",l&&"text-muted"),children:n})]}):m.jsx("span",{ref:Y,className:"col-start-2 row-start-1 min-w-0 max-w-full origin-center justify-self-start self-center [width:fit-content] will-change-transform",children:m.jsx(ee,{as:"span",variant:ue.title,inheritColor:!0,className:E(l&&"text-muted",!l&&o&&"text-danger"),children:e})})]})});ar.displayName="Checkbox";function ku(t,e,n){return u.Children.toArray(t).map((s,i)=>{if(!u.isValidElement(s)||s.type!==ar)return s;const o=s.props,a=o.value!==void 0&&o.value!==null?String(o.value):`__checkbox_group_${i}`,l=e!==void 0&&e===a;return u.cloneElement(s,{checked:l,defaultChecked:void 0,onChange:c=>{var d;(d=o.onChange)==null||d.call(o,c),!c.defaultPrevented&&n(a,c)}})})}const ji=u.forwardRef(function({title:e,description:n,isRequired:r=!1,selection:s="multiple",value:i,defaultValue:o,onValueChange:a,children:l,className:c,disabled:d,...f},p){const h=`${u.useId()}-desc`,g=n!=null,b=i!==void 0,[x,v]=u.useState(o),T=s==="single"?b?i==null?void 0:String(i):x:void 0,_=u.useCallback(y=>{s==="single"&&(b||v(y),a==null||a(y))},[b,a,s]),C=u.useCallback((y,S)=>{S.target.checked?_(y):_(void 0)},[_]),k=u.useMemo(()=>s!=="single"?l:ku(l,T,C),[l,C,T,s]);return m.jsxs("fieldset",{ref:p,disabled:d,"aria-required":r||void 0,"aria-describedby":g?h:void 0,className:E("m-0 min-w-0 border-0 p-0 disabled:pointer-events-none disabled:opacity-55",c),...f,children:[m.jsx("legend",{className:"m-0 block w-full max-w-full border-0 p-0 pb-plus",children:m.jsxs("span",{className:"flex flex-col",children:[m.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-xsmall gap-y-0",children:[m.jsx(ee,{as:"span",variant:"base",className:"font-medium leading-snug",children:e}),r?m.jsx("span",{className:"text-danger leading-none","aria-hidden":!0,children:"*"}):null]}),g?m.jsx(ee,{as:"span",id:h,variant:"small",className:"leading-snug text-muted",children:n}):null]})}),m.jsx("div",{className:"flex flex-col gap-mid",children:k})]})});ji.displayName="CheckboxGroup";const bs={default:"bg-surface",outline:"bg-transparent"},xs={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},Ru={danger:"focus-within:border-danger",success:"focus-within:border-success",warning:"focus-within:border-warning"},Di={danger:"bg-surface-tint-danger-strong",success:"bg-surface-tint-success-strong",warning:"bg-surface-tint-warning-strong"},Au={default:"text-muted",danger:"text-danger",success:"text-success",warning:"text-warning"},zi={default:"bg-[color-mix(in_oklab,var(--color-border)_32%,var(--color-surface))]",outline:"bg-[color-mix(in_oklab,var(--color-border)_22%,transparent)]"},Nu={base:"px-plus text-base leading-[1.2]",large:"px-mid text-mid leading-[1.2]",xlarge:"px-large text-mid leading-[1.2]"},Su={base:"px-plus py-small text-base leading-[1.2]",large:"px-mid py-base text-mid leading-[1.2]",xlarge:"px-large py-base text-mid leading-[1.2]"},zn={base:"min-h-8",large:"min-h-10",xlarge:"min-h-12"},Iu={base:{box:"min-h-8 min-w-8",icon:"icon-base",pad:"px-small"},large:{box:"min-h-10 min-w-10",icon:"icon-large",pad:"px-base"},xlarge:{box:"min-h-12 min-w-12",icon:"icon-large",pad:"px-plus"}};function vs({side:t,variant:e,status:n,controlSize:r,children:s}){const i=t==="prefix"?"border-r border-base":"border-l border-base",o=n==="default"?zi[e]:Di[n];return m.jsx("span",{className:E("flex shrink-0 items-center text-muted",Nu[r],o,i),children:s})}function Mu({variant:t,status:e,controlSize:n,visible:r,disabled:s,onToggle:i}){const o=e==="default"?zi[t]:Di[e],a=Iu[n];return m.jsx("span",{className:E("flex shrink-0 items-stretch border-l border-base",o),children:m.jsx("button",{type:"button",disabled:s,"aria-label":r?"Скрыть пароль":"Показать пароль","aria-pressed":r,onClick:l=>{l.preventDefault(),l.stopPropagation(),i()},onPointerDown:l=>l.stopPropagation(),className:E("relative z-10 flex items-center justify-center text-muted outline-none transition-colors",a.box,a.pad,"hover:text-foreground","focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",s?"cursor-not-allowed opacity-45":"cursor-pointer"),children:r?m.jsx(Oe.IoEyeOff,{className:E("shrink-0",a.icon),"aria-hidden":!0}):m.jsx(Oe.IoEye,{className:E("shrink-0",a.icon),"aria-hidden":!0})})})}function ys({className:t=""}){return m.jsx("span",{className:E("flex size-9 shrink-0 items-center justify-center rounded-base bg-surface text-muted border border-base",t),"aria-hidden":!0,children:m.jsx(Oe.IoFolderOpen,{className:"icon-mid shrink-0","aria-hidden":!0})})}function Lu(t,e){const n=new DataTransfer;e.forEach(r=>n.items.add(r)),t.files=n.files}function Ou(t){q(t);const e=fe(t,{scale:[1,.94],translateY:[0,"-0.5rem"],opacity:[1,0],duration:Be,ease:me});return Promise.resolve(e).then(()=>{q(t)})}function ws({disabled:t,title:e,onRemove:n}){return m.jsx("button",{type:"button",disabled:t,title:e,"aria-label":e,onClick:r=>{r.preventDefault(),r.stopPropagation(),n(r)},onPointerDown:r=>r.stopPropagation(),className:E("relative z-10 flex size-8 shrink-0 items-center justify-center rounded-base text-danger outline-none transition-colors","hover:bg-[color-mix(in_oklab,var(--color-danger)_14%,transparent)]","focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface",t?"pointer-events-none opacity-40":""),children:m.jsx(Oe.IoClose,{className:"icon-mid shrink-0","aria-hidden":!0})})}const lr=u.forwardRef(function({variant:e="default",status:n="default",size:r="base",label:s,isRequired:i=!1,hint:o,inputType:a="text",placeholder:l,prefix:c,suffix:d,id:f,disabled:p,readOnly:h,className:g="",groupSegment:b,onPointerDown:x,onChange:v,...T},_){const C=u.useId(),k=f??C,y=u.useRef(null),S=u.useRef(null),w=u.useCallback(A=>{S.current=A,typeof _=="function"?_(A):_&&(_.current=A)},[_]),M=!!(p||h),N=n==="danger"||n==="success"||n==="warning",j=N?E(xs[n],"border-transparent",Ru[n]):E(e==="outline"?"surface-outline":bs[e],e==="outline"?"focus-within:border-accent":"border-base focus-within:border-accent"),O=u.useCallback(A=>{if(x==null||x(A),A.defaultPrevented||M)return;const F=y.current;!F||ne()||tt(F)},[M,x]),z=a==="file",L=a==="password",[G,$]=u.useState(!1),[H,Y]=u.useState([]);u.useEffect(()=>{L||$(!1)},[L]);const D=u.useMemo(()=>H.map(A=>({file:A,previewUrl:A.type.startsWith("image/")?URL.createObjectURL(A):null})),[H]);u.useEffect(()=>{const A=D.map(F=>F.previewUrl).filter(F=>F!=null);return()=>{for(const F of A)URL.revokeObjectURL(F)}},[D]),u.useEffect(()=>{if(!z)return;const A=S.current,F=A==null?void 0:A.form;if(!F)return;const K=()=>Y([]);return F.addEventListener("reset",K),()=>F.removeEventListener("reset",K)},[z]);const I=u.useCallback(A=>{const F=A.target.files;Y(F?Array.from(F):[]),v==null||v(A)},[v]),ue=u.useCallback((A,F)=>{if(M)return;const K=()=>{Y(ce=>{const ye=ce.filter(ke=>ke!==A),pe=S.current;return pe&&Lu(pe,ye),pe&&(v==null||v({target:pe,currentTarget:pe})),ye})};if(!F||ne()){K();return}Ou(F).then(K)},[M,v]),X=A=>F=>{const K=F.currentTarget.closest("[data-file-row]");ue(A,K instanceof HTMLElement?K:null)},Ee=H.length>1,oe=z&&H.length===0,V=oe?E(N?xs[n]:bs[e],"border-2 border-dashed",N?n==="danger"?"border-danger/50 focus-within:border-danger":n==="success"?"border-success/50 focus-within:border-success":"border-warning/50 focus-within:border-warning":"border-base focus-within:border-accent"):null,Q=!z,te=b!=null?E(gn(b),rr(b),"relative z-0 focus-within:z-[2]"):"rounded-base",de=oe?"":zn[r];return m.jsxs("div",{className:E("flex w-full flex-col gap-small",(b==null?void 0:b.orientation)==="horizontal"?"min-w-0 flex-1":"",g),children:[s?m.jsxs("label",{htmlFor:k,className:"inline-flex flex-wrap items-baseline gap-x-xsmall gap-y-0",children:[m.jsx(ee,{as:"span",variant:"base",className:"font-medium leading-snug",children:s}),i?m.jsx("span",{className:"text-danger leading-none","aria-hidden":!0,children:"*"}):null]}):null,m.jsxs("div",{ref:y,"data-slot":"input-shell",role:"presentation",onPointerDown:O,className:E("flex items-stretch overflow-hidden transition-[border-color,background-color] duration-200 ease-out",oe?"min-h-[7.25rem]":E("border-1",de),te,V??j,M?"cursor-not-allowed opacity-55":""),children:[Q&&c!=null?m.jsx(vs,{side:"prefix",variant:e,status:n,controlSize:r,children:c}):null,z?m.jsxs("div",{className:oe?"relative flex min-h-[6.5rem] min-w-0 flex-1 flex-col items-center justify-center gap-plus px-mid py-xlarge":E("relative min-w-0 flex-1 px-plus py-base",Ee?"flex flex-col gap-base":E("flex items-center gap-plus",zn[r])),children:[oe?m.jsxs(m.Fragment,{children:[m.jsx(Oe.IoFolderOpen,{className:"pointer-events-none size-12 shrink-0 text-muted","aria-hidden":!0}),m.jsx(ee,{as:"span",variant:"base",className:"pointer-events-none max-w-[18rem] text-center leading-snug text-muted",children:l??"Выберите файл"})]}):Ee?D.map(({file:A,previewUrl:F})=>m.jsxs("div",{"data-file-row":"",className:"flex min-w-0 items-center gap-base",children:[F?m.jsx("img",{src:F,alt:"",className:"size-9 shrink-0 rounded-base border border-base object-cover"}):m.jsx(ys,{}),m.jsx(ee,{as:"span",variant:"base",className:"min-w-0 flex-1 truncate",children:A.name}),M?null:m.jsx(ws,{title:"Удалить файл",onRemove:X(A)})]},`${A.name}-${A.size}-${A.lastModified}`)):m.jsxs("div",{"data-file-row":"",className:E("flex min-w-0 flex-1 items-center gap-base",zn[r]),children:[D[0].previewUrl?m.jsx("img",{src:D[0].previewUrl,alt:"",className:"size-9 shrink-0 rounded-base border border-base object-cover"}):m.jsx(ys,{}),m.jsx(ee,{as:"span",variant:"base",className:"min-w-0 flex-1 truncate",children:D[0].file.name}),M?null:m.jsx(ws,{title:"Удалить файл",onRemove:X(D[0].file)})]}),m.jsx("input",{ref:w,id:k,type:"file",disabled:p,readOnly:h,onChange:I,"aria-required":i||void 0,className:"absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed",...T})]}):m.jsx("input",{ref:w,id:k,type:L?G?"text":"password":a,disabled:p,readOnly:h,placeholder:l,onChange:v,"aria-required":i||void 0,className:E("min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted",Su[r]),...T}),Q&&d!=null?m.jsx(vs,{side:"suffix",variant:e,status:n,controlSize:r,children:d}):null,Q&&L?m.jsx(Mu,{variant:e,status:n,controlSize:r,visible:G,disabled:p,onToggle:()=>$(A=>!A)}):null]}),o?m.jsx(ee,{as:"p",variant:"base",className:E("leading-snug",Au[n]),children:o}):null]})});function ju(t){return t==="small"?"base":t}const Du={small:"small",base:"base",large:"mid",xlarge:"mid"},zu={small:"min-h-7 px-base py-xsmall",base:"min-h-8 px-plus py-small",large:"min-h-10 px-mid py-base",xlarge:"min-h-12 px-large py-base"};function Fi(t){const e=[];return u.Children.forEach(t,n=>{if(u.isValidElement(n)){if(n.type===u.Fragment){const{children:r}=n.props;e.push(...Fi(r));return}e.push(n)}}),e}const cr=u.forwardRef(function({children:e,className:n="",buttonSize:r="base",groupSegment:s,...i},o){return m.jsx("span",{ref:o,...i,className:E(rl(s),zu[r],n),children:m.jsx(ee,{variant:Du[r],inheritColor:!0,as:"span",className:"max-w-[12rem] truncate font-medium whitespace-nowrap md:max-w-[18rem]",children:e})})});cr.displayName="ButtonGroupText";function _s(t){return t.type===vn||t.type===cr||t.type===lr}const Pi=u.forwardRef(function({children:e,className:n="",orientation:r="horizontal",buttonSize:s="base",...i},o){const a=Fi(e),l=a.reduce((d,f)=>d+(_s(f)?1:0),0);let c=-1;return m.jsx("div",{ref:o,role:"group",className:E("inline-flex",r==="horizontal"?"flex-row flex-nowrap items-stretch":"flex-col flex-nowrap items-stretch",n),...i,children:a.map((d,f)=>{if(!_s(d))return m.jsx(u.Fragment,{children:d},d.key??`bg-wrap-${f}`);c+=1;const p=l<=1?"only":c===0?"first":c===l-1?"last":"middle",h={orientation:r,position:p};if(d.type===vn){const x=d,v=u.cloneElement(x,{groupSegment:x.props.groupSegment??h,size:x.props.size??s});return m.jsx(u.Fragment,{children:v},d.key??`bg-btn-${f}`)}if(d.type===lr){const x=d,v=u.cloneElement(x,{groupSegment:x.props.groupSegment??h,size:x.props.size??ju(s)});return m.jsx(u.Fragment,{children:v},d.key??`bg-inp-${f}`)}const g=d,b=u.cloneElement(g,{groupSegment:g.props.groupSegment??h,buttonSize:g.props.buttonSize??s});return m.jsx(u.Fragment,{children:b},d.key??`bg-t-${f}`)})})});Pi.displayName="ButtonGroup";const Bi={small:"small",base:"base",large:"large"};function Fu(t){return Bi[t]}function Ui(t,e){return u.Children.map(t,n=>{if(!u.isValidElement(n))return n;if(n.type===vn){const r=n.props;return u.cloneElement(n,{size:r.size??e})}if(n.type===u.Fragment){const r=n;return m.jsx(u.Fragment,{children:Ui(r.props.children,e)},r.key??void 0)}return n})}const Pu={small:{panelMax:"max-w-component-small",maxHeight:"max-h-[min(85dvh,26rem)]",headerGap:"gap-base",headerPad:"px-plus pt-plus pb-base",bodyPad:"py-base px-plus",footerPad:"py-base px-plus gap-small",headingBlockGap:"flex min-w-0 flex-col gap-xsmall",iconClass:"icon-base",titleVariant:"small",titleClassName:"font-medium leading-snug",descVariant:"small",descClassName:"leading-normal text-muted",bodyVariant:"small",bodyClassName:"leading-normal"},base:{panelMax:"max-w-component-mid",maxHeight:"max-h-[min(90dvh,36rem)]",headerGap:"gap-plus",headerPad:"px-mid pt-mid pb-plus",bodyPad:"py-plus px-mid",footerPad:"py-plus px-mid gap-base",headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-large",titleVariant:"mid",titleClassName:"",descVariant:"base",descClassName:"leading-normal text-muted",bodyVariant:"base",bodyClassName:"leading-normal"},large:{panelMax:"max-w-component-large",maxHeight:"max-h-[min(90dvh,44rem)]",headerGap:"gap-plus",headerPad:"px-large pt-large pb-mid",bodyPad:"py-mid px-large",footerPad:"py-mid px-mid gap-plus",headingBlockGap:"flex min-w-0 flex-col gap-base",iconClass:"icon-2xlarge",titleVariant:"large",titleClassName:"",descVariant:"mid",descClassName:"text-muted",bodyVariant:"mid",bodyClassName:""}},Bu="bg-surface text-foreground border border-base shadow-token-lg";function Uu(t){return t==="outline"?"surface-outline text-foreground shadow-token-lg":t==="secondary"?"surface-secondary text-foreground shadow-token-lg":Bu}function Gu(t){return t!=="default"&&t!=="secondary"}function $u(t){switch(t){case"danger":return Xe.danger;case"success":return Xe.success;case"info":return Xe.info;case"warning":return Xe.warning;default:return"text-accent"}}function Vu(t){return t==="default"||t==="secondary"?null:t==="outline"?Oe.IoHelpCircleOutline:ir[t]}function Hu(t){switch(t){case"danger":return"danger";case"success":return"success";case"info":return"info";case"warning":return"warning";default:return"default"}}function Wu(){return typeof document>"u"?!1:document.documentElement.dataset.brnTheme==="light"}const Gi=u.createContext(null);function gt(){const t=u.useContext(Gi);if(!t)throw new Error("Компоненты AlertDialog.* должны быть внутри <AlertDialog>.");return t}const ur=u.forwardRef(function({className:e="",onClick:n,...r},s){const{onOpenChange:i}=gt();return m.jsx(yn,{ref:s,className:E("shrink-0 self-start",e),onClick:o=>{n==null||n(o),o.defaultPrevented||i(!1)},...r})});ur.displayName="AlertDialog.Close";function Xu({icon:t,showClose:e=!0,className:n="",children:r,...s}){const{tone:i,sizePreset:o}=gt(),a=$u(i),l=Vu(i);let c;return t===null?c=null:t!==void 0?c=t:Gu(i)&&l!==null?c=m.jsx(l,{"aria-hidden":!0,className:o.iconClass}):c=null,m.jsxs("div",{className:E("flex shrink-0 items-start",o.headerGap,o.headerPad,n),...s,children:[c!==null?m.jsx("span",{className:E("shrink-0 leading-none [&_svg]:block",a),children:c}):null,m.jsx("div",{className:"min-w-0 flex-1",children:r}),e?m.jsx(ur,{}):null]})}const qu=u.forwardRef(function({className:e="",id:n,...r},s){const{titleId:i,sizePreset:o}=gt();return m.jsx(ee,{ref:s,as:"h2",variant:o.titleVariant,id:n??i,className:E("min-w-0",o.titleClassName,e),...r})});function Yu({className:t="",id:e,...n}){const{descriptionId:r,setHasDescription:s,sizePreset:i}=gt();return u.useLayoutEffect(()=>(s(!0),()=>s(!1)),[s]),m.jsx(ee,{as:"p",variant:i.descVariant,id:e??r,className:E(i.descClassName,t),...n})}function Zu({className:t="",...e}){const{sizePreset:n}=gt();return m.jsx("div",{className:E(n.headingBlockGap,"min-w-0 flex-1",t),...e})}function Qu({className:t="",children:e,...n}){const{sizePreset:r}=gt();return m.jsx("div",{className:E("min-h-0 flex-1 overflow-y-auto",r.bodyPad,t),...n,children:m.jsx(ee,{variant:r.bodyVariant,as:"div",className:E("min-h-0",r.bodyClassName),children:e})})}function Ku({className:t="",children:e,...n}){const{sizePreset:r,footerButtonSize:s}=gt(),i=u.useMemo(()=>Ui(e,s),[e,s]);return m.jsx("div",{className:E("flex shrink-0 flex-wrap items-center justify-end border-t border-base",r.footerPad,t),...n,children:i})}const Ju=function({open:e,onOpenChange:n,children:r,className:s="",variant:i,status:o,size:a="base"}){const l=or(o,i),c=Pu[a],d=u.useId(),f=u.useId(),[p,h]=u.useState(!1),[g,b]=u.useState(e),x=u.useRef(null),v=u.useRef(null),T=u.useCallback(k=>{h(k)},[]);u.useEffect(()=>{e&&b(!0)},[e]),u.useEffect(()=>{if(!g)return;const k=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=k}},[g]),u.useEffect(()=>{if(e||!g)return;const k=x.current,y=v.current;let S=!1;const w=()=>{S||b(!1)};if(!k||!y){w();return}if(ne()){w();return}q(k),q(y);const M=fe(k,{opacity:[1,0],duration:200,ease:me}),N=fe(y,{opacity:[1,0],scale:[1,.97],duration:Be,ease:me});return Promise.all([Promise.resolve(M),Promise.resolve(N)]).then(w),()=>{S=!0,q(k),q(y)}},[e,g]),u.useEffect(()=>{if(!e)return;const k=y=>{y.key==="Escape"&&y.preventDefault()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[e]),u.useLayoutEffect(()=>{if(!e||!g)return;const k=x.current,y=v.current;if(!(!k||!y)){if(ne()){k.style.opacity="1",y.style.opacity="1";return}q(k),q(y),fe(k,{opacity:[0,1],duration:200,ease:me}),fe(y,{opacity:[0,1],scale:[.97,1],duration:Be,ease:me})}},[e,g]),u.useLayoutEffect(()=>{!e||!g||!v.current||v.current.focus()},[e,g]);const _={titleId:d,descriptionId:f,hasDescription:p,setHasDescription:T,onOpenChange:n,tone:l,size:a,sizePreset:c,footerButtonSize:Bi[a]};if(typeof document>"u"||!g)return null;const C=Wu();return jt.createPortal(m.jsx(Gi.Provider,{value:_,children:m.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-mid",role:"presentation",...C?{"data-theme":"light"}:{},children:[m.jsx("div",{ref:x,className:E("absolute inset-0",C?"bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none":"bg-[color-mix(in_oklab,black_58%,transparent)]"),style:{opacity:ne()?1:0},"aria-hidden":!0}),m.jsx("div",{ref:v,role:"alertdialog","aria-modal":e?!0:void 0,"aria-hidden":!e,"aria-labelledby":d,"aria-describedby":p?f:void 0,tabIndex:-1,className:E("relative z-10 flex min-h-0 w-full flex-col overflow-hidden rounded-mid outline-none",c.panelMax,c.maxHeight,Uu(l),s),style:ne()?void 0:{opacity:0},children:r})]})}),document.body)},ed=Object.assign(Ju,{Header:Xu,HeadingBlock:Zu,Title:qu,Description:Yu,Body:Qu,Footer:Ku,Close:ur});function td(){return typeof document>"u"?!1:document.documentElement.dataset.brnTheme==="light"}const $i=u.createContext(null);function dr(){const t=u.useContext($i);if(!t)throw new Error("Компоненты Dialog.* должны быть внутри <Dialog>.");return t}function nd({className:t="",...e}){return m.jsx("div",{className:E("flex shrink-0 items-start gap-plus px-mid pt-mid pb-plus",t),...e})}const rd=u.forwardRef(function({className:e="",id:n,...r},s){const{titleId:i}=dr();return m.jsx(ee,{ref:s,as:"h2",variant:"mid",id:n??i,className:E("min-w-0",e),...r})});function sd({className:t="",id:e,...n}){const{descriptionId:r,setHasDescription:s}=dr();return u.useLayoutEffect(()=>(s(!0),()=>s(!1)),[s]),m.jsx(ee,{as:"p",variant:"base",id:e??r,className:E("leading-normal text-muted",t),...n})}function id({className:t="",...e}){return m.jsx("div",{className:E("flex min-w-0 flex-1 flex-col gap-base",t),...e})}const od=u.forwardRef(function({className:e="",onClick:n,"aria-label":r="Закрыть",...s},i){const{onOpenChange:o}=dr();return m.jsx(yn,{ref:i,"aria-label":r,className:E("-m-xsmall",e),onClick:a=>{n==null||n(a),a.defaultPrevented||o(!1)},...s})});function ad({className:t="",...e}){return m.jsx("div",{className:E("min-h-0 flex-1 overflow-y-auto py-plus px-mid",t),...e})}function ld({className:t="",...e}){return m.jsx("div",{className:E("flex shrink-0 flex-wrap items-center justify-end gap-base border-t border-base py-plus px-mid",t),...e})}const cd=function({open:e,onOpenChange:n,children:r,className:s="",dismissOnBackdrop:i=!0}){const o=u.useId(),a=u.useId(),[l,c]=u.useState(!1),[d,f]=u.useState(e),p=u.useRef(null),h=u.useRef(null),g=u.useCallback(T=>{c(T)},[]);u.useEffect(()=>{e&&f(!0)},[e]),u.useEffect(()=>{if(!d)return;const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=T}},[d]),u.useEffect(()=>{if(e||!d)return;const T=p.current,_=h.current;let C=!1;const k=()=>{C||f(!1)};if(!T||!_){k();return}if(ne()){k();return}q(T),q(_);const y=fe(T,{opacity:[1,0],duration:200,ease:me}),S=fe(_,{opacity:[1,0],scale:[1,.97],duration:Be,ease:me}),w=Promise.resolve(y).then(()=>{}),M=Promise.resolve(S).then(()=>{});return Promise.all([w,M]).then(k),()=>{C=!0,q(T),q(_)}},[e,d]),u.useEffect(()=>{if(!e)return;const T=_=>{_.key==="Escape"&&n(!1)};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[e,n]),u.useLayoutEffect(()=>{if(!e||!d)return;const T=p.current,_=h.current;if(!(!T||!_)){if(ne()){T.style.opacity="1",_.style.opacity="1";return}q(T),q(_),fe(T,{opacity:[0,1],duration:200,ease:me}),fe(_,{opacity:[0,1],scale:[.97,1],duration:Be,ease:me})}},[e,d]),u.useLayoutEffect(()=>{!e||!d||!h.current||h.current.focus()},[e,d]);const b={titleId:o,descriptionId:a,hasDescription:l,setHasDescription:g,onOpenChange:n},x=u.useCallback(T=>{i&&T.target===T.currentTarget&&n(!1)},[n,i]);if(typeof document>"u"||!d)return null;const v=td();return jt.createPortal(m.jsx($i.Provider,{value:b,children:m.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-mid",role:"presentation",...v?{"data-theme":"light"}:{},children:[m.jsx("div",{ref:p,className:E("absolute inset-0",v?"bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none":"bg-[color-mix(in_oklab,black_58%,transparent)]"),style:{opacity:ne()?1:0},"aria-hidden":!0,onMouseDown:x}),m.jsx("div",{ref:h,role:"dialog","aria-modal":e,"aria-hidden":!e,"aria-labelledby":o,"aria-describedby":l?a:void 0,tabIndex:-1,className:E("relative z-10 flex min-h-0 max-h-[min(90dvh,36rem)] w-full max-w-component-mid flex-col overflow-hidden rounded-mid border border-base bg-surface text-foreground shadow-token-lg outline-none",s),style:ne()?void 0:{opacity:0},children:r})]})}),document.body)},ud=Object.assign(cd,{Header:nd,HeadingBlock:id,Title:rd,Description:sd,Close:od,Body:ad,Footer:ld});function dd(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function fd(t){var n;return t?((n=t.closest("[data-theme]"))==null?void 0:n.getAttribute("data-theme"))==="light"?{"data-theme":"light"}:{}:{}}function hd(t){const e=[t.value];return t.filterText&&e.push(t.filterText),typeof t.label=="string"&&e.push(t.label),typeof t.description=="string"&&e.push(t.description),e.join(" ").toLowerCase()}function Ts(t,e){const n=e.trim().toLowerCase();return n?hd(t).includes(n):!0}const md={default:"bg-surface",outline:"bg-transparent"},pd={danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",warning:"bg-surface-tint-warning"},gd={danger:"focus-within:border-danger",success:"focus-within:border-success",warning:"focus-within:border-warning"},bd={default:"text-muted",danger:"text-danger",success:"text-success",warning:"text-warning"},xd={base:"min-h-8",large:"min-h-10",xlarge:"min-h-12"},vd={base:"px-plus py-small text-base leading-[1.2]",large:"px-mid py-base text-mid leading-[1.2]",xlarge:"px-large py-base text-mid leading-[1.2]"},Cs={base:"icon-base",large:"icon-large",xlarge:"icon-large"},Vi=u.forwardRef(function({options:e,value:n,defaultValue:r,onValueChange:s,variant:i="default",size:o="base",status:a="default",disabled:l=!1,label:c,isRequired:d=!1,placeholder:f="Выберите значение",hint:p,menuMaxHeight:h="min(24rem, 70vh)",className:g="",id:b,listId:x},v){var W;const T=u.useId(),_=b??T,C=x??`${_}-listbox`,k=n!==void 0,[y,S]=u.useState(r??""),w=k?n??"":y,M=u.useCallback(R=>{k||S(R),s==null||s(R)},[k,s]),[N,j]=u.useState(!1),[O,z]=u.useState(!1),[L,G]=u.useState({top:0,left:0,minW:0}),[$,H]=u.useState(""),[Y,D]=u.useState(0),I=u.useRef(null),ue=u.useRef(null),X=u.useRef(null),Ee=u.useRef(null),oe=u.useRef(!1),V=u.useRef(null),Q=u.useCallback(R=>{ue.current=R,I.current=R},[]),te=u.useCallback(R=>{X.current=R,typeof v=="function"?v(R):v&&(v.current=R)},[v]),de=u.useMemo(()=>e.findIndex(R=>R.value===w),[e,w]),A=de>=0?e[de]:void 0,F=u.useMemo(()=>A?typeof A.label=="string"?A.label:A.filterText?A.filterText:A.value:"",[A]),K=u.useMemo(()=>e.map((R,P)=>({o:R,i:P})).filter(({o:R})=>Ts(R,$)).map(({i:R})=>R),[e,$]),ce=K[Y]??K[0]??-1,pe=a==="danger"||a==="success"||a==="warning"?E(pd[a],"border-transparent",gd[a]):E(i==="outline"?"surface-outline":md[i],i==="outline"?"focus-within:border-accent":"border-base focus-within:border-accent"),ke=u.useCallback(()=>{const R=I.current;if(!R)return;const P=R.getBoundingClientRect();G({top:P.bottom+6,left:P.left,minW:P.width})},[]);u.useLayoutEffect(()=>{N&&z(!0)},[N]),u.useLayoutEffect(()=>{N&&ke()},[N,ke,$]),u.useLayoutEffect(()=>{N&&D(R=>{const P=K;return P.length===0?0:Math.min(R,P.length-1)})},[K,N]),u.useEffect(()=>{if(!N)return;const R=()=>ke();return window.addEventListener("scroll",R,!0),window.addEventListener("resize",R),()=>{window.removeEventListener("scroll",R,!0),window.removeEventListener("resize",R)}},[N,ke]),u.useEffect(()=>{if(!N)return;const R=P=>{var he,ie;const ae=P.target;(he=I.current)!=null&&he.contains(ae)||(ie=Ee.current)!=null&&ie.contains(ae)||j(!1)};return document.addEventListener("pointerdown",R,!0),()=>document.removeEventListener("pointerdown",R,!0)},[N]),u.useEffect(()=>{if(!N)return;const R=P=>{var he;const ae=P;ae.key==="Escape"&&(ae.preventDefault(),j(!1),(he=X.current)==null||he.focus())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[N]),u.useLayoutEffect(()=>{if(!O)return;const R=Ee.current;if(!R)return;const P=ne();let ae=!1;if(P)return q(R),N?R.style.opacity="":z(!1),()=>{ae=!0};if(q(R),N)return R.style.opacity="0",fe(R,{opacity:[0,1],duration:lt,ease:me}),()=>{ae=!0,q(R)};const he=Number.parseFloat(getComputedStyle(R).opacity),ie=Number.isFinite(he)&&he>0?he:1,Le=fe(R,{opacity:[ie,0],duration:lt,ease:me});return Promise.resolve(Le).then(()=>{ae||z(!1)}),()=>{ae=!0,q(R)}},[N,O]),u.useLayoutEffect(()=>{var P;if(!N||!O||ce<0)return;const R=`${C}-opt-${ce}`;(P=document.getElementById(R))==null||P.scrollIntoView({block:"nearest"})},[N,O,ce,C]);const we=u.useCallback(R=>{var he;const P=K;if(P.length===0)return;let ae=Y;for(let ie=0;ie<P.length;ie+=1){ae=(ae+R+P.length)%P.length;const Le=P[ae];if(Le!==void 0&&!((he=e[Le])!=null&&he.disabled)){D(ae);return}}},[Y,K,e]),_e=u.useCallback(R=>{var ae;const P=e[R];!P||P.disabled||(M(P.value),j(!1),H(""),(ae=X.current)==null||ae.focus())},[e,M]),Me=u.useCallback(()=>{const R=V.current;V.current=null;const P=R??"";H(P);const ae=e.map((ie,Le)=>({o:ie,i:Le})).filter(({o:ie})=>Ts(ie,P)).map(({i:ie})=>ie);let he=0;if(ae.length>0&&de>=0){const ie=ae.indexOf(de);ie>=0&&(he=ie)}D(he),requestAnimationFrame(()=>{const ie=X.current;if(!ie)return;ie.focus();const Le=P.length;ie.setSelectionRange(Le,Le)})},[e,de]),Ae=u.useCallback(()=>{if(l||oe.current)return;oe.current=!0;const R=ue.current;if(!R){oe.current=!1;return}if(ne()){oe.current=!1,j(!0),Me();return}tt(R).then(()=>{oe.current=!1,!l&&(j(!0),Me())})},[l,Me]),xe=u.useCallback(R=>{l||N||R.button===0&&Ae()},[l,N,Ae]),Ue=u.useCallback(R=>{if(R.stopPropagation(),!l){if(N){j(!1),H("");return}R.button===0&&Ae()}},[l,N,Ae]),Re=u.useCallback(R=>{N&&H(R.target.value)},[N]),J=u.useCallback(R=>{var P,ae;if(!l&&!R.nativeEvent.isComposing){if(!N){if(R.key==="ArrowDown"||R.key==="ArrowUp"){R.preventDefault(),Ae();return}if(R.key==="Enter"||R.key===" "){R.preventDefault(),Ae();return}if(R.key.length===1&&!R.ctrlKey&&!R.metaKey&&!R.altKey&&R.key!=="Tab"){R.preventDefault(),V.current=R.key,Ae();return}return}if(R.key==="ArrowDown"){R.preventDefault(),we(1);return}if(R.key==="ArrowUp"){R.preventDefault(),we(-1);return}if(R.key==="Enter"){R.preventDefault(),ce>=0&&_e(ce);return}if(R.key==="Home"){R.preventDefault();const he=K;for(let ie=0;ie<he.length;ie+=1){const Le=he[ie];if(Le!==void 0&&!((P=e[Le])!=null&&P.disabled)){D(ie);break}}return}if(R.key==="End"){R.preventDefault();const he=K;for(let ie=he.length-1;ie>=0;ie-=1){const Le=he[ie];if(Le!==void 0&&!((ae=e[Le])!=null&&ae.disabled)){D(ie);break}}}}},[l,N,Ae,we,ce,_e,K,e]);u.useEffect(()=>{N||H("")},[N]);const Te=fd(I.current),qe=N?$:F,Ke=O&&typeof document<"u"?jt.createPortal(m.jsx("div",{ref:Ee,...Te,id:C,role:"listbox",className:E("fixed z-[100] flex flex-col overflow-hidden rounded-mid border border-base bg-surface shadow-token-md outline-none","will-change-[opacity] motion-reduce:transition-none",!N&&O&&"pointer-events-none"),style:{top:L.top,left:L.left,minWidth:Math.max(L.minW,192)},children:m.jsx("div",{className:"flex min-h-0 flex-col gap-xsmall overflow-y-auto overflow-x-hidden p-base",style:{maxHeight:h},children:K.length===0?m.jsx(ee,{as:"p",variant:"base",className:"px-base py-small text-center text-muted",children:"Нет совпадений"}):K.map(R=>{const P=e[R],ae=P.value===w,he=R===ce;return m.jsxs("button",{type:"button",id:`${C}-opt-${R}`,role:"option","aria-selected":ae,disabled:P.disabled,tabIndex:-1,className:E("flex w-full min-w-0 items-center gap-base rounded-mid px-base py-small text-left outline-none","button-idle-surface-transition motion-reduce:transition-none",!P.disabled&&"cursor-pointer text-foreground hover:bg-accent-fill-hover focus-visible:bg-accent-fill-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",P.disabled&&"cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",he&&!P.disabled&&"bg-accent-fill-hover"),onClick:()=>_e(R),onPointerEnter:()=>{if(!P.disabled){const ie=K.indexOf(R);ie>=0&&D(ie)}},children:[m.jsxs("span",{className:"min-w-0 flex-1 text-left",children:[m.jsx(ee,{as:"span",variant:"base",inheritColor:!0,className:"block font-medium leading-snug",children:P.label}),P.description!=null?m.jsx(ee,{as:"span",variant:"tools",className:"mt-xsmall block text-muted",children:P.description}):null]}),P.icon!=null?m.jsx("span",{className:E("flex shrink-0 items-center text-muted [&_svg]:shrink-0",Cs[o]),children:P.icon}):null]},P.value)})})}),document.body):null;return m.jsxs("div",{className:E("flex w-full flex-col gap-small",g),children:[c?m.jsxs("label",{htmlFor:_,className:"inline-flex flex-wrap items-baseline gap-x-xsmall gap-y-0",children:[m.jsx(ee,{as:"span",variant:"base",className:"font-medium leading-snug",children:c}),d?m.jsx("span",{className:"text-danger leading-none","aria-hidden":!0,children:"*"}):null]}):null,m.jsxs("div",{ref:Q,role:"presentation",onPointerDown:xe,className:E("relative z-0 flex w-full min-w-0 items-stretch border-1 text-left outline-none","overflow-hidden rounded-base transition-[border-color,background-color] duration-200 ease-out motion-reduce:transition-none","focus-within:outline focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-accent",xd[o],pe,l?"cursor-not-allowed opacity-55":"cursor-pointer"),children:[m.jsx("input",{ref:dd(te),id:_,type:"text",role:"combobox","aria-expanded":N,"aria-controls":C,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":N&&ce>=0&&e[ce]&&!((W=e[ce])!=null&&W.disabled)?`${C}-opt-${ce}`:void 0,"aria-required":d||void 0,disabled:l,readOnly:!N,autoComplete:"off",placeholder:f,value:qe,onChange:Re,onKeyDown:J,className:E("min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted",vd[o],!N&&!A&&"text-muted")}),m.jsx("button",{type:"button",tabIndex:-1,disabled:l,"aria-label":N?"Закрыть список":"Открыть список",className:E("flex shrink-0 items-center justify-center self-stretch border-l border-base px-small outline-none","text-muted transition-transform duration-200 ease-out motion-reduce:transition-none","hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",N&&"rotate-180",l&&"pointer-events-none"),onPointerDown:Ue,children:m.jsx(Oe.IoChevronDown,{className:Cs[o],"aria-hidden":!0})})]}),p?m.jsx(ee,{as:"p",variant:"base",className:E("leading-snug",bd[a]),children:p}):null,Ke]})});Vi.displayName="Selector";const yd="hover:bg-accent-fill-hover",wd={base:{dim:32,defaultExpandedW:280,iconBox:16,padX:12,radiusExpanded:8,iconClass:"icon-small",inputClass:"text-base",clearTap:24,clearIconClass:"icon-base",textGapClear:6},large:{dim:52,defaultExpandedW:340,iconBox:26,padX:14,radiusExpanded:12,iconClass:"icon-large",inputClass:"text-[1rem]",clearTap:36,clearIconClass:"icon-large",textGapClear:8}},Hi=u.forwardRef(function({className:e="",size:n="base",expandedWidth:r,defaultExpanded:s=!1,expanded:i,onExpandedChange:o,collapseOnBlur:a=!0,disabled:l,readOnly:c,placeholder:d="Поиск…",value:f,defaultValue:p,onChange:h,onBlur:g,onKeyDown:b,id:x,"aria-label":v,onValueChange:T,ripple:_=!1,...C},k){const y=u.useId(),S=x??y,w=i!==void 0,[M,N]=u.useState(s),j=w?i:M,O=u.useCallback(W=>{w||N(W),o==null||o(W)},[w,o]),z=u.useRef(null),L=u.useRef(null),G=u.useRef(null),$=u.useRef(null),H=u.useRef(!1),Y=f!==void 0,[D,I]=u.useState(()=>p!=null&&String(p).trim().length>0||f!=null&&String(f).trim().length>0);u.useEffect(()=>{Y&&I(String(f??"").trim().length>0)},[Y,f]);const ue=u.useCallback(W=>{G.current=W,typeof k=="function"?k(W):k&&(k.current=W)},[k]),X=!!(l||c),Ee=u.useCallback(W=>{h==null||h(W),T==null||T(W.target.value),Y||I(W.target.value.trim().length>0)},[Y,h,T]),oe=u.useCallback(W=>{var ae;if(W.preventDefault(),W.stopPropagation(),X)return;const R=G.current;if(!R)return;Y||I(!1);const P=(ae=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:ae.set;P==null||P.call(R,""),R.dispatchEvent(new Event("input",{bubbles:!0})),h==null||h({target:R,currentTarget:R}),T==null||T(""),requestAnimationFrame(()=>R.focus())},[X,Y,h,T]),V=wd[n],Q=r??V.defaultExpandedW,te=V.dim,de=(te-V.iconBox)/2,A=V.padX,F=u.useCallback(W=>{const R=z.current,P=L.current;if(!R||!P)return;const ae=W?Q:te,he=W?V.radiusExpanded:te/2;R.style.width=`${ae}px`,R.style.height=`${te}px`,R.style.borderRadius=`${he}px`,P.style.left=`${W?A:de}px`},[te,de,A,V.radiusExpanded,Q]),K=u.useCallback(W=>{const R=z.current,P=L.current;if(!(!R||!P)){if(ne()){F(W);return}q(R),q(P),fe(R,{width:W?Q:te,height:te,borderRadius:W?V.radiusExpanded:te/2,duration:Be,ease:me}),fe(P,{left:W?A:de,duration:Be,ease:me})}},[F,te,de,A,V.radiusExpanded,Q]);u.useLayoutEffect(()=>{if(!H.current){H.current=!0,F(j);return}K(j)},[F,j,K]);const ce={hover:st()},ye=u.useCallback(()=>{requestAnimationFrame(()=>{var W;return(W=G.current)==null?void 0:W.focus()})},[]),pe=u.useCallback(async()=>{if(X||j)return;await($.current??Promise.resolve()),$.current=null,O(!0);const W=z.current;W&&!ne()&&(q(W),He(W,!1,void 0,ce)),ye()},[X,j,ye,O]),ke=u.useCallback(W=>{if(X||j)return;const R=z.current;if(!R||ne()){$.current=Promise.resolve();return}$.current=tt(R).then(()=>{})},[X,j]),we=u.useCallback(W=>{X||j||(W.preventDefault(),pe())},[X,j,pe]),_e=u.useCallback(()=>{if(X||j)return;const W=z.current;!W||ne()||He(W,!0,void 0,ce)},[X,j]),Me=u.useCallback(()=>{const W=z.current;!W||X||j||ne()||He(W,!1,void 0,ce)},[X,j]),Ae=u.useCallback(W=>{g==null||g(W),!(!a||X)&&window.setTimeout(()=>{const R=z.current;if(!(R!=null&&R.contains(document.activeElement))){const P=G.current;((P==null?void 0:P.value)??"").trim().length===0&&O(!1)}},0)},[X,a,g,O]),xe=u.useCallback(W=>{j||X||(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),pe())},[X,j,pe]),Ue=u.useCallback(W=>{var R,P;b==null||b(W),!W.defaultPrevented&&W.key==="Escape"&&a&&(((R=G.current)==null?void 0:R.value)??"").length===0&&(W.stopPropagation(),O(!1),(P=z.current)==null||P.focus())},[a,b,O]),Re=V.padX+V.iconBox+6,J=j&&D&&!X,Te=V.padX+(J?V.clearTap+V.textGapClear:0),qe=v??"Открыть поиск",Ke=v??(d?String(d):"Поиск");return m.jsxs("div",{ref:z,role:j?"search":void 0,tabIndex:j||X?-1:0,"aria-expanded":j,"aria-disabled":X||void 0,"aria-label":j?void 0:qe,"data-search-expanded":j?"":void 0,className:E("relative inline-block overflow-hidden border border-base bg-surface outline-none animate-shadow button-idle-surface-transition motion-reduce:transition-none","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","focus-within:outline focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-accent",j?"cursor-text":"",!j&&!X?"cursor-pointer":"",X?"pointer-events-none opacity-50":"",e),style:{width:te,height:te,borderRadius:te/2},onPointerDown:ke,onPointerEnter:_e,onPointerLeave:Me,onClick:we,onKeyDown:xe,children:[_?m.jsx(Xt,{color:"accentSoft",disabled:X}):null,m.jsx("span",{ref:L,className:E("pointer-events-none absolute top-1/2 z-[1] flex -translate-y-1/2 items-center justify-center text-muted",V.iconClass),style:{left:de},"aria-hidden":!0,children:m.jsx(Oe.IoSearch,{className:"size-full","aria-hidden":!0})}),m.jsx("input",{ref:ue,id:S,type:"search",disabled:l,readOnly:c,placeholder:d,value:f,defaultValue:p,onChange:Ee,onBlur:Ae,onKeyDown:Ue,tabIndex:j?0:-1,"aria-hidden":!j,"aria-label":Ke,className:E("box-border min-h-0 w-full border-0 bg-transparent py-0 text-foreground outline-none placeholder:text-muted","[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none","disabled:cursor-not-allowed disabled:opacity-100",V.inputClass,j?"relative z-[2] opacity-100":"pointer-events-none absolute inset-0 opacity-0"),style:j?{height:te,lineHeight:`${te}px`,paddingLeft:Re,paddingRight:Te,paddingTop:0,paddingBottom:0}:{paddingLeft:Re,lineHeight:`${te}px`,height:"100%"},...C}),J?m.jsx("button",{type:"button","aria-label":"Очистить поле",onClick:oe,onPointerDown:W=>W.stopPropagation(),className:E("absolute top-1/2 z-[3] flex -translate-y-1/2 items-center justify-center rounded-full border-0 bg-transparent p-0","text-foreground outline-none transition-colors",yd,"focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-inset","cursor-pointer"),style:{right:V.padX,width:V.clearTap,height:V.clearTap},children:m.jsx(Oe.IoClose,{className:`shrink-0 ${V.clearIconClass}`,"aria-hidden":!0})}):null]})});Hi.displayName="SearchInput";const _d={default:"bg-surface border border-base",outline:"surface-outline",secondary:"surface-secondary"};function Td({className:t="",...e}){return m.jsx("div",{className:E("flex min-w-0 flex-col gap-small py-plus px-mid",t),...e})}const Cd=u.forwardRef(function({className:e="",...n},r){return m.jsx(ee,{ref:r,as:"h3",variant:"base",className:E("min-w-0 leading-snug",e),...n})}),Ed=u.forwardRef(function({className:e="",...n},r){return m.jsx(ee,{ref:r,as:"p",variant:"base",className:E("min-w-0 leading-normal text-muted",e),...n})});function kd({className:t="",children:e,...n}){return m.jsx("div",{className:E("min-w-0 px-mid pb-mid",t),...n,children:m.jsx(ee,{variant:"base",as:"div",className:"leading-relaxed",children:e})})}function Rd({className:t="",...e}){return m.jsx("div",{className:E("mt-auto border-t border-base py-plus px-mid text-sm text-muted",t),...e})}const Es={hover:st()},Ad=u.forwardRef(function({className:e="",variant:n="default",pressable:r=!1,onPress:s,onPointerOver:i,onPointerOut:o,onPointerDown:a,onClick:l,onKeyDown:c,role:d,tabIndex:f,children:p,...h},g){const b=u.useRef(null),x=u.useRef(!1),v=u.useCallback(y=>{b.current=y,typeof g=="function"?g(y):g&&(g.current=y)},[g]),T=wt(b,r,x,void 0,r?Es:void 0);u.useEffect(()=>{if(r)return;const y=b.current;y&&q(y),x.current=!1},[r]);const _=u.useCallback(y=>{if(a==null||a(y),!r||y.defaultPrevented||ne())return;const S=b.current;S&&tt(S).then(()=>{const w=b.current;!w||ne()||x.current&&He(w,!0,void 0,Es)})},[a,r]),C=u.useCallback(y=>{l==null||l(y),!(!r||y.defaultPrevented)&&(s==null||s(y))},[l,s,r]),k=u.useCallback(y=>{c==null||c(y),!(!r||y.defaultPrevented)&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),y.currentTarget.click())},[c,r]);return m.jsx("div",{ref:v,role:d??(r?"button":void 0),tabIndex:f??(r?0:void 0),className:E("flex min-w-0 flex-col overflow-hidden rounded-mid text-foreground outline-none",r&&"relative cursor-pointer animate-shadow button-idle-surface-transition motion-reduce:transition-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",_d[n],r&&"will-change-transform origin-center",e),onPointerOver:y=>{i==null||i(y),!y.defaultPrevented&&r&&T.onPointerOver(y)},onPointerOut:y=>{o==null||o(y),r&&T.onPointerOut(y)},onPointerDown:_,onClick:C,onKeyDown:k,...h,children:r?m.jsx("div",{className:"relative flex min-w-0 flex-1 flex-col",children:p}):p})}),Nd=Object.assign(Ad,{Content:Td,Title:Cd,Description:Ed,Body:kd,Footer:Rd}),Sd={default:"border border-base bg-surface",outline:"surface-outline",secondary:"surface-secondary",danger:"bg-surface-tint-danger",success:"bg-surface-tint-success",info:"bg-surface-tint-info",warning:"bg-surface-tint-warning"},Id={small:"max-w-[12rem] px-base py-xsmall",base:"max-w-[16rem] px-base py-small",large:"max-w-xs px-plus py-base"},Md={small:"tools",base:"small",large:"base"},Ld={small:"icon-small",base:"icon-base",large:"icon-mid"},Od={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",large:"[&_svg]:icon-mid"};function jd(t){return t==="danger"||t==="success"||t==="info"||t==="warning"}function Dd({variant:t,size:e,showIcon:n,icon:r}){if(n===!1)return null;if(r!=null)return m.jsx("span",{className:E("inline-flex shrink-0 text-foreground [&_svg]:shrink-0",Od[e]),children:r});if(!jd(t))return null;const i=ir[t];return m.jsx(i,{"aria-hidden":!0,className:E("shrink-0",Ld[e],Xe[t])})}const Wi=u.createContext(null);function Xi(t){const e=u.useContext(Wi);if(!e)throw new Error(`${t} должен быть внутри <Tooltip>`);return e}function zd({children:t,size:e="base",variant:n="default",delayShowMs:r=240,side:s="top",icon:i,showIcon:o}){const[a,l]=u.useState(!1),c=u.useRef(null),d=u.useRef(null),f=u.useId(),p=u.useCallback(()=>{d.current!==null&&(clearTimeout(d.current),d.current=null)},[]),h=u.useCallback(()=>{p(),d.current=globalThis.setTimeout(()=>{d.current=null,l(!0)},r)},[p,r]),g=u.useCallback(()=>{p(),l(!1)},[p]);u.useEffect(()=>()=>p(),[p]);const b=u.useMemo(()=>({open:a,tooltipId:f,variant:n,size:e,side:s,icon:i,showIcon:o,triggerRef:c,scheduleShow:h,hide:g}),[g,i,a,h,o,s,e,f,n]);return m.jsx(Wi.Provider,{value:b,children:t})}const Fd=u.forwardRef(function({className:e="",children:n,onPointerEnter:r,onPointerLeave:s,...i},o){const{scheduleShow:a,hide:l,tooltipId:c,open:d,triggerRef:f}=Xi("Tooltip.Trigger"),p=u.useCallback(h=>{f.current=h,typeof o=="function"?o(h):o&&(o.current=h)},[o,f]);return m.jsx("span",{ref:p,className:E("inline-flex shrink-0",e),"aria-describedby":d?c:void 0,onPointerEnter:h=>{a(),r==null||r(h)},onPointerLeave:h=>{l(),s==null||s(h)},...i,children:n})});function Pd(t){var n;return t?((n=t.closest("[data-theme]"))==null?void 0:n.getAttribute("data-theme"))==="light"?{"data-theme":"light"}:{}:{}}function Bd({className:t="",children:e,...n}){const{open:r,tooltipId:s,variant:i,size:o,side:a,icon:l,showIcon:c,triggerRef:d}=Xi("Tooltip.Content"),f=u.useRef(null),[p,h]=u.useState(!1);u.useLayoutEffect(()=>{r&&h(!0)},[r]),u.useEffect(()=>{const T=f.current;T&&T.style.setProperty("--el-shadow",st())});const g=u.useCallback(()=>{const T=d.current,_=f.current;if(!T||!_)return;const C=8,k=8,y=T.getBoundingClientRect(),S=_.getBoundingClientRect();let w=y.left+y.width/2-S.width/2,M;a==="top"?(M=y.top-k-S.height,M<C&&(M=y.bottom+k)):(M=y.bottom+k,M+S.height>window.innerHeight-C&&(M=Math.max(C,y.top-k-S.height))),w=Math.max(C,Math.min(w,window.innerWidth-S.width-C)),_.style.position="fixed",_.style.left=`${w}px`,_.style.top=`${M}px`,_.style.transform=""},[a,d]);if(u.useLayoutEffect(()=>{if(!r)return;g();const T=window.requestAnimationFrame(()=>g()),_=()=>g();return window.addEventListener("scroll",_,!0),window.addEventListener("resize",_),()=>{window.cancelAnimationFrame(T),window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",_)}},[r,g,e]),u.useLayoutEffect(()=>{if(!p)return;const T=f.current;if(!T)return;const _=ne();let C=!1;if(_)return q(T),r?T.style.opacity="":h(!1),()=>{C=!0};if(q(T),r)return T.style.opacity="0",fe(T,{opacity:[0,1],duration:lt,ease:me}),()=>{C=!0,q(T)};const k=Number.parseFloat(getComputedStyle(T).opacity),y=Number.isFinite(k)&&k>0?k:1,S=fe(T,{opacity:[y,0],duration:lt,ease:me});return Promise.resolve(S).then(()=>{C||h(!1)}),()=>{C=!0,q(T)}},[r,p]),!p||typeof document>"u")return null;const b=Dd({variant:i,size:o,showIcon:c,icon:l}),x=Pd(d.current),v=m.jsx("div",{ref:f,...x,role:"tooltip",id:s,className:E("pointer-events-none z-[10000] w-max min-w-0 rounded-lg outline-none will-change-[opacity] animate-shadow",Sd[i],Id[o],t),...n,children:m.jsxs("span",{className:"flex min-w-0 items-center gap-small",children:[b,m.jsx(ee,{as:"span",variant:Md[o],className:E("min-w-0 leading-tight",b&&"flex-1"),children:e})]})});return jt.createPortal(v,document.body)}const dn=Object.assign(zd,{Trigger:Fd,Content:Bd}),qi=u.createContext(null);function Yi(t){const e=u.useContext(qi);if(!e)throw new Error(`${t} должен использоваться внутри <Avatar>`);return e}const Ud={small:{root:"size-8"},base:{root:"size-10"},large:{root:"size-14"}},Gd={small:{variant:"small",className:"font-semibold uppercase leading-none tracking-tight"},base:{variant:"base",className:"font-semibold uppercase leading-none tracking-tight"},large:{variant:"header-2",className:"font-semibold uppercase leading-none tracking-tight"}};function $d(t){const e=t==null?void 0:t.trim();if(!e)return"?";const n=[...e][0];return n?n.toLocaleUpperCase():"?"}const Vd=u.forwardRef(function({size:e="base",label:n,nickname:r,tooltipSize:s="base",tooltipVariant:i="default",tooltipSide:o="top",className:a="",children:l,role:c,...d},f){const[p,h]=u.useState("idle"),g=u.useCallback(()=>{h("loaded")},[]),b=u.useCallback(()=>{h("error")},[]),x=u.useMemo(()=>({size:e,label:n,imageStatus:p,onImageLoad:g,onImageError:b}),[e,n,p,g,b]),v=!!(n!=null&&n.trim()),T=r==null?void 0:r.trim(),_=m.jsx("div",{ref:f,role:c??"group",className:E("relative inline-flex shrink-0 select-none overflow-hidden rounded-full bg-surface ring-2 ring-background",Ud[e].root,a),"aria-label":v?n.trim():void 0,...d,children:l});return m.jsx(qi.Provider,{value:x,children:T?m.jsxs(dn,{size:s,variant:i,side:o,children:[m.jsx(dn.Trigger,{children:_}),m.jsx(dn.Content,{children:T})]}):_})}),Hd=u.forwardRef(function({className:e="",onLoad:n,onError:r,...s},i){const{imageStatus:o,onImageLoad:a,onImageError:l}=Yi("Avatar.Image"),c=u.useCallback(p=>{n==null||n(p),p.defaultPrevented||a()},[n,a]),d=u.useCallback(p=>{r==null||r(p),p.defaultPrevented||l()},[r,l]),f=o==="loaded";return m.jsx("img",{ref:i,className:E("absolute inset-0 z-[1] size-full object-cover transition-opacity duration-200",f?"opacity-100":"pointer-events-none opacity-0",e),alt:s.alt??"",onLoad:c,onError:d,...s})}),Wd=u.forwardRef(function({className:e="",children:n,...r},s){const{label:i,imageStatus:o,size:a}=Yi("Avatar.Fallback"),l=o!=="loaded",d=n!=null&&n!==!1&&n!==""?n:$d(i),f=Gd[a];return m.jsx("span",{ref:s,className:E("absolute inset-0 z-0 flex items-center justify-center bg-[color-mix(in_oklab,var(--color-accent)_18%,var(--color-surface))] text-accent",l?"opacity-100":"pointer-events-none opacity-0",e),"aria-hidden":!0,...r,children:m.jsx(ee,{as:"span",variant:f.variant,inheritColor:!0,className:f.className,children:d})})}),Xd=Object.assign(Vd,{Image:Hd,Fallback:Wd}),ks=-10,Rs=1.08,qd=u.forwardRef(function({className:e="",children:n,...r},s){const i=u.Children.toArray(n).filter(u.isValidElement);return m.jsx("div",{ref:s,role:"group",className:E("flex flex-row flex-nowrap items-center",e),...r,children:i.map((o,a)=>m.jsx(Yd,{stackIndex:a,children:o},o.key??a))})});function Yd({stackIndex:t,children:e}){const n=u.useRef(null),r=ne(),s=u.useCallback(()=>{const o=n.current;if(o){if(q(o),r){o.style.transform="";return}fe(o,{translateY:0,scale:1,duration:Be,ease:me})}},[r]),i=u.useCallback(()=>{const o=n.current;if(o){if(q(o),r){o.style.transform=`translateY(${ks}px) scale(${Rs})`;return}fe(o,{translateY:ks,scale:Rs,duration:Be,ease:me})}},[r]);return u.useEffect(()=>()=>{const o=n.current;o&&q(o)},[]),m.jsx("div",{ref:n,style:{transformOrigin:"center bottom"},className:E("relative inline-flex will-change-transform",t>0&&"-ml-plus"),onPointerEnter:i,onPointerLeave:s,children:e})}function Zd(t){const e=t.length;return e===0?[]:e<=3?t.map((n,r)=>({kind:"segment",item:n,isLast:r===e-1})):[{kind:"segment",item:t[0],isLast:!1},{kind:"ellipsis"},{kind:"segment",item:t[e-2],isLast:!1},{kind:"segment",item:t[e-1],isLast:!0}]}const Qd=u.forwardRef(function({href:e,onClick:n,children:r,className:s=""},i){const o=u.useRef(null),a=u.useRef(!1),l=u.useCallback(h=>{o.current=h,typeof i=="function"?i(h):i&&(i.current=h)},[i]),c=u.useCallback(()=>{const h=o.current;!h||ne()||(a.current=!0,He(h,!0,Nt))},[]),d=u.useCallback(()=>{a.current=!1;const h=o.current;!h||ne()||He(h,!1,Nt)},[]),f=u.useCallback(()=>{const h=o.current;!h||ne()||tt(h).then(()=>{const g=o.current;!g||ne()||!a.current||He(g,!0,Nt)})},[]),p="inline-flex max-w-[min(12rem,46vw)] min-w-0 cursor-pointer items-center justify-start rounded-mid px-xsmall py-xsmall text-left text-muted no-underline outline-none transition-colors hover:text-muted motion-reduce:transition-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent";return m.jsx("span",{ref:l,className:E("inline-flex origin-center items-center rounded-mid motion-reduce:animate-none",s),onPointerEnter:c,onPointerLeave:d,onPointerDown:f,children:e!=null&&e!==""?m.jsx("a",{href:e,onClick:n,className:E(p,"border-0 bg-transparent font-[inherit]"),children:m.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:"min-w-0 truncate leading-none",children:r})}):m.jsx("button",{type:"button",onClick:n,className:E(p,"inline-flex border-0 bg-transparent font-[inherit]"),children:m.jsx(ee,{variant:"small",inheritColor:!0,as:"span",className:"min-w-0 truncate leading-none",children:r})})})}),Kd=u.forwardRef(function({items:e,className:n="","aria-label":r="Хлебные крошки",...s},i){const o=u.useMemo(()=>Zd(e),[e]);return m.jsx("nav",{ref:i,"aria-label":r,...s,children:m.jsx("ol",{className:E("m-0 flex list-none flex-wrap items-center gap-xsmall gap-y-xsmall p-0",n),children:o.map((a,l)=>m.jsxs("li",{className:"flex items-center gap-xsmall",...a.kind==="segment"&&a.isLast?{"aria-current":"page"}:{},children:[l>0?m.jsx(Oe.IoChevronForward,{className:"shrink-0 text-muted opacity-75 icon-small","aria-hidden":!0}):null,a.kind==="ellipsis"?m.jsx(ee,{as:"span",variant:"small",className:"leading-none px-xsmall py-xsmall text-muted tabular-nums","aria-hidden":!0,children:"…"}):a.isLast?m.jsx(ee,{as:"span",variant:"small",className:"min-w-0 max-w-[min(14rem,50vw)] truncate px-xsmall py-xsmall font-medium leading-none text-foreground",children:a.item.label}):a.item.href||a.item.onClick?m.jsx(Qd,{href:a.item.href,onClick:a.item.onClick,children:a.item.label}):m.jsx(ee,{as:"span",variant:"small",className:"max-w-[min(12rem,46vw)] truncate px-xsmall py-xsmall leading-none text-muted",children:a.item.label})]},a.kind==="ellipsis"?"ellipsis":`segment-${l}`))})})}),fr=u.forwardRef(function({orientation:e="horizontal",className:n="",...r},s){return m.jsx("div",{ref:s,role:"separator","aria-orientation":e==="vertical"?"vertical":void 0,className:E("box-border shrink-0 border-solid border-base",e==="horizontal"?"my-xsmall h-0 w-full min-w-0 max-w-full border-t":"mx-xsmall min-h-[1.5rem] w-0 self-stretch border-l",n),...r})});fr.displayName="Separator";function Ot(...t){return e=>{for(const n of t)n!=null&&(typeof n=="function"?n(e):n.current=e)}}function As(t){return t==null?[]:Array.isArray(t)?[...t]:[t]}const Zi=u.createContext(null),hr=u.createContext(!1);function Qi(){return u.useContext(hr)}function qt(){const t=u.useContext(Zi);if(!t)throw new Error("Компоненты Dropdown.* должны быть внутри <Dropdown>.");return t}function Ki(t){var n;return t?((n=t.closest("[data-theme]"))==null?void 0:n.getAttribute("data-theme"))==="light"?{"data-theme":"light"}:{}:{}}function Ji({children:t,className:e="",open:n,defaultOpen:r=!1,onOpenChange:s,multiple:i=!1,value:o,defaultValue:a,onValueChange:l,selectionIndicator:c=!1,closeOnSelect:d,...f}){const p=n!==void 0,[h,g]=u.useState(r),b=p?n:h,x=u.useCallback(L=>{p||g(L),s==null||s(L)},[p,s]),v=o!==void 0,[T,_]=u.useState(()=>As(a)),C=v?As(o):T,k=u.useMemo(()=>new Set(C),[C]),y=u.useCallback(L=>{v||_(L),l==null||l(i?L:L[0]??"")},[v,i,l]),S=u.useCallback(L=>{let G;if(i){G=[...C];const H=G.indexOf(L);H>=0?G.splice(H,1):G.push(L)}else G=k.has(L)?[]:[L];y(G),(d??!i)&&x(!1)},[i,k,C,x,y,d]),w=u.useRef(null),M=u.useRef(null),N=u.useRef(new Set),j=u.useId(),O=i?"multi":"radio",z=u.useMemo(()=>({open:b,setOpen:x,multiple:i,selected:k,selectItem:S,indicatorMode:O,closeOnSelect:d??!i,triggerRef:w,contentRef:M,contentId:j,subPanelRootsRef:N}),[b,x,i,k,S,O,d,j,N]);return m.jsx(Zi.Provider,{value:z,children:m.jsx(hr.Provider,{value:c,children:m.jsx("div",{className:E("relative inline-flex",e),...f,children:t})})})}const mr=u.forwardRef(function({children:e,className:n="",asChild:r,onClick:s,...i},o){const{open:a,setOpen:l,triggerRef:c,contentId:d}=qt(),f=u.useCallback(p=>{s==null||s(p),!p.defaultPrevented&&l(!a)},[s,a,l]);if(r&&u.isValidElement(e)){const p=e;return u.cloneElement(p,{...i,ref:Ot(o,c,p.props.ref),className:E(p.props.className,n),onClick:h=>{var g,b;(b=(g=p.props).onClick)==null||b.call(g,h),f(h)},"aria-expanded":a,"aria-haspopup":"menu","aria-controls":d})}return m.jsx("button",{type:"button",ref:Ot(o,c),className:E("inline-flex",n),"aria-expanded":a,"aria-haspopup":"menu","aria-controls":d,onClick:f,...i,children:e})}),pr=u.forwardRef(function({children:e,className:n="",style:r,...s},i){const{open:o,setOpen:a,triggerRef:l,contentRef:c,contentId:d,multiple:f,subPanelRootsRef:p}=qt(),[h,g]=u.useState({top:0,left:0,minW:0}),[b,x]=u.useState(o),v=u.useCallback(()=>{const C=l.current;if(!C)return;const k=C.getBoundingClientRect();g({top:k.bottom+6,left:k.left,minW:k.width})},[l]);if(u.useLayoutEffect(()=>{o&&x(!0)},[o]),u.useLayoutEffect(()=>{o&&v()},[o,v]),u.useEffect(()=>{if(!o)return;const C=()=>v();return window.addEventListener("scroll",C,!0),window.addEventListener("resize",C),()=>{window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",C)}},[o,v]),u.useEffect(()=>{if(!o)return;const C=k=>{var S,w;const y=k.target;if(!((S=l.current)!=null&&S.contains(y))&&!((w=c.current)!=null&&w.contains(y))){for(const M of p.current)if(M.contains(y))return;a(!1)}};return document.addEventListener("pointerdown",C,!0),()=>document.removeEventListener("pointerdown",C,!0)},[o,a,l,c,p]),u.useEffect(()=>{if(!o)return;const C=k=>{k.key==="Escape"&&a(!1)};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[o,a]),u.useLayoutEffect(()=>{if(!b)return;const C=c.current;if(!C)return;const k=ne();let y=!1;if(k)return q(C),o?C.style.opacity="":x(!1),()=>{y=!0};if(q(C),o)return C.style.opacity="0",fe(C,{opacity:[0,1],duration:lt,ease:me}),()=>{y=!0,q(C)};const S=Number.parseFloat(getComputedStyle(C).opacity),w=Number.isFinite(S)&&S>0?S:1,M=fe(C,{opacity:[w,0],duration:lt,ease:me});return Promise.resolve(M).then(()=>{y||x(!1)}),()=>{y=!0,q(C)}},[o,b]),!b)return null;const T=Ki(l.current),_=m.jsx("div",{ref:Ot(i,c),...T,id:d,role:"menu","aria-multiselectable":f?!0:void 0,className:E("fixed z-[100] flex max-h-[min(24rem,70vh)] flex-col overflow-y-auto overflow-x-hidden rounded-mid border border-base bg-surface p-base shadow-token-md outline-none","will-change-[opacity] motion-reduce:transition-none",!o&&b&&"pointer-events-none",n),style:{top:h.top,left:h.left,minWidth:Math.max(h.minW,192),...r},...s,children:e});return typeof document<"u"?jt.createPortal(_,document.body):null});function gr({className:t="",children:e,selectionIndicator:n,...r}){const s=Qi(),i=n!==void 0?n:s;return m.jsx(hr.Provider,{value:i,children:m.jsx("div",{role:"group",className:E("flex min-w-0 flex-col gap-xsmall",t),...r,children:e})})}function br({className:t="",children:e,...n}){return m.jsx("div",{className:E("px-base",t),...n,children:m.jsx(ee,{as:"span",variant:"small",className:"font-medium text-muted leading-none",children:e})})}function xr({className:t="",...e}){return m.jsx(fr,{className:t,...e})}const eo=u.createContext(null);function to(){const t=u.useContext(eo);if(!t)throw new Error("Компоненты DropdownSub.* должны быть внутри <DropdownSub>.");return t}function vr({className:t="",children:e,...n}){const{open:r}=qt(),[s,i]=u.useState(!1),o=u.useRef(null),a=u.useRef(void 0);u.useEffect(()=>{r||i(!1)},[r]);const l=u.useCallback(()=>{window.clearTimeout(a.current),a.current=void 0},[]),c=u.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>{i(!1)},160)},[]),d=u.useMemo(()=>({open:s,setOpen:i,triggerRef:o,scheduleClose:c,cancelClose:l}),[s,c,l]);return m.jsx(eo.Provider,{value:d,children:m.jsx("div",{className:E("relative min-w-0",t),...n,children:e})})}const yr=u.forwardRef(function({className:e="",children:n,asChild:r,onPointerEnter:s,onPointerLeave:i,onClick:o,...a},l){const{open:c,setOpen:d,triggerRef:f,scheduleClose:p,cancelClose:h}=to(),g=u.useCallback(T=>{s==null||s(T),!T.defaultPrevented&&(h(),d(!0))},[h,s,d]),b=u.useCallback(T=>{i==null||i(T),!T.defaultPrevented&&p()},[i,p]),x=u.useCallback(T=>{o==null||o(T),!T.defaultPrevented&&(h(),d(!0))},[h,o,d]),v=E("flex w-full min-w-0 cursor-pointer items-center gap-base rounded-mid px-base py-small text-left outline-none","text-base font-medium leading-snug text-foreground button-idle-surface-transition motion-reduce:transition-none hover:bg-accent-fill-hover","focus-visible:bg-accent-fill-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",e);if(r&&u.isValidElement(n)){const T=n;return u.cloneElement(T,{...a,ref:Ot(l,f,T.props.ref),className:E(T.props.className,v),onPointerEnter:_=>{var C,k;(k=(C=T.props).onPointerEnter)==null||k.call(C,_),g(_)},onPointerLeave:_=>{var C,k;(k=(C=T.props).onPointerLeave)==null||k.call(C,_),b(_)},onClick:_=>{var C,k;(k=(C=T.props).onClick)==null||k.call(C,_),x(_)},role:"menuitem","aria-expanded":c,"aria-haspopup":"menu"})}return m.jsxs("div",{ref:Ot(l,f),role:"menuitem",tabIndex:-1,"aria-expanded":c,"aria-haspopup":"menu",className:v,onPointerEnter:g,onPointerLeave:b,onClick:x,...a,children:[m.jsx("span",{className:"min-w-0 flex-1",children:n}),m.jsx(Oe.IoChevronForward,{className:"shrink-0 text-muted icon-base","aria-hidden":!0})]})}),wr=u.forwardRef(function({children:e,className:n="",style:r,onPointerEnter:s,onPointerLeave:i,...o},a){const{open:l,triggerRef:c,scheduleClose:d,cancelClose:f}=to(),{subPanelRootsRef:p,triggerRef:h}=qt(),g=u.useRef(null),[b,x]=u.useState({top:0,left:0,minW:0}),[v,T]=u.useState(l),_=u.useCallback(()=>{const w=c.current;if(!w)return;const M=w.getBoundingClientRect(),N=6,j=Math.max(M.width,160);let O=M.right+N,z=M.top;const L=j;O+L>window.innerWidth-12&&(O=Math.max(12,M.left-L-N));const G=g.current,$=(G==null?void 0:G.offsetHeight)??0;$>0&&z+$>window.innerHeight-8&&(z=Math.max(8,window.innerHeight-$-8)),x({top:z,left:O,minW:j})},[c]);u.useLayoutEffect(()=>{l&&T(!0)},[l]),u.useLayoutEffect(()=>{l&&_()},[l,_]),u.useEffect(()=>{if(!l)return;const w=()=>_();return window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[l,_]),u.useLayoutEffect(()=>{const w=g.current;if(!(!v||!w))return p.current.add(w),()=>{p.current.delete(w)}},[v,p]),u.useLayoutEffect(()=>{if(!v)return;const w=g.current;if(!w)return;const M=ne();let N=!1;if(M)return q(w),l?w.style.opacity="":T(!1),()=>{N=!0};if(q(w),l)return w.style.opacity="0",fe(w,{opacity:[0,1],duration:lt,ease:me}),()=>{N=!0,q(w)};const j=Number.parseFloat(getComputedStyle(w).opacity),O=Number.isFinite(j)&&j>0?j:1,z=fe(w,{opacity:[O,0],duration:lt,ease:me});return Promise.resolve(z).then(()=>{N||T(!1)}),()=>{N=!0,q(w)}},[l,v]);const C=u.useCallback(w=>{s==null||s(w),!w.defaultPrevented&&f()},[f,s]),k=u.useCallback(w=>{i==null||i(w),!w.defaultPrevented&&d()},[i,d]);if(!v)return null;const y=Ki(h.current),S=m.jsx("div",{ref:Ot(a,g),...y,role:"menu",className:E("fixed z-[110] flex max-h-[min(22rem,65vh)] flex-col overflow-y-auto overflow-x-hidden rounded-mid border border-base bg-surface p-base shadow-token-md outline-none","will-change-[opacity] motion-reduce:transition-none",!l&&v&&"pointer-events-none",n),style:{top:b.top,left:b.left,minWidth:b.minW,...r},...o,onPointerEnter:C,onPointerLeave:k,children:e});return typeof document<"u"?jt.createPortal(S,document.body):null});function Jd({selected:t}){return m.jsx("span",{className:"flex shrink-0 items-center justify-center","aria-hidden":!0,children:m.jsx("span",{className:E("box-border size-2.5 rounded-full border border-muted",t&&"border-accent bg-accent")})})}function ef({selected:t}){const e=u.useRef(null),n=u.useRef(null);return u.useEffect(()=>{const r=e.current;if(r){if(ne()){r.style.transform=t?"scale(1)":"scale(0)",r.style.opacity=t?"1":"0",n.current=t;return}if(n.current===null){n.current=t,r.style.opacity=t?"1":"0",r.style.transform=t?"scale(1)":"scale(0)";return}n.current!==t&&(n.current=t,q(r),t?(r.style.opacity="0",r.style.transform="scale(0)",fe(r,{opacity:[0,1],scale:[0,1],duration:Be,ease:me})):fe(r,{opacity:[1,0],scale:[1,0],duration:Be,ease:me}))}},[t]),m.jsxs("span",{className:"relative flex size-3.5 shrink-0 items-center justify-center","aria-hidden":!0,children:[m.jsx("span",{className:"absolute inset-0 rounded-full border border-muted bg-transparent"}),m.jsx("span",{ref:e,className:"absolute inset-[2px] rounded-full bg-foreground opacity-0",style:{transform:"scale(0)"}})]})}const tf={default:E("text-foreground hover:bg-accent-fill-hover","focus-visible:bg-accent-fill-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent"),danger:E("text-danger hover:bg-accent-fill-hover","focus-visible:bg-accent-fill-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-danger"),warning:E("text-warning hover:bg-accent-fill-hover","focus-visible:bg-accent-fill-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"),info:E("text-info hover:bg-accent-fill-hover","focus-visible:bg-accent-fill-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"),success:E("text-success hover:bg-accent-fill-hover","focus-visible:bg-accent-fill-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success")},_r=u.forwardRef(function({children:e,className:n="",value:r,disabled:s=!1,selection:i=!0,variant:o="default",description:a,hint:l,onClick:c,onPointerDown:d,...f},p){const{selected:h,selectItem:g,multiple:b,indicatorMode:x,setOpen:v}=qt(),T=Qi(),_=i!==!1,C=(b||T)&&_,k=C?x==="multi"?"menuitemcheckbox":"menuitemradio":"menuitem",y=_&&h.has(r),S=u.useRef(null),w=u.useCallback(O=>{S.current=O,typeof p=="function"?p(O):p&&(p.current=O)},[p]),M=u.useCallback(O=>{if(d==null||d(O),O.defaultPrevented||s)return;const z=S.current;!z||ne()||tt(z)},[s,d]),N=u.useCallback(O=>{if(c==null||c(O),!(O.defaultPrevented||s)){if(!_){v(!1);return}g(r)}},[s,_,c,g,v,r]);let j=null;return C&&(j=x==="multi"?m.jsx(ef,{selected:y}):m.jsx(Jd,{selected:y})),m.jsxs("button",{ref:w,type:"button",role:k,disabled:s,"aria-checked":C?y:void 0,className:E("flex w-full min-w-0 origin-center items-center rounded-mid px-base py-small text-left outline-none","button-idle-surface-transition motion-reduce:transition-none",!s&&E("cursor-pointer",tf[o]),s&&"cursor-not-allowed bg-transparent text-muted opacity-45 hover:bg-transparent",n),onClick:N,onPointerDown:M,...f,children:[m.jsx("span",{className:E("min-w-0 flex-1",C?"grid grid-cols-[auto_1fr] items-center gap-x-base gap-y-xsmall":"flex flex-col"),children:C?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"flex items-center justify-center",children:j}),m.jsx("span",{className:"min-w-0",children:m.jsx(ee,{as:"span",variant:"base",inheritColor:!0,className:"block font-medium leading-snug",children:e})}),a!=null?m.jsx("span",{className:"col-start-2 row-start-2 min-w-0",children:m.jsx(ee,{as:"span",variant:"tools",inheritColor:!0,className:E("block",s||o==="default"?"text-muted":"opacity-80"),children:a})}):null]}):m.jsxs(m.Fragment,{children:[m.jsx(ee,{as:"span",variant:"base",inheritColor:!0,className:"block font-medium leading-snug",children:e}),a!=null?m.jsx(ee,{as:"span",variant:"tools",className:E("mt-xsmall block text-muted",s||o==="default"?"text-muted":"opacity-80"),children:a}):null]})}),l!=null?m.jsx("span",{className:E("flex shrink-0 items-center gap-xsmall [&_svg]:icon-base",s||o==="default"?"text-muted":"opacity-80"),children:typeof l=="string"?m.jsx(ee,{as:"span",variant:"base",inheritColor:!0,className:"opacity-90",children:l}):l}):null]})});mr.displayName="Dropdown.Trigger";pr.displayName="Dropdown.Content";_r.displayName="Dropdown.Item";gr.displayName="Dropdown.Group";br.displayName="Dropdown.Label";xr.displayName="Dropdown.Separator";vr.displayName="Dropdown.Sub";yr.displayName="Dropdown.SubTrigger";wr.displayName="Dropdown.SubContent";Ji.displayName="Dropdown";const nf=Object.assign(Ji,{Trigger:mr,Content:pr,Group:gr,Label:br,Separator:xr,Item:_r,Sub:vr,SubTrigger:yr,SubContent:wr}),sn={default:"bg-accent text-accent-foreground",outline:"surface-outline text-foreground",secondary:"surface-secondary text-accent",danger:E("bg-surface-tint-danger",Xe.danger),success:E("bg-surface-tint-success",Xe.success),info:E("bg-surface-tint-info",Xe.info),warning:E("bg-surface-tint-warning",Xe.warning)},Ns={default:"bg-accent",outline:"bg-accent",secondary:"bg-accent",danger:"bg-danger",success:"bg-success",info:"bg-info",warning:"bg-warning"},rf={"top-right":"absolute right-0 top-0 z-10 translate-x-[38%] -translate-y-[38%]","top-left":"absolute left-0 top-0 z-10 -translate-x-[38%] -translate-y-[38%]","bottom-right":"absolute bottom-0 right-0 z-10 translate-x-[38%] translate-y-[38%]","bottom-left":"absolute bottom-0 left-0 z-10 -translate-x-[38%] translate-y-[38%]"},Ss={small:"gap-xsmall px-small py-xsmall",base:"gap-xsmall px-base py-xsmall",large:"gap-small px-plus py-xsmall"},Is={small:"min-w-[1.625rem]",base:"min-w-[1.755rem]",large:"min-w-[1.875rem]"},sf={small:"tools",base:"small",large:"base"},Ms={small:"shrink-0 p-xsmall [&_svg]:icon-small",base:"shrink-0 p-small [&_svg]:icon-base",large:"shrink-0 p-plus [&_svg]:icon-large"},Ls={small:"icon-small min-h-3 min-w-3 shrink-0 p-0",base:"icon-base min-h-4 min-w-4 shrink-0 p-0",large:"icon-large min-h-5 min-w-5 shrink-0 p-0"},of={small:"[&_svg]:icon-small",base:"[&_svg]:icon-base",large:"[&_svg]:icon-large"};function Os(t){return t==="accent"?"secondary":t}function af(t,e){return Os(t??void 0)??Os(e??void 0)??"default"}const no=u.createContext(null),ro=u.forwardRef(function({className:e="",children:n,hoverLift:r=!0,onPointerOver:s,onPointerOut:i,...o},a){const l=u.useRef(null),c=u.useRef(null),[d,f]=u.useState(0),p=u.useCallback(x=>{l.current=x,typeof a=="function"?a(x):a&&(a.current=x)},[a]),h=u.useCallback(x=>{c.current=x},[]);u.useLayoutEffect(()=>{f(x=>x+1)},[]);const g=u.useMemo(()=>({registerLiftTarget:h,anchorRef:l,anchorCommitGen:d,hoverLift:r}),[h,d,r]),b=wt(c,r,void 0,xi,{idle:st(),hover:er()});return m.jsx(no.Provider,{value:g,children:m.jsx("div",{ref:p,"data-badge-anchor":!0,className:E("relative isolate block w-max shrink-0",e),onPointerOver:x=>{s==null||s(x),x.defaultPrevented||b.onPointerOver(x)},onPointerOut:x=>{i==null||i(x),b.onPointerOut(x)},...o,children:n})})});function so(t){return t==null||t===!1?!1:typeof t=="string"?t.trim().length>0:typeof t=="number"?!0:Array.isArray(t)?t.some(so):u.isValidElement(t)}const lf=u.forwardRef(function({color:e,variant:n="default",size:r="base",icon:s,iconPosition:i="start",iconOnly:o=!1,dot:a=!1,placement:l,className:c="",children:d,...f},p){const h=u.useContext(no),g=u.useRef(null),b=u.useRef(null),[x,v]=u.useState(!1),T=af(e??void 0,n),_=r,C=so(d),k=a,y=x?l??"top-right":void 0,S=y?rf[y]:"",w=!!(x&&(h!=null&&h.hoverLift)),M=u.useCallback(()=>{const Y=g.current;if(!h){v(!1);return}const D=h.anchorRef.current,I=!!(Y&&D&&Y.parentElement===D);if(v(I),!I||!h.hoverLift){h.registerLiftTarget(null);return}h.registerLiftTarget(b.current)},[h]),N=u.useCallback(Y=>{g.current=Y,Y===null&&(h==null||h.registerLiftTarget(null),v(!1)),typeof p=="function"?p(Y):p&&(p.current=Y)},[p,h]);if(u.useLayoutEffect(()=>{M(),queueMicrotask(()=>{M()})},[h==null?void 0:h.anchorCommitGen,h==null?void 0:h.hoverLift,l,M,C,s,k,o,d]),u.useLayoutEffect(()=>{const Y=w?b.current:g.current;tr(Y,st())}),k){const Y=typeof f["aria-label"]=="string"||typeof f["aria-labelledby"]=="string",D=E("box-border isolate rounded-full ring-2 ring-background motion-reduce:ring-1",Ls[_],Ns[T],w&&"will-change-transform origin-center",!w&&S,c);return w?m.jsx("span",{ref:N,"data-badge-root":!0,className:E("pointer-events-none",S),...Y?{}:{"aria-hidden":!0,role:"presentation"},...f,children:m.jsx("span",{ref:b,"data-badge-lift-target":!0,className:D})}):m.jsx("span",{ref:N,"data-badge-root":!0,className:E("box-border isolate rounded-full ring-2 ring-background motion-reduce:ring-1",Ls[_],Ns[T],x&&"pointer-events-none",S,c),...Y?{}:{"aria-hidden":!0,role:"presentation"},...f})}const O=!C&&(!!s&&!C||!!(o&&s)),z=s?m.jsx("span",{className:E("inline-flex shrink-0 [&_svg]:shrink-0",of[_]),children:s}):null,L=C?m.jsx(ee,{as:"span",variant:sf[_],inheritColor:!0,className:E("min-w-0 truncate",_==="small"&&"text-[0.6875rem] leading-tight",_==="base"&&"leading-tight",_==="large"&&"leading-snug"),children:d}):null;if(O){const Y=E("box-border isolate inline-flex items-center justify-center rounded-full whitespace-nowrap animate-shadow",sn[T],Ms[_],w&&"will-change-transform origin-center",!w&&S,c);return w?m.jsx("span",{ref:N,"data-badge-root":!0,className:E("pointer-events-none",S),...f,children:m.jsx("span",{ref:b,"data-badge-lift-target":!0,className:Y,children:s??d})}):m.jsx("span",{ref:N,"data-badge-root":!0,className:E("box-border isolate inline-flex items-center justify-center rounded-full whitespace-nowrap animate-shadow",x&&"pointer-events-none",sn[T],Ms[_],S,c),...f,children:s??d})}const $=!!(z&&L)?i:void 0,H=E("box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center truncate rounded-full whitespace-nowrap motion-reduce:transition-none animate-shadow",Is[_],sn[T],Ss[_],w&&"will-change-transform origin-center",!w&&S,c);return w?m.jsx("span",{ref:N,"data-badge-root":!0,className:E("pointer-events-none",S),...f,children:m.jsxs("span",{ref:b,"data-badge-lift-target":!0,"data-icon":$,className:H,children:[i==="start"&&z,L,i==="end"&&z]})}):m.jsxs("span",{ref:N,"data-icon":$,"data-badge-root":!0,className:E("box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center truncate rounded-full whitespace-nowrap motion-reduce:transition-none animate-shadow",Is[_],x&&"pointer-events-none",sn[T],Ss[_],S,c),...f,children:[i==="start"&&z,L,i==="end"&&z]})}),cf=Object.assign(lf,{Anchor:ro});exports.Accordion=yu;exports.Alert=vu;exports.AlertDialog=ed;exports.Avatar=Xd;exports.AvatarGroup=qd;exports.Badge=cf;exports.BadgeAnchor=ro;exports.Breadcrumbs=Kd;exports.Button=vn;exports.ButtonGroup=Pi;exports.ButtonGroupText=cr;exports.Card=Nd;exports.Checkbox=ar;exports.CheckboxGroup=ji;exports.CloseButton=yn;exports.ConvergeRippleLayer=_i;exports.Dialog=ud;exports.Dropdown=nf;exports.DropdownContent=pr;exports.DropdownGroup=gr;exports.DropdownItem=_r;exports.DropdownLabel=br;exports.DropdownSeparator=xr;exports.DropdownSub=vr;exports.DropdownSubContent=wr;exports.DropdownSubTrigger=yr;exports.DropdownTrigger=mr;exports.Expandable=dt;exports.Form=wu;exports.GlassBackdrop=Ii;exports.GlassShaderLayer=Si;exports.GlassSurface=Kc;exports.Input=lr;exports.MOTION_BADGE_ANCHOR_HOVER_LIFT_SCALE=xi;exports.MOTION_FEEDBACK_EXPAND_MS=wi;exports.MOTION_HOVER_LIFT_SCALE=Nt;exports.MOTION_INTERACTIVE_EASE=me;exports.MOTION_INTERACTIVE_MS=Be;exports.MOTION_PRESS_SQUEEZE_SCALE=vi;exports.MOTION_RIPPLE_DEFAULT_DURATION_MS=Wt;exports.MOTION_RIPPLE_DEFAULT_OPACITY_FROM=Kn;exports.MOTION_RIPPLE_EASE_CSS=yi;exports.MOTION_RIPPLE_EXPANDABLE_DURATION_MS=Va;exports.MOTION_RIPPLE_EXPANDABLE_OPACITY_FROM=Ha;exports.MOTION_RIPPLE_MIN_SCALE=cn;exports.MOTION_TOOLTIP_MS=lt;exports.RIPPLE_COLOR=un;exports.Ripple=Xt;exports.SearchInput=Hi;exports.Selector=Vi;exports.Separator=fr;exports.Text=ee;exports.Tooltip=dn;exports.animate=fe;exports.animateInteractiveHoverLift=He;exports.animateInteractivePressSqueeze=tt;exports.buttonRippleTone=al;exports.cn=E;exports.colorToken=Fe;exports.createConvergeRippleAtPointer=nr;exports.createConvergeRippleFromPointer=Qa;exports.designTokenNames=el;exports.footerButtonSizeForAlertDialog=Fu;exports.prefersReducedInteractiveHoverLift=ne;exports.primaryButtonVariantForAlertTone=Hu;exports.remove=q;exports.resolveAlertStatus=or;exports.tokensConfig=Ja;exports.useAlertDialog=gt;exports.useConvergeRipples=Ti;exports.useInteractiveHoverLiftContainerHandlers=wt;exports.useInteractiveHoverLiftOnContainer=Ya;
|