@udixio/ui-react 0.3.7 → 0.3.9
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/CHANGELOG.md +20 -0
- package/index.js +2 -10
- package/index.mjs +1862 -9880
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),m=require("react"),za=require("react-dom");function Wa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const xe=Wa(m);function yi(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=yi(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function xi(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=yi(e))&&(s&&(s+=" "),s+=t);return s}const Yn="-",$a=e=>{const t=Ga(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{const a=i.split(Yn);return a[0]===""&&a.length!==1&&a.shift(),vi(a,t)||Ua(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&s[i]?[...l,...s[i]]:l}}},vi=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),r=s?vi(e.slice(1),s):void 0;if(r)return r;if(t.validators.length===0)return;const o=e.join(Yn);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Bs=/^\[(.+)\]$/,Ua=e=>{if(Bs.test(e)){const t=Bs.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ga=e=>{const{theme:t,classGroups:n}=e,s={nextPart:new Map,validators:[]};for(const r in n)bn(n[r],s,r,t);return s},bn=(e,t,n,s)=>{e.forEach(r=>{if(typeof r=="string"){const o=r===""?t:Fs(t,r);o.classGroupId=n;return}if(typeof r=="function"){if(Ha(r)){bn(r(s),t,n,s);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([o,i])=>{bn(i,Fs(t,o),n,s)})})},Fs=(e,t)=>{let n=e;return t.split(Yn).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},Ha=e=>e.isThemeGetter,Ka=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const r=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,s=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=s.get(o))!==void 0)return r(o,i),i},set(o,i){n.has(o)?n.set(o,i):r(o,i)}}},wn="!",Sn=":",_a=Sn.length,Xa=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,l=0,c;for(let p=0;p<r.length;p++){let g=r[p];if(i===0&&a===0){if(g===Sn){o.push(r.slice(l,p)),l=p+_a;continue}if(g==="/"){c=p;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const u=o.length===0?r:r.substring(l),d=Ya(u),f=d!==u,h=c&&c>l?c-l:void 0;return{modifiers:o,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}};if(t){const r=t+Sn,o=s;s=i=>i.startsWith(r)?o(i.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},Ya=e=>e.endsWith(wn)?e.substring(0,e.length-1):e.startsWith(wn)?e.substring(1):e,qa=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let o=[];return s.forEach(i=>{i[0]==="["||t[i]?(r.push(...o.sort(),i),o=[]):o.push(i)}),r.push(...o.sort()),r}},Za=e=>({cache:Ka(e.cacheSize),parseClassName:Xa(e),sortModifiers:qa(e),...$a(e)}),Ja=/\s+/,Qa=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o}=t,i=[],a=e.trim().split(Ja);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let w=!!g,b=s(w?p.substring(0,g):p);if(!b){if(!w){l=u+(l.length>0?" "+l:l);continue}if(b=s(p),!b){l=u+(l.length>0?" "+l:l);continue}w=!1}const y=o(f).join(":"),v=h?y+wn:y,k=v+b;if(i.includes(k))continue;i.push(k);const P=r(b,w);for(let E=0;E<P.length;++E){const V=P[E];i.push(v+V)}l=u+(l.length>0?" "+l:l)}return l};function el(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=bi(t))&&(s&&(s+=" "),s+=n);return s}const bi=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=bi(e[s]))&&(n&&(n+=" "),n+=t);return n};function Os(e,...t){let n,s,r,o=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=Za(c),s=n.cache.get,r=n.cache.set,o=a,a(l)}function a(l){const c=s(l);if(c)return c;const u=Qa(l,n);return r(l,u),u}return function(){return o(el.apply(null,arguments))}}const ee=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},wi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Si=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tl=/^\d+\/\d+$/,nl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sl=/\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$/,rl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,il=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ol=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oe=e=>tl.test(e),N=e=>!!e&&!Number.isNaN(Number(e)),Ee=e=>!!e&&Number.isInteger(Number(e)),tn=e=>e.endsWith("%")&&N(e.slice(0,-1)),Te=e=>nl.test(e),al=()=>!0,ll=e=>sl.test(e)&&!rl.test(e),Ti=()=>!1,cl=e=>il.test(e),ul=e=>ol.test(e),fl=e=>!L(e)&&!D(e),dl=e=>Ye(e,Ei,Ti),L=e=>wi.test(e),Re=e=>Ye(e,Ci,ll),nn=e=>Ye(e,yl,N),zs=e=>Ye(e,Pi,Ti),hl=e=>Ye(e,ki,ul),Et=e=>Ye(e,Mi,cl),D=e=>Si.test(e),st=e=>qe(e,Ci),ml=e=>qe(e,xl),Ws=e=>qe(e,Pi),pl=e=>qe(e,Ei),gl=e=>qe(e,ki),Ct=e=>qe(e,Mi,!0),Ye=(e,t,n)=>{const s=wi.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},qe=(e,t,n=!1)=>{const s=Si.exec(e);return s?s[1]?t(s[1]):n:!1},Pi=e=>e==="position"||e==="percentage",ki=e=>e==="image"||e==="url",Ei=e=>e==="length"||e==="size"||e==="bg-size",Ci=e=>e==="length",yl=e=>e==="number",xl=e=>e==="family-name",Mi=e=>e==="shadow",$s=()=>{const e=ee("color"),t=ee("font"),n=ee("text"),s=ee("font-weight"),r=ee("tracking"),o=ee("leading"),i=ee("breakpoint"),a=ee("container"),l=ee("spacing"),c=ee("radius"),u=ee("shadow"),d=ee("inset-shadow"),f=ee("text-shadow"),h=ee("drop-shadow"),p=ee("blur"),g=ee("perspective"),w=ee("aspect"),b=ee("ease"),y=ee("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...k(),D,L],E=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],T=()=>[D,L,l],R=()=>[Oe,"full","auto",...T()],C=()=>[Ee,"none","subgrid",D,L],O=()=>["auto",{span:["full",Ee,D,L]},Ee,D,L],H=()=>[Ee,"auto",D,L],_=()=>["auto","min","max","fr",D,L],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...T()],M=()=>[Oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],S=()=>[e,D,L],B=()=>[...k(),Ws,zs,{position:[D,L]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",pl,dl,{size:[D,L]}],G=()=>[tn,st,Re],F=()=>["","none","full",c,D,L],U=()=>["",N,st,Re],he=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[N,tn,Ws,zs],Ns=()=>["","none",p,D,L],Tt=()=>["none",N,D,L],Pt=()=>["none",N,D,L],en=()=>[N,D,L],kt=()=>[Oe,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Te],breakpoint:[Te],color:[al],container:[Te],"drop-shadow":[Te],ease:["in","out","in-out"],font:[fl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Te],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Te],shadow:[Te],spacing:["px",N],text:[Te],"text-shadow":[Te],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oe,L,D,w]}],container:["container"],columns:[{columns:[N,L,D,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:P()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Ee,"auto",D,L]}],basis:[{basis:[Oe,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[N,Oe,"auto","initial","none",L]}],grow:[{grow:["",N,D,L]}],shrink:[{shrink:["",N,D,L]}],order:[{order:[Ee,"first","last","none",D,L]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[a,"screen",...M()]}],"min-w":[{"min-w":[a,"screen","none",...M()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,st,Re]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,D,nn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tn,L]}],"font-family":[{font:[ml,L,t]}],"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:[r,D,L]}],"line-clamp":[{"line-clamp":[N,"none",D,nn]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",D,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",D,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[N,"from-font","auto",D,Re]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[N,"auto",D,L]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D,L]}],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",D,L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ee,D,L],radial:["",D,L],conic:[Ee,D,L]},gl,hl]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[N,D,L]}],"outline-w":[{outline:["",N,st,Re]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",u,Ct,Et]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",d,Ct,Et]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[N,Re]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",f,Ct,Et]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[N,D,L]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"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":[N]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[D,L]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[N]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",D,L]}],filter:[{filter:["","none",D,L]}],blur:[{blur:Ns()}],brightness:[{brightness:[N,D,L]}],contrast:[{contrast:[N,D,L]}],"drop-shadow":[{"drop-shadow":["","none",h,Ct,Et]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",N,D,L]}],"hue-rotate":[{"hue-rotate":[N,D,L]}],invert:[{invert:["",N,D,L]}],saturate:[{saturate:[N,D,L]}],sepia:[{sepia:["",N,D,L]}],"backdrop-filter":[{"backdrop-filter":["","none",D,L]}],"backdrop-blur":[{"backdrop-blur":Ns()}],"backdrop-brightness":[{"backdrop-brightness":[N,D,L]}],"backdrop-contrast":[{"backdrop-contrast":[N,D,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",N,D,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N,D,L]}],"backdrop-invert":[{"backdrop-invert":["",N,D,L]}],"backdrop-opacity":[{"backdrop-opacity":[N,D,L]}],"backdrop-saturate":[{"backdrop-saturate":[N,D,L]}],"backdrop-sepia":[{"backdrop-sepia":["",N,D,L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",D,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[N,"initial",D,L]}],ease:[{ease:["linear","initial",b,D,L]}],delay:[{delay:[N,D,L]}],animate:[{animate:["none",y,D,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,D,L]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:Tt()}],"rotate-x":[{"rotate-x":Tt()}],"rotate-y":[{"rotate-y":Tt()}],"rotate-z":[{"rotate-z":Tt()}],scale:[{scale:Pt()}],"scale-x":[{"scale-x":Pt()}],"scale-y":[{"scale-y":Pt()}],"scale-z":[{"scale-z":Pt()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[D,L,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:kt()}],"translate-x":[{"translate-x":kt()}],"translate-y":[{"translate-y":kt()}],"translate-z":[{"translate-z":kt()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"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",D,L]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",D,L]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[N,st,Re,nn]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},vl=(e,{cacheSize:t,prefix:n,experimentalParseClassName:s,extend:r={},override:o={}})=>(ot(e,"cacheSize",t),ot(e,"prefix",n),ot(e,"experimentalParseClassName",s),Mt(e.theme,o.theme),Mt(e.classGroups,o.classGroups),Mt(e.conflictingClassGroups,o.conflictingClassGroups),Mt(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),ot(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),At(e.theme,r.theme),At(e.classGroups,r.classGroups),At(e.conflictingClassGroups,r.conflictingClassGroups),At(e.conflictingClassGroupModifiers,r.conflictingClassGroupModifiers),Ai(e,r,"orderSensitiveModifiers"),e),ot=(e,t,n)=>{n!==void 0&&(e[t]=n)},Mt=(e,t)=>{if(t)for(const n in t)ot(e,n,t[n])},At=(e,t)=>{if(t)for(const n in t)Ai(e,t,n)},Ai=(e,t,n)=>{const s=t[n];s!==void 0&&(e[n]=e[n]?e[n].concat(s):s)},bl=(e,...t)=>typeof e=="function"?Os($s,e,...t):Os(()=>vl($s(),e),...t),Vi=bl({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),A=(...e)=>Vi(xi(e)),Ri=(...e)=>Vi(xi(e));function wl(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Li=e=>{let t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const o=s(e.states);Object.entries(o).map(i=>{const[a,l]=i;(t[a]??(t[a]=[])).push(l)})}});const n=t;return Object.entries(t).map(s=>{let[r,o]=s;o=o.reverse(),r==e.default&&o.unshift("relative"),o.unshift(wl(r)),n[r]=Ri(...o)}),n},te=(e,t)=>n=>Li({classNameList:[n.className,t],default:e,states:n}),Di=te("button",({variant:e,disabled:t,iconPosition:n,icon:s,loading:r,shape:o,size:i,allowShapeTransformation:a})=>({button:A("group flex items-center cursor-pointer",i==="xSmall"&&"py-2",i==="small"&&"py-1",e==="text"&&[i==="xSmall"&&"-my-2",i==="small"&&"-my-1"]),container:A(" relative outline-none overflow-hidden inline-block flex justify-center items-center ",i==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",i==="small"&&"text-label-large px-4 py-2.5 gap-2",i==="medium"&&"text-title-medium px-6 py-4 gap-2",i==="large"&&"text-headline-small px-12 py-8 gap-3",i==="xLarge"&&"text-headline-large px-16 py-12 gap-4",o==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},o==="squared"&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},a&&!t&&{"group-active:rounded-[12px]":i==="xSmall"||i=="small","group-active:rounded-[16px]":i==="medium","group-active:rounded-[28px]":i==="large"||i=="xLarge"},e==="elevated"&&{"bg-surface-container-low shadow-1 hover:shadow-2":!t},e==="filled"&&{"bg-primary hover:shadow-1":!t},e==="filledTonal"&&{"bg-secondary-container hover:shadow-1":!t},e==="outlined"&&[" border",{"border-on-surface/[0.12]":t," border-outline focus:border-primary":!t}],e==="text"&&["w-fit",{"text-primary":!t,"text-on-surface/[0.38]":t},i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "],t&&"cursor-default"),stateLayer:A("state-layer min-h-full min-w-full absolute top-0 left-0 ",e==="elevated"&&{"bg-on-surface/[0.12]":t,"group-state-primary":!t},e==="filled"&&{"bg-on-surface/[0.12]":t,"group-state-on-primary":!t},e==="filledTonal"&&{"bg-on-surface/[0.12]":t,"group-state-on-secondary-container ":!t},e==="outlined"&&{"group-state-primary group-state-primary":!t},e==="text"&&{"group-state-primary":!t}),label:A({invisible:r},e==="elevated"&&{"text-primary":!t,"text-on-surface/[38%]":t},e==="filled"&&{"text-on-primary":!t,"text-on-surface/[38%]":t},e==="filledTonal"&&{"text-on-secondary-container":!t,"text-on-surface/[0.38]":t},e==="outlined"&&{"text-primary":!t,"text-on-surface/[0.38]":t},e==="text"&&{"text-primary":!t,"text-on-surface/[0.38]":t}),icon:A({invisible:r},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10",e==="elevated"&&{"text-primary":!t,"text-on-surface/[38%]":t},e==="filled"&&{"text-on-primary":!t,"text-on-surface/[38%]":t},e==="filledTonal"&&{"text-on-secondary-container":!t,"text-on-surface/[0.38]":t},e==="outlined"&&{"text-primary":!t,"text-on-surface/[0.38]":t},e==="text"&&{"text-primary":!t,"text-on-surface/[0.38]":t})})),ji=te("card",({variant:e,isInteractive:t})=>({card:A("card group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",e!=="filled"&&"border border-outline-variant"),stateLayer:A(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),Ii=te("carouselItem",({})=>({carouselItem:A("rounded-[28px] overflow-hidden flex-none")})),Ni=te("carousel",({})=>({carousel:A(["w-full h-[400px]"]),track:A("grid grid-flow-col h-full transition-transform ease-out w-fit")})),Bi=te("divider",({orientation:e})=>({divider:A("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),Fi=te("fab",({size:e,variant:t,isExtended:n})=>({fab:A("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!n,"rounded-[16px]":e=="medium"||n,"rounded-[28px]":e=="large"&&!n},{"p-2":e=="small"&&!n,"p-4":e=="medium"||n,"p-[30px]":e=="large"&&!n},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container"),stateLayer:A("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:A({"h-6 w-6":e=="small"||e=="medium"||n,"h-9 w-9":e=="large"&&!n},t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),label:A("text-label-large text-nowrap",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container")})),Oi=te("iconButton",({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:o,shape:i,allowShapeTransformation:a})=>({iconButton:A("group min-h-12 flex items-center cursor-pointer",{"cursor-default":t}),container:A("rounded-full relative flex overflow-hidden transition-all duration-300",(i==="rounded"||i==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||i==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!t&&{"group-active:rounded-[12px]":r==="xSmall"||r=="small","group-active:rounded-[16px]":r==="medium","group-active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-secondary-container":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),stateLayer:A("absolute top-0 left-0 h-full w-full ",!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:A(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},o=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],o=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="tonal"&&{"text-on-surface-variant":!s&&!!n,"text-on-secondary-container":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")})),zi=te("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:A((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full"),track:"h-full rounded-full bg-primary rounded-l-full",activeIndicator:A((e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:"absolute right-0 bg-primary rounded-full"})),Wi=te("slider",({isChanging:e})=>({slider:A(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:A(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:A(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:A(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:A(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:A(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),$i=te("snackbar",({})=>({snackbar:A(" rounded bg-inverse-surface "),container:A("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:A("text-body-medium text-inverse-on-surface "),icon:A(" ml-auto mr-0 text-inverse-on-surface block dark")})),Ui=te("switch",({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:A("group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:A("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:A("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:A("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:A("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),Gi=te("tab",({isSelected:e,icon:t,label:n,variant:s})=>({tab:A("bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:A("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},s==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:A("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:A("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:A("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:A("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")})),Hi=te("tabs",({scrollable:e})=>({tabs:A("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),Ki=te("textField",({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:o,value:i,suffix:a,textLine:l})=>({textField:A({"opacity-[.38]":e}),content:A("group transition-border duration-200 relative flex items-center ",{"h-14":l=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!o&&s=="filled","border-outline":!(r!=null&&r.length)&&!o&&s=="outlined","border-primary":!(r!=null&&r.length)&&o,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":o}]),stateLayer:A("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":o}),label:A("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&o}),input:A("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!a},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:A("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":o}]),supportingText:A(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":o},{"text-error":!!(r!=null&&r.length)}),leadingIcon:A(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!m.isValidElement(t)}]),trailingIcon:A("h-12 w-12 flex items-center justify-center",{"cursor-text":!m.isValidElement(n)}),suffix:A("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")})),_i=te("toolTip",({position:e,variant:t})=>({toolTip:A(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:A("pb-2",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"),actions:A("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:A("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:A("")})),ve=({icon:e,colors:t=[],className:n})=>{const{icon:s}=e,[r,o,,,i]=s||[],a=l=>{switch(l.length){case 2:return{"--fa-primary-color":l[0]||"inherit","--fa-secondary-color":l[1]||"inherit"};case 1:return{color:l[0]};default:return{}}};return x.jsx("svg",{className:A("size-5 box-content",n),style:{...a(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${r} ${o}`,role:"img","aria-hidden":"true",children:typeof i=="string"?x.jsx("path",{className:"fill-current",d:i}):i.map((l,c)=>x.jsx("path",{d:l},c))})},qn=m.createContext({});function Ze(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zn=typeof window<"u",_t=Zn?m.useLayoutEffect:m.useEffect,Xt=m.createContext(null);function Jn(e,t){e.indexOf(t)===-1&&e.push(t)}function Qn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Se=(e,t,n)=>n>t?t:n<e?e:n;function Tn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Je=()=>{},ge=()=>{};process.env.NODE_ENV!=="production"&&(Je=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Tn(t,n))},ge=(e,t,n)=>{if(!e)throw new Error(Tn(t,n))});const Pe={},Xi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Yi(e){return typeof e=="object"&&e!==null}const qi=e=>/^0[^.\s]+$/u.test(e);function es(e){let t;return()=>(t===void 0&&(t=e()),t)}const ce=e=>e,Sl=(e,t)=>n=>t(e(n)),vt=(...e)=>e.reduce(Sl),_e=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class ts{constructor(){this.subscriptions=[]}add(t){return Jn(this.subscriptions,t),()=>Qn(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const pe=e=>e*1e3,be=e=>e/1e3;function ns(e,t){return t?e*(1e3/t):0}const Us=new Set;function Yt(e,t,n){e||Us.has(t)||(console.warn(Tn(t,n)),Us.add(t))}const Zi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Tl=1e-7,Pl=12;function kl(e,t,n,s,r){let o,i,a=0;do i=t+(n-t)/2,o=Zi(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>Tl&&++a<Pl);return i}function bt(e,t,n,s){if(e===t&&n===s)return ce;const r=o=>kl(o,0,1,e,n);return o=>o===0||o===1?o:Zi(r(o),t,s)}const Ji=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qi=e=>t=>1-e(1-t),eo=bt(.33,1.53,.69,.99),ss=Qi(eo),to=Ji(ss),no=e=>(e*=2)<1?.5*ss(e):.5*(2-Math.pow(2,-10*(e-1))),rs=e=>1-Math.sin(Math.acos(e)),so=Qi(rs),ro=Ji(rs),El=bt(.42,0,1,1),Cl=bt(0,0,.58,1),io=bt(.42,0,.58,1),Ml=e=>Array.isArray(e)&&typeof e[0]!="number",oo=e=>Array.isArray(e)&&typeof e[0]=="number",Gs={linear:ce,easeIn:El,easeInOut:io,easeOut:Cl,circIn:rs,circInOut:ro,circOut:so,backIn:ss,backInOut:to,backOut:eo,anticipate:no},Al=e=>typeof e=="string",Hs=e=>{if(oo(e)){ge(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return bt(t,n,s,r)}else if(Al(e))return ge(Gs[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Gs[e];return e},Vt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Vl(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){i.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&r?n:s;return d&&i.add(u),p.has(u)||p.add(u),u},cancel:u=>{s.delete(u),i.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0,[n,s]=[s,n],n.forEach(l),n.clear(),r=!1,o&&(o=!1,c.process(u))}};return c}const Rl=40;function ao(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Vt.reduce((v,k)=>(v[k]=Vl(o),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=i,g=()=>{const v=Pe.useManualTiming?r.timestamp:performance.now();n=!1,Pe.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(v-r.timestamp,Rl),1)),r.timestamp=v,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),h.process(r),p.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(g))},w=()=>{n=!0,s=!0,r.isProcessing||e(g)};return{schedule:Vt.reduce((v,k)=>{const P=i[k];return v[k]=(E,V=!1,T=!1)=>(n||w(),P.schedule(E,V,T)),v},{}),cancel:v=>{for(let k=0;k<Vt.length;k++)i[Vt[k]].cancel(v)},state:r,steps:i}}const{schedule:W,cancel:ye,state:se,steps:sn}=ao(typeof requestAnimationFrame<"u"?requestAnimationFrame:ce,!0);let It;function Ll(){It=void 0}const le={now:()=>(It===void 0&&le.set(se.isProcessing||Pe.useManualTiming?se.timestamp:performance.now()),It),set:e=>{It=e,queueMicrotask(Ll)}},lo=e=>t=>typeof t=="string"&&t.startsWith(e),is=lo("--"),Dl=lo("var(--"),os=e=>Dl(e)?jl.test(e.split("/*")[0].trim()):!1,jl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ht={...Qe,transform:e=>Se(0,1,e)},Rt={...Qe,default:1},lt=e=>Math.round(e*1e5)/1e5,as=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Il(e){return e==null}const Nl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ls=(e,t)=>n=>!!(typeof n=="string"&&Nl.test(n)&&n.startsWith(e)||t&&!Il(n)&&Object.prototype.hasOwnProperty.call(n,t)),co=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,a]=s.match(as);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Bl=e=>Se(0,255,e),rn={...Qe,transform:e=>Math.round(Bl(e))},je={test:ls("rgb","red"),parse:co("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+rn.transform(e)+", "+rn.transform(t)+", "+rn.transform(n)+", "+lt(ht.transform(s))+")"};function Fl(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const Pn={test:ls("#"),parse:Fl,transform:je.transform},wt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ce=wt("deg"),we=wt("%"),j=wt("px"),Ol=wt("vh"),zl=wt("vw"),Ks={...we,parse:e=>we.parse(e)/100,transform:e=>we.transform(e*100)},ze={test:ls("hsl","hue"),parse:co("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+we.transform(lt(t))+", "+we.transform(lt(n))+", "+lt(ht.transform(s))+")"},Q={test:e=>je.test(e)||Pn.test(e)||ze.test(e),parse:e=>je.test(e)?je.parse(e):ze.test(e)?ze.parse(e):Pn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?je.transform(e):ze.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},Wl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function $l(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(as))==null?void 0:t.length)||0)+(((n=e.match(Wl))==null?void 0:n.length)||0)>0}const uo="number",fo="color",Ul="var",Gl="var(",_s="${}",Hl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function mt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(Hl,l=>(Q.test(l)?(s.color.push(o),r.push(fo),n.push(Q.parse(l))):l.startsWith(Gl)?(s.var.push(o),r.push(Ul),n.push(l)):(s.number.push(o),r.push(uo),n.push(parseFloat(l))),++o,_s)).split(_s);return{values:n,split:a,indexes:s,types:r}}function ho(e){return mt(e).values}function mo(e){const{split:t,types:n}=mt(e),s=t.length;return r=>{let o="";for(let i=0;i<s;i++)if(o+=t[i],r[i]!==void 0){const a=n[i];a===uo?o+=lt(r[i]):a===fo?o+=Q.transform(r[i]):o+=r[i]}return o}}const Kl=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function _l(e){const t=ho(e);return mo(e)(t.map(Kl))}const Ae={test:$l,parse:ho,createTransformer:mo,getAnimatableNone:_l};function on(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xl({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,i=0;if(!t)r=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=on(l,a,e+1/3),o=on(l,a,e),i=on(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function Wt(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,an=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Yl=[Pn,je,ze],ql=e=>Yl.find(t=>t.test(e));function Xs(e){const t=ql(e);if(Je(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ze&&(n=Xl(n)),n}const Ys=(e,t)=>{const n=Xs(e),s=Xs(t);if(!n||!s)return Wt(e,t);const r={...n};return o=>(r.red=an(n.red,s.red,o),r.green=an(n.green,s.green,o),r.blue=an(n.blue,s.blue,o),r.alpha=Y(n.alpha,s.alpha,o),je.transform(r))},kn=new Set(["none","hidden"]);function Zl(e,t){return kn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Jl(e,t){return n=>Y(e,t,n)}function cs(e){return typeof e=="number"?Jl:typeof e=="string"?os(e)?Wt:Q.test(e)?Ys:tc:Array.isArray(e)?po:typeof e=="object"?Q.test(e)?Ys:Ql:Wt}function po(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>cs(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Ql(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=cs(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function ec(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],a=e.values[i]??0;n[r]=a,s[o]++}return n}const tc=(e,t)=>{const n=Ae.createTransformer(t),s=mt(e),r=mt(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?kn.has(e)&&!r.values.length||kn.has(t)&&!s.values.length?Zl(e,t):vt(po(ec(s,r),r.values),n):(Je(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Wt(e,t))};function go(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):cs(e)(e,t)}const nc=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>W.update(t,n),stop:()=>ye(t),now:()=>se.isProcessing?se.timestamp:le.now()}},yo=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},$t=2e4;function us(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<$t;)t+=n,s=e.next(t);return t>=$t?1/0:t}function sc(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(us(s),$t);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:be(r)}}const rc=5;function xo(e,t,n){const s=Math.max(t-rc,0);return ns(n-e(s),t-s)}const X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ln=.001;function ic({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:s=X.mass}){let r,o;Je(e<=pe(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Se(X.minDamping,X.maxDamping,i),e=Se(X.minDuration,X.maxDuration,be(e)),i<1?(r=c=>{const u=c*i,d=u*e,f=u-n,h=En(c,i),p=Math.exp(-d);return ln-f/h*p},o=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),g=En(Math.pow(c,2),i);return(-r(c)+ln>0?-1:1)*((f-h)*p)/g}):(r=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-ln+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ac(r,o,a);if(e=pe(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:i*2*Math.sqrt(s*c),duration:e}}}const oc=12;function ac(e,t,n){let s=n;for(let r=1;r<oc;r++)s=s-e(s)/t(s);return s}function En(e,t){return e*Math.sqrt(1-t*t)}const lc=["duration","bounce"],cc=["stiffness","damping","mass"];function qs(e,t){return t.some(n=>e[n]!==void 0)}function uc(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!qs(e,cc)&&qs(e,lc))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*Se(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:X.mass,stiffness:r,damping:o}}else{const n=ic(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Ut(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=uc({...n,velocity:-be(n.velocity||0)}),p=f||0,g=c/(2*Math.sqrt(l*u)),w=i-o,b=be(Math.sqrt(l/u)),y=Math.abs(w)<5;s||(s=y?X.restSpeed.granular:X.restSpeed.default),r||(r=y?X.restDelta.granular:X.restDelta.default);let v;if(g<1){const P=En(b,g);v=E=>{const V=Math.exp(-g*b*E);return i-V*((p+g*b*w)/P*Math.sin(P*E)+w*Math.cos(P*E))}}else if(g===1)v=P=>i-Math.exp(-b*P)*(w+(p+b*w)*P);else{const P=b*Math.sqrt(g*g-1);v=E=>{const V=Math.exp(-g*b*E),T=Math.min(P*E,300);return i-V*((p+g*b*w)*Math.sinh(T)+P*w*Math.cosh(T))/P}}const k={calculatedDuration:h&&d||null,next:P=>{const E=v(P);if(h)a.done=P>=d;else{let V=P===0?p:0;g<1&&(V=P===0?pe(p):xo(v,P,E));const T=Math.abs(V)<=s,R=Math.abs(i-E)<=r;a.done=T&&R}return a.value=a.done?i:E,a},toString:()=>{const P=Math.min(us(k),$t),E=yo(V=>k.next(P*V).value,P,30);return P+"ms "+E},toTransition:()=>{}};return k}Ut.applyToOptions=e=>{const t=sc(e,100,Ut);return e.ease=t.ease,e.duration=pe(t.duration),e.type="keyframes",e};function Cn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let g=n*t;const w=d+g,b=i===void 0?w:i(w);b!==w&&(g=b-d);const y=T=>-g*Math.exp(-T/s),v=T=>b+y(T),k=T=>{const R=y(T),C=v(T);f.done=Math.abs(R)<=c,f.value=f.done?b:C};let P,E;const V=T=>{h(f.value)&&(P=T,E=Ut({keyframes:[f.value,p(f.value)],velocity:xo(v,T,f.value),damping:r,stiffness:o,restDelta:c,restSpeed:u}))};return V(0),{calculatedDuration:null,next:T=>{let R=!1;return!E&&P===void 0&&(R=!0,k(T),V(T)),P!==void 0&&T>=P?E.next(T-P):(!R&&k(T),f)}}}function fc(e,t,n){const s=[],r=n||Pe.mix||go,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||ce:t;a=vt(l,a)}s.push(a)}return s}function fs(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(ge(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=fc(t,s,r),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=_e(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Se(e[0],e[o-1],u)):c}function dc(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=_e(0,t,s);e.push(Y(n,1,r))}}function vo(e){const t=[0];return dc(t,e.length-1),t}function hc(e,t){return e.map(n=>n*t)}function mc(e,t){return e.map(()=>t||io).splice(0,e.length-1)}function We({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=Ml(s)?s.map(Hs):Hs(s),o={done:!1,value:t[0]},i=hc(n&&n.length===t.length?n:vo(t),e),a=fs(i,t,{ease:Array.isArray(r)?r:mc(t,r)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const pc=e=>e!==null;function ds(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(pc),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const gc={decay:Cn,inertia:Cn,tween:We,keyframes:We,spring:Ut};function bo(e){typeof e.type=="string"&&(e.type=gc[e.type])}class hs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const yc=e=>e/100;class ms extends hs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==le.now()&&this.tick(le.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;bo(t);const{type:n=We,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const l=n||We;process.env.NODE_ENV!=="production"&&l!==We&&ge(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==We&&typeof a[0]!="number"&&(this.mixKeyframes=vt(yc,go(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=us(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?b<0:b>r;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,k=s;if(d){const T=Math.min(this.currentTime,r)/a;let R=Math.floor(T),C=T%1;!C&&T>=1&&(C=1),C===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(f==="reverse"?(C=1-C,h&&(C-=h/a)):f==="mirror"&&(k=i)),v=Se(0,1,C)*a}const P=y?{done:!1,value:u[0]}:k.next(v);o&&(P.value=o(P.value));let{done:E}=P;!y&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return V&&p!==Cn&&(P.value=ds(u,this.options,w,this.speed)),g&&g(P.value),V&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return be(this.calculatedDuration)}get time(){return be(this.currentTime)}set time(t){var n;t=pe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=be(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=nc,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function xc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ie=e=>e*180/Math.PI,Mn=e=>{const t=Ie(Math.atan2(e[1],e[0]));return An(t)},vc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Mn,rotateZ:Mn,skewX:e=>Ie(Math.atan(e[1])),skewY:e=>Ie(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},An=e=>(e=e%360,e<0&&(e+=360),e),Zs=Mn,Js=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Qs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),bc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Js,scaleY:Qs,scale:e=>(Js(e)+Qs(e))/2,rotateX:e=>An(Ie(Math.atan2(e[6],e[5]))),rotateY:e=>An(Ie(Math.atan2(-e[2],e[0]))),rotateZ:Zs,rotate:Zs,skewX:e=>Ie(Math.atan(e[4])),skewY:e=>Ie(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vn(e){return e.includes("scale")?1:0}function Rn(e,t){if(!e||e==="none")return Vn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=bc,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=vc,r=a}if(!r)return Vn(t);const o=s[t],i=r[1].split(",").map(Sc);return typeof o=="function"?o(i):i[o]}const wc=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Rn(n,t)};function Sc(e){return parseFloat(e.trim())}const et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tt=new Set(et),er=e=>e===Qe||e===j,Tc=new Set(["x","y","z"]),Pc=et.filter(e=>!Tc.has(e));function kc(e){const t=[];return Pc.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ne={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Rn(t,"x"),y:(e,{transform:t})=>Rn(t,"y")};Ne.translateX=Ne.x;Ne.translateY=Ne.y;const Be=new Set;let Ln=!1,Dn=!1,jn=!1;function wo(){if(Dn){const e=Array.from(Be).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=kc(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var a;(a=s.getValue(o))==null||a.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Dn=!1,Ln=!1,Be.forEach(e=>e.complete(jn)),Be.clear()}function So(){Be.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Dn=!0)})}function Ec(){jn=!0,So(),wo(),jn=!1}class ps{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Be.add(this),Ln||(Ln=!0,W.read(So),W.resolveKeyframes(wo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}xc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Be.delete(this)}cancel(){this.state==="scheduled"&&(Be.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Cc=e=>e.startsWith("--");function Mc(e,t,n){Cc(t)?e.style.setProperty(t,n):e.style[t]=n}const To=es(()=>window.ScrollTimeline!==void 0),Ac={};function Vc(e,t){const n=es(e);return()=>Ac[t]??n()}const Po=Vc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),at=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,tr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:at([0,.65,.55,1]),circOut:at([.55,0,1,.45]),backIn:at([.31,.01,.66,-.59]),backOut:at([.33,1.53,.69,.99])};function ko(e,t){if(e)return typeof e=="function"?Po()?yo(e,t):"ease-out":oo(e)?at(e):Array.isArray(e)?e.map(n=>ko(n,t)||tr.easeOut):tr[e]}function Rc(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ko(a,r);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function Eo(e){return typeof e=="function"&&"applyToOptions"in e}function Lc({type:e,...t}){return Eo(e)&&Po()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dc extends hs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,ge(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Lc(t);this.animation=Rc(n,s,r,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=ds(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Mc(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return be(Number(t))}get time(){return be(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=pe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&To()?(this.animation.timeline=t,ce):n(this)}}const Co={anticipate:no,backInOut:to,circInOut:ro};function jc(e){return e in Co}function Ic(e){typeof e.ease=="string"&&jc(e.ease)&&(e.ease=Co[e.ease])}const nr=10;class Nc extends Dc{constructor(t){Ic(t),bo(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ms({...i,autoplay:!1}),l=pe(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-nr).value,a.sample(l).value,nr),a.stop()}}const sr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ae.test(e)||e==="0")&&!e.startsWith("url("));function Bc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Fc(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=sr(r,t),a=sr(o,t);return Je(i===a,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:Bc(e)||(n==="spring"||Eo(n))&&s}function In(e){e.duration=0,e.type}const Oc=new Set(["opacity","clipPath","filter","transform"]),zc=es(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wc(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return zc()&&n&&Oc.has(n)&&(n!=="transform"||!c)&&!l&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const $c=40;class Uc extends hs{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var p;super(),this.stop=()=>{var g,w;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=le.now();const f={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||ps;this.keyframeResolver=new h(a,(g,w,b)=>this.onKeyframesResolved(g,w,f,!b),l,c,u),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,s,r){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=le.now(),Fc(t,o,i,a)||((Pe.instantAnimations||!l)&&(u==null||u(ds(t,s,n))),t[0]=t[t.length-1],In(s),s.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>$c?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!c&&Wc(f)?new Nc({...f,element:f.motionValue.owner.current}):new ms(f);h.finished.then(()=>this.notifyFinished()).catch(ce),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ec()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Gc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hc(e){const t=Gc.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Kc=4;function Mo(e,t,n=1){ge(n<=Kc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Hc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return Xi(i)?parseFloat(i):i}return os(r)?Mo(r,t,n+1):r}function gs(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Ao=new Set(["width","height","top","left","right","bottom",...et]),_c={test:e=>e==="auto",parse:e=>e},Vo=e=>t=>t.test(e),Ro=[Qe,j,we,Ce,zl,Ol,_c],rr=e=>Ro.find(Vo(e));function Xc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||qi(e):!0}const Yc=new Set(["brightness","contrast","saturate","opacity"]);function qc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(as)||[];if(!s)return e;const r=n.replace(s,"");let o=Yc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Zc=/\b([a-z-]*)\(.*?\)/gu,Nn={...Ae,getAnimatableNone:e=>{const t=e.match(Zc);return t?t.map(qc).join(" "):e}},ir={...Qe,transform:Math.round},Jc={rotate:Ce,rotateX:Ce,rotateY:Ce,rotateZ:Ce,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:Ce,skewX:Ce,skewY:Ce,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:ht,originX:Ks,originY:Ks,originZ:j},ys={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j,...Jc,zIndex:ir,fillOpacity:ht,strokeOpacity:ht,numOctaves:ir},Qc={...ys,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:Nn,WebkitFilter:Nn},Lo=e=>Qc[e];function Do(e,t){let n=Lo(e);return n!==Nn&&(n=Ae),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const eu=new Set(["auto","none","0"]);function tu(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!eu.has(o)&&mt(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Do(n,r)}class nu extends ps{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),os(c))){const u=Mo(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ao.has(s)||t.length!==2)return;const[r,o]=t,i=rr(r),a=rr(o);if(i!==a)if(er(i)&&er(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Ne[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Xc(t[r]))&&s.push(r);s.length&&tu(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ne[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Ne[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function jo(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const r=document.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Io=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xs(e){return Yi(e)&&"offsetHeight"in e}const or=30,su=e=>!isNaN(parseFloat(e)),ct={current:void 0};class ru{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=le.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=su(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Yt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ts);const s=this.events[t].add(n);return t==="change"?()=>{s(),W.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ct.current&&ct.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>or)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,or);return ns(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ue(e,t){return new ru(e,t)}const{schedule:vs}=ao(queueMicrotask,!1),me={x:!1,y:!1};function No(){return me.x||me.y}function iu(e){return e==="x"||e==="y"?me[e]?null:(me[e]=!0,()=>{me[e]=!1}):me.x||me.y?null:(me.x=me.y=!0,()=>{me.x=me.y=!1})}function Bo(e,t){const n=jo(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function ar(e){return!(e.pointerType==="touch"||No())}function ou(e,t,n={}){const[s,r,o]=Bo(e,n),i=a=>{if(!ar(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{ar(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return s.forEach(a=>{a.addEventListener("pointerenter",i,r)}),o}const Fo=(e,t)=>t?e===t?!0:Fo(e,t.parentElement):!1,bs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,au=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lu(e){return au.has(e.tagName)||e.tabIndex!==-1}const Nt=new WeakSet;function lr(e){return t=>{t.key==="Enter"&&e(t)}}function cn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const cu=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=lr(()=>{if(Nt.has(n))return;cn(n,"down");const r=lr(()=>{cn(n,"up")}),o=()=>cn(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function cr(e){return bs(e)&&!No()}function uu(e,t,n={}){const[s,r,o]=Bo(e,n),i=a=>{const l=a.currentTarget;if(!cr(a))return;Nt.add(l);const c=t(l,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Nt.has(l)&&Nt.delete(l),cr(h)&&typeof c=="function"&&c(h,{success:p})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Fo(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",f,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,r),xs(a)&&(a.addEventListener("focus",c=>cu(c,r)),!lu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ws(e){return Yi(e)&&"ownerSVGElement"in e}const Bt=new WeakMap;let Me;const Oo=(e,t,n)=>(s,r)=>r&&r[0]?r[0][e+"Size"]:ws(s)&&"getBBox"in s?s.getBBox()[t]:s[n],fu=Oo("inline","width","offsetWidth"),du=Oo("block","height","offsetHeight");function hu({target:e,borderBoxSize:t}){var n;(n=Bt.get(e))==null||n.forEach(s=>{s(e,{get width(){return fu(e,t)},get height(){return du(e,t)}})})}function mu(e){e.forEach(hu)}function pu(){typeof ResizeObserver>"u"||(Me=new ResizeObserver(mu))}function gu(e,t){Me||pu();const n=jo(e);return n.forEach(s=>{let r=Bt.get(s);r||(r=new Set,Bt.set(s,r)),r.add(t),Me==null||Me.observe(s)}),()=>{n.forEach(s=>{const r=Bt.get(s);r==null||r.delete(t),r!=null&&r.size||Me==null||Me.unobserve(s)})}}const Ft=new Set;let $e;function yu(){$e=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ft.forEach(t=>t(e))},window.addEventListener("resize",$e)}function xu(e){return Ft.add(e),$e||yu(),()=>{Ft.delete(e),!Ft.size&&typeof $e=="function"&&(window.removeEventListener("resize",$e),$e=void 0)}}function vu(e,t){return typeof e=="function"?xu(e):gu(e,t)}function zo(e,t){let n;const s=()=>{const{currentTime:r}=t,i=(r===null?0:r.value)/100;n!==i&&e(i),n=i};return W.preUpdate(s,!0),()=>ye(s)}function bu(e){return ws(e)&&e.tagName==="svg"}function wu(...e){const t=!Array.isArray(e[0]),n=t?0:-1,s=e[0+n],r=e[1+n],o=e[2+n],i=e[3+n],a=fs(r,o,i);return t?a(s):a}const ie=e=>!!(e&&e.getVelocity),Su=[...Ro,Q,Ae],Tu=e=>Su.find(Vo(e)),qt=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Pu extends xe.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,r=xs(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=r-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function ku({children:e,isPresent:t,anchorX:n,root:s}){const r=m.useId(),o=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=m.useContext(qt);return m.useInsertionEffect(()=>{const{width:l,height:c,top:u,left:d,right:f}=i.current;if(t||!o.current||!l||!c)return;const h=n==="left"?`left: ${d}`:`right: ${f}`;o.current.dataset.motionPopId=r;const p=document.createElement("style");a&&(p.nonce=a);const g=s??document.head;return g.appendChild(p),p.sheet&&p.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${r}"] {
|
|
3
|
-
position: absolute !important;
|
|
4
|
-
width: ${l}px !important;
|
|
5
|
-
height: ${c}px !important;
|
|
6
|
-
${h}px !important;
|
|
7
|
-
top: ${u}px !important;
|
|
8
|
-
}
|
|
9
|
-
`),()=>{g.contains(p)&&g.removeChild(p)}},[t]),x.jsx(Pu,{isPresent:t,childRef:o,sizeRef:i,children:xe.cloneElement(e,{ref:o})})}const Eu=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,root:l})=>{const c=Ze(Cu),u=m.useId();let d=!0,f=m.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:r,onExitComplete:h=>{c.set(h,!0);for(const p of c.values())if(!p)return;s&&s()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,s]);return o&&d&&(f={...f}),m.useMemo(()=>{c.forEach((h,p)=>c.set(p,!1))},[n]),xe.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),i==="popLayout"&&(e=x.jsx(ku,{isPresent:n,anchorX:a,root:l,children:e})),x.jsx(Xt.Provider,{value:f,children:e})};function Cu(){return new Map}function Wo(e=!0){const t=m.useContext(Xt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=m.useId();m.useEffect(()=>{if(e)return r(o)},[e]);const i=m.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Lt=e=>e.key||"";function ur(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const Fe=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",root:l})=>{const[c,u]=Wo(i),d=m.useMemo(()=>ur(e),[e]),f=i&&!c?[]:d.map(Lt),h=m.useRef(!0),p=m.useRef(d),g=Ze(()=>new Map),[w,b]=m.useState(d),[y,v]=m.useState(d);_t(()=>{h.current=!1,p.current=d;for(let E=0;E<y.length;E++){const V=Lt(y[E]);f.includes(V)?g.delete(V):g.get(V)!==!0&&g.set(V,!1)}},[y,f.length,f.join("-")]);const k=[];if(d!==w){let E=[...d];for(let V=0;V<y.length;V++){const T=y[V],R=Lt(T);f.includes(R)||(E.splice(V,0,T),k.push(T))}return o==="wait"&&k.length&&(E=k),v(ur(E)),b(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=m.useContext(qn);return x.jsx(x.Fragment,{children:y.map(E=>{const V=Lt(E),T=i&&!c?!1:d===y||f.includes(V),R=()=>{if(g.has(V))g.set(V,!0);else return;let C=!0;g.forEach(O=>{O||(C=!1)}),C&&(P==null||P(),v(p.current),i&&(u==null||u()),s&&s())};return x.jsx(Eu,{isPresent:T,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:l,onExitComplete:T?void 0:R,anchorX:a,children:E},V)})})},$o=m.createContext({strict:!1}),fr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Xe={};for(const e in fr)Xe[e]={isEnabled:t=>fr[e].some(n=>!!t[n])};function Mu(e){for(const t in e)Xe[t]={...Xe[t],...e[t]}}const Au=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Gt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Au.has(e)}let Uo=e=>!Gt(e);function Vu(e){typeof e=="function"&&(Uo=t=>t.startsWith("on")?!Gt(t):e(t))}try{Vu(require("@emotion/is-prop-valid").default)}catch{}function Ru(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(Uo(r)||n===!0&&Gt(r)||!t&&!Gt(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Zt=m.createContext({});function Jt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function pt(e){return typeof e=="string"||Array.isArray(e)}const Ss=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ts=["initial",...Ss];function Qt(e){return Jt(e.animate)||Ts.some(t=>pt(e[t]))}function Go(e){return!!(Qt(e)||e.variants)}function Lu(e,t){if(Qt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||pt(n)?n:void 0,animate:pt(s)?s:void 0}}return e.inherit!==!1?t:{}}function Du(e){const{initial:t,animate:n}=Lu(e,m.useContext(Zt));return m.useMemo(()=>({initial:t,animate:n}),[dr(t),dr(n)])}function dr(e){return Array.isArray(e)?e.join(" "):e}const gt={};function ju(e){for(const t in e)gt[t]=e[t],is(t)&&(gt[t].isCSSVariable=!0)}function Ho(e,{layout:t,layoutId:n}){return tt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!gt[e]||e==="opacity")}const Iu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nu=et.length;function Bu(e,t,n){let s="",r=!0;for(let o=0;o<Nu;o++){const i=et[o],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Io(a,ys[i]);if(!l){r=!1;const u=Iu[i]||i;s+=`${u}(${c}) `}n&&(t[i]=c)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function Ps(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(tt.has(l)){i=!0;continue}else if(is(l)){r[l]=c;continue}else{const u=Io(c,ys[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(t.transform||(i||n?s.transform=Bu(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}const ks=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ko(e,t,n){for(const s in t)!ie(t[s])&&!Ho(s,n)&&(e[s]=t[s])}function Fu({transformTemplate:e},t){return m.useMemo(()=>{const n=ks();return Ps(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ou(e,t){const n=e.style||{},s={};return Ko(s,n,e),Object.assign(s,Fu(e,t)),s}function zu(e,t){const n={},s=Ou(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const Wu={offset:"stroke-dashoffset",array:"stroke-dasharray"},$u={offset:"strokeDashoffset",array:"strokeDasharray"};function Uu(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Wu:$u;e[o.offset]=j.transform(-s);const i=j.transform(t),a=j.transform(n);e[o.array]=`${i} ${a}`}function _o(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},l,c,u){if(Ps(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&Uu(d,r,o,i,!1)}const Xo=()=>({...ks(),attrs:{}}),Yo=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gu(e,t,n,s){const r=m.useMemo(()=>{const o=Xo();return _o(o,t,Yo(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Ko(o,e.style,e),r.style={...o,...r.style}}return r}const Hu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Es(e){return typeof e!="string"||e.includes("-")?!1:!!(Hu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ku(e,t,n,{latestValues:s},r,o=!1){const a=(Es(e)?Gu:zu)(t,s,r,e),l=Ru(t,typeof e=="string",o),c=e!==m.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=m.useMemo(()=>ie(u)?u.get():u,[u]);return m.createElement(e,{...c,children:d})}function hr(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Cs(e,t,n,s){if(typeof t=="function"){const[r,o]=hr(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=hr(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function Ot(e){return ie(e)?e.get():e}function _u({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Xu(n,s,r,e),renderState:t()}}function Xu(e,t,n,s){const r={},o=s(e,{});for(const f in o)r[f]=Ot(o[f]);let{initial:i,animate:a}=e;const l=Qt(e),c=Go(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!Jt(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Cs(e,f[h]);if(p){const{transitionEnd:g,transition:w,...b}=p;for(const y in b){let v=b[y];if(Array.isArray(v)){const k=u?v.length-1:0;v=v[k]}v!==null&&(r[y]=v)}for(const y in g)r[y]=g[y]}}}return r}const qo=e=>(t,n)=>{const s=m.useContext(Zt),r=m.useContext(Xt),o=()=>_u(e,t,s,r);return n?o():Ze(o)};function Ms(e,t,n){var o;const{style:s}=e,r={};for(const i in s)(ie(s[i])||t.style&&ie(t.style[i])||Ho(i,e)||((o=n==null?void 0:n.getValue(i))==null?void 0:o.liveStyle)!==void 0)&&(r[i]=s[i]);return r}const Yu=qo({scrapeMotionValuesFromProps:Ms,createRenderState:ks});function Zo(e,t,n){const s=Ms(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const o=et.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}const qu=qo({scrapeMotionValuesFromProps:Zo,createRenderState:Xo}),Zu=Symbol.for("motionComponentSymbol");function Ue(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ju(e,t,n){return m.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Ue(n)&&(n.current=s))},[t])}const As=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qu="framerAppearId",Jo="data-"+As(Qu),Qo=m.createContext({});function ef(e,t,n,s,r){var g,w;const{visualElement:o}=m.useContext(Zt),i=m.useContext($o),a=m.useContext(Xt),l=m.useContext(qt).reducedMotion,c=m.useRef(null);s=s||i.renderer,!c.current&&s&&(c.current=s(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=m.useContext(Qo);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&tf(c.current,n,r,d);const f=m.useRef(!1);m.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[Jo],p=m.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return _t(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,h)}),p.current=!1))}),u}function tf(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ea(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&Ue(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function ea(e){if(e)return e.options.allowProjection!==!1?e.projection:ea(e.parent)}function un(e,{forwardMotionProps:t=!1}={},n,s){n&&Mu(n);const r=Es(e)?qu:Yu;function o(a,l){let c;const u={...m.useContext(qt),...a,layoutId:nf(a)},{isStatic:d}=u,f=Du(a),h=r(a,d);if(!d&&Zn){sf(u,n);const p=rf(u);c=p.MeasureLayout,f.visualElement=ef(e,h,u,s,p.ProjectionNode)}return x.jsxs(Zt.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,Ku(e,a,Ju(h,f.visualElement,l),h,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=m.forwardRef(o);return i[Zu]=e,i}function nf({layoutId:e}){const t=m.useContext(qn).id;return t&&e!==void 0?t+"-"+e:e}function sf(e,t){const n=m.useContext($o).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Je(!1,s,"lazy-strict-mode"):ge(!1,s,"lazy-strict-mode")}}function rf(e){const{drag:t,layout:n}=Xe;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function of(e,t){if(typeof Proxy>"u")return un;const n=new Map,s=(o,i)=>un(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&Yt(!1,"motion() is deprecated. Use motion.create() instead."),s(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?s:(n.has(i)||n.set(i,un(i,void 0,e,t)),n.get(i))})}function ta({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function af({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function lf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function fn(e){return e===void 0||e===1}function Bn({scale:e,scaleX:t,scaleY:n}){return!fn(e)||!fn(t)||!fn(n)}function De(e){return Bn(e)||na(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function na(e){return mr(e.x)||mr(e.y)}function mr(e){return e&&e!=="0%"}function Ht(e,t,n){const s=e-n,r=t*s;return n+r}function pr(e,t,n,s,r){return r!==void 0&&(e=Ht(e,r,s)),Ht(e,n,s)+t}function Fn(e,t=0,n=1,s,r){e.min=pr(e.min,t,n,s,r),e.max=pr(e.max,t,n,s,r)}function sa(e,{x:t,y:n}){Fn(e.x,t.translate,t.scale,t.originPoint),Fn(e.y,n.translate,n.scale,n.originPoint)}const gr=.999999999999,yr=1.0000000000001;function cf(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,i;for(let a=0;a<r;a++){o=n[a],i=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&He(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,sa(e,i)),s&&De(o.latestValues)&&He(e,o.latestValues))}t.x<yr&&t.x>gr&&(t.x=1),t.y<yr&&t.y>gr&&(t.y=1)}function Ge(e,t){e.min=e.min+t,e.max=e.max+t}function xr(e,t,n,s,r=.5){const o=Y(e.min,e.max,r);Fn(e,t,n,o,s)}function He(e,t){xr(e.x,t.x,t.scaleX,t.scale,t.originX),xr(e.y,t.y,t.scaleY,t.scale,t.originY)}function ra(e,t){return ta(lf(e.getBoundingClientRect(),t))}function uf(e,t,n){const s=ra(e,n),{scroll:r}=t;return r&&(Ge(s.x,r.offset.x),Ge(s.y,r.offset.y)),s}const vr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ke=()=>({x:vr(),y:vr()}),br=()=>({min:0,max:0}),q=()=>({x:br(),y:br()}),On={current:null},ia={current:!1};function ff(){if(ia.current=!0,!!Zn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>On.current=e.matches;e.addEventListener("change",t),t()}else On.current=!1}const df=new WeakMap;function hf(e,t,n){for(const s in t){const r=t[s],o=n[s];if(ie(r))e.addValue(s,r);else if(ie(o))e.addValue(s,ue(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,ue(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const wr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mf{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ps,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=le.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,W.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Qt(n),this.isVariantNode=Go(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&ie(h)&&h.set(l[f])}}mount(t){this.current=t,df.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),ia.current||ff(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:On.current,process.env.NODE_ENV!=="production"&&Yt(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ye(this.notifyUpdate),ye(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=tt.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&W.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Xe){const n=Xe[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):q()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<wr.length;s++){const r=wr[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=hf(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=ue(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Xi(s)||qi(s))?s=parseFloat(s):!Tu(s)&&Ae.test(n)&&(s=Do(t,n)),this.setBaseTarget(t,ie(s)?s.get():s)),ie(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=Cs(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ie(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ts),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){vs.render(this.render)}}class oa extends mf{constructor(){super(...arguments),this.KeyframeResolver=nu}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function aa(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function pf(e){return window.getComputedStyle(e)}class gf extends oa{constructor(){super(...arguments),this.type="html",this.renderInstance=aa}readValueFromInstance(t,n){var s;if(tt.has(n))return(s=this.projection)!=null&&s.isProjecting?Vn(n):wc(t,n);{const r=pf(t),o=(is(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ra(t,n)}build(t,n,s){Ps(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Ms(t,n,s)}}const la=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function yf(e,t,n,s){aa(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(la.has(r)?r:As(r),t.attrs[r])}class xf extends oa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=q}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(tt.has(n)){const s=Lo(n);return s&&s.default||0}return n=la.has(n)?n:As(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Zo(t,n,s)}build(t,n,s){_o(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){yf(t,n,s,r)}mount(t){this.isSVGTag=Yo(t.tagName),super.mount(t)}}const vf=(e,t)=>Es(e)?new xf(t):new gf(t,{allowProjection:e!==m.Fragment});function yt(e,t,n){const s=e.getProps();return Cs(s,t,n!==void 0?n:s.custom,e)}const zn=e=>Array.isArray(e);function bf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ue(n))}function wf(e){return zn(e)?e[e.length-1]||0:e}function Sf(e,t){const n=yt(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=wf(o[i]);bf(e,i,a)}}function Tf(e){return!!(ie(e)&&e.add)}function Wn(e,t){const n=e.getValue("willChange");if(Tf(n))return n.add(t);if(!n&&Pe.WillChange){const s=new Pe.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function ca(e){return e.props[Jo]}const Pf=e=>e!==null;function kf(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Pf),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}const Ef={type:"spring",stiffness:500,damping:25,restSpeed:10},Cf=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mf={type:"keyframes",duration:.8},Af={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vf=(e,{keyframes:t})=>t.length>2?Mf:tt.has(e)?e.startsWith("scale")?Cf(t[1]):Ef:Af;function Rf({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Vs=(e,t,n,s={},r,o)=>i=>{const a=gs(s,e)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-pe(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};Rf(a)||Object.assign(u,Vf(e,u)),u.duration&&(u.duration=pe(u.duration)),u.repeatDelay&&(u.repeatDelay=pe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(In(u),u.delay===0&&(d=!0)),(Pe.instantAnimations||Pe.skipAnimations)&&(d=!0,In(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=kf(u.keyframes,a);if(f!==void 0){W.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new ms(u):new Uc(u)};function Lf({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function ua(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...a}=t;s&&(o=s);const l=[],c=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&Lf(c,u))continue;const h={delay:n,...gs(o||{},u)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const b=ca(e);if(b){const y=window.MotionHandoffAnimation(b,u,W);y!==null&&(h.startTime=y,g=!0)}}Wn(e,u),d.start(Vs(u,d,f,e.shouldReduceMotion&&Ao.has(u)?{type:!1}:h,e,g));const w=d.animation;w&&l.push(w)}return i&&Promise.all(l).then(()=>{W.update(()=>{i&&Sf(e,i)})}),l}function $n(e,t,n={}){var l;const s=yt(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(ua(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=r;return Df(e,t,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,u]=a==="beforeChildren"?[o,i]:[i,o];return c().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function Df(e,t,n=0,s=0,r=0,o=1,i){const a=[],l=e.variantChildren.size,c=(l-1)*r,u=typeof s=="function",d=u?f=>s(f,l):o===1?(f=0)=>f*r:(f=0)=>c-f*r;return Array.from(e.variantChildren).sort(jf).forEach((f,h)=>{f.notify("AnimationStart",t),a.push($n(f,t,{...i,delay:n+(u?0:s)+d(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(a)}function jf(e,t){return e.sortNodePosition(t)}function If(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>$n(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=$n(e,t,n);else{const r=typeof t=="function"?yt(e,t,n.custom):t;s=Promise.all(ua(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function fa(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Nf=Ts.length;function da(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?da(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Nf;n++){const s=Ts[n],r=e.props[s];(pt(r)||r===!1)&&(t[s]=r)}return t}const Bf=[...Ss].reverse(),Ff=Ss.length;function Of(e){return t=>Promise.all(t.map(({animation:n,options:s})=>If(e,n,s)))}function zf(e){let t=Of(e),n=Sr(),s=!0;const r=l=>(c,u)=>{var f;const d=yt(e,u,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...g}=d;c={...c,...g,...p}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,u=da(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let w=0;w<Ff;w++){const b=Bf[w],y=n[b],v=c[b]!==void 0?c[b]:u[b],k=pt(v),P=b===l?y.isActive:null;P===!1&&(p=w);let E=v===u[b]&&v!==c[b]&&k;if(E&&s&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&P===null||!v&&!y.prevProp||Jt(v)||typeof v=="boolean")continue;const V=Wf(y.prevProp,v);let T=V||b===l&&y.isActive&&!E&&k||w>p&&k,R=!1;const C=Array.isArray(v)?v:[v];let O=C.reduce(r(b),{});P===!1&&(O={});const{prevResolvedValues:H={}}=y,_={...H,...O},Z=M=>{T=!0,f.has(M)&&(R=!0,f.delete(M)),y.needsAnimating[M]=!0;const S=e.getValue(M);S&&(S.liveStyle=!1)};for(const M in _){const S=O[M],B=H[M];if(h.hasOwnProperty(M))continue;let z=!1;zn(S)&&zn(B)?z=!fa(S,B):z=S!==B,z?S!=null?Z(M):f.add(M):S!==void 0&&f.has(M)?Z(M):y.protectedKeys[M]=!0}y.prevProp=v,y.prevResolvedValues=O,y.isActive&&(h={...h,...O}),s&&e.blockInitialAnimation&&(T=!1),T&&(!(E&&V)||R)&&d.push(...C.map(M=>({animation:M,options:{type:b}})))}if(f.size){const w={};if(typeof c.initial!="boolean"){const b=yt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(w.transition=b.transition)}f.forEach(b=>{const y=e.getBaseTarget(b),v=e.getValue(b);v&&(v.liveStyle=!0),w[b]=y??null}),d.push({animation:w})}let g=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),s=!1,g?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=i(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Sr(),s=!0}}}function Wf(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fa(t,e):!1}function Le(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Sr(){return{animate:Le(!0),whileInView:Le(),whileHover:Le(),whileTap:Le(),whileDrag:Le(),whileFocus:Le(),exit:Le()}}class Ve{constructor(t){this.isMounted=!1,this.node=t}update(){}}class $f extends Ve{constructor(t){super(t),t.animationState||(t.animationState=zf(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Jt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Uf=0;class Gf extends Ve{constructor(){super(...arguments),this.id=Uf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Hf={animation:{Feature:$f},exit:{Feature:Gf}};function xt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function St(e){return{point:{x:e.pageX,y:e.pageY}}}const Kf=e=>t=>bs(t)&&e(t,St(t));function ut(e,t,n,s){return xt(e,t,Kf(n),s)}const ha=1e-4,_f=1-ha,Xf=1+ha,ma=.01,Yf=0-ma,qf=0+ma;function ae(e){return e.max-e.min}function Zf(e,t,n){return Math.abs(e-t)<=n}function Tr(e,t,n,s=.5){e.origin=s,e.originPoint=Y(t.min,t.max,e.origin),e.scale=ae(n)/ae(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_f&&e.scale<=Xf||isNaN(e.scale))&&(e.scale=1),(e.translate>=Yf&&e.translate<=qf||isNaN(e.translate))&&(e.translate=0)}function ft(e,t,n,s){Tr(e.x,t.x,n.x,s?s.originX:void 0),Tr(e.y,t.y,n.y,s?s.originY:void 0)}function Pr(e,t,n){e.min=n.min+t.min,e.max=e.min+ae(t)}function Jf(e,t,n){Pr(e.x,t.x,n.x),Pr(e.y,t.y,n.y)}function kr(e,t,n){e.min=t.min-n.min,e.max=e.min+ae(t)}function dt(e,t,n){kr(e.x,t.x,n.x),kr(e.y,t.y,n.y)}function de(e){return[e("x"),e("y")]}const pa=({current:e})=>e?e.ownerDocument.defaultView:null,Er=(e,t)=>Math.abs(e-t);function Qf(e,t){const n=Er(e.x,t.x),s=Er(e.y,t.y);return Math.sqrt(n**2+s**2)}class ga{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=hn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=Qf(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:w}=se;this.history.push({...g,timestamp:w});const{onStart:b,onMove:y}=this.handlers;h||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=dn(h,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=hn(f.type==="pointercancel"?this.lastMoveEventInfo:dn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,b),g&&g(f,b)},!bs(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const a=St(t),l=dn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=se;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,hn(l,this.history)),this.removeListeners=vt(ut(this.contextWindow,"pointermove",this.handlePointerMove),ut(this.contextWindow,"pointerup",this.handlePointerUp),ut(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ye(this.updatePoint)}}function dn(e,t){return t?{point:t(e.point)}:e}function Cr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hn({point:e},t){return{point:e,delta:Cr(e,ya(t)),offset:Cr(e,ed(t)),velocity:td(t,.1)}}function ed(e){return e[0]}function ya(e){return e[e.length-1]}function td(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=ya(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>pe(t)));)n--;if(!s)return{x:0,y:0};const o=be(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function nd(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?Y(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?Y(n,e,s.max):Math.min(e,n)),e}function Mr(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function sd(e,{top:t,left:n,bottom:s,right:r}){return{x:Mr(e.x,n,r),y:Mr(e.y,t,s)}}function Ar(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function rd(e,t){return{x:Ar(e.x,t.x),y:Ar(e.y,t.y)}}function id(e,t){let n=.5;const s=ae(e),r=ae(t);return r>s?n=_e(t.min,t.max-s,e.min):s>r&&(n=_e(e.min,e.max-r,t.min)),Se(0,1,n)}function od(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Un=.35;function ad(e=Un){return e===!1?e=0:e===!0&&(e=Un),{x:Vr(e,"left","right"),y:Vr(e,"top","bottom")}}function Vr(e,t,n){return{min:Rr(e,t),max:Rr(e,n)}}function Rr(e,t){return typeof e=="number"?e:e[t]||0}const ld=new WeakMap;class cd{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(St(d).point)},i=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=iu(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),de(b=>{let y=this.getAxisMotionValue(b).get()||0;if(we.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const k=v.layout.layoutBox[b];k&&(y=ae(k)*(parseFloat(y)/100))}}this.originPoint[b]=y}),g&&W.postRender(()=>g(d,f)),Wn(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:w}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=f;if(p&&this.currentDirection===null){this.currentDirection=ud(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),w&&w(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>de(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ga(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:pa(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!s)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&W.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Dt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=nd(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,r=this.constraints;t&&Ue(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=sd(s.layoutBox,t):this.constraints=!1,this.elastic=ad(n),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&de(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=od(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ue(t))return!1;const s=t.current;ge(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=uf(s,r.root,this.visualElement.getTransformPagePoint());let i=rd(r.layout.layoutBox,o);if(n){const a=n(af(i));this.hasMutatedConstraints=!!a,a&&(i=ta(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=de(u=>{if(!Dt(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=r?200:1e6,h=r?40:1e7,p={type:"inertia",velocity:s?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Wn(this.visualElement,t),s.start(Vs(t,s,0,n,this.visualElement,!1))}stopAnimation(){de(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){de(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){de(n=>{const{drag:s}=this.getProps();if(!Dt(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n];o.set(t[n]-Y(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ue(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};de(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();r[i]=id({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),de(i=>{if(!Dt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Y(l,c,r[i]))})}addListeners(){if(!this.visualElement.current)return;ld.set(this.visualElement,this);const t=this.visualElement.current,n=ut(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ue(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),W.read(s);const i=xt(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(de(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Un,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Dt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ud(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class fd extends Ve{constructor(t){super(t),this.removeGroupControls=ce,this.removeListeners=ce,this.controls=new cd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const Lr=e=>(t,n)=>{e&&W.postRender(()=>e(t,n))};class dd extends Ve{constructor(){super(...arguments),this.removePointerDownListener=ce}onPointerDown(t){this.session=new ga(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pa(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:Lr(t),onStart:Lr(n),onMove:s,onEnd:(o,i)=>{delete this.session,r&&W.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=ut(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const zt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Dr(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const rt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const n=Dr(e,t.target.x),s=Dr(e,t.target.y);return`${n}% ${s}%`}},hd={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=Ae.parse(e);if(r.length>5)return s;const o=Ae.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=l;const c=Y(a,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=c),typeof r[3+i]=="number"&&(r[3+i]/=c),o(r)}};let jr=!1;class md extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;ju(pd),o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),jr&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,{projection:i}=s;return i&&(i.isPresent=o,jr=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||W.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),vs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xa(e){const[t,n]=Wo(),s=m.useContext(qn);return x.jsx(md,{...e,layoutGroup:s,switchLayoutGroup:m.useContext(Qo),isPresent:t,safeToRemove:n})}const pd={borderRadius:{...rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomLeftRadius:rt,borderBottomRightRadius:rt,boxShadow:hd};function gd(e,t,n){const s=ie(e)?e:ue(e);return s.start(Vs("",s,t,n)),s.animation}const yd=(e,t)=>e.depth-t.depth;class xd{constructor(){this.children=[],this.isDirty=!1}add(t){Jn(this.children,t),this.isDirty=!0}remove(t){Qn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yd),this.isDirty=!1,this.children.forEach(t)}}function vd(e,t){const n=le.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(ye(s),e(o-t))};return W.setup(s,!0),()=>ye(s)}const va=["TopLeft","TopRight","BottomLeft","BottomRight"],bd=va.length,Ir=e=>typeof e=="string"?parseFloat(e):e,Nr=e=>typeof e=="number"||j.test(e);function wd(e,t,n,s,r,o){r?(e.opacity=Y(0,n.opacity??1,Sd(s)),e.opacityExit=Y(t.opacity??1,0,Td(s))):o&&(e.opacity=Y(t.opacity??1,n.opacity??1,s));for(let i=0;i<bd;i++){const a=`border${va[i]}Radius`;let l=Br(t,a),c=Br(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Nr(l)===Nr(c)?(e[a]=Math.max(Y(Ir(l),Ir(c),s),0),(we.test(c)||we.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Y(t.rotate||0,n.rotate||0,s))}function Br(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Sd=ba(0,.5,so),Td=ba(.5,.95,ce);function ba(e,t,n){return s=>s<e?0:s>t?1:n(_e(e,t,s))}function Fr(e,t){e.min=t.min,e.max=t.max}function fe(e,t){Fr(e.x,t.x),Fr(e.y,t.y)}function Or(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zr(e,t,n,s,r){return e-=t,e=Ht(e,1/n,s),r!==void 0&&(e=Ht(e,1/r,s)),e}function Pd(e,t=0,n=1,s=.5,r,o=e,i=e){if(we.test(t)&&(t=parseFloat(t),t=Y(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Y(o.min,o.max,s);e===o&&(a-=t),e.min=zr(e.min,t,n,a,r),e.max=zr(e.max,t,n,a,r)}function Wr(e,t,[n,s,r],o,i){Pd(e,t[n],t[s],t[r],t.scale,o,i)}const kd=["x","scaleX","originX"],Ed=["y","scaleY","originY"];function $r(e,t,n,s){Wr(e.x,t,kd,n?n.x:void 0,s?s.x:void 0),Wr(e.y,t,Ed,n?n.y:void 0,s?s.y:void 0)}function Ur(e){return e.translate===0&&e.scale===1}function wa(e){return Ur(e.x)&&Ur(e.y)}function Gr(e,t){return e.min===t.min&&e.max===t.max}function Cd(e,t){return Gr(e.x,t.x)&&Gr(e.y,t.y)}function Hr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Sa(e,t){return Hr(e.x,t.x)&&Hr(e.y,t.y)}function Kr(e){return ae(e.x)/ae(e.y)}function _r(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Md{constructor(){this.members=[]}add(t){Jn(this.members,t),t.scheduleRender()}remove(t){if(Qn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let s;for(let r=n;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ad(e,t,n){let s="";const r=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||o||i)&&(s=`translate3d(${r}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),f&&(s+=`rotateY(${f}deg) `),h&&(s+=`skewX(${h}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const mn=["","X","Y","Z"],Vd=1e3;let Rd=0;function pn(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Ta(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ca(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Ta(s)}function Pa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Rd++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(jd),this.nodes.forEach(Fd),this.nodes.forEach(Od),this.nodes.forEach(Id)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new xd)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new ts),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=ws(i)&&!bu(i),this.instance=i;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;W.read(()=>{d=window.innerWidth}),e(i,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=vd(f,250),zt.hasAnimatedSinceResize&&(zt.hasAnimatedSinceResize=!1,this.nodes.forEach(qr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Gd,{onLayoutAnimationStart:g,onLayoutAnimationComplete:w}=c.getProps(),b=!this.targetLayout||!Sa(this.targetLayout,h),y=!d&&f;if(this.options.layoutRoot||this.resumeFrom||y||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...gs(p,"layout"),onPlay:g,onComplete:w};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,y)}else d||qr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ye(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zd),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ta(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Xr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Bd),this.nodes.forEach(Ld),this.nodes.forEach(Dd)):this.nodes.forEach(Yr),this.clearAllSnapshots();const a=le.now();se.delta=Se(0,1e3/60,a-se.timestamp),se.timestamp=a,se.isProcessing=!0,sn.update.process(se),sn.preRender.process(se),sn.render.process(se),se.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Nd),this.sharedNodes.forEach(Wd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ae(this.snapshot.measuredBox.x)&&!ae(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=q(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!wa(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&this.instance&&(a||De(this.latestValues)||u)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),Hd(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:i}=this.options;if(!i)return q();const a=i.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Kd))){const{scroll:u}=this.root;u&&(Ge(a.x,u.offset.x),Ge(a.y,u.offset.y))}return a}removeElementScroll(i){var l;const a=q();if(fe(a,i),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&fe(a,i),Ge(a.x,d.offset.x),Ge(a.y,d.offset.y))}return a}applyTransform(i,a=!1){const l=q();fe(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&He(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),De(u.latestValues)&&He(l,u.latestValues)}return De(this.latestValues)&&He(l,this.latestValues),l}removeTransform(i){const a=q();fe(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!De(c.latestValues))continue;Bn(c.latestValues)&&c.updateSnapshot();const u=q(),d=c.measurePageBox();fe(u,d),$r(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return De(this.latestValues)&&$r(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==se.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=se.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q(),this.relativeTargetOrigin=q(),dt(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=q(),this.targetWithTransforms=q()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Jf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fe(this.target,this.layout.layoutBox),sa(this.target,this.targetDelta)):fe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q(),this.relativeTargetOrigin=q(),dt(this.relativeTargetOrigin,this.target,h.target),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Bn(this.parent.latestValues)||na(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var p;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===se.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;fe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;cf(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=q());const{target:h}=i;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Or(this.prevProjectionDelta.x,this.projectionDelta.x),Or(this.prevProjectionDelta.y,this.projectionDelta.y)),ft(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!_r(this.projectionDelta.x,this.prevProjectionDelta.x)||!_r(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ke(),this.projectionDelta=Ke(),this.projectionDeltaWithTransform=Ke()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ke();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=q(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,w=this.getStack(),b=!w||w.members.length<=1,y=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(Ud));this.animationProgress=0;let v;this.mixTargetDelta=k=>{const P=k/1e3;Zr(d.x,i.x,P),Zr(d.y,i.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$d(this.relativeTarget,this.relativeTargetOrigin,f,P),v&&Cd(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=q()),fe(v,this.relativeTarget)),g&&(this.animationValues=u,wd(u,c,this.latestValues,P,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(ye(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{zt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ue(0)),this.currentAnimation=gd(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&ka(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||q();const d=ae(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ae(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}fe(a,l),He(a,u),ft(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Md),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&pn("z",i,c,this.animationValues);for(let u=0;u<mn.length;u++)pn(`rotate${mn[u]}`,i,c,this.animationValues),pn(`skew${mn[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Ot(a==null?void 0:a.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Ot(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!De(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Ad(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),i.transform=d;const{x:f,y:h}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?i.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in gt){if(u[p]===void 0)continue;const{correct:g,applyTo:w,isCSSVariable:b}=gt[p],y=d==="none"?u[p]:g(u[p],c);if(w){const v=w.length;for(let k=0;k<v;k++)i[w[k]]=y}else b?this.options.visualElement.renderState.vars[p]=y:i[p]=y}this.options.layoutId&&(i.pointerEvents=c===this?Ot(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Xr),this.root.sharedNodes.clear()}}}function Ld(e){e.updateLayout()}function Dd(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?de(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=ae(f);f.min=s[d].min,f.max=f.min+h}):ka(o,t.layoutBox,s)&&de(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=ae(s[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Ke();ft(a,s,t.layoutBox);const l=Ke();i?ft(l,e.applyTransform(r,!0),t.measuredBox):ft(l,s,t.layoutBox);const c=!wa(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=q();dt(p,t.layoutBox,f.layoutBox);const g=q();dt(g,s,h.layoutBox),Sa(p,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function jd(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Id(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Nd(e){e.clearSnapshot()}function Xr(e){e.clearMeasurements()}function Yr(e){e.isLayoutDirty=!1}function Bd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fd(e){e.resolveTargetDelta()}function Od(e){e.calcProjection()}function zd(e){e.resetSkewAndRotation()}function Wd(e){e.removeLeadSnapshot()}function Zr(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jr(e,t,n,s){e.min=Y(t.min,n.min,s),e.max=Y(t.max,n.max,s)}function $d(e,t,n,s){Jr(e.x,t.x,n.x,s),Jr(e.y,t.y,n.y,s)}function Ud(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Gd={duration:.45,ease:[.4,0,.1,1]},Qr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ei=Qr("applewebkit/")&&!Qr("chrome/")?Math.round:ce;function ti(e){e.min=ei(e.min),e.max=ei(e.max)}function Hd(e){ti(e.x),ti(e.y)}function ka(e,t,n){return e==="position"||e==="preserve-aspect"&&!Zf(Kr(t),Kr(n),.2)}function Kd(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const _d=Pa({attachResizeListener:(e,t)=>xt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),gn={current:void 0},Ea=Pa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!gn.current){const e=new _d({});e.mount(window),e.setOptions({layoutScroll:!0}),gn.current=e}return gn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Xd={pan:{Feature:dd},drag:{Feature:fd,ProjectionNode:Ea,MeasureLayout:xa}};function ni(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&W.postRender(()=>o(t,St(t)))}class Yd extends Ve{mount(){const{current:t}=this.node;t&&(this.unmount=ou(t,(n,s)=>(ni(this.node,s,"Start"),r=>ni(this.node,r,"End"))))}unmount(){}}class qd extends Ve{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=vt(xt(this.node.current,"focus",()=>this.onFocus()),xt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function si(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&W.postRender(()=>o(t,St(t)))}class Zd extends Ve{mount(){const{current:t}=this.node;t&&(this.unmount=uu(t,(n,s)=>(si(this.node,s,"Start"),(r,{success:o})=>si(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Gn=new WeakMap,yn=new WeakMap,Jd=e=>{const t=Gn.get(e.target);t&&t(e)},Qd=e=>{e.forEach(Jd)};function eh({root:e,...t}){const n=e||document;yn.has(n)||yn.set(n,{});const s=yn.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Qd,{root:e,...t})),s[r]}function th(e,t,n){const s=eh(t);return Gn.set(e,n),s.observe(e),()=>{Gn.delete(e),s.unobserve(e)}}const nh={some:0,all:1};class sh extends Ve{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:nh[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return th(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(rh(t,n))&&this.startObserver()}unmount(){}}function rh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ih={inView:{Feature:sh},tap:{Feature:Zd},focus:{Feature:qd},hover:{Feature:Yd}},oh={layout:{ProjectionNode:Ea,MeasureLayout:xa}},ah={...Hf,...ih,...Xd,...oh},K=of(ah,vf);function Hn(e,t,n){m.useInsertionEffect(()=>e.on(t,n),[e,t,n])}const lh=50,ri=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ch=()=>({time:0,x:ri(),y:ri()}),uh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ii(e,t,n,s){const r=n[t],{length:o,position:i}=uh[t],a=r.current,l=n.time;r.current=e[`scroll${i}`],r.scrollLength=e[`scroll${o}`]-e[`client${o}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=_e(0,r.scrollLength,r.current);const c=s-l;r.velocity=c>lh?0:ns(r.current-a,c)}function fh(e,t,n){ii(e,"x",t,n),ii(e,"y",t,n),t.time=n}function dh(e,t){const n={x:0,y:0};let s=e;for(;s&&s!==t;)if(xs(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const r=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=r.left-o.left,n.y+=r.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:r,y:o}=s.getBBox();n.x+=r,n.y+=o;let i=null,a=s.parentNode;for(;!i;)a.tagName==="svg"&&(i=a),a=s.parentNode;s=i}else break;return n}const Kn={start:0,center:.5,end:1};function oi(e,t,n=0){let s=0;if(e in Kn&&(e=Kn[e]),typeof e=="string"){const r=parseFloat(e);e.endsWith("px")?s=r:e.endsWith("%")?e=r/100:e.endsWith("vw")?s=r/100*document.documentElement.clientWidth:e.endsWith("vh")?s=r/100*document.documentElement.clientHeight:e=r}return typeof e=="number"&&(s=t*e),n+s}const hh=[0,0];function mh(e,t,n,s){let r=Array.isArray(e)?e:hh,o=0,i=0;return typeof e=="number"?r=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?r=e.split(" "):r=[e,Kn[e]?e:"0"]),o=oi(r[0],n,s),i=oi(r[1],t),o-i}const ph={All:[[0,0],[1,1]]},gh={x:0,y:0};function yh(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function xh(e,t,n){const{offset:s=ph.All}=n,{target:r=e,axis:o="y"}=n,i=o==="y"?"height":"width",a=r!==e?dh(r,e):gh,l=r===e?{width:e.scrollWidth,height:e.scrollHeight}:yh(r),c={width:e.clientWidth,height:e.clientHeight};t[o].offset.length=0;let u=!t[o].interpolate;const d=s.length;for(let f=0;f<d;f++){const h=mh(s[f],c[i],l[i],a[o]);!u&&h!==t[o].interpolatorOffsets[f]&&(u=!0),t[o].offset[f]=h}u&&(t[o].interpolate=fs(t[o].offset,vo(s),{clamp:!1}),t[o].interpolatorOffsets=[...t[o].offset]),t[o].progress=Se(0,1,t[o].interpolate(t[o].current))}function vh(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let s=t;for(;s&&s!==e;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&Yt(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function bh(e,t,n,s={}){return{measure:r=>{vh(e,s.target,n),fh(e,n,r),(s.offset||s.target)&&xh(e,n,s)},notify:()=>t(n)}}const it=new WeakMap,ai=new WeakMap,xn=new WeakMap,li=e=>e===document.scrollingElement?window:e;function Ca(e,{container:t=document.scrollingElement,...n}={}){if(!t)return ce;let s=xn.get(t);s||(s=new Set,xn.set(t,s));const r=ch(),o=bh(t,e,r,n);if(s.add(o),!it.has(t)){const a=()=>{for(const d of s)d.measure(se.timestamp);W.preUpdate(l)},l=()=>{for(const d of s)d.notify()},c=()=>W.read(a);it.set(t,c);const u=li(t);window.addEventListener("resize",c,{passive:!0}),t!==document.documentElement&&ai.set(t,vu(t,c)),u.addEventListener("scroll",c,{passive:!0}),c()}const i=it.get(t);return W.read(i,!1,!0),()=>{var c;ye(i);const a=xn.get(t);if(!a||(a.delete(o),a.size))return;const l=it.get(t);it.delete(t),l&&(li(t).removeEventListener("scroll",l),(c=ai.get(t))==null||c(),window.removeEventListener("resize",l))}}const ci=new Map;function wh(e){const t={value:0},n=Ca(s=>{t.value=s[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Ma({source:e,container:t,...n}){const{axis:s}=n;e&&(t=e);const r=ci.get(t)??new Map;ci.set(t,r);const o=n.target??"self",i=r.get(o)??{},a=s+(n.offset??[]).join(",");return i[a]||(i[a]=!n.target&&To()?new ScrollTimeline({source:t,axis:s}):wh({container:t,...n})),i[a]}function Sh(e,t){const n=Ma(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:s=>(s.pause(),zo(r=>{s.time=s.duration*r},n))})}function Th(e){return e.length===2}function Ph(e,t){return Th(e)?Ca(n=>{e(n[t.axis].progress,n)},t):zo(e,Ma(t))}function kh(e,{axis:t="y",container:n=document.scrollingElement,...s}={}){if(!n)return ce;const r={axis:t,container:n,...s};return typeof e=="function"?Ph(e,r):Sh(e,r)}const Eh=()=>({scrollX:ue(0),scrollY:ue(0),scrollXProgress:ue(0),scrollYProgress:ue(0)}),jt=e=>e?!e.current:!1;function Ch({container:e,target:t,...n}={}){const s=Ze(Eh),r=m.useRef(null),o=m.useRef(!1),i=m.useCallback(()=>(r.current=kh((a,{x:l,y:c})=>{s.scrollX.set(l.current),s.scrollXProgress.set(l.progress),s.scrollY.set(c.current),s.scrollYProgress.set(c.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var a;(a=r.current)==null||a.call(r)}),[e,t,JSON.stringify(n.offset)]);return _t(()=>{if(o.current=!1,jt(e)||jt(t)){o.current=!0;return}else return i()},[i]),m.useEffect(()=>{if(o.current)return ge(!jt(e),"Container ref is defined but not hydrated","use-scroll-ref"),ge(!jt(t),"Target ref is defined but not hydrated","use-scroll-ref"),i()},[i]),s}function Mh(e){const t=Ze(()=>ue(e)),{isStatic:n}=m.useContext(qt);if(n){const[,s]=m.useState(e);m.useEffect(()=>t.on("change",s),[])}return t}function Aa(e,t){const n=Mh(t()),s=()=>n.set(t());return s(),_t(()=>{const r=()=>W.preRender(s,!1,!0),o=e.map(i=>i.on("change",r));return()=>{o.forEach(i=>i()),ye(s)}}),n}function Ah(e){ct.current=[],e();const t=Aa(ct.current,e);return ct.current=void 0,t}function Kt(e,t,n,s){if(typeof e=="function")return Ah(e);const r=typeof t=="function"?t:wu(t,n,s);return Array.isArray(e)?ui(e,r):ui([e],([o])=>r(o))}function ui(e,t){const n=Ze(()=>[]);return Aa(e,()=>{n.length=0;const s=e.length;for(let r=0;r<s;r++)n[r]=e[r].get();return t(n)})}const Va=({variant:e="linear-determinate",minHeight:t=4,value:n=0,transitionDuration:s=1e3,className:r,...o})=>{const[i,a]=m.useState(n),[l,c]=m.useState(1.5);m.useEffect(()=>{n>100&&(n=100),n<0&&(n=0),a(n)},[n]);const[u,d]=m.useState(!0),f=()=>u?l:l*.5;m.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&i!==100){const w=setInterval(()=>{a(u?10:90),d(!u)},f()*1e3);return()=>clearInterval(w)}},[e,u,i]);const[h,p]=m.useState(!1);m.useEffect(()=>{if(i>=100){const w=setTimeout(()=>{p(!1)},s);return()=>{clearTimeout(w)}}else p(!0)},[i,s]);const g=zi({className:r,variant:e,value:n,transitionDuration:s,isVisible:h,minHeight:t});return x.jsxs(x.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&x.jsxs("div",{style:{height:`${t}px`},className:g.progressIndicator,...o,children:[x.jsx("div",{style:{height:h?`${t}px`:"0px",width:`${i}%`,transition:`width 1ms ease-in-out ${i==100?", height 200ms 0.5s ease-in-out":""}`},className:g.track}),x.jsx("div",{style:{height:h?`${t}px`:"0px",marginLeft:i!=100?"6px":"0px",transition:`width ${s}ms ease-in-out ${i==100?`, height 200ms 0.5s ease-in-out, margin-left ${s}ms ${s/1.5}ms`:""}`},className:g.activeIndicator}),x.jsx("div",{style:{height:h?`${t}px`:"0px",width:`${t}px`,transition:`width ${s}ms ease-in-out, height 200ms 0.5s ease-in-out`},className:g.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&x.jsx(K.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:f(),ease:"linear"},className:g.progressIndicator,...o,children:x.jsx(K.circle,{cx:"50%",cy:"50%",r:h?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:g.activeIndicator,variants:{hidden:{pathLength:u?10/100:90/100},visible:{pathLength:u?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:f(),bounce:0}}})},u+"")]})},nt=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[s,r]=m.useState(!0),[o,i]=m.useState(!1),[a,l]=m.useState({x:0,y:0});m.useEffect(()=>{o&&(r(!0),r(!1))},[o]),m.useEffect(()=>{const f=t==null?void 0:t.current;if(f)return f.addEventListener("mousedown",c),f.addEventListener("mouseup",d),f.addEventListener("mouseleave",u),()=>{f.removeEventListener("mousedown",c),f.removeEventListener("mouseup",d),f.removeEventListener("mouseleave",u)}},[t]);const c=f=>{const h=t==null?void 0:t.current,p=h.getBoundingClientRect();i(!0),l({x:(f.clientX-p.left)/h.clientWidth*100,y:(f.clientY-p.top)/h.clientHeight*100})},u=f=>{i(!1)},d=f=>{i(!1)};return x.jsx(Fe,{mode:"wait",children:(o||!o&&!s)&&x.jsx(K.div,{style:{position:"absolute",width:"100%",height:"100%",top:a.y+"%",left:a.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:n,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>r(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})};function Vh(e,t,n){var s={},r=s.noTrailing,o=r===void 0?!1:r,i=s.noLeading,a=i===void 0?!1:i,l=s.debounceMode,c=l===void 0?void 0:l,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function p(w){var b=w||{},y=b.upcomingOnly,v=y===void 0?!1:y;h(),d=!v}function g(){for(var w=arguments.length,b=new Array(w),y=0;y<w;y++)b[y]=arguments[y];var v=this,k=Date.now()-f;if(d)return;function P(){f=Date.now(),t.apply(v,b)}function E(){u=void 0}!a&&c&&!u&&P(),h(),c===void 0&&k>e?a?(f=Date.now(),o||(u=setTimeout(c?E:P,e))):P():o!==!0&&(u=setTimeout(c?E:P,c===void 0?e-k:e))}return g.cancel=p,g}const Ra=te("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:A("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:A("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})})),Rs=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:o=!1,throttleDuration:i=75})=>{var B,z;const a=m.useRef(null),l=m.useRef(null),[c,u]=m.useState({width:null,height:null});m.useEffect(()=>{if(!a.current)return;const I=new ResizeObserver(G=>{for(const F of G)F.target===a.current&&u({width:F.contentRect.width,height:F.contentRect.height})});return I.observe(a.current),()=>{I.disconnect()}},[a]);const d=m.useRef(null),f=m.useRef(null),h=()=>{const I=l.current;return I?{width:n??I.scrollWidth,height:n??I.scrollHeight}:null},p=()=>{const I=a.current;return I?{width:I.clientWidth,height:I.clientHeight}:null},{scrollYProgress:g,scrollXProgress:w}=Ch({container:a}),b=m.useRef(null);b.current||(b.current=Vh(i,(I,G)=>{!f.current||!d.current||s&&(t==="horizontal"&&G==="x"&&s({scrollProgress:I,scroll:I*d.current.width,scrollTotal:d.current.width,scrollVisible:f.current.width}),t==="vertical"&&G==="y"&&s({scrollProgress:I,scroll:I*d.current.height,scrollTotal:d.current.height,scrollVisible:f.current.height}))}));const y=(I,G)=>{b.current&&b.current(I,G)};m.useEffect(()=>{c.width&&y(w.get(),"x"),c.height&&y(g.get(),"y")},[c]),Hn(w,"change",I=>{y(I,"x")}),Hn(g,"change",I=>{y(I,"y")});const[v,k]=m.useState(!1);m.useLayoutEffect(()=>{v||!f.current||!d.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?d.current.height:d.current.width,scrollVisible:t=="vertical"?f.current.height:f.current.width}),k(!0))},[f,d,s]),d.current=h(),f.current=p();const[P,E]=m.useState(!1),V=Ra({isDragging:P,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:o,throttleDuration:i}),[T,R]=m.useState(0),[C,O]=m.useState(0),H=I=>{if(!o)return;const G=a.current;if(!G||T==null)return;const U=(I.pageX-G.offsetLeft-T)*1.5;G.scrollLeft=C-U},_=I=>{const G=a.current;G&&(E(!0),R(I.pageX-G.offsetLeft),O(G.scrollLeft))},Z=I=>{P&&(I.preventDefault(),H(I))},$=()=>{E(!1)},J=()=>{E(!1)},M=I=>{I.preventDefault()};m.useEffect(()=>{},[P]);const S=m.useRef(null);return m.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]),x.jsxs("div",{className:V.customScroll,ref:a,onMouseDown:_,onMouseMove:Z,onMouseUp:$,onMouseLeave:J,onDragStart:M,onScroll:I=>{P||(R(null),E(!0),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{E(!1)},1e3))},children:[x.jsx("div",{ref:l,style:t==="vertical"?{height:((B=f==null?void 0:f.current)==null?void 0:B.height)??"100%"}:{width:((z=f==null?void 0:f.current)==null?void 0:z.width)??"100%"},className:V.track,children:e}),f.current&&d.current&&x.jsxs(x.Fragment,{children:[t==="vertical"&&d.current.height>f.current.height&&x.jsx(K.div,{className:"flex-none",style:{height:d.current.height-f.current.height}}),t==="horizontal"&&d.current.width>f.current.width&&x.jsx(K.div,{className:"flex-none",style:{width:d.current.width-f.current.width}})]})]})},Rh=({children:e,transition:t=".5s",orientation:n="vertical",throttleDuration:s=25,...r})=>{const[o,i]=m.useState(null),a=ue((o==null?void 0:o.scrollProgress)??0),l=Kt(a,[0,1],[0,1-((o==null?void 0:o.scrollVisible)??0)/((o==null?void 0:o.scrollTotal)??0)]),c=Kt(l,f=>`${-f*100}%`),u=f=>{a.set(f.scrollProgress),f.scrollTotal>0&&i(f)},d=m.useRef(null);return Hn(c,"change",f=>{const h=performance.now();if(d.current!==null){const p=h-d.current;console.log(`Delta temps : ${p} ms`)}d.current=h,console.log(f)}),x.jsx(Rs,{onScroll:u,throttleDuration:s,...r,children:x.jsx(K.div,{className:A("transition-transform ease-out",{"w-fit h-full":n==="horizontal","h-fit w-full":n==="vertical"}),style:{transitionDuration:t,...n=="vertical"?{y:c}:{x:c}},children:e})})},La=({targetRef:e,children:t})=>{const[n,s]=m.useState(null),r=m.useRef(null),o=()=>{const i=e.current;if(!i)return;const a=i.getBoundingClientRect();console.log(i),s({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return m.useEffect(()=>{const i=e.current;if(i)return o(),window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),r.current=new ResizeObserver(o),r.current.observe(i),()=>{var a;window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o),(a=r.current)==null||a.disconnect()}},[e]),n?za.createPortal(x.jsx("div",{style:n,children:t}),document.body):null},Da=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,className:o,iconPosition:i="left",loading:a=!1,shape:l="rounded",onClick:c,ref:u,size:d="medium",allowShapeTransformation:f=!0,transition:h,...p})=>{const g=s?"a":"button",w=m.useRef(null),b=u||w,y=Di({allowShapeTransformation:f,size:d,shape:l,href:s,disabled:t,icon:n,iconPosition:i,label:r,loading:a,variant:e,transition:h,className:o}),v=n?x.jsx(ve,{icon:n,className:y.icon}):x.jsx(x.Fragment,{});return h={duration:.3,...h},x.jsx(g,{ref:b,href:s,className:y.button,...p,onClick:k=>{t?k.preventDefault():c&&c(k)},disabled:t,children:x.jsxs("div",{className:y.container,style:{transition:h.duration+"s"},children:[x.jsx("div",{className:y.stateLayer,children:!t&&x.jsx(nt,{colorName:e==="elevated"&&"primary"||e==="filled"&&"on-primary"||e==="filledTonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:b})}),i==="left"&&v,a&&x.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:x.jsx(Va,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:A({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="filledTonal"&&!t,"!stroke-on-surface/[38%]":e==="filledTonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),x.jsx("span",{className:y.label,children:r}),i==="right"&&v]})})},Lh=({variant:e="outlined",className:t,children:n,isInteractive:s=!1,ref:r,...o})=>{const i=ji({className:t,isInteractive:s,variant:e}),a=m.useRef(null),l=r||a;return x.jsxs("div",{...o,ref:l,className:i.card,children:[x.jsx("div",{className:i.stateLayer,children:s&&x.jsx(nt,{colorName:"on-surface",triggerRef:l})}),n]})},ja=(e,t,n=[0,1])=>{const[s,r]=t,[o,i]=n,l=(Math.max(s,Math.min(e,r))-s)/(r-s);return o+l*(i-o)},Ia=({className:e,children:t,width:n=1,index:s=0,ref:r,...o})=>{const i=m.useRef(null),a=r||i,l=Ii({className:e,index:s,width:n,children:t});return x.jsx(K.div,{ref:a,animate:{width:n+"px"},transition:{duration:.5,ease:"linear"},className:l.carouselItem,...o,children:t})},Dh=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:o=[.21,.65],outputRange:i=[42,300],gap:a=8,onChange:l,scrollSensitivity:c=1.25,...u})=>{var $,J;const d=m.useRef(null),f=s||d,h=Ni({className:t,children:n,variant:e,inputRange:o,outputRange:i,marginPourcent:r,onChange:l,gap:a,scrollSensitivity:c}),p=m.Children.toArray(n).filter(M=>m.isValidElement(M)&&M.type===Ia),g=m.useRef(null),[w,b]=m.useState([]),[y,v]=m.useState(null),k=()=>{var G;if(!g.current||!f.current||!y)return[];const{scrollVisible:M,scrollProgress:S}=y;function B(F,U){return F.map(he=>(he-U)/Math.abs(F[1]-F[0]))}let z=p.map((F,U)=>{if(!P[U].current||!g.current)return 0;let ke=U/(p.length-1);return ke>1&&(ke=1),ke<0&&(ke=0),ke});z=B(z,S);let I=((((G=f.current)==null?void 0:G.clientWidth)??M)-(i[0]+a))/(i[1]+a);return z.map((F,U)=>({value:Math.abs(F),originalIndex:U})).sort((F,U)=>F.value-U.value).forEach((F,U)=>{U===0&&V(F.originalIndex);let he=ja(I,[0,1],[0,i[1]]);he<i[0]&&(he=i[0]),I--,z[F.originalIndex]=he}),z},P=m.useRef([]).current,[E,V]=m.useState(0);m.useEffect(()=>{l&&l(E)},[E]),P.length!==p.length&&p.forEach((M,S)=>{P[S]||(P[S]=m.createRef())});const T=p.map((M,S)=>m.cloneElement(M,{width:w[S],ref:P[S],key:S,index:S})),R=ue((y==null?void 0:y.scrollProgress)??0),C=Kt(R,[0,1],[0,1-((($=f.current)==null?void 0:$.clientWidth)??0)/(((J=g==null?void 0:g.current)==null?void 0:J.clientWidth)??0)]),O=Kt(C,M=>`${-M*100}%`),H=M=>{M.scrollTotal>0&&v(M)};m.useEffect(()=>{const M=k();b(M)},[y]);const[_,Z]=m.useState(0);return m.useLayoutEffect(()=>{let M=i[1];y&&M>y.scrollVisible&&(M=y.scrollVisible);const S=(M+a)*T.length/c;Z(S)},[f,P,y]),x.jsx("div",{className:h.carousel,ref:f,...u,children:x.jsx(Rs,{draggable:!0,orientation:"horizontal",onScroll:H,scrollSize:_,children:x.jsx(K.div,{className:h.track,ref:g,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${a}px`,x:O},children:T})})})},jh=({orientation:e="horizontal",className:t,...n})=>{const s=Bi({orientation:e,className:t});return x.jsx("hr",{className:s.divider,...n})},re=[];for(let e=0;e<256;++e)re.push((e+256).toString(16).slice(1));function Ih(e,t=0){return(re[e[t+0]]+re[e[t+1]]+re[e[t+2]]+re[e[t+3]]+"-"+re[e[t+4]]+re[e[t+5]]+"-"+re[e[t+6]]+re[e[t+7]]+"-"+re[e[t+8]]+re[e[t+9]]+"-"+re[e[t+10]]+re[e[t+11]]+re[e[t+12]]+re[e[t+13]]+re[e[t+14]]+re[e[t+15]]).toLowerCase()}let vn;const Nh=new Uint8Array(16);function Bh(){if(!vn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");vn=crypto.getRandomValues.bind(crypto)}return vn(Nh)}const Fh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),fi={randomUUID:Fh};function Ls(e,t,n){var r;if(fi.randomUUID&&!e)return fi.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??Bh();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ih(s)}const Ds=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:o,position:i,targetRef:a,ref:l,trigger:c=["hover","focus"],...u})=>{if(!s&&!a)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(c)||(c=[c]),t&&!Array.isArray(t)&&(t=[t]);const d=m.useRef(null),f=a||d,[h,p]=m.useState(null),[g]=m.useState(Ls()),[w,b]=m.useState(!1),y=m.useRef(null);m.useEffect(()=>{const C=O=>{p(O.detail)};return document.addEventListener("tooltip-update",C),()=>{document.removeEventListener("tooltip-update",C)}},[]),m.useEffect(()=>{y.current&&clearTimeout(y.current),h?b(h===g):y.current=setTimeout(()=>{b(!1)},1200)},[h,g]);const v=()=>{if(c.includes("hover")){const C=new CustomEvent("tooltip-update",{detail:g});document.dispatchEvent(C)}},k=()=>{if(c.includes("hover")){const C=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(C)}},P=()=>{if(c.includes("click")){const C=new CustomEvent("tooltip-update",{detail:w?null:g});document.dispatchEvent(C)}},E=()=>{if(c.includes("focus")){const C=new CustomEvent("tooltip-update",{detail:g});document.dispatchEvent(C)}},V=()=>{if(c.includes("focus")){const C=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(C)}};m.useEffect(()=>{if(f!=null&&f.current){const C=f.current;return C.addEventListener("mouseenter",v),C.addEventListener("mouseleave",k),C.addEventListener("click",P),C.addEventListener("focus",E),C.addEventListener("blur",V),()=>{C.removeEventListener("mouseenter",v),C.removeEventListener("mouseleave",k),C.removeEventListener("click",P),C.removeEventListener("focus",E),C.removeEventListener("blur",V)}}},[f,c,g,w]);const T=!a&&m.isValidElement(s)?m.cloneElement(s,{ref:d}):s;if(!i&&typeof window<"u"&&f!=null&&f.current&&!i){const C=f.current.getBoundingClientRect(),O=window.innerWidth,H=window.innerHeight,_=C.left/O,Z=C.top/H;e==="plain"?_<1/3?i="right":_>2/3?i="left":i=Z>.5?"top":"bottom":_<1/2&&Z<1/2?i="bottom-right":_>1/2&&Z<1/2?i="bottom-left":_>1/2&&Z>1/2?i="top-left":_<1/2&&Z>1/2&&(i="top-right")}const R=_i({variant:e,buttons:t,className:n,title:r,text:o,position:i,trigger:c,targetRef:a,children:s});return x.jsxs(x.Fragment,{children:[T,x.jsx(Fe,{children:w&&x.jsx(La,{targetRef:f,children:x.jsx(K.div,{initial:{opacity:h?1:0},animate:{opacity:1},transition:{duration:h?0:.3},exit:{opacity:h?1:0},className:R.toolTip,...u,onMouseEnter:v,onMouseLeave:k,children:x.jsxs(K.div,{className:R.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&x.jsx("div",{className:R.subHead,children:r}),x.jsx("div",{className:R.supportingText,children:o}),t&&x.jsx("div",{className:R.actions,children:Array.isArray(t)&&t.map((C,O)=>x.jsx(Da,{size:"small",variant:"text",...C},O))})]})})})})]})},_n=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:o,icon:i,isExtended:a=!1,ref:l,transition:c,...u})=>{const d=r?"a":"button",f=Fi({href:r,icon:i,isExtended:a,label:t,size:s,variant:n,className:e,transition:c});c={duration:.3,...c};const h=m.useRef(null),p=l||h,g={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...c,opacity:{duration:c.duration/2,delay:c.duration-c.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...c,marginLeft:{duration:c.duration/2,delay:c.duration-c.duration/2}}}};return x.jsxs(d,{...u,ref:p,href:r,"aria-label":a?void 0:t,className:f.fab,children:[x.jsx(Ds,{trigger:a?null:void 0,text:t,targetRef:p}),x.jsx("span",{className:f.stateLayer,children:x.jsx(nt,{colorName:A({primary:n=="surface","on-primary-container":n=="primary","on-secondary-container":n=="secondary","on-tertiary-container":n=="tertiary"}),triggerRef:p})}),x.jsx(ve,{icon:i,className:f.icon}),x.jsx(Fe,{children:a&&x.jsx(K.span,{variants:g,initial:"hidden",animate:"visible",exit:"hidden",className:f.label,children:t})})]})},js=({variant:e="standard",href:t,disabled:n=!1,type:s="button",title:r,arialLabel:o,onToggle:i,activated:a=!1,onClick:l,icon:c,size:u="medium",iconSelected:d,className:f,ref:h,width:p="default",shape:g="rounded",allowShapeTransformation:w=!0,transition:b,...y})=>{r||(r=o);const[v,k]=m.useState(a);let P;i?i&&(P=C=>{n&&C.preventDefault(),k(!v),i(!!v)},c=v&&d||c):P=C=>{n&&C.preventDefault(),l&&l(C)},m.useEffect(()=>{k(a)},[a]);const E=t?"a":"button",V=Oi({transition:b,shape:g,allowShapeTransformation:w,width:p,href:t,activated:a,arialLabel:o,iconSelected:d,isActive:v,onToggle:i,disabled:n,icon:c,variant:e,className:f,size:u,...y}),T=m.useRef(null),R=h||T;return b={duration:.3,...b},x.jsxs(E,{disabled:n,href:t,className:V.iconButton,"aria-label":o,...y,title:void 0,onClick:P,ref:R,children:[x.jsx(Ds,{targetRef:R,trigger:n?null:void 0,text:r}),x.jsxs("div",{style:{transition:b.duration+"s"},className:V.container,children:[x.jsx("div",{className:V.stateLayer,children:!n&&x.jsx(nt,{colorName:A(e==="standard"&&{"on-surface-variant":!v,primary:v},e==="filled"&&{primary:!v&&!!i,"inverse-on-surface":v||!i},e==="tonal"&&{"on-surface-variant":!v&&!!i,"on-secondary-container":v||!i},e==="outlined"&&{"on-surface-variant":!v,"on-primary":v}),triggerRef:R})}),c&&x.jsx(ve,{icon:c,className:V.icon})]})]})},Oh=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:o=0,max:i=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:l,onChange:c,...u})=>{const d=M=>{const S=h(),B=f();return M===1/0?100:M===-1/0?0:(M-S)/(B-S)*100},f=(M=!1)=>M?i:i==1/0?a[(a==null?void 0:a.length)-1].value:i,h=(M=!1)=>M?o:o==-1/0?a[0].value:o,p=M=>{const S=h(!1);return(f(!1)-S)*M/100+S},[g,w]=m.useState(!1),b=m.useRef(null),y=l||b,[v,k]=m.useState(r),[P,E]=m.useState(d(r)),[V,T]=m.useState(!1),R=M=>{T(!0),w(!0),H(M)},C=()=>{T(!1),w(!1)};m.useEffect(()=>(V?(window.addEventListener("mouseup",C),window.addEventListener("mousemove",H),window.addEventListener("touchend",C),window.addEventListener("touchmove",H)):(window.removeEventListener("mouseup",C),window.removeEventListener("mousemove",H),window.removeEventListener("touchend",C),window.removeEventListener("touchmove",H)),()=>{window.removeEventListener("mouseup",C),window.removeEventListener("mousemove",H),window.removeEventListener("touchend",C),window.removeEventListener("touchmove",H)}),[V]);const O=Wi({className:e,isChanging:g,marks:a,max:i,min:o,name:s,step:n,value:v,valueFormatter:t,onChange:c}),H=M=>{const S=y==null?void 0:y.current;if(S){const B=S.getBoundingClientRect().left;let I=((M.type==="touchmove"||M.type==="touchstart"?M.touches[0].clientX:M.clientX)-B)/S.offsetWidth*100;_({pourcent:I})}},_=({pourcent:M,value:S})=>{if(M){if(M>=100){k(f(!0)),E(100);return}if(M<=0){k(h(!0)),E(0);return}S=p(M),S==h()&&(S=h(!0)),S==f()&&(S=f(!0))}else if(S!=null){if(S>=f()){k(f(!0)),E(100);return}if(S<=h()){k(h(!0)),E(0);return}M=d(S)}else return;n!=null?S=Math.round((S-h())/n)*n+h():a&&(S=a.reduce((B,z,I)=>{let G=z.value===1/0?f():z.value===-1/0?h():z.value,F=B.value===1/0?f():B.value===-1/0?h():B.value;return G=Math.abs(G-S),F=Math.abs(F-S),G<F?z:B}).value),S>=f()&&(S=f(!0)),S<=h()&&(S=h(!0)),M=d(S),k(S),E(M),c&&c(S)},[Z,$]=m.useState(0);m.useEffect(()=>{const M=()=>{y.current&&$(y.current.offsetWidth)};return M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M)}},[]);const J=M=>{switch(M.key){case"ArrowRight":if(n)_({value:v+n});else if(a){const S=a.find(B=>B.value>v);S&&_({value:S.value})}break;case"ArrowLeft":if(n)_({value:v-n});else if(a){const S=a.slice(0).reverse().find((B,z,I)=>v===1/0?z===1:B.value<v);S&&_({value:S.value})}break;default:return}};return x.jsxs("div",{tabIndex:0,onKeyDown:J,role:"slider","aria-valuemin":h(!0),"aria-valuemax":f(!0),"aria-valuenow":v,"aria-valuetext":v.toString(),className:O.slider,onMouseDown:R,onClick:H,ref:y,onTouchStart:R,onDragStart:M=>M.preventDefault(),...u,children:[x.jsx("input",{type:"hidden",name:s,value:v}),x.jsx("div",{className:O.activeTrack,style:{flex:P/100}}),x.jsx("div",{className:O.handle,children:x.jsx(Fe,{children:g&&x.jsx(K.div,{className:O.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(v):v})})}),x.jsx("div",{className:O.inactiveTrack,style:{flex:1-P/100}}),x.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((M,S)=>{let B=null;const z=(g?9:10)/Z*100,I=d(M.value);return I<=P-z?B=!0:I>=P+z&&(B=!1),x.jsx("div",{className:A(O.dot,{"bg-primary-container":B!=null&&B,"bg-primary":B!=null&&!B}),style:{left:`${d(M.value)}%`}},S)})})]})};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),Pe=require("tailwind-merge"),c=require("react"),k=require("motion/react"),De=require("react-dom"),$e=require("react-textarea-autosize");function se(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=se(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function le(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=se(e))&&(n&&(n+=" "),n+=t);return n}const oe=Pe.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),d=(...e)=>oe(le(e)),ae=(...e)=>oe(le(e));function We(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const ce=e=>{let t={};e.classNameList.forEach(n=>{var s;if(n)if(typeof n=="string")(t[s=e.default]??(t[s]=[])).push(n);else{const u=n(e.states);Object.entries(u).map(l=>{const[i,m]=l;(t[i]??(t[i]=[])).push(m)})}});const r=t;return Object.entries(t).map(n=>{let[s,u]=n;u=u.reverse(),s==e.default&&u.unshift("relative"),u.unshift(We(s)),r[s]=ae(...u)}),r},O=(e,t)=>r=>ce({classNameList:[r.className,t],default:e,states:r}),ie=O("button",({variant:e,disabled:t,iconPosition:r,icon:n,loading:s,shape:u,size:l,allowShapeTransformation:i})=>({button:d("group flex items-center cursor-pointer",l==="xSmall"&&"py-2",l==="small"&&"py-1",e==="text"&&[l==="xSmall"&&"-my-2",l==="small"&&"-my-1"]),container:d(" relative outline-none overflow-hidden inline-block flex justify-center items-center ",l==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",l==="small"&&"text-label-large px-4 py-2.5 gap-2",l==="medium"&&"text-title-medium px-6 py-4 gap-2",l==="large"&&"text-headline-small px-12 py-8 gap-3",l==="xLarge"&&"text-headline-large px-16 py-12 gap-4",u==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},u==="squared"&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},i&&!t&&{"group-active:rounded-[12px]":l==="xSmall"||l=="small","group-active:rounded-[16px]":l==="medium","group-active:rounded-[28px]":l==="large"||l=="xLarge"},e==="elevated"&&{"bg-surface-container-low shadow-1 hover:shadow-2":!t},e==="filled"&&{"bg-primary hover:shadow-1":!t},e==="filledTonal"&&{"bg-secondary-container hover:shadow-1":!t},e==="outlined"&&[" border",{"border-on-surface/[0.12]":t," border-outline focus:border-primary":!t}],e==="text"&&["w-fit",{"text-primary":!t,"text-on-surface/[0.38]":t},l==="xSmall"&&"-mx-3 ",l==="small"&&"-mx-4 ",l==="medium"&&"-mx-6 ",l==="large"&&"-mx-12",l==="xLarge"&&"-mx-16 "],t&&"cursor-default"),stateLayer:d("state-layer min-h-full min-w-full absolute top-0 left-0 ",e==="elevated"&&{"bg-on-surface/[0.12]":t,"group-state-primary":!t},e==="filled"&&{"bg-on-surface/[0.12]":t,"group-state-on-primary":!t},e==="filledTonal"&&{"bg-on-surface/[0.12]":t,"group-state-on-secondary-container ":!t},e==="outlined"&&{"group-state-primary group-state-primary":!t},e==="text"&&{"group-state-primary":!t}),label:d({invisible:s},e==="elevated"&&{"text-primary":!t,"text-on-surface/[38%]":t},e==="filled"&&{"text-on-primary":!t,"text-on-surface/[38%]":t},e==="filledTonal"&&{"text-on-secondary-container":!t,"text-on-surface/[0.38]":t},e==="outlined"&&{"text-primary":!t,"text-on-surface/[0.38]":t},e==="text"&&{"text-primary":!t,"text-on-surface/[0.38]":t}),icon:d({invisible:s},l==="xSmall"&&"size-5",l==="small"&&"size-5",l==="medium"&&"size-6",l==="large"&&"size-8",l==="xLarge"&&"size-10",e==="elevated"&&{"text-primary":!t,"text-on-surface/[38%]":t},e==="filled"&&{"text-on-primary":!t,"text-on-surface/[38%]":t},e==="filledTonal"&&{"text-on-secondary-container":!t,"text-on-surface/[0.38]":t},e==="outlined"&&{"text-primary":!t,"text-on-surface/[0.38]":t},e==="text"&&{"text-primary":!t,"text-on-surface/[0.38]":t})})),ue=O("card",({variant:e,isInteractive:t})=>({card:d("card group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",e!=="filled"&&"border border-outline-variant"),stateLayer:d(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),fe=O("carouselItem",({})=>({carouselItem:d("rounded-[28px] overflow-hidden flex-none")})),de=O("carousel",({})=>({carousel:d(["w-full h-[400px]"]),track:d("grid grid-flow-col h-full transition-transform ease-out w-fit")})),me=O("divider",({orientation:e})=>({divider:d("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),pe=O("fab",({size:e,variant:t,isExtended:r})=>({fab:d("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!r,"rounded-[16px]":e=="medium"||r,"rounded-[28px]":e=="large"&&!r},{"p-2":e=="small"&&!r,"p-4":e=="medium"||r,"p-[30px]":e=="large"&&!r},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:d({"h-6 w-6":e=="small"||e=="medium"||r,"h-9 w-9":e=="large"&&!r},t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),label:d("text-label-large text-nowrap",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container")})),he=O("iconButton",({variant:e,disabled:t,onToggle:r,isActive:n,size:s,width:u,shape:l,allowShapeTransformation:i})=>({iconButton:d("group min-h-12 flex items-center cursor-pointer",{"cursor-default":t}),container:d("rounded-full relative flex overflow-hidden transition-all duration-300",(l==="rounded"||l==="squared"&&r&&!t&&n&&i)&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||l==="rounded"&&r&&!t&&n&&i)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},i&&!t&&{"group-active:rounded-[12px]":s==="xSmall"||s=="small","group-active:rounded-[16px]":s==="medium","group-active:rounded-[28px]":s==="large"||s=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!n&&!!r,"bg-primary":n||!r},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!n&&!!r,"bg-secondary-container":n||!r},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!n,"border border-transparent bg-inverse-surface":n},!!t&&{"border border-on-surface/[0.12]":!n,"border border-transparent bg-on-surface/[0.12]":n}]),stateLayer:d("absolute top-0 left-0 h-full w-full ",!t&&[e==="standard"&&{"state-on-surface-variant":!n,"state-primary":n},e==="filled"&&{"state-primary":!n&&!!r,"state-inverse-on-surface":n||!r},e==="tonal"&&{"state-on-surface-variant":!n&&!!r,"state-on-secondary-container":n||!r},e==="outlined"&&{"state-on-surface-variant":!n,"state-on-primary":n}]),icon:d(" transition-all duration-300",{"size-5 p-1.5":s==="xSmall"},{"size-6 p-2":s==="small"},{"size-6 p-4":s==="medium"},{"size-8 p-8":s==="large"},{"size-10 p-12":s==="xLarge"},u=="narrow"&&[{"px-1":s==="xSmall"},{"px-1":s==="small"},{"px-3":s==="medium"},{"px-4":s==="large"},{"px-8":s==="xLarge"}],u=="wide"&&[{"px-2.5":s==="xSmall"},{"px-3.5":s==="small"},{"px-6":s==="medium"},{"px-12":s==="large"},{"px-[72px]":s==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!n,"text-primary":n},e==="filled"&&{"text-primary":!n&&!!r,"text-on-primary":n||!r},e==="tonal"&&{"text-on-surface-variant":!n&&!!r,"text-on-secondary-container":n||!r},e==="outlined"&&{"text-on-surface-variant":!n,"text-inverse-on-surface":n}],!!t&&"text-on-surface/[0.38]")})),xe=O("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:d((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full"),track:"h-full rounded-full bg-primary rounded-l-full",activeIndicator:d((e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:"absolute right-0 bg-primary rounded-full"})),ye=O("slider",({isChanging:e})=>({slider:d(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:d(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:d(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:d(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:d(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:d(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ge=O("snackbar",({})=>({snackbar:d(" rounded bg-inverse-surface "),container:d("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:d("text-body-medium text-inverse-on-surface "),icon:d(" ml-auto mr-0 text-inverse-on-surface block dark")})),we=O("switch",({isSelected:e,disabled:t,inactiveIcon:r})=>({switch:d("group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:d("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:d("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!r},{"w-[24px] h-[24px]":!(!e&&!r)},!t&&["cursor-pointer group-active:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:d("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:d("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),ve=O("tab",({isSelected:e,icon:t,label:r,variant:n})=>({tab:d("bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&r)&&n==="primary"&&"h-16",!(t&&r&&n==="primary")&&"h-12"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",n==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},n==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:d("flex gap-0.5 h-full justify-center",{relative:n=="primary"},{"":!!(r&&!t)},n==="primary"&&"flex-col items-center",n==="secondary"&&{"flex-col items-center":!(r&&t),"flex-row items-center gap-2":!!(r&&t)}),icon:d("h-6 w-6 p-0.5 !box-border",n==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},n==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:d("text-title-small text-nowrap",n==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},n==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:d("bg-primary absolute w-full left-0 bottom-0",n==="primary"&&"h-[3px] rounded-t",n==="secondary"&&"h-0.5")})),be=O("tabs",({scrollable:e})=>({tabs:d("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),je=O("textField",({disabled:e,leadingIcon:t,trailingIcon:r,variant:n,errorText:s,isFocused:u,value:l,suffix:i,textLine:m})=>({textField:d({"opacity-[.38]":e}),content:d("group transition-border duration-200 relative flex items-center ",{"h-14":m=="singleLine"},{"border-on-surface-variant":!(s!=null&&s.length)&&!u&&n=="filled","border-outline":!(s!=null&&s.length)&&!u&&n=="outlined","border-primary":!(s!=null&&s.length)&&u,"border-error":!!(s!=null&&s.length)},{"bg-on-surface/[0.04]":e},n=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],n=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:d("absolute -z-10 w-full h-full top-0 left-0",{hidden:n=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:d("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(s!=null&&s.length)},{"text-on-surface":e},{"text-error":!!(s!=null&&s.length)},{"text-primary":!(s!=null&&s.length)&&u}),input:d("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!i},n=="filled"&&" pb-2 pt-6",n=="outlined"&&"py-4 relative z-10"),activeIndicator:d("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",n=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(s!=null&&s.length)},{"bg-error":!!(s!=null&&s.length)},{"!w-full":u}]),supportingText:d(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(s!=null&&s.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(s!=null&&s.length)}),leadingIcon:d(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!c.isValidElement(t)}]),trailingIcon:d("h-12 w-12 flex items-center justify-center",{"cursor-text":!c.isValidElement(r)}),suffix:d("text-on-surface-variant pl-0 pr-4",n=="filled"&&" pb-2 pt-6",n=="outlined"&&"py-4 relative z-10")})),Ne=O("toolTip",({position:e,variant:t})=>({toolTip:d(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:d("pb-2",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"),actions:d("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:d("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:d("")})),H=({icon:e,colors:t=[],className:r})=>{const{icon:n}=e,[s,u,,,l]=n||[],i=m=>{switch(m.length){case 2:return{"--fa-primary-color":m[0]||"inherit","--fa-secondary-color":m[1]||"inherit"};case 1:return{color:m[0]};default:return{}}};return o.jsx("svg",{className:d("size-5 box-content",r),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${s} ${u}`,role:"img","aria-hidden":"true",children:typeof l=="string"?o.jsx("path",{className:"fill-current",d:l}):l.map((m,f)=>o.jsx("path",{d:m},f))})},Se=({variant:e="linear-determinate",minHeight:t=4,value:r=0,transitionDuration:n=1e3,className:s,...u})=>{const[l,i]=c.useState(r),[m,f]=c.useState(1.5);c.useEffect(()=>{r>100&&(r=100),r<0&&(r=0),i(r)},[r]);const[h,v]=c.useState(!0),a=()=>h?m:m*.5;c.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&l!==100){const S=setInterval(()=>{i(h?10:90),v(!h)},a()*1e3);return()=>clearInterval(S)}},[e,h,l]);const[y,b]=c.useState(!1);c.useEffect(()=>{if(l>=100){const S=setTimeout(()=>{b(!1)},n);return()=>{clearTimeout(S)}}else b(!0)},[l,n]);const j=xe({className:s,variant:e,value:r,transitionDuration:n,isVisible:y,minHeight:t});return o.jsxs(o.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&o.jsxs("div",{style:{height:`${t}px`},className:j.progressIndicator,...u,children:[o.jsx("div",{style:{height:y?`${t}px`:"0px",width:`${l}%`,transition:`width 1ms ease-in-out ${l==100?", height 200ms 0.5s ease-in-out":""}`},className:j.track}),o.jsx("div",{style:{height:y?`${t}px`:"0px",marginLeft:l!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${l==100?`, height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:j.activeIndicator}),o.jsx("div",{style:{height:y?`${t}px`:"0px",width:`${t}px`,transition:`width ${n}ms ease-in-out, height 200ms 0.5s ease-in-out`},className:j.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&o.jsx(k.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:a(),ease:"linear"},className:j.progressIndicator,...u,children:o.jsx(k.motion.circle,{cx:"50%",cy:"50%",r:y?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:j.activeIndicator,variants:{hidden:{pathLength:h?10/100:90/100},visible:{pathLength:h?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:a(),bounce:0}}})},h+"")]})},Z=({colorName:e="on-surface",triggerRef:t})=>{const r={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[n,s]=c.useState(!0),[u,l]=c.useState(!1),[i,m]=c.useState({x:0,y:0});c.useEffect(()=>{u&&(s(!0),s(!1))},[u]),c.useEffect(()=>{const a=t==null?void 0:t.current;if(a)return a.addEventListener("mousedown",f),a.addEventListener("mouseup",v),a.addEventListener("mouseleave",h),()=>{a.removeEventListener("mousedown",f),a.removeEventListener("mouseup",v),a.removeEventListener("mouseleave",h)}},[t]);const f=a=>{const y=t==null?void 0:t.current,b=y.getBoundingClientRect();l(!0),m({x:(a.clientX-b.left)/y.clientWidth*100,y:(a.clientY-b.top)/y.clientHeight*100})},h=a=>{l(!1)},v=a=>{l(!1)};return o.jsx(k.AnimatePresence,{mode:"wait",children:(u||!u&&!n)&&o.jsx(k.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:i.y+"%",left:i.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:r,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>s(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})};function Fe(e,t,r){var n={},s=n.noTrailing,u=s===void 0?!1:s,l=n.noLeading,i=l===void 0?!1:l,m=n.debounceMode,f=m===void 0?void 0:m,h,v=!1,a=0;function y(){h&&clearTimeout(h)}function b(S){var E=S||{},p=E.upcomingOnly,N=p===void 0?!1:p;y(),v=!N}function j(){for(var S=arguments.length,E=new Array(S),p=0;p<S;p++)E[p]=arguments[p];var N=this,R=Date.now()-a;if(v)return;function L(){a=Date.now(),t.apply(N,E)}function C(){h=void 0}!i&&f&&!h&&L(),y(),f===void 0&&R>e?i?(a=Date.now(),u||(h=setTimeout(f?C:L,e))):L():u!==!0&&(h=setTimeout(f?C:L,f===void 0?e-R:e))}return j.cancel=b,j}const Ee=O("customScroll",({orientation:e,draggable:t,isDragging:r})=>({customScroll:d("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":r,"[&::-webkit-scrollbar-thumb]:bg-transparent":!r},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!r,"cursor-grabbing":t&&r}),track:d("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})})),T=({children:e,orientation:t="vertical",scrollSize:r,onScroll:n,className:s,draggable:u=!1,throttleDuration:l=75})=>{var V,$;const i=c.useRef(null),m=c.useRef(null),[f,h]=c.useState({width:null,height:null});c.useEffect(()=>{if(!i.current)return;const I=new ResizeObserver(W=>{for(const F of W)F.target===i.current&&h({width:F.contentRect.width,height:F.contentRect.height})});return I.observe(i.current),()=>{I.disconnect()}},[i]);const v=c.useRef(null),a=c.useRef(null),y=()=>{const I=m.current;return I?{width:r??I.scrollWidth,height:r??I.scrollHeight}:null},b=()=>{const I=i.current;return I?{width:I.clientWidth,height:I.clientHeight}:null},{scrollYProgress:j,scrollXProgress:S}=k.useScroll({container:i}),E=c.useRef(null);E.current||(E.current=Fe(l,(I,W)=>{!a.current||!v.current||n&&(t==="horizontal"&&W==="x"&&n({scrollProgress:I,scroll:I*v.current.width,scrollTotal:v.current.width,scrollVisible:a.current.width}),t==="vertical"&&W==="y"&&n({scrollProgress:I,scroll:I*v.current.height,scrollTotal:v.current.height,scrollVisible:a.current.height}))}));const p=(I,W)=>{E.current&&E.current(I,W)};c.useEffect(()=>{f.width&&p(S.get(),"x"),f.height&&p(j.get(),"y")},[f]),k.useMotionValueEvent(S,"change",I=>{p(I,"x")}),k.useMotionValueEvent(j,"change",I=>{p(I,"y")});const[N,R]=c.useState(!1);c.useLayoutEffect(()=>{N||!a.current||!v.current||!n||(n({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?v.current.height:v.current.width,scrollVisible:t=="vertical"?a.current.height:a.current.width}),R(!0))},[a,v,n]),v.current=y(),a.current=b();const[L,C]=c.useState(!1),B=Ee({isDragging:L,children:e,className:s,onScroll:n,orientation:t,scrollSize:r,draggable:u,throttleDuration:l}),[P,M]=c.useState(0),[x,D]=c.useState(0),A=I=>{if(!u)return;const W=i.current;if(!W||P==null)return;const K=(I.pageX-W.offsetLeft-P)*1.5;W.scrollLeft=x-K},X=I=>{const W=i.current;W&&(C(!0),M(I.pageX-W.offsetLeft),D(W.scrollLeft))},G=I=>{L&&(I.preventDefault(),A(I))},U=()=>{C(!1)},_=()=>{C(!1)},w=I=>{I.preventDefault()};c.useEffect(()=>{},[L]);const g=c.useRef(null);return c.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),o.jsxs("div",{className:B.customScroll,ref:i,onMouseDown:X,onMouseMove:G,onMouseUp:U,onMouseLeave:_,onDragStart:w,onScroll:I=>{L||(M(null),C(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{C(!1)},1e3))},children:[o.jsx("div",{ref:m,style:t==="vertical"?{height:((V=a==null?void 0:a.current)==null?void 0:V.height)??"100%"}:{width:(($=a==null?void 0:a.current)==null?void 0:$.width)??"100%"},className:B.track,children:e}),a.current&&v.current&&o.jsxs(o.Fragment,{children:[t==="vertical"&&v.current.height>a.current.height&&o.jsx(k.motion.div,{className:"flex-none",style:{height:v.current.height-a.current.height}}),t==="horizontal"&&v.current.width>a.current.width&&o.jsx(k.motion.div,{className:"flex-none",style:{width:v.current.width-a.current.width}})]})]})},Ue=({children:e,transition:t=".5s",orientation:r="vertical",throttleDuration:n=25,...s})=>{const[u,l]=c.useState(null),i=k.motionValue((u==null?void 0:u.scrollProgress)??0),m=k.useTransform(i,[0,1],[0,1-((u==null?void 0:u.scrollVisible)??0)/((u==null?void 0:u.scrollTotal)??0)]),f=k.useTransform(m,a=>`${-a*100}%`),h=a=>{i.set(a.scrollProgress),a.scrollTotal>0&&l(a)},v=c.useRef(null);return k.useMotionValueEvent(f,"change",a=>{const y=performance.now();if(v.current!==null){const b=y-v.current;console.log(`Delta temps : ${b} ms`)}v.current=y,console.log(a)}),o.jsx(T,{onScroll:h,throttleDuration:n,...s,children:o.jsx(k.motion.div,{className:d("transition-transform ease-out",{"w-fit h-full":r==="horizontal","h-fit w-full":r==="vertical"}),style:{transitionDuration:t,...r=="vertical"?{y:f}:{x:f}},children:e})})},Le=({targetRef:e,children:t})=>{const[r,n]=c.useState(null),s=c.useRef(null),u=()=>{const l=e.current;if(!l)return;const i=l.getBoundingClientRect();console.log(l),n({position:"fixed",top:i.top,left:i.left,width:i.width,height:i.height,pointerEvents:"none",zIndex:999})};return c.useEffect(()=>{const l=e.current;if(l)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),s.current=new ResizeObserver(u),s.current.observe(l),()=>{var i;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(i=s.current)==null||i.disconnect()}},[e]),r?De.createPortal(o.jsx("div",{style:r,children:t}),document.body):null},Re=({variant:e="filled",disabled:t=!1,icon:r,href:n,label:s,className:u,iconPosition:l="left",loading:i=!1,shape:m="rounded",onClick:f,ref:h,size:v="medium",allowShapeTransformation:a=!0,transition:y,...b})=>{const j=n?"a":"button",S=c.useRef(null),E=h||S,p=ie({allowShapeTransformation:a,size:v,shape:m,href:n,disabled:t,icon:r,iconPosition:l,label:s,loading:i,variant:e,transition:y,className:u}),N=r?o.jsx(H,{icon:r,className:p.icon}):o.jsx(o.Fragment,{});return y={duration:.3,...y},o.jsx(j,{ref:E,href:n,className:p.button,...b,onClick:R=>{t?R.preventDefault():f&&f(R)},disabled:t,children:o.jsxs("div",{className:p.container,style:{transition:y.duration+"s"},children:[o.jsx("div",{className:p.stateLayer,children:!t&&o.jsx(Z,{colorName:e==="elevated"&&"primary"||e==="filled"&&"on-primary"||e==="filledTonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:E})}),l==="left"&&N,i&&o.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:o.jsx(Se,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:d({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="filledTonal"&&!t,"!stroke-on-surface/[38%]":e==="filledTonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),o.jsx("span",{className:p.label,children:s}),l==="right"&&N]})})},Oe=({variant:e="outlined",className:t,children:r,isInteractive:n=!1,ref:s,...u})=>{const l=ue({className:t,isInteractive:n,variant:e}),i=c.useRef(null),m=s||i;return o.jsxs("div",{...u,ref:m,className:l.card,children:[o.jsx("div",{className:l.stateLayer,children:n&&o.jsx(Z,{colorName:"on-surface",triggerRef:m})}),r]})},Ie=(e,t,r=[0,1])=>{const[n,s]=t,[u,l]=r,m=(Math.max(n,Math.min(e,s))-n)/(s-n);return u+m*(l-u)},ke=({className:e,children:t,width:r=1,index:n=0,ref:s,...u})=>{const l=c.useRef(null),i=s||l,m=fe({className:e,index:n,width:r,children:t});return o.jsx(k.motion.div,{ref:i,animate:{width:r+"px"},transition:{duration:.5,ease:"linear"},className:m.carouselItem,...u,children:t})},Xe=({variant:e="hero",className:t,children:r,ref:n,marginPourcent:s=0,inputRange:u=[.21,.65],outputRange:l=[42,300],gap:i=8,onChange:m,scrollSensitivity:f=1.25,...h})=>{var U,_;const v=c.useRef(null),a=n||v,y=de({className:t,children:r,variant:e,inputRange:u,outputRange:l,marginPourcent:s,onChange:m,gap:i,scrollSensitivity:f}),b=c.Children.toArray(r).filter(w=>c.isValidElement(w)&&w.type===ke),j=c.useRef(null),[S,E]=c.useState([]),[p,N]=c.useState(null),R=()=>{var W;if(!j.current||!a.current||!p)return[];const{scrollVisible:w,scrollProgress:g}=p;function V(F,K){return F.map(Y=>(Y-K)/Math.abs(F[1]-F[0]))}let $=b.map((F,K)=>{if(!L[K].current||!j.current)return 0;let J=K/(b.length-1);return J>1&&(J=1),J<0&&(J=0),J});$=V($,g);let I=((((W=a.current)==null?void 0:W.clientWidth)??w)-(l[0]+i))/(l[1]+i);return $.map((F,K)=>({value:Math.abs(F),originalIndex:K})).sort((F,K)=>F.value-K.value).forEach((F,K)=>{K===0&&B(F.originalIndex);let Y=Ie(I,[0,1],[0,l[1]]);Y<l[0]&&(Y=l[0]),I--,$[F.originalIndex]=Y}),$},L=c.useRef([]).current,[C,B]=c.useState(0);c.useEffect(()=>{m&&m(C)},[C]),L.length!==b.length&&b.forEach((w,g)=>{L[g]||(L[g]=c.createRef())});const P=b.map((w,g)=>c.cloneElement(w,{width:S[g],ref:L[g],key:g,index:g})),M=k.motionValue((p==null?void 0:p.scrollProgress)??0),x=k.useTransform(M,[0,1],[0,1-(((U=a.current)==null?void 0:U.clientWidth)??0)/(((_=j==null?void 0:j.current)==null?void 0:_.clientWidth)??0)]),D=k.useTransform(x,w=>`${-w*100}%`),A=w=>{w.scrollTotal>0&&N(w)};c.useEffect(()=>{const w=R();E(w)},[p]);const[X,G]=c.useState(0);return c.useLayoutEffect(()=>{let w=l[1];p&&w>p.scrollVisible&&(w=p.scrollVisible);const g=(w+i)*P.length/f;G(g)},[a,L,p]),o.jsx("div",{className:y.carousel,ref:a,...h,children:o.jsx(T,{draggable:!0,orientation:"horizontal",onScroll:A,scrollSize:X,children:o.jsx(k.motion.div,{className:y.track,ref:j,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${i}px`,x:D},children:P})})})},qe=({orientation:e="horizontal",className:t,...r})=>{const n=me({orientation:e,className:t});return o.jsx("hr",{className:n.divider,...r})},q=[];for(let e=0;e<256;++e)q.push((e+256).toString(16).slice(1));function Ae(e,t=0){return(q[e[t+0]]+q[e[t+1]]+q[e[t+2]]+q[e[t+3]]+"-"+q[e[t+4]]+q[e[t+5]]+"-"+q[e[t+6]]+q[e[t+7]]+"-"+q[e[t+8]]+q[e[t+9]]+"-"+q[e[t+10]]+q[e[t+11]]+q[e[t+12]]+q[e[t+13]]+q[e[t+14]]+q[e[t+15]]).toLowerCase()}let Q;const Ge=new Uint8Array(16);function Ke(){if(!Q){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Q=crypto.getRandomValues.bind(crypto)}return Q(Ge)}const He=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),re={randomUUID:He};function ee(e,t,r){var s;if(re.randomUUID&&!e)return re.randomUUID();e=e||{};const n=e.random??((s=e.rng)==null?void 0:s.call(e))??Ke();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ae(n)}const te=({variant:e="plain",buttons:t,className:r,children:n,title:s,text:u,position:l,targetRef:i,ref:m,trigger:f=["hover","focus"],...h})=>{if(!n&&!i)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(f)||(f=[f]),t&&!Array.isArray(t)&&(t=[t]);const v=c.useRef(null),a=i||v,[y,b]=c.useState(null),[j]=c.useState(ee()),[S,E]=c.useState(!1),p=c.useRef(null);c.useEffect(()=>{const x=D=>{b(D.detail)};return document.addEventListener("tooltip-update",x),()=>{document.removeEventListener("tooltip-update",x)}},[]),c.useEffect(()=>{p.current&&clearTimeout(p.current),y?E(y===j):p.current=setTimeout(()=>{E(!1)},1200)},[y,j]);const N=()=>{if(f.includes("hover")){const x=new CustomEvent("tooltip-update",{detail:j});document.dispatchEvent(x)}},R=()=>{if(f.includes("hover")){const x=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(x)}},L=()=>{if(f.includes("click")){const x=new CustomEvent("tooltip-update",{detail:S?null:j});document.dispatchEvent(x)}},C=()=>{if(f.includes("focus")){const x=new CustomEvent("tooltip-update",{detail:j});document.dispatchEvent(x)}},B=()=>{if(f.includes("focus")){const x=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(x)}};c.useEffect(()=>{if(a!=null&&a.current){const x=a.current;return x.addEventListener("mouseenter",N),x.addEventListener("mouseleave",R),x.addEventListener("click",L),x.addEventListener("focus",C),x.addEventListener("blur",B),()=>{x.removeEventListener("mouseenter",N),x.removeEventListener("mouseleave",R),x.removeEventListener("click",L),x.removeEventListener("focus",C),x.removeEventListener("blur",B)}}},[a,f,j,S]);const P=!i&&c.isValidElement(n)?c.cloneElement(n,{ref:v}):n;if(!l&&typeof window<"u"&&a!=null&&a.current&&!l){const x=a.current.getBoundingClientRect(),D=window.innerWidth,A=window.innerHeight,X=x.left/D,G=x.top/A;e==="plain"?X<1/3?l="right":X>2/3?l="left":l=G>.5?"top":"bottom":X<1/2&&G<1/2?l="bottom-right":X>1/2&&G<1/2?l="bottom-left":X>1/2&&G>1/2?l="top-left":X<1/2&&G>1/2&&(l="top-right")}const M=Ne({variant:e,buttons:t,className:r,title:s,text:u,position:l,trigger:f,targetRef:i,children:n});return o.jsxs(o.Fragment,{children:[P,o.jsx(k.AnimatePresence,{children:S&&o.jsx(Le,{targetRef:a,children:o.jsx(k.motion.div,{initial:{opacity:y?1:0},animate:{opacity:1},transition:{duration:y?0:.3},exit:{opacity:y?1:0},className:M.toolTip,...h,onMouseEnter:N,onMouseLeave:R,children:o.jsxs(k.motion.div,{className:M.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[s&&o.jsx("div",{className:M.subHead,children:s}),o.jsx("div",{className:M.supportingText,children:u}),t&&o.jsx("div",{className:M.actions,children:Array.isArray(t)&&t.map((x,D)=>o.jsx(Re,{size:"small",variant:"text",...x},D))})]})})})})]})},z=({className:e,label:t,variant:r="primary",size:n="medium",href:s,type:u,icon:l,isExtended:i=!1,ref:m,transition:f,...h})=>{const v=s?"a":"button",a=pe({href:s,icon:l,isExtended:i,label:t,size:n,variant:r,className:e,transition:f});f={duration:.3,...f};const y=c.useRef(null),b=m||y,j={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...f,opacity:{duration:f.duration/2,delay:f.duration-f.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...f,marginLeft:{duration:f.duration/2,delay:f.duration-f.duration/2}}}};return o.jsxs(v,{...h,ref:b,href:s,"aria-label":i?void 0:t,className:a.fab,children:[o.jsx(te,{trigger:i?null:void 0,text:t,targetRef:b}),o.jsx("span",{className:a.stateLayer,children:o.jsx(Z,{colorName:d({primary:r=="surface","on-primary-container":r=="primary","on-secondary-container":r=="secondary","on-tertiary-container":r=="tertiary"}),triggerRef:b})}),o.jsx(H,{icon:l,className:a.icon}),o.jsx(k.AnimatePresence,{children:i&&o.jsx(k.motion.span,{variants:j,initial:"hidden",animate:"visible",exit:"hidden",className:a.label,children:t})})]})},ne=({variant:e="standard",href:t,disabled:r=!1,type:n="button",title:s,arialLabel:u,onToggle:l,activated:i=!1,onClick:m,icon:f,size:h="medium",iconSelected:v,className:a,ref:y,width:b="default",shape:j="rounded",allowShapeTransformation:S=!0,transition:E,...p})=>{s||(s=u);const[N,R]=c.useState(i);let L;l?l&&(L=x=>{r&&x.preventDefault(),R(!N),l(!!N)},f=N&&v||f):L=x=>{r&&x.preventDefault(),m&&m(x)},c.useEffect(()=>{R(i)},[i]);const C=t?"a":"button",B=he({transition:E,shape:j,allowShapeTransformation:S,width:b,href:t,activated:i,arialLabel:u,iconSelected:v,isActive:N,onToggle:l,disabled:r,icon:f,variant:e,className:a,size:h,...p}),P=c.useRef(null),M=y||P;return E={duration:.3,...E},o.jsxs(C,{disabled:r,href:t,className:B.iconButton,"aria-label":u,...p,title:void 0,onClick:L,ref:M,children:[o.jsx(te,{targetRef:M,trigger:r?null:void 0,text:s}),o.jsxs("div",{style:{transition:E.duration+"s"},className:B.container,children:[o.jsx("div",{className:B.stateLayer,children:!r&&o.jsx(Z,{colorName:d(e==="standard"&&{"on-surface-variant":!N,primary:N},e==="filled"&&{primary:!N&&!!l,"inverse-on-surface":N||!l},e==="tonal"&&{"on-surface-variant":!N&&!!l,"on-secondary-container":N||!l},e==="outlined"&&{"on-surface-variant":!N,"on-primary":N}),triggerRef:M})}),f&&o.jsx(H,{icon:f,className:B.icon})]})]})},_e=({className:e,valueFormatter:t,step:r=10,name:n,value:s=0,min:u=0,max:l=100,marks:i=[{value:0,label:"0"},{value:100,label:"100"}],ref:m,onChange:f,...h})=>{const v=w=>{const g=y(),V=a();return w===1/0?100:w===-1/0?0:(w-g)/(V-g)*100},a=(w=!1)=>w?l:l==1/0?i[(i==null?void 0:i.length)-1].value:l,y=(w=!1)=>w?u:u==-1/0?i[0].value:u,b=w=>{const g=y(!1);return(a(!1)-g)*w/100+g},[j,S]=c.useState(!1),E=c.useRef(null),p=m||E,[N,R]=c.useState(s),[L,C]=c.useState(v(s)),[B,P]=c.useState(!1),M=w=>{P(!0),S(!0),A(w)},x=()=>{P(!1),S(!1)};c.useEffect(()=>(B?(window.addEventListener("mouseup",x),window.addEventListener("mousemove",A),window.addEventListener("touchend",x),window.addEventListener("touchmove",A)):(window.removeEventListener("mouseup",x),window.removeEventListener("mousemove",A),window.removeEventListener("touchend",x),window.removeEventListener("touchmove",A)),()=>{window.removeEventListener("mouseup",x),window.removeEventListener("mousemove",A),window.removeEventListener("touchend",x),window.removeEventListener("touchmove",A)}),[B]);const D=ye({className:e,isChanging:j,marks:i,max:l,min:u,name:n,step:r,value:N,valueFormatter:t,onChange:f}),A=w=>{const g=p==null?void 0:p.current;if(g){const V=g.getBoundingClientRect().left;let I=((w.type==="touchmove"||w.type==="touchstart"?w.touches[0].clientX:w.clientX)-V)/g.offsetWidth*100;X({pourcent:I})}},X=({pourcent:w,value:g})=>{if(w){if(w>=100){R(a(!0)),C(100);return}if(w<=0){R(y(!0)),C(0);return}g=b(w),g==y()&&(g=y(!0)),g==a()&&(g=a(!0))}else if(g!=null){if(g>=a()){R(a(!0)),C(100);return}if(g<=y()){R(y(!0)),C(0);return}w=v(g)}else return;r!=null?g=Math.round((g-y())/r)*r+y():i&&(g=i.reduce((V,$,I)=>{let W=$.value===1/0?a():$.value===-1/0?y():$.value,F=V.value===1/0?a():V.value===-1/0?y():V.value;return W=Math.abs(W-g),F=Math.abs(F-g),W<F?$:V}).value),g>=a()&&(g=a(!0)),g<=y()&&(g=y(!0)),w=v(g),R(g),C(w),f&&f(g)},[G,U]=c.useState(0);c.useEffect(()=>{const w=()=>{p.current&&U(p.current.offsetWidth)};return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[]);const _=w=>{switch(w.key){case"ArrowRight":if(r)X({value:N+r});else if(i){const g=i.find(V=>V.value>N);g&&X({value:g.value})}break;case"ArrowLeft":if(r)X({value:N-r});else if(i){const g=i.slice(0).reverse().find((V,$,I)=>N===1/0?$===1:V.value<N);g&&X({value:g.value})}break;default:return}};return o.jsxs("div",{tabIndex:0,onKeyDown:_,role:"slider","aria-valuemin":y(!0),"aria-valuemax":a(!0),"aria-valuenow":N,"aria-valuetext":N.toString(),className:D.slider,onMouseDown:M,onClick:A,ref:p,onTouchStart:M,onDragStart:w=>w.preventDefault(),...h,children:[o.jsx("input",{type:"hidden",name:n,value:N}),o.jsx("div",{className:D.activeTrack,style:{flex:L/100}}),o.jsx("div",{className:D.handle,children:o.jsx(k.AnimatePresence,{children:j&&o.jsx(k.motion.div,{className:D.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(N):N})})}),o.jsx("div",{className:D.inactiveTrack,style:{flex:1-L/100}}),o.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:i&&i.map((w,g)=>{let V=null;const $=(j?9:10)/G*100,I=v(w.value);return I<=L-$?V=!0:I>=L+$&&(V=!1),o.jsx("div",{className:d(D.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${v(w.value)}%`}},g)})})]})};/*!
|
|
10
2
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
11
3
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
12
4
|
* Copyright 2024 Fonticons, Inc.
|
|
13
|
-
*/const zh={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},Wh={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},Na={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},$h=({supportingText:e,className:t,duration:n,closeIcon:s=Na,onClose:r,...o})=>{const[i,a]=m.useState(!0),l=$i({className:t,closeIcon:s,duration:n,isVisible:i,onClose:r,supportingText:e});m.useEffect(()=>{n&&setTimeout(()=>{c()},n)},[n]);const c=()=>{a(!1),r==null||r()};return x.jsx(Fe,{children:i&&x.jsx(K.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:l.snackbar,...o,children:x.jsxs("div",{className:l.container,children:[x.jsx("p",{className:l.supportingText,children:e}),x.jsx(js,{onClick:()=>c(),className:l.icon,icon:s,arialLabel:"close the snackbar"})]})})})},Uh=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:o,onClick:i,onKeyDown:a,ref:l,...c})=>{const[u,d]=m.useState(e),f=y=>{s||(p(),i&&i(y))},h=y=>{s||((y.key===" "||y.key==="Enter")&&(y.preventDefault(),p()),a&&a(y))},p=()=>{d(!u),o==null||o(!u)},g=Ui({className:t,isSelected:u,activeIcon:n,inactiveIcon:r,disabled:s,selected:u,onChange:o}),w=m.useRef(null),b=l||w;return x.jsxs(K.div,{role:"switch","aria-checked":u,tabIndex:s?-1:0,onKeyDown:h,onClick:f,ref:b,className:g.switch,...c,children:[x.jsx("input",{type:"hidden",value:u?"1":"0"}),x.jsxs(K.div,{layout:!0,style:{translate:u?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:g.handleContainer,children:[x.jsx("div",{className:g.handle,children:(u?n:r)&&x.jsx(ve,{className:g.icon,icon:u?n:r})}),x.jsx("div",{className:g.handleStateLayer})]})]})},Ba=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:o,selectedTab:i,setSelectedTab:a,tabsId:l,index:c,onTabSelected:u,scrollable:d=!1,selected:f=!1,ref:h,...p})=>{const g=m.useRef(null),w=h||g,[b,y]=m.useState(f);m.useEffect(()=>{f&&i==null?y(!0):y(i==c&&c!=null)},[i]),m.useEffect(()=>{i==c&&u&&u({ref:w,index:c||0,label:n,icon:o})},[i]);const v=r?"a":"button",k=E=>{a&&a(c??null),t&&t(E)},P=Gi({className:e,onTabSelected:u,scrollable:d,selectedTab:i,index:c,tabsId:l,selected:b,variant:s,icon:o,label:n,isSelected:b,setSelectedTab:a,href:r});return x.jsxs(v,{...p,role:"tab","aria-selected":b,ref:w,href:r,className:P.tab,onClick:k,...p,children:[x.jsx("span",{className:P.stateLayer,children:x.jsx(nt,{colorName:s==="primary"&&b?"primary":"on-surface",triggerRef:w})}),x.jsxs("span",{className:P.content,children:[o&&x.jsx(ve,{icon:o,className:P.icon}),x.jsx("span",{className:P.label,children:n}),b&&x.jsx(K.span,{layoutId:`underline-${l}`,className:P.underline,transition:{duration:.3}})]})]})},Gh=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:o,scrollable:i=!1})=>{const[a,l]=m.useState(null);let c;r==0||r!=null?c=r:c=a;const u=o||l,d=m.Children.toArray(n).filter(w=>m.isValidElement(w)&&w.type===Ba),f=m.useRef(null),h=w=>{if(t==null||t(w),i){const b=f.current,y=w.ref.current;if(b&&y){const v=y.offsetLeft+y.offsetWidth/2-b.offsetWidth/2;b.scrollTo({left:v,behavior:"smooth"})}}},p=m.useMemo(()=>Ls(),[]),g=Hi({children:n,onTabSelected:t,scrollable:i,selectedTab:c,setSelectedTab:u,className:s,variant:e});return x.jsx("div",{ref:f,role:"tablist",className:g.tabs,children:d.map((w,b)=>m.cloneElement(w,{key:b,index:b,variant:e,selectedTab:c,setSelectedTab:u,tabsId:p,onTabSelected:h,scrollable:i}))})};function Xn(){return Xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Xn.apply(null,arguments)}function Hh(e,t){if(e==null)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;n[s]=e[s]}return n}var Kh=m.useLayoutEffect,_h=function(t){var n=m.useRef(t);return Kh(function(){n.current=t}),n},di=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},Xh=function(t,n){var s=m.useRef();return m.useCallback(function(r){t.current=r,s.current&&di(s.current,null),s.current=n,n&&di(n,r)},[n])},hi={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Yh=function(t){Object.keys(hi).forEach(function(n){t.style.setProperty(n,hi[n],"important")})},mi=Yh,oe=null,pi=function(t,n){var s=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?s+n.borderSize:s-n.paddingSize};function qh(e,t,n,s){n===void 0&&(n=1),s===void 0&&(s=1/0),oe||(oe=document.createElement("textarea"),oe.setAttribute("tabindex","-1"),oe.setAttribute("aria-hidden","true"),mi(oe)),oe.parentNode===null&&document.body.appendChild(oe);var r=e.paddingSize,o=e.borderSize,i=e.sizingStyle,a=i.boxSizing;Object.keys(i).forEach(function(f){var h=f;oe.style[h]=i[h]}),mi(oe),oe.value=t;var l=pi(oe,e);oe.value=t,l=pi(oe,e),oe.value="x";var c=oe.scrollHeight-r,u=c*n;a==="border-box"&&(u=u+r+o),l=Math.max(u,l);var d=c*s;return a==="border-box"&&(d=d+r+o),l=Math.min(d,l),[l,c]}var gi=function(){},Zh=function(t,n){return t.reduce(function(s,r){return s[r]=n[r],s},{})},Jh=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Qh=!!document.documentElement.currentStyle,em=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var s=Zh(Jh,n),r=s.boxSizing;if(r==="")return null;Qh&&r==="border-box"&&(s.width=parseFloat(s.width)+parseFloat(s.borderRightWidth)+parseFloat(s.borderLeftWidth)+parseFloat(s.paddingRight)+parseFloat(s.paddingLeft)+"px");var o=parseFloat(s.paddingBottom)+parseFloat(s.paddingTop),i=parseFloat(s.borderBottomWidth)+parseFloat(s.borderTopWidth);return{sizingStyle:s,paddingSize:o,borderSize:i}},tm=em;function Is(e,t,n){var s=_h(n);xe.useLayoutEffect(function(){var r=function(i){return s.current(i)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var nm=function(t,n){Is(document.body,"reset",function(s){t.current.form===s.target&&n(s)})},sm=function(t){Is(window,"resize",t)},rm=function(t){Is(document.fonts,"loadingdone",t)},im=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],om=function(t,n){var s=t.cacheMeasurements,r=t.maxRows,o=t.minRows,i=t.onChange,a=i===void 0?gi:i,l=t.onHeightChange,c=l===void 0?gi:l,u=Hh(t,im),d=u.value!==void 0,f=xe.useRef(null),h=Xh(f,n),p=xe.useRef(0),g=xe.useRef(),w=function(){var v=f.current,k=s&&g.current?g.current:tm(v);if(k){g.current=k;var P=qh(k,v.value||v.placeholder||"x",o,r),E=P[0],V=P[1];p.current!==E&&(p.current=E,v.style.setProperty("height",E+"px","important"),c(E,{rowHeight:V}))}},b=function(v){d||w(),a(v)};return xe.useLayoutEffect(w),nm(f,function(){if(!d){var y=f.current.value;requestAnimationFrame(function(){var v=f.current;v&&y!==v.value&&w()})}}),sm(w),rm(w),xe.createElement("textarea",Xn({},u,{onChange:b,ref:h}))},am=xe.forwardRef(om);const lm=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:s,suffix:r,name:o,label:i,className:a,supportingText:l,trailingIcon:c,leadingIcon:u,type:d="text",textLine:f="singleLine",autoComplete:h="on",onChange:p,value:g,showSupportingText:w=!1,...b})=>{const[y,v]=m.useState(g??""),[k,P]=m.useState(!1),[E,V]=m.useState(!1),[T,R]=m.useState(w);m.useEffect(()=>{v(g??"")},[g]),m.useEffect(()=>{n!=null&&n.length?V(!0):V(!1)},[n]),m.useEffect(()=>{w?R(w):l!=null&&l.length?R(!0):R(!1)},[T,l]),m.useEffect(()=>{k&&V(!1)},[k]);const C=m.useRef(null),O=()=>{C.current&&!k&&C.current.focus()},H=()=>{P(!0)},_=B=>{const z=B.target.value;v(z),V(!1),typeof p=="function"&&p(z)},Z=()=>{P(!1)},$=Ki({showSupportingText:T,isFocused:k,showErrorIcon:E,disabled:t,name:o,label:i,autoComplete:h,className:a,onChange:p,placeholder:s,supportingText:l,type:d,leadingIcon:u,trailingIcon:c,variant:e,errorText:n,value:y,suffix:r,textLine:f}),[J]=m.useState(Ls());let M,S;switch(f){case"multiLine":S=am,M={};break;case"textAreas":S="textarea",M={};break;case"singleLine":default:S="input",M={type:d};break}return x.jsxs("div",{className:$.textField,...b,children:[x.jsxs("fieldset",{onClick:O,className:$.content,children:[x.jsx("div",{className:$.stateLayer}),u&&x.jsx("div",{className:$.leadingIcon,children:m.isValidElement(u)?u:x.jsx(ve,{className:"w-5 h-5",icon:u})}),!(!k&&!y.length||e=="filled")&&x.jsx(K.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!k&&!y.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:x.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:x.jsx(K.span,{className:$.label,transition:{duration:.3},layoutId:J,children:i})})}),x.jsxs("div",{className:"flex-1 relative",children:[(!k&&!y.length||e=="filled")&&x.jsx(K.label,{htmlFor:o,className:A("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!k&&!y.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!k&&!y.length))}),transition:{duration:.3},children:x.jsx(K.span,{className:$.label,transition:{duration:.3},layoutId:e=="outlined"?J:void 0,children:i})}),x.jsx(S,{ref:C,value:y,onChange:_,className:$.input,id:o,name:o,placeholder:k?s??void 0:"",onFocus:H,onBlur:Z,disabled:t,autoComplete:h,"aria-invalid":!!(n!=null&&n.length),"aria-label":i,...M})]}),x.jsx("div",{className:$.activeIndicator}),!E&&x.jsxs(x.Fragment,{children:[c&&x.jsx("div",{onClick:B=>{B.stopPropagation()},className:$.trailingIcon,children:m.isValidElement(c)?c:x.jsx(ve,{className:"h-5",icon:c})}),!c&&r&&x.jsx("span",{className:$.suffix,children:r})]}),E&&x.jsx("div",{className:A($.trailingIcon,{" absolute right-0":!c}),children:x.jsx(ve,{className:"h-5 text-error",icon:Wh})})]}),T&&x.jsx("p",{className:$.supportingText,children:n!=null&&n.length?n:l!=null&&l.length?l:" "})]})},cm=te("navigationRailItem",({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:A(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:A(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:A(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:A("size-6 flex"),label:A("w-fit mx-auto",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})})),Fa=({label:e})=>x.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:x.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Oa=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:o,selectedItem:i,setSelectedItem:a,index:l,onItemSelected:c,selected:u=!1,ref:d,transition:f,isExtended:h,iconSelected:p,style:g,extendedOnly:w,...b})=>{const y=m.useRef(null),v=d||y,[k,P]=m.useState(u);m.useEffect(()=>{u&&i==null?P(!0):P(i==l&&l!=null)},[i]),m.useEffect(()=>{i==l&&c&&c({ref:v,index:l||0,label:n,icon:o})},[i]);const E=r?"a":"button",V=R=>{a&&a(l??null),t&&t(R)},T=cm({isExtended:h,extendedOnly:w,className:e,onItemSelected:c,selectedItem:i,index:l,transition:f,selected:k,variant:s,icon:o,label:n,isSelected:k,setSelectedItem:a,href:r,iconSelected:p});return f={duration:.3,...f},w&&!h?null:x.jsxs(E,{...b,role:"tab","aria-selected":k,ref:v,href:r,className:T.navigationRailItem,onClick:V,style:{transition:f.duration+"s",...g},children:[x.jsxs(K.div,{style:{transition:s=="horizontal"?f.duration+`s, gap ${f.duration/2}s ${f.duration-f.duration/2}s`:f.duration+`s, gap ${f.duration/3}s ${f.duration-f.duration/3}s`},transition:f,className:T.container,children:[x.jsx(K.div,{layout:!0,className:T.stateLayer}),o&&x.jsx(ve,{icon:k?p:o,className:T.icon}),x.jsx(Fe,{children:s=="horizontal"&&(()=>{const R={width:0,opacity:0,transition:{...f}},C={width:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/2,delay:f.duration-f.duration/2}}};return x.jsx(K.span,{initial:R,animate:C,exit:R,className:T.label,children:n})})()})]}),x.jsx(Fe,{children:s=="vertical"&&(()=>{const R={height:0,opacity:0,transition:{...f,opacity:{duration:0}}},C={height:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/3,delay:f.duration-f.duration/3}}};return x.jsx(K.span,{initial:R,animate:C,exit:R,className:T.label,transition:f,children:n})})()})]})},um=te("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:A("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:A("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:A(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),fm=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:o,alignment:i="top",menu:a={closed:{icon:zh,label:"Open menu"},opened:{icon:Na,label:"Close menu"}},style:l,onExtendedChange:c,transition:u,setSelectedItem:d})=>{const[f,h]=m.useState(null),[p,g]=m.useState(o);let w;r==0||r!=null?w=r:w=f;const b=d||h,y=m.useRef(null),v=R=>{t==null||t(R)};function k(R){const C=[];return m.Children.forEach(R,O=>{m.isValidElement(O)&&O.type===m.Fragment?C.push(...k(O.props.children)):C.push(O)}),C}const P=k(n),E=P.filter(R=>m.isValidElement(R)&&R.type===_n),V=um({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:b,className:s,variant:e,extended:p,isExtended:p,alignment:i,menu:a,transition:u,onExtendedChange:c});u={duration:.3,...u};const T=m.useRef(!1);return T.current=!1,m.useEffect(()=>{c==null||c(p??!1)},[p]),x.jsxs("div",{style:{transition:u.duration+"s",...l},ref:y,className:V.navigationRail,children:[x.jsxs("div",{className:V.header,children:[x.jsx(js,{onClick:()=>g(!p),arialLabel:p?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:V.menuIcon,icon:p?a.opened.icon:a==null?void 0:a.closed.icon}),E.length>0&&m.cloneElement(E[0],{transition:u,isExtended:p,className:"!shadow-none mx-5 "+E[0].props.className})]}),x.jsx("div",{className:V.segments,children:(()=>{let R=0;return P.map(C=>m.isValidElement(C)&&C.type===Oa?m.cloneElement(C,{key:R,index:R++,variant:p?"horizontal":"vertical",selectedItem:w,setSelectedItem:b,onItemSelected:v,transition:u,extendedOnly:T.current,isExtended:p}):m.isValidElement(C)&&C.type===_n?null:m.isValidElement(C)&&C.type===Fa?(T.current=!0,p?m.cloneElement(C,{}):null):C)})()}),x.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=Da;exports.Card=Lh;exports.Carousel=Dh;exports.CarouselItem=Ia;exports.CustomScroll=Rs;exports.Divider=jh;exports.Fab=_n;exports.Icon=ve;exports.IconButton=js;exports.NavigationRail=fm;exports.NavigationRailItem=Oa;exports.NavigationRailSection=Fa;exports.ProgressIndicator=Va;exports.RippleEffect=nt;exports.Slider=Oh;exports.SmoothScroll=Rh;exports.Snackbar=$h;exports.Switch=Uh;exports.SyncedFixedWrapper=La;exports.Tab=Ba;exports.Tabs=Gh;exports.TextField=lm;exports.ToolTip=Ds;exports.buttonStyle=Di;exports.cardStyle=ji;exports.carouselItemStyle=Ii;exports.carouselStyle=Ni;exports.classNames=A;exports.classnames=Ri;exports.customScrollStyle=Ra;exports.defaultClassNames=te;exports.dividerStyle=Bi;exports.fabStyle=Fi;exports.getClassNames=Li;exports.iconButtonStyle=Oi;exports.normalize=ja;exports.progressIndicatorStyle=zi;exports.sliderStyle=Wi;exports.snackbarStyle=$i;exports.switchStyle=Ui;exports.tabStyle=Gi;exports.tabsStyle=Hi;exports.textFieldStyle=Ki;exports.toolStyle=_i;
|
|
5
|
+
*/const Ye={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},Ze={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},Me={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},Je=({supportingText:e,className:t,duration:r,closeIcon:n=Me,onClose:s,...u})=>{const[l,i]=c.useState(!0),m=ge({className:t,closeIcon:n,duration:r,isVisible:l,onClose:s,supportingText:e});c.useEffect(()=>{r&&setTimeout(()=>{f()},r)},[r]);const f=()=>{i(!1),s==null||s()};return o.jsx(k.AnimatePresence,{children:l&&o.jsx(k.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...u,children:o.jsxs("div",{className:m.container,children:[o.jsx("p",{className:m.supportingText,children:e}),o.jsx(ne,{onClick:()=>f(),className:m.icon,icon:n,arialLabel:"close the snackbar"})]})})})},Qe=({selected:e=!1,className:t,activeIcon:r,disabled:n=!1,inactiveIcon:s,onChange:u,onClick:l,onKeyDown:i,ref:m,...f})=>{const[h,v]=c.useState(e),a=p=>{n||(b(),l&&l(p))},y=p=>{n||((p.key===" "||p.key==="Enter")&&(p.preventDefault(),b()),i&&i(p))},b=()=>{v(!h),u==null||u(!h)},j=we({className:t,isSelected:h,activeIcon:r,inactiveIcon:s,disabled:n,selected:h,onChange:u}),S=c.useRef(null),E=m||S;return o.jsxs(k.motion.div,{role:"switch","aria-checked":h,tabIndex:n?-1:0,onKeyDown:y,onClick:a,ref:E,className:j.switch,...f,children:[o.jsx("input",{type:"hidden",value:h?"1":"0"}),o.jsxs(k.motion.div,{layout:!0,style:{translate:h?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:j.handleContainer,children:[o.jsx("div",{className:j.handle,children:(h?r:s)&&o.jsx(H,{className:j.icon,icon:h?r:s})}),o.jsx("div",{className:j.handleStateLayer})]})]})},Ce=({className:e,onClick:t,label:r,variant:n="primary",href:s,icon:u,selectedTab:l,setSelectedTab:i,tabsId:m,index:f,onTabSelected:h,scrollable:v=!1,selected:a=!1,ref:y,...b})=>{const j=c.useRef(null),S=y||j,[E,p]=c.useState(a);c.useEffect(()=>{a&&l==null?p(!0):p(l==f&&f!=null)},[l]),c.useEffect(()=>{l==f&&h&&h({ref:S,index:f||0,label:r,icon:u})},[l]);const N=s?"a":"button",R=C=>{i&&i(f??null),t&&t(C)},L=ve({className:e,onTabSelected:h,scrollable:v,selectedTab:l,index:f,tabsId:m,selected:E,variant:n,icon:u,label:r,isSelected:E,setSelectedTab:i,href:s});return o.jsxs(N,{...b,role:"tab","aria-selected":E,ref:S,href:s,className:L.tab,onClick:R,...b,children:[o.jsx("span",{className:L.stateLayer,children:o.jsx(Z,{colorName:n==="primary"&&E?"primary":"on-surface",triggerRef:S})}),o.jsxs("span",{className:L.content,children:[u&&o.jsx(H,{icon:u,className:L.icon}),o.jsx("span",{className:L.label,children:r}),E&&o.jsx(k.motion.span,{layoutId:`underline-${m}`,className:L.underline,transition:{duration:.3}})]})]})},ze=({variant:e="primary",onTabSelected:t,children:r,className:n,selectedTab:s,setSelectedTab:u,scrollable:l=!1})=>{const[i,m]=c.useState(null);let f;s==0||s!=null?f=s:f=i;const h=u||m,v=c.Children.toArray(r).filter(S=>c.isValidElement(S)&&S.type===Ce),a=c.useRef(null),y=S=>{if(t==null||t(S),l){const E=a.current,p=S.ref.current;if(E&&p){const N=p.offsetLeft+p.offsetWidth/2-E.offsetWidth/2;E.scrollTo({left:N,behavior:"smooth"})}}},b=c.useMemo(()=>ee(),[]),j=be({children:r,onTabSelected:t,scrollable:l,selectedTab:f,setSelectedTab:h,className:n,variant:e});return o.jsx("div",{ref:a,role:"tablist",className:j.tabs,children:v.map((S,E)=>c.cloneElement(S,{key:E,index:E,variant:e,selectedTab:f,setSelectedTab:h,tabsId:b,onTabSelected:y,scrollable:l}))})},Te=({variant:e="filled",disabled:t=!1,errorText:r,placeholder:n,suffix:s,name:u,label:l,className:i,supportingText:m,trailingIcon:f,leadingIcon:h,type:v="text",textLine:a="singleLine",autoComplete:y="on",onChange:b,value:j,showSupportingText:S=!1,...E})=>{const[p,N]=c.useState(j??""),[R,L]=c.useState(!1),[C,B]=c.useState(!1),[P,M]=c.useState(S);c.useEffect(()=>{N(j??"")},[j]),c.useEffect(()=>{r!=null&&r.length?B(!0):B(!1)},[r]),c.useEffect(()=>{S?M(S):m!=null&&m.length?M(!0):M(!1)},[P,m]),c.useEffect(()=>{R&&B(!1)},[R]);const x=c.useRef(null),D=()=>{x.current&&!R&&x.current.focus()},A=()=>{L(!0)},X=V=>{const $=V.target.value;N($),B(!1),typeof b=="function"&&b($)},G=()=>{L(!1)},U=je({showSupportingText:P,isFocused:R,showErrorIcon:C,disabled:t,name:u,label:l,autoComplete:y,className:i,onChange:b,placeholder:n,supportingText:m,type:v,leadingIcon:h,trailingIcon:f,variant:e,errorText:r,value:p,suffix:s,textLine:a}),[_]=c.useState(ee());let w,g;switch(a){case"multiLine":g=$e,w={};break;case"textAreas":g="textarea",w={};break;case"singleLine":default:g="input",w={type:v};break}return o.jsxs("div",{className:U.textField,...E,children:[o.jsxs("fieldset",{onClick:D,className:U.content,children:[o.jsx("div",{className:U.stateLayer}),h&&o.jsx("div",{className:U.leadingIcon,children:c.isValidElement(h)?h:o.jsx(H,{className:"w-5 h-5",icon:h})}),!(!R&&!p.length||e=="filled")&&o.jsx(k.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!R&&!p.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:o.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:o.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:_,children:l})})}),o.jsxs("div",{className:"flex-1 relative",children:[(!R&&!p.length||e=="filled")&&o.jsx(k.motion.label,{htmlFor:u,className:d("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!R&&!p.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!R&&!p.length))}),transition:{duration:.3},children:o.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?_:void 0,children:l})}),o.jsx(g,{ref:x,value:p,onChange:X,className:U.input,id:u,name:u,placeholder:R?n??void 0:"",onFocus:A,onBlur:G,disabled:t,autoComplete:y,"aria-invalid":!!(r!=null&&r.length),"aria-label":l,...w})]}),o.jsx("div",{className:U.activeIndicator}),!C&&o.jsxs(o.Fragment,{children:[f&&o.jsx("div",{onClick:V=>{V.stopPropagation()},className:U.trailingIcon,children:c.isValidElement(f)?f:o.jsx(H,{className:"h-5",icon:f})}),!f&&s&&o.jsx("span",{className:U.suffix,children:s})]}),C&&o.jsx("div",{className:d(U.trailingIcon,{" absolute right-0":!f}),children:o.jsx(H,{className:"h-5 text-error",icon:Ze})})]}),P&&o.jsx("p",{className:U.supportingText,children:r!=null&&r.length?r:m!=null&&m.length?m:" "})]})},et=O("navigationRailItem",({isSelected:e,icon:t,label:r,variant:n})=>({navigationRailItem:d(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":n=="vertical","gap-0 h-[66px]":n=="horizontal"}),container:d(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":n=="horizontal","gap-0 ":n=="vertical","p-4":!r},r&&["px-4",{"py-1 ":n=="vertical","py-4 ":n=="horizontal"}]),stateLayer:d(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:d("size-6 flex"),label:d("w-fit mx-auto",{"text-label-large ":n=="horizontal","text-label-medium":n=="vertical"})})),Ve=({label:e})=>o.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:o.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Be=({className:e,onClick:t,label:r,variant:n="vertical",href:s,icon:u,selectedItem:l,setSelectedItem:i,index:m,onItemSelected:f,selected:h=!1,ref:v,transition:a,isExtended:y,iconSelected:b,style:j,extendedOnly:S,...E})=>{const p=c.useRef(null),N=v||p,[R,L]=c.useState(h);c.useEffect(()=>{h&&l==null?L(!0):L(l==m&&m!=null)},[l]),c.useEffect(()=>{l==m&&f&&f({ref:N,index:m||0,label:r,icon:u})},[l]);const C=s?"a":"button",B=M=>{i&&i(m??null),t&&t(M)},P=et({isExtended:y,extendedOnly:S,className:e,onItemSelected:f,selectedItem:l,index:m,transition:a,selected:R,variant:n,icon:u,label:r,isSelected:R,setSelectedItem:i,href:s,iconSelected:b});return a={duration:.3,...a},S&&!y?null:o.jsxs(C,{...E,role:"tab","aria-selected":R,ref:N,href:s,className:P.navigationRailItem,onClick:B,style:{transition:a.duration+"s",...j},children:[o.jsxs(k.motion.div,{style:{transition:n=="horizontal"?a.duration+`s, gap ${a.duration/2}s ${a.duration-a.duration/2}s`:a.duration+`s, gap ${a.duration/3}s ${a.duration-a.duration/3}s`},transition:a,className:P.container,children:[o.jsx(k.motion.div,{layout:!0,className:P.stateLayer}),u&&o.jsx(H,{icon:R?b:u,className:P.icon}),o.jsx(k.AnimatePresence,{children:n=="horizontal"&&(()=>{const M={width:0,opacity:0,transition:{...a}},x={width:"auto",opacity:1,transition:{...a,opacity:{duration:a.duration/2,delay:a.duration-a.duration/2}}};return o.jsx(k.motion.span,{initial:M,animate:x,exit:M,className:P.label,children:r})})()})]}),o.jsx(k.AnimatePresence,{children:n=="vertical"&&(()=>{const M={height:0,opacity:0,transition:{...a,opacity:{duration:0}}},x={height:"auto",opacity:1,transition:{...a,opacity:{duration:a.duration/3,delay:a.duration-a.duration/3}}};return o.jsx(k.motion.span,{initial:M,animate:x,exit:M,className:P.label,transition:a,children:r})})()})]})},tt=O("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:d("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:d("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:d(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),nt=({variant:e="standard",onItemSelected:t,children:r,className:n,selectedItem:s,extended:u,alignment:l="top",menu:i={closed:{icon:Ye,label:"Open menu"},opened:{icon:Me,label:"Close menu"}},style:m,onExtendedChange:f,transition:h,setSelectedItem:v})=>{const[a,y]=c.useState(null),[b,j]=c.useState(u);let S;s==0||s!=null?S=s:S=a;const E=v||y,p=c.useRef(null),N=M=>{t==null||t(M)};function R(M){const x=[];return c.Children.forEach(M,D=>{c.isValidElement(D)&&D.type===c.Fragment?x.push(...R(D.props.children)):x.push(D)}),x}const L=R(r),C=L.filter(M=>c.isValidElement(M)&&M.type===z),B=tt({children:r,onItemSelected:t,selectedItem:S,setSelectedItem:E,className:n,variant:e,extended:b,isExtended:b,alignment:l,menu:i,transition:h,onExtendedChange:f});h={duration:.3,...h};const P=c.useRef(!1);return P.current=!1,c.useEffect(()=>{f==null||f(b??!1)},[b]),o.jsxs("div",{style:{transition:h.duration+"s",...m},ref:p,className:B.navigationRail,children:[o.jsxs("div",{className:B.header,children:[o.jsx(ne,{onClick:()=>j(!b),arialLabel:b?i==null?void 0:i.opened.label:i==null?void 0:i.closed.label,className:B.menuIcon,icon:b?i.opened.icon:i==null?void 0:i.closed.icon}),C.length>0&&c.cloneElement(C[0],{transition:h,isExtended:b,className:"!shadow-none mx-5 "+C[0].props.className})]}),o.jsx("div",{className:B.segments,children:(()=>{let M=0;return L.map(x=>c.isValidElement(x)&&x.type===Be?c.cloneElement(x,{key:M,index:M++,variant:b?"horizontal":"vertical",selectedItem:S,setSelectedItem:E,onItemSelected:N,transition:h,extendedOnly:P.current,isExtended:b}):c.isValidElement(x)&&x.type===z?null:c.isValidElement(x)&&x.type===Ve?(P.current=!0,b?c.cloneElement(x,{}):null):x)})()}),o.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=Re;exports.Card=Oe;exports.Carousel=Xe;exports.CarouselItem=ke;exports.CustomScroll=T;exports.Divider=qe;exports.Fab=z;exports.Icon=H;exports.IconButton=ne;exports.NavigationRail=nt;exports.NavigationRailItem=Be;exports.NavigationRailSection=Ve;exports.ProgressIndicator=Se;exports.RippleEffect=Z;exports.Slider=_e;exports.SmoothScroll=Ue;exports.Snackbar=Je;exports.Switch=Qe;exports.SyncedFixedWrapper=Le;exports.Tab=Ce;exports.Tabs=ze;exports.TextField=Te;exports.ToolTip=te;exports.buttonStyle=ie;exports.cardStyle=ue;exports.carouselItemStyle=fe;exports.carouselStyle=de;exports.classNames=d;exports.classnames=ae;exports.customScrollStyle=Ee;exports.defaultClassNames=O;exports.dividerStyle=me;exports.fabStyle=pe;exports.getClassNames=ce;exports.iconButtonStyle=he;exports.normalize=Ie;exports.progressIndicatorStyle=xe;exports.sliderStyle=ye;exports.snackbarStyle=ge;exports.switchStyle=we;exports.tabStyle=ve;exports.tabsStyle=be;exports.textFieldStyle=je;exports.toolStyle=Ne;
|