@dss-kit/ui-kit 0.1.21 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/components/controls/SegmentControl/SegmentControl.d.ts +57 -0
  2. package/dist/components/controls/SegmentControl/SegmentControl.d.ts.map +1 -0
  3. package/dist/components/controls/SegmentControl/SegmentControl.stories.d.ts +11 -0
  4. package/dist/components/controls/SegmentControl/SegmentControl.stories.d.ts.map +1 -0
  5. package/dist/components/controls/SegmentControl/index.d.ts +3 -0
  6. package/dist/components/controls/SegmentControl/index.d.ts.map +1 -0
  7. package/dist/components/controls/Select/Select.d.ts +6 -3
  8. package/dist/components/controls/Select/Select.d.ts.map +1 -1
  9. package/dist/components/controls/Select/Select.stories.d.ts.map +1 -1
  10. package/dist/components/controls/index.d.ts +1 -0
  11. package/dist/components/controls/index.d.ts.map +1 -1
  12. package/dist/components/index.d.ts +1 -0
  13. package/dist/components/index.d.ts.map +1 -1
  14. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +67 -0
  15. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
  16. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.stories.d.ts +16 -0
  17. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
  18. package/dist/components/navigation/Breadcrumbs/index.d.ts +2 -0
  19. package/dist/components/navigation/Breadcrumbs/index.d.ts.map +1 -0
  20. package/dist/components/navigation/index.d.ts +2 -0
  21. package/dist/components/navigation/index.d.ts.map +1 -0
  22. package/dist/root.css +1 -1
  23. package/dist/ui-kit.cjs.js +7 -20
  24. package/dist/ui-kit.cjs.js.map +1 -1
  25. package/dist/ui-kit.css +1 -1
  26. package/dist/ui-kit.es.js +2587 -2490
  27. package/dist/ui-kit.es.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),M=require("@emotion/css"),w=require("react"),_o=require("react-dom");function La(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=La(w);function $a(e){const{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:v,xGap:C,yGap:y,row:S,flex:_,relative:R,absolute:T,display:b,overflow:k,absoluteFill:F,center:z,justifyContent:Y,alignItems:ee,alignSelf:ie,borderWidth:re,borderBottomWidth:te,borderColor:$,borderRadius:U,zIndex:I,minWidth:j,minHeight:W,maxWidth:ve,maxHeight:Qe,flexWrap:Jt,flexGrow:Qt,flexShrink:en,flexBasis:tn,backgroundColor:_t,...Rt}=e;return{spacers:{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:v,xGap:C,yGap:y,row:S,flex:_,relative:R,absolute:T,display:b,overflow:k,absoluteFill:F,center:z,justifyContent:Y,alignItems:ee,alignSelf:ie,borderWidth:re,borderBottomWidth:te,borderColor:$,borderRadius:U,zIndex:I,minWidth:j,minHeight:W,maxWidth:ve,maxHeight:Qe,flexWrap:Jt,flexGrow:Qt,flexShrink:en,flexBasis:tn,backgroundColor:_t},rest:Rt}}const ja=e=>M.css({display:e.display??"flex",flexDirection:e.row?"row":"column",height:e.h==="screen"?"100vh":e.h==="full"?"100%":e.h,width:e.w==="screen"?"100vw":e.w==="full"?"100%":e.w,margin:e.m,marginTop:e.mt??e.my,marginBottom:e.mb??e.my,marginLeft:e.ml??e.mx,marginRight:e.mr??e.mx,padding:e.p,paddingTop:e.pt??e.py,paddingBottom:e.pb??e.py,paddingLeft:e.pl??e.px,paddingRight:e.pr??e.px,gap:e.gap,columnGap:e.xGap,rowGap:e.yGap,justifyContent:e.center?"center":e.justifyContent,alignItems:e.center?"center":e.alignItems,alignSelf:e.alignSelf,borderWidth:e.borderWidth,borderBottomWidth:e.borderBottomWidth,borderColor:e.borderColor,borderRadius:e.borderRadius,zIndex:e.zIndex,overflow:e.overflow,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,flex:e.flex===!0?1:e.flex,flexWrap:e.flexWrap,flexGrow:e.flexGrow,flexShrink:e.flexShrink,flexBasis:e.flexBasis,backgroundColor:e.backgroundColor,position:e.absolute?"absolute":e.relative?"relative":"unset",...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),V=w.forwardRef(({className:e,children:t,...n},i)=>{const{spacers:s,rest:o}=$a(n),r=w.useMemo(()=>ja(s),[s]);return m.jsx("div",{ref:i,className:M.cx(r,e),...o,children:t})});V.displayName="Box";const Ro=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Oa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var on={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),M=require("@emotion/css"),w=require("react"),Mo=require("react-dom");function Oa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ve=Oa(w);function za(e){const{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:v,xGap:C,yGap:y,row:S,flex:_,relative:b,absolute:P,display:R,overflow:F,absoluteFill:D,center:L,justifyContent:q,alignItems:ee,alignSelf:ie,borderWidth:re,borderBottomWidth:te,borderColor:$,borderRadius:G,zIndex:Y,minWidth:I,minHeight:z,maxWidth:U,maxHeight:be,flexWrap:nt,flexGrow:tn,flexShrink:nn,flexBasis:sn,backgroundColor:Rt,...Mt}=e;return{spacers:{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:v,xGap:C,yGap:y,row:S,flex:_,relative:b,absolute:P,display:R,overflow:F,absoluteFill:D,center:L,justifyContent:q,alignItems:ee,alignSelf:ie,borderWidth:re,borderBottomWidth:te,borderColor:$,borderRadius:G,zIndex:Y,minWidth:I,minHeight:z,maxWidth:U,maxHeight:be,flexWrap:nt,flexGrow:tn,flexShrink:nn,flexBasis:sn,backgroundColor:Rt},rest:Mt}}const Ba=e=>M.css({display:e.display??"flex",flexDirection:e.row?"row":"column",height:e.h==="screen"?"100vh":e.h==="full"?"100%":e.h,width:e.w==="screen"?"100vw":e.w==="full"?"100%":e.w,margin:e.m,marginTop:e.mt??e.my,marginBottom:e.mb??e.my,marginLeft:e.ml??e.mx,marginRight:e.mr??e.mx,padding:e.p,paddingTop:e.pt??e.py,paddingBottom:e.pb??e.py,paddingLeft:e.pl??e.px,paddingRight:e.pr??e.px,gap:e.gap,columnGap:e.xGap,rowGap:e.yGap,justifyContent:e.center?"center":e.justifyContent,alignItems:e.center?"center":e.alignItems,alignSelf:e.alignSelf,borderWidth:e.borderWidth,borderBottomWidth:e.borderBottomWidth,borderColor:e.borderColor,borderRadius:e.borderRadius,zIndex:e.zIndex,overflow:e.overflow,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,flex:e.flex===!0?1:e.flex,flexWrap:e.flexWrap,flexGrow:e.flexGrow,flexShrink:e.flexShrink,flexBasis:e.flexBasis,backgroundColor:e.backgroundColor,position:e.absolute?"absolute":e.relative?"relative":"unset",...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),T=w.forwardRef(({className:e,children:t,...n},i)=>{const{spacers:s,rest:o}=za(n),r=w.useMemo(()=>Ba(s),[s]);return m.jsx("div",{ref:i,className:M.cx(r,e),...o,children:t})});T.displayName="Box";const Po="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%206L6%2018M6%206L18%2018'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var an={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var qi;function za(){return qi||(qi=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=s(o,i(a)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var r="";for(var a in o)t.call(o,a)&&o[a]&&(r=s(r,a));return r}function s(o,r){return r?o?o+" "+r:o+r:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(on)),on.exports}var Ba=za();const Fe=Oa(Ba),Na="_rippleOverlay_s2kim_8",Ha="_ripple_s2kim_8",Xi={rippleOverlay:Na,ripple:Ha},rn="button, a, input, label, [role='button'], [data-ripple']";function Ga(e){if(typeof e.composedPath=="function")return e.composedPath();const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentNode||n.host;return t.push(window),t}const yt=w.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:i},s)=>{const o=w.useRef(null),[r,a]=w.useState([]),l=w.useRef([]),c=w.useRef(1),u=w.useRef(null),d=()=>{l.current.forEach(g=>clearTimeout(g)),l.current=[]},f=w.useCallback((g,x,v,C)=>{const y=v.getBoundingClientRect(),S=n==="auto"?Math.max(y.width,y.height)*2:n,_=g-C.left,R=x-C.top,T=Math.max(0,y.top-C.top),b=Math.max(0,y.left-C.left),k=Math.max(0,C.right-y.right),F=Math.max(0,C.bottom-y.bottom),Y=window.getComputedStyle(v).borderRadius||"0px",ee=c.current++,ie={id:ee,left:_-S/2,top:R-S/2,size:Math.ceil(S),clip:{top:Math.round(T),right:Math.round(k),bottom:Math.round(F),left:Math.round(b)},borderRadius:Y};a(te=>[...te,ie]);const re=window.setTimeout(()=>{a(te=>te.filter($=>$.id!==ee))},t+80);l.current.push(re)},[t,n]),h=w.useCallback(g=>{try{if(!o.current)return;const x=o.current,v=x.parentElement;if(!v)return;const C=Ga(g);let y=null;for(const b of C)if(b instanceof Element){if(b===v)break;if(b.matches&&b.matches(rn)){y=b;break}}if(y||(y=v),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const S=g.target;if(S&&S.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const _=x.getBoundingClientRect(),{clientX:R}=g,{clientY:T}=g;f(R,T,y,_)}catch{}},[f]),p=w.useCallback(g=>{if(!o.current||!(g.key==="Enter"||g.key===" "))return;const x=o.current,v=x.parentElement;if(!v)return;const C=document.activeElement;let y=null;if(C instanceof Element&&C.matches(rn)&&(y=C),y||(y=v),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const S=x.getBoundingClientRect(),_=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,R=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;f(_,R,y,S)},[f]);return w.useImperativeHandle(s,()=>({trigger:({center:g=!0,x,y:v}={})=>{const C=o.current;if(!C)return;const y=C.parentElement;if(!y)return;const S=C.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(rn)?document.activeElement:y,R=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:x??S.left+S.width/2,T=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:v??S.top+S.height/2;f(R,T,_,S)}}),[f]),w.useEffect(()=>{const g=o.current;if(!g)return;const x=g.parentElement;if(!x)return;const v=window.getComputedStyle(x);let C=!1;return v.position==="static"&&(x.style.position="relative",C=!0,u.current=x),x.addEventListener("pointerdown",h,!0),x.addEventListener("keydown",p),()=>{x.removeEventListener("pointerdown",h,!0),x.removeEventListener("keydown",p),C&&u.current&&(u.current.style.position="",u.current=null),d()}},[h,p]),w.useEffect(()=>()=>d(),[]),m.jsx("div",{ref:o,className:`${Xi.rippleOverlay} ${i??""}`,"aria-hidden":!0,children:r.map(g=>m.jsx("span",{className:Xi.ripple,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.size}px`,height:`${g.size}px`,backgroundColor:e,animationDuration:`${t}ms`,clipPath:`inset(${g.clip.top}px ${g.clip.right}px ${g.clip.bottom}px ${g.clip.left}px round ${g.borderRadius})`}},g.id))})});function Ht(e,t){const{current:n}=w.useRef(e!==void 0),[i,s]=w.useState(t),o=n?e:i,r=w.useCallback(a=>{n||s(a)},[n]);return[o,r]}const bo=(e,t)=>{const[n,i]=w.useState({top:0,left:0,width:0});return w.useLayoutEffect(()=>{if(!t||!e.current)return;const s=()=>{const r=e.current.getBoundingClientRect();i({top:r.bottom+window.scrollY+4,left:r.left+window.scrollX,width:r.width})};s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0);const o=new ResizeObserver(()=>s());return o.observe(e.current),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),o.disconnect()}},[t,e]),n};function Gt(e,t,n,i=""){if(n)return e[`${t}_${n}${i}`]}function ct(e,t,n){return Gt(e,t,n,"Size")}const Wa="_button_11ykb_8",Ua="_button_primary_11ykb_19",Ka="_button_secondary_11ykb_22",qa="_button_negative_11ykb_25",Xa="_button_positive_11ykb_28",Ya="_button_warning_11ykb_31",Za="_button_neutral_11ykb_34",Ja="_button_mdSize_11ykb_118",Qa="_button_smSize_11ykb_128",el="_button_xsSize_11ykb_138",an={button:Wa,button_primary:Ua,button_secondary:Ka,button_negative:qa,button_positive:Xa,button_warning:Ya,button_neutral:Za,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:Ja,button_smSize:Qa,button_xsSize:el};function dt({attr:e,children:t,className:n,type:i="button",color:s="primary",size:o="md",...r}){const a="button";return m.jsxs("button",{...e,...r,type:i,className:Fe(an[a],n,ct(an,a,o),Gt(an,a,s)),children:[m.jsx(yt,{}),t]})}const tl="_overlay_1udux_8",nl="_open_1udux_21",il="_modal_1udux_25",sl="_closeButton_1udux_42",ol="_size_lg_1udux_49",rl="_size_md_1udux_52",al="_size_sm_1udux_55",et={overlay:tl,open:nl,modal:il,"modal-animation":"_modal-animation_1udux_1",closeButton:sl,size_lg:ol,size_md:rl,size_sm:al},Po=w.forwardRef(({isOpen:e=!0,onClose:t,overlayClassName:n,modalClassName:i,size:s="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:c},u)=>{w.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=w.useCallback(h=>{h.key==="Escape"&&t&&t()},[t]);w.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=w.useCallback(h=>{h.target===h.currentTarget&&o&&t&&t()},[o,t]);return m.jsx("div",{onClick:f,className:M.cx(et.overlay,{[et.open]:e},n),children:m.jsxs(V,{ref:u,className:M.cx(et.modal,et[`size_${s}`],i),children:[l&&m.jsx(dt,{className:et.closeButton,onClick:t,color:"neutral",children:m.jsx(Ro,{})}),c]})})});Po.displayName="Modal";const si=w.createContext({});function oi(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const ri=typeof window<"u",Mo=ri?w.useLayoutEffect:w.useEffect,Wt=w.createContext(null);function ai(e,t){e.indexOf(t)===-1&&e.push(t)}function li(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ce=(e,t,n)=>n>t?t:n<e?e:n;function An(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Xe=()=>{},Se=()=>{};process.env.NODE_ENV!=="production"&&(Xe=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(An(t,n))},Se=(e,t,n)=>{if(!e)throw new Error(An(t,n))});const _e={},To=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Vo(e){return typeof e=="object"&&e!==null}const Eo=e=>/^0[^.\s]+$/u.test(e);function ui(e){let t;return()=>(t===void 0&&(t=e()),t)}const fe=e=>e,ll=(e,t)=>n=>t(e(n)),xt=(...e)=>e.reduce(ll),ft=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class ci{constructor(){this.subscriptions=[]}add(t){return ai(this.subscriptions,t),()=>li(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const pe=e=>e*1e3,de=e=>e/1e3;function Ao(e,t){return t?e*(1e3/t):0}const Yi=new Set;function di(e,t,n){e||Yi.has(t)||(console.warn(An(t,n)),Yi.add(t))}const Do=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ul=1e-7,cl=12;function dl(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Do(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>ul&&++a<cl);return r}function wt(e,t,n,i){if(e===t&&n===i)return fe;const s=o=>dl(o,0,1,e,n);return o=>o===0||o===1?o:Do(s(o),t,i)}const Fo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ko=e=>t=>1-e(1-t),Io=wt(.33,1.53,.69,.99),fi=ko(Io),Lo=Fo(fi),$o=e=>(e*=2)<1?.5*fi(e):.5*(2-Math.pow(2,-10*(e-1))),hi=e=>1-Math.sin(Math.acos(e)),jo=ko(hi),Oo=Fo(hi),fl=wt(.42,0,1,1),hl=wt(0,0,.58,1),zo=wt(.42,0,.58,1),gl=e=>Array.isArray(e)&&typeof e[0]!="number",Bo=e=>Array.isArray(e)&&typeof e[0]=="number",Zi={linear:fe,easeIn:fl,easeInOut:zo,easeOut:hl,circIn:hi,circInOut:Oo,circOut:jo,backIn:fi,backInOut:Lo,backOut:Io,anticipate:$o},pl=e=>typeof e=="string",Ji=e=>{if(Bo(e)){Se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return wt(t,n,i,s)}else if(pl(e))return Se(Zi[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Zi[e];return e},bt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ml(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&s?n:i;return d&&r.add(u),p.has(u)||p.add(u),u},cancel:u=>{i.delete(u),r.delete(u)},process:u=>{if(a=u,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(u))}};return c}const vl=40;function No(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=bt.reduce((y,S)=>(y[S]=ml(o),y),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const y=_e.useManualTiming?s.timestamp:performance.now();n=!1,_e.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(y-s.timestamp,vl),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(g))},x=()=>{n=!0,i=!0,s.isProcessing||e(g)};return{schedule:bt.reduce((y,S)=>{const _=r[S];return y[S]=(R,T=!1,b=!1)=>(n||x(),_.schedule(R,T,b)),y},{}),cancel:y=>{for(let S=0;S<bt.length;S++)r[bt[S]].cancel(y)},state:s,steps:r}}const{schedule:N,cancel:Pe,state:Z,steps:ln}=No(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let Ft;function yl(){Ft=void 0}const oe={now:()=>(Ft===void 0&&oe.set(Z.isProcessing||_e.useManualTiming?Z.timestamp:performance.now()),Ft),set:e=>{Ft=e,queueMicrotask(yl)}},Ho=e=>t=>typeof t=="string"&&t.startsWith(e),gi=Ho("--"),xl=Ho("var(--"),pi=e=>xl(e)?wl.test(e.split("/*")[0].trim()):!1,wl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ye={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ht={...Ye,transform:e=>Ce(0,1,e)},Pt={...Ye,default:1},ot=e=>Math.round(e*1e5)/1e5,mi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cl(e){return e==null}const Sl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vi=(e,t)=>n=>!!(typeof n=="string"&&Sl.test(n)&&n.startsWith(e)||t&&!Cl(n)&&Object.prototype.hasOwnProperty.call(n,t)),Go=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(mi);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},_l=e=>Ce(0,255,e),un={...Ye,transform:e=>Math.round(_l(e))},ke={test:vi("rgb","red"),parse:Go("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+un.transform(e)+", "+un.transform(t)+", "+un.transform(n)+", "+ot(ht.transform(i))+")"};function Rl(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Dn={test:vi("#"),parse:Rl,transform:ke.transform},Ct=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Re=Ct("deg"),ye=Ct("%"),D=Ct("px"),bl=Ct("vh"),Pl=Ct("vw"),Qi={...ye,parse:e=>ye.parse(e)/100,transform:e=>ye.transform(e*100)},ze={test:vi("hsl","hue"),parse:Go("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+ye.transform(ot(t))+", "+ye.transform(ot(n))+", "+ot(ht.transform(i))+")"},q={test:e=>ke.test(e)||Dn.test(e)||ze.test(e),parse:e=>ke.test(e)?ke.parse(e):ze.test(e)?ze.parse(e):Dn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ke.transform(e):ze.transform(e),getAnimatableNone:e=>{const t=q.parse(e);return t.alpha=0,q.transform(t)}},Ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Tl(e){return isNaN(e)&&typeof e=="string"&&(e.match(mi)?.length||0)+(e.match(Ml)?.length||0)>0}const Wo="number",Uo="color",Vl="var",El="var(",es="${}",Al=/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 gt(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Al,l=>(q.test(l)?(i.color.push(o),s.push(Uo),n.push(q.parse(l))):l.startsWith(El)?(i.var.push(o),s.push(Vl),n.push(l)):(i.number.push(o),s.push(Wo),n.push(parseFloat(l))),++o,es)).split(es);return{values:n,split:a,indexes:i,types:s}}function Ko(e){return gt(e).values}function qo(e){const{split:t,types:n}=gt(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===Wo?o+=ot(s[r]):a===Uo?o+=q.transform(s[r]):o+=s[r]}return o}}const Dl=e=>typeof e=="number"?0:q.test(e)?q.getAnimatableNone(e):e;function Fl(e){const t=Ko(e);return qo(e)(t.map(Dl))}const Me={test:Tl,parse:Ko,createTransformer:qo,getAnimatableNone:Fl};function cn(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 kl({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=cn(l,a,e+1/3),o=cn(l,a,e),r=cn(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function $t(e,t){return n=>n>0?t:e}const G=(e,t,n)=>e+(t-e)*n,dn=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Il=[Dn,ke,ze],Ll=e=>Il.find(t=>t.test(e));function ts(e){const t=Ll(e);if(Xe(!!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=kl(n)),n}const ns=(e,t)=>{const n=ts(e),i=ts(t);if(!n||!i)return $t(e,t);const s={...n};return o=>(s.red=dn(n.red,i.red,o),s.green=dn(n.green,i.green,o),s.blue=dn(n.blue,i.blue,o),s.alpha=G(n.alpha,i.alpha,o),ke.transform(s))},Fn=new Set(["none","hidden"]);function $l(e,t){return Fn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jl(e,t){return n=>G(e,t,n)}function yi(e){return typeof e=="number"?jl:typeof e=="string"?pi(e)?$t:q.test(e)?ns:Bl:Array.isArray(e)?Xo:typeof e=="object"?q.test(e)?ns:Ol:$t}function Xo(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>yi(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function Ol(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=yi(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function zl(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const Bl=(e,t)=>{const n=Me.createTransformer(t),i=gt(e),s=gt(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Fn.has(e)&&!s.values.length||Fn.has(t)&&!i.values.length?$l(e,t):xt(Xo(zl(i,s),s.values),n):(Xe(!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"),$t(e,t))};function Yo(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?G(e,t,n):yi(e)(e,t)}const Nl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>N.update(t,n),stop:()=>Pe(t),now:()=>Z.isProcessing?Z.timestamp:oe.now()}},Zo=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},jt=2e4;function xi(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<jt;)t+=n,i=e.next(t);return t>=jt?1/0:t}function Hl(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(xi(i),jt);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:de(s)}}const Gl=5;function Jo(e,t,n){const i=Math.max(t-Gl,0);return Ao(n-e(i),t-i)}const H={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},fn=.001;function Wl({duration:e=H.duration,bounce:t=H.bounce,velocity:n=H.velocity,mass:i=H.mass}){let s,o;Xe(e<=pe(H.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Ce(H.minDamping,H.maxDamping,r),e=Ce(H.minDuration,H.maxDuration,de(e)),r<1?(s=c=>{const u=c*r,d=u*e,f=u-n,h=kn(c,r),p=Math.exp(-d);return fn-f/h*p},o=c=>{const d=c*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,p=Math.exp(-d),g=kn(Math.pow(c,2),r);return(-s(c)+fn>0?-1:1)*((f-h)*p)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-fn+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Kl(s,o,a);if(e=pe(e),isNaN(l))return{stiffness:H.stiffness,damping:H.damping,duration:e};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:e}}}const Ul=12;function Kl(e,t,n){let i=n;for(let s=1;s<Ul;s++)i=i-e(i)/t(i);return i}function kn(e,t){return e*Math.sqrt(1-t*t)}const ql=["duration","bounce"],Xl=["stiffness","damping","mass"];function is(e,t){return t.some(n=>e[n]!==void 0)}function Yl(e){let t={velocity:H.velocity,stiffness:H.stiffness,damping:H.damping,mass:H.mass,isResolvedFromDuration:!1,...e};if(!is(e,Xl)&&is(e,ql))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*Ce(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:H.mass,stiffness:s,damping:o}}else{const n=Wl(e);t={...t,...n,mass:H.mass},t.isResolvedFromDuration=!0}return t}function Ot(e=H.visualDuration,t=H.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Yl({...n,velocity:-de(n.velocity||0)}),p=f||0,g=c/(2*Math.sqrt(l*u)),x=r-o,v=de(Math.sqrt(l/u)),C=Math.abs(x)<5;i||(i=C?H.restSpeed.granular:H.restSpeed.default),s||(s=C?H.restDelta.granular:H.restDelta.default);let y;if(g<1){const _=kn(v,g);y=R=>{const T=Math.exp(-g*v*R);return r-T*((p+g*v*x)/_*Math.sin(_*R)+x*Math.cos(_*R))}}else if(g===1)y=_=>r-Math.exp(-v*_)*(x+(p+v*x)*_);else{const _=v*Math.sqrt(g*g-1);y=R=>{const T=Math.exp(-g*v*R),b=Math.min(_*R,300);return r-T*((p+g*v*x)*Math.sinh(b)+_*x*Math.cosh(b))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const R=y(_);if(h)a.done=_>=d;else{let T=_===0?p:0;g<1&&(T=_===0?pe(p):Jo(y,_,R));const b=Math.abs(T)<=i,k=Math.abs(r-R)<=s;a.done=b&&k}return a.value=a.done?r:R,a},toString:()=>{const _=Math.min(xi(S),jt),R=Zo(T=>S.next(_*T).value,_,30);return _+"ms "+R},toTransition:()=>{}};return S}Ot.applyToOptions=e=>{const t=Hl(e,100,Ot);return e.ease=t.ease,e.duration=pe(t.duration),e.type="keyframes",e};function In({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=b=>a!==void 0&&b<a||l!==void 0&&b>l,p=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let g=n*t;const x=d+g,v=r===void 0?x:r(x);v!==x&&(g=v-d);const C=b=>-g*Math.exp(-b/i),y=b=>v+C(b),S=b=>{const k=C(b),F=y(b);f.done=Math.abs(k)<=c,f.value=f.done?v:F};let _,R;const T=b=>{h(f.value)&&(_=b,R=Ot({keyframes:[f.value,p(f.value)],velocity:Jo(y,b,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:b=>{let k=!1;return!R&&_===void 0&&(k=!0,S(b),T(b)),_!==void 0&&b>=_?R.next(b-_):(!k&&S(b),f)}}}function Zl(e,t,n){const i=[],s=n||_e.mix||Yo,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||fe:t;a=xt(l,a)}i.push(a)}return i}function Jl(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(Se(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 r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Zl(t,i,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ft(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ce(e[0],e[o-1],u)):c}function Ql(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=ft(0,t,i);e.push(G(n,1,s))}}function eu(e){const t=[0];return Ql(t,e.length-1),t}function tu(e,t){return e.map(n=>n*t)}function nu(e,t){return e.map(()=>t||zo).splice(0,e.length-1)}function Be({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=gl(i)?i.map(Ji):Ji(i),o={done:!1,value:t[0]},r=tu(n&&n.length===t.length?n:eu(t),e),a=Jl(r,t,{ease:Array.isArray(s)?s:nu(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const iu=e=>e!==null;function wi(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(iu),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const su={decay:In,inertia:In,tween:Be,keyframes:Be,spring:Ot};function Qo(e){typeof e.type=="string"&&(e.type=su[e.type])}class Ci{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 ou=e=>e/100;class Si extends Ci{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==oe.now()&&this.tick(oe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Qo(t);const{type:n=Be,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Be;process.env.NODE_ENV!=="production"&&l!==Be&&Se(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Be&&typeof a[0]!="number"&&(this.mixKeyframes=xt(ou,Yo(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=xi(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,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:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=i;if(d){const b=Math.min(this.currentTime,s)/a;let k=Math.floor(b),F=b%1;!F&&b>=1&&(F=1),F===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(f==="reverse"?(F=1-F,h&&(F-=h/a)):f==="mirror"&&(S=r)),y=Ce(0,1,F)*a}const _=C?{done:!1,value:u[0]}:S.next(y);o&&(_.value=o(_.value));let{done:R}=_;!C&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return T&&p!==In&&(_.value=wi(u,this.options,x,this.speed)),g&&g(_.value),T&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return de(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+de(t)}get time(){return de(this.currentTime)}set time(t){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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(oe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=de(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Nl,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(oe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function ru(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ie=e=>e*180/Math.PI,Ln=e=>{const t=Ie(Math.atan2(e[1],e[0]));return $n(t)},au={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ln,rotateZ:Ln,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},$n=e=>(e=e%360,e<0&&(e+=360),e),ss=Ln,os=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),lu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:os,scaleY:rs,scale:e=>(os(e)+rs(e))/2,rotateX:e=>$n(Ie(Math.atan2(e[6],e[5]))),rotateY:e=>$n(Ie(Math.atan2(-e[2],e[0]))),rotateZ:ss,rotate:ss,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 jn(e){return e.includes("scale")?1:0}function On(e,t){if(!e||e==="none")return jn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=lu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=au,s=a}if(!s)return jn(t);const o=i[t],r=s[1].split(",").map(cu);return typeof o=="function"?o(r):r[o]}const uu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return On(n,t)};function cu(e){return parseFloat(e.trim())}const Ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Je=new Set(Ze),as=e=>e===Ye||e===D,du=new Set(["x","y","z"]),fu=Ze.filter(e=>!du.has(e));function hu(e){const t=[];return fu.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Le={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})=>On(t,"x"),y:(e,{transform:t})=>On(t,"y")};Le.translateX=Le.x;Le.translateY=Le.y;const $e=new Set;let zn=!1,Bn=!1,Nn=!1;function er(){if(Bn){const e=Array.from($e).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=hu(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Bn=!1,zn=!1,$e.forEach(e=>e.complete(Nn)),$e.clear()}function tr(){$e.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Bn=!0)})}function gu(){Nn=!0,tr(),er(),Nn=!1}class _i{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?($e.add(this),zn||(zn=!0,N.read(tr),N.resolveKeyframes(er))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}ru(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$e.delete(this)}cancel(){this.state==="scheduled"&&($e.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const pu=e=>e.startsWith("--");function mu(e,t,n){pu(t)?e.style.setProperty(t,n):e.style[t]=n}const vu=ui(()=>window.ScrollTimeline!==void 0),yu={};function xu(e,t){const n=ui(e);return()=>yu[t]??n()}const nr=xu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),st=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,ls={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:st([0,.65,.55,1]),circOut:st([.55,0,1,.45]),backIn:st([.31,.01,.66,-.59]),backOut:st([.33,1.53,.69,.99])};function ir(e,t){if(e)return typeof e=="function"?nr()?Zo(e,t):"ease-out":Bo(e)?st(e):Array.isArray(e)?e.map(n=>ir(n,t)||ls.easeOut):ls[e]}function wu(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ir(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function sr(e){return typeof e=="function"&&"applyToOptions"in e}function Cu({type:e,...t}){return sr(e)&&nr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Su extends Ci{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Cu(t);this.animation=wu(n,i,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=wi(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):mu(n,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return de(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+de(t)}get time(){return de(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}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&vu()?(this.animation.timeline=t,fe):n(this)}}const or={anticipate:$o,backInOut:Lo,circInOut:Oo};function _u(e){return e in or}function Ru(e){typeof e.ease=="string"&&_u(e.ease)&&(e.ease=or[e.ease])}const us=10;class bu extends Su{constructor(t){Ru(t),Qo(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Si({...r,autoplay:!1}),l=pe(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-us).value,a.sample(l).value,us),a.stop()}}const cs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Me.test(e)||e==="0")&&!e.startsWith("url("));function Pu(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 Mu(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=cs(s,t),a=cs(o,t);return Xe(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Pu(e)||(n==="spring"||sr(n))&&i}function Hn(e){e.duration=0,e.type="keyframes"}const Tu=new Set(["opacity","clipPath","filter","transform"]),Vu=ui(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Eu(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Vu()&&n&&Tu.has(n)&&(n!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const Au=40;class Du extends Ci{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=oe.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||_i;this.keyframeResolver=new h(a,(p,g,x)=>this.onKeyframesResolved(p,g,f,!x),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=oe.now(),Mu(t,o,r,a)||((_e.instantAnimations||!l)&&u?.(wi(t,i,n)),t[0]=t[t.length-1],Hn(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Au?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!c&&Eu(f)?new bu({...f,element:f.motionValue.owner.current}):new Si(f);h.finished.then(()=>this.notifyFinished()).catch(fe),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(){return this._animation||(this.keyframeResolver?.resume(),gu()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Fu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ku(e){const t=Fu.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const Iu=4;function rr(e,t,n=1){Se(n<=Iu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=ku(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return To(r)?parseFloat(r):r}return pi(s)?rr(s,t,n+1):s}function Ri(e,t){return e?.[t]??e?.default??e}const ar=new Set(["width","height","top","left","right","bottom",...Ze]),Lu={test:e=>e==="auto",parse:e=>e},lr=e=>t=>t.test(e),ur=[Ye,D,ye,Re,Pl,bl,Lu],ds=e=>ur.find(lr(e));function $u(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Eo(e):!0}const ju=new Set(["brightness","contrast","saturate","opacity"]);function Ou(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(mi)||[];if(!i)return e;const s=n.replace(i,"");let o=ju.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const zu=/\b([a-z-]*)\(.*?\)/gu,Gn={...Me,getAnimatableNone:e=>{const t=e.match(zu);return t?t.map(Ou).join(" "):e}},fs={...Ye,transform:Math.round},Bu={rotate:Re,rotateX:Re,rotateY:Re,rotateZ:Re,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Re,skewX:Re,skewY:Re,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:ht,originX:Qi,originY:Qi,originZ:D},bi={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,backgroundPositionX:D,backgroundPositionY:D,...Bu,zIndex:fs,fillOpacity:ht,strokeOpacity:ht,numOctaves:fs},Nu={...bi,color:q,backgroundColor:q,outlineColor:q,fill:q,stroke:q,borderColor:q,borderTopColor:q,borderRightColor:q,borderBottomColor:q,borderLeftColor:q,filter:Gn,WebkitFilter:Gn},cr=e=>Nu[e];function dr(e,t){let n=cr(e);return n!==Gn&&(n=Me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Hu=new Set(["auto","none","0"]);function Gu(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Hu.has(o)&&gt(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=dr(n,s)}class Wu extends _i{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=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(),pi(c))){const u=rr(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ar.has(i)||t.length!==2)return;const[s,o]=t,r=ds(s),a=ds(o);if(r!==a)if(as(r)&&as(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Le[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||$u(t[s]))&&i.push(s);i.length&&Gu(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Le[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=Le[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Uu(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const fr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hr(e){return Vo(e)&&"offsetHeight"in e}const hs=30,Ku=e=>!isNaN(parseFloat(e));class qu{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=oe.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=oe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ku(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&di(!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 ci);const i=this.events[t].add(n);return t==="change"?()=>{i(),N.read(()=>{this.events.change.getSize()||this.stop()})}:i}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,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.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 this.current}getPrevious(){return this.prev}getVelocity(){const t=oe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>hs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,hs);return Ao(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ke(e,t){return new qu(e,t)}const{schedule:Pi}=No(queueMicrotask,!1),ge={x:!1,y:!1};function gr(){return ge.x||ge.y}function Xu(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function pr(e,t){const n=Uu(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function gs(e){return!(e.pointerType==="touch"||gr())}function Yu(e,t,n={}){const[i,s,o]=pr(e,n),r=a=>{if(!gs(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{gs(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return i.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}const mr=(e,t)=>t?e===t?!0:mr(e,t.parentElement):!1,Mi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Zu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ju(e){return Zu.has(e.tagName)||e.tabIndex!==-1}const kt=new WeakSet;function ps(e){return t=>{t.key==="Enter"&&e(t)}}function hn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Qu=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=ps(()=>{if(kt.has(n))return;hn(n,"down");const s=ps(()=>{hn(n,"up")}),o=()=>hn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function ms(e){return Mi(e)&&!gr()}function ec(e,t,n={}){const[i,s,o]=pr(e,n),r=a=>{const l=a.currentTarget;if(!ms(a))return;kt.add(l);const c=t(l,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),kt.has(l)&&kt.delete(l),ms(h)&&typeof c=="function"&&c(h,{success:p})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||mr(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),hr(a)&&(a.addEventListener("focus",c=>Qu(c,s)),!Ju(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function vr(e){return Vo(e)&&"ownerSVGElement"in e}function tc(e){return vr(e)&&e.tagName==="svg"}const Q=e=>!!(e&&e.getVelocity),nc=[...ur,q,Me],ic=e=>nc.find(lr(e)),Ti=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sc(...e){return t=>{let n=!1;const i=e.map(s=>{const o=vs(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():vs(e[s],null)}}}}function oc(...e){return P.useCallback(sc(...e),e)}class rc extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=hr(i)&&i.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=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function ac({children:e,isPresent:t,anchorX:n,root:i}){const s=w.useId(),o=w.useRef(null),r=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=w.useContext(Ti),l=oc(o,e?.ref);return w.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(t||!o.current||!c||!u)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const x=i??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
5
+ */var Zi;function Ha(){return Zi||(Zi=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=s(o,i(a)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var r="";for(var a in o)t.call(o,a)&&o[a]&&(r=s(r,a));return r}function s(o,r){return r?o?o+" "+r:o+r:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(an)),an.exports}var Ga=Ha();const ke=Na(Ga),Wa="_rippleOverlay_s2kim_8",Ua="_ripple_s2kim_8",Ji={rippleOverlay:Wa,ripple:Ua},ln="button, a, input, label, [role='button'], [data-ripple]";function Ka(e){if(typeof e.composedPath=="function")return e.composedPath();const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentNode||n.host;return t.push(window),t}const Ze=w.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:i},s)=>{const o=w.useRef(null),[r,a]=w.useState([]),l=w.useRef([]),c=w.useRef(1),u=w.useRef(null),d=()=>{l.current.forEach(g=>clearTimeout(g)),l.current=[]},f=w.useCallback((g,x,v,C)=>{const y=v.getBoundingClientRect(),S=n==="auto"?Math.max(y.width,y.height)*2:n,_=g-C.left,b=x-C.top,P=Math.max(0,y.top-C.top),R=Math.max(0,y.left-C.left),F=Math.max(0,C.right-y.right),D=Math.max(0,C.bottom-y.bottom),q=window.getComputedStyle(v).borderRadius||"0px",ee=c.current++,ie={id:ee,left:_-S/2,top:b-S/2,size:Math.ceil(S),clip:{top:Math.round(P),right:Math.round(F),bottom:Math.round(D),left:Math.round(R)},borderRadius:q};a(te=>[...te,ie]);const re=window.setTimeout(()=>{a(te=>te.filter($=>$.id!==ee))},t+80);l.current.push(re)},[t,n]),h=w.useCallback(g=>{try{if(!o.current)return;const x=o.current,v=x.parentElement;if(!v)return;const C=Ka(g);let y=null;for(const R of C)if(R instanceof Element){if(R===v)break;if(R.matches&&R.matches(ln)){y=R;break}}if(y||(y=v),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const S=g.target;if(S&&S.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const _=x.getBoundingClientRect(),{clientX:b}=g,{clientY:P}=g;f(b,P,y,_)}catch{}},[f]),p=w.useCallback(g=>{if(!o.current||!(g.key==="Enter"||g.key===" "))return;const x=o.current,v=x.parentElement;if(!v)return;const C=document.activeElement;let y=null;if(C instanceof Element&&C.matches(ln)&&(y=C),y||(y=v),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const S=x.getBoundingClientRect(),_=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,b=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;f(_,b,y,S)},[f]);return w.useImperativeHandle(s,()=>({trigger:({center:g=!0,x,y:v}={})=>{const C=o.current;if(!C)return;const y=C.parentElement;if(!y)return;const S=C.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(ln)?document.activeElement:y,b=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:x??S.left+S.width/2,P=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:v??S.top+S.height/2;f(b,P,_,S)}}),[f]),w.useEffect(()=>{const g=o.current;if(!g)return;const x=g.parentElement;if(!x)return;const v=window.getComputedStyle(x);let C=!1;return v.position==="static"&&(x.style.position="relative",C=!0,u.current=x),x.addEventListener("pointerdown",h,!0),x.addEventListener("keydown",p),()=>{x.removeEventListener("pointerdown",h,!0),x.removeEventListener("keydown",p),C&&u.current&&(u.current.style.position="",u.current=null),d()}},[h,p]),w.useEffect(()=>()=>d(),[]),m.jsx("div",{ref:o,className:`${Ji.rippleOverlay} ${i??""}`,"aria-hidden":!0,children:r.map(g=>m.jsx("span",{className:Ji.ripple,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.size}px`,height:`${g.size}px`,backgroundColor:e,animationDuration:`${t}ms`,clipPath:`inset(${g.clip.top}px ${g.clip.right}px ${g.clip.bottom}px ${g.clip.left}px round ${g.borderRadius})`}},g.id))})});function Ut(e,t){const{current:n}=w.useRef(e!==void 0),[i,s]=w.useState(t),o=n?e:i,r=w.useCallback(a=>{n||s(a)},[n]);return[o,r]}const To=(e,t)=>{const[n,i]=w.useState({top:0,left:0,width:0});return w.useLayoutEffect(()=>{if(!t||!e.current)return;const s=()=>{const r=e.current.getBoundingClientRect();i({top:r.bottom+window.scrollY+4,left:r.left+window.scrollX,width:r.width})};s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0);const o=new ResizeObserver(()=>s());return o.observe(e.current),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),o.disconnect()}},[t,e]),n};function Kt(e,t,n,i=""){if(n)return e[`${t}_${n}${i}`]}function ht(e,t,n){return Kt(e,t,n,"Size")}const qa="_button_11ykb_8",Xa="_button_primary_11ykb_19",Ya="_button_secondary_11ykb_22",Za="_button_negative_11ykb_25",Ja="_button_positive_11ykb_28",Qa="_button_warning_11ykb_31",el="_button_neutral_11ykb_34",tl="_button_mdSize_11ykb_118",nl="_button_smSize_11ykb_128",il="_button_xsSize_11ykb_138",un={button:qa,button_primary:Xa,button_secondary:Ya,button_negative:Za,button_positive:Ja,button_warning:Qa,button_neutral:el,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:tl,button_smSize:nl,button_xsSize:il};function gt({attr:e,children:t,className:n,type:i="button",color:s="primary",size:o="md",...r}){const a="button";return m.jsxs("button",{...e,...r,type:i,className:ke(un[a],n,ht(un,a,o),Kt(un,a,s)),children:[m.jsx(Ze,{}),t]})}const sl="_overlay_1udux_8",ol="_open_1udux_21",rl="_modal_1udux_25",al="_closeButton_1udux_42",ll="_size_lg_1udux_49",ul="_size_md_1udux_52",cl="_size_sm_1udux_55",it={overlay:sl,open:ol,modal:rl,"modal-animation":"_modal-animation_1udux_1",closeButton:al,size_lg:ll,size_md:ul,size_sm:cl},Vo=w.forwardRef(({isOpen:e=!0,onClose:t,overlayClassName:n,modalClassName:i,size:s="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:c},u)=>{w.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=w.useCallback(h=>{h.key==="Escape"&&t&&t()},[t]);w.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=w.useCallback(h=>{h.target===h.currentTarget&&o&&t&&t()},[o,t]);return m.jsx("div",{onClick:f,className:M.cx(it.overlay,{[it.open]:e},n),children:m.jsxs(T,{ref:u,className:M.cx(it.modal,it[`size_${s}`],i),children:[l&&m.jsx(gt,{className:it.closeButton,onClick:t,color:"neutral",children:m.jsx(Po,{})}),c]})})});Vo.displayName="Modal";const ri=w.createContext({});function ai(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const li=typeof window<"u",Eo=li?w.useLayoutEffect:w.useEffect,qt=w.createContext(null);function ui(e,t){e.indexOf(t)===-1&&e.push(t)}function ci(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ce=(e,t,n)=>n>t?t:n<e?e:n;function Fn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Je=()=>{},Se=()=>{};process.env.NODE_ENV!=="production"&&(Je=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Fn(t,n))},Se=(e,t,n)=>{if(!e)throw new Error(Fn(t,n))});const _e={},Ao=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Do(e){return typeof e=="object"&&e!==null}const Fo=e=>/^0[^.\s]+$/u.test(e);function di(e){let t;return()=>(t===void 0&&(t=e()),t)}const fe=e=>e,dl=(e,t)=>n=>t(e(n)),Ct=(...e)=>e.reduce(dl),pt=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class fi{constructor(){this.subscriptions=[]}add(t){return ui(this.subscriptions,t),()=>ci(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const pe=e=>e*1e3,de=e=>e/1e3;function Io(e,t){return t?e*(1e3/t):0}const Qi=new Set;function hi(e,t,n){e||Qi.has(t)||(console.warn(Fn(t,n)),Qi.add(t))}const ko=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fl=1e-7,hl=12;function gl(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=ko(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>fl&&++a<hl);return r}function St(e,t,n,i){if(e===t&&n===i)return fe;const s=o=>gl(o,0,1,e,n);return o=>o===0||o===1?o:ko(s(o),t,i)}const jo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$o=e=>t=>1-e(1-t),Lo=St(.33,1.53,.69,.99),gi=$o(Lo),Oo=jo(gi),zo=e=>(e*=2)<1?.5*gi(e):.5*(2-Math.pow(2,-10*(e-1))),pi=e=>1-Math.sin(Math.acos(e)),Bo=$o(pi),No=jo(pi),pl=St(.42,0,1,1),ml=St(0,0,.58,1),Ho=St(.42,0,.58,1),vl=e=>Array.isArray(e)&&typeof e[0]!="number",Go=e=>Array.isArray(e)&&typeof e[0]=="number",es={linear:fe,easeIn:pl,easeInOut:Ho,easeOut:ml,circIn:pi,circInOut:No,circOut:Bo,backIn:gi,backInOut:Oo,backOut:Lo,anticipate:zo},yl=e=>typeof e=="string",ts=e=>{if(Go(e)){Se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return St(t,n,i,s)}else if(yl(e))return Se(es[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),es[e];return e},Pt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function xl(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&s?n:i;return d&&r.add(u),p.has(u)||p.add(u),u},cancel:u=>{i.delete(u),r.delete(u)},process:u=>{if(a=u,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(u))}};return c}const wl=40;function Wo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Pt.reduce((y,S)=>(y[S]=xl(o),y),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const y=_e.useManualTiming?s.timestamp:performance.now();n=!1,_e.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(y-s.timestamp,wl),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(g))},x=()=>{n=!0,i=!0,s.isProcessing||e(g)};return{schedule:Pt.reduce((y,S)=>{const _=r[S];return y[S]=(b,P=!1,R=!1)=>(n||x(),_.schedule(b,P,R)),y},{}),cancel:y=>{for(let S=0;S<Pt.length;S++)r[Pt[S]].cancel(y)},state:s,steps:r}}const{schedule:B,cancel:Te,state:Z,steps:cn}=Wo(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let kt;function Cl(){kt=void 0}const oe={now:()=>(kt===void 0&&oe.set(Z.isProcessing||_e.useManualTiming?Z.timestamp:performance.now()),kt),set:e=>{kt=e,queueMicrotask(Cl)}},Uo=e=>t=>typeof t=="string"&&t.startsWith(e),mi=Uo("--"),Sl=Uo("var(--"),vi=e=>Sl(e)?_l.test(e.split("/*")[0].trim()):!1,_l=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mt={...Qe,transform:e=>Ce(0,1,e)},Tt={...Qe,default:1},lt=e=>Math.round(e*1e5)/1e5,yi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bl(e){return e==null}const Rl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xi=(e,t)=>n=>!!(typeof n=="string"&&Rl.test(n)&&n.startsWith(e)||t&&!bl(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ko=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(yi);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ml=e=>Ce(0,255,e),dn={...Qe,transform:e=>Math.round(Ml(e))},je={test:xi("rgb","red"),parse:Ko("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+dn.transform(e)+", "+dn.transform(t)+", "+dn.transform(n)+", "+lt(mt.transform(i))+")"};function Pl(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const In={test:xi("#"),parse:Pl,transform:je.transform},_t=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Me=_t("deg"),ye=_t("%"),A=_t("px"),Tl=_t("vh"),Vl=_t("vw"),ns={...ye,parse:e=>ye.parse(e)/100,transform:e=>ye.transform(e*100)},Ne={test:xi("hsl","hue"),parse:Ko("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+ye.transform(lt(t))+", "+ye.transform(lt(n))+", "+lt(mt.transform(i))+")"},K={test:e=>je.test(e)||In.test(e)||Ne.test(e),parse:e=>je.test(e)?je.parse(e):Ne.test(e)?Ne.parse(e):In.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?je.transform(e):Ne.transform(e),getAnimatableNone:e=>{const t=K.parse(e);return t.alpha=0,K.transform(t)}},El=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Al(e){return isNaN(e)&&typeof e=="string"&&(e.match(yi)?.length||0)+(e.match(El)?.length||0)>0}const qo="number",Xo="color",Dl="var",Fl="var(",is="${}",Il=/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 vt(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Il,l=>(K.test(l)?(i.color.push(o),s.push(Xo),n.push(K.parse(l))):l.startsWith(Fl)?(i.var.push(o),s.push(Dl),n.push(l)):(i.number.push(o),s.push(qo),n.push(parseFloat(l))),++o,is)).split(is);return{values:n,split:a,indexes:i,types:s}}function Yo(e){return vt(e).values}function Zo(e){const{split:t,types:n}=vt(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===qo?o+=lt(s[r]):a===Xo?o+=K.transform(s[r]):o+=s[r]}return o}}const kl=e=>typeof e=="number"?0:K.test(e)?K.getAnimatableNone(e):e;function jl(e){const t=Yo(e);return Zo(e)(t.map(kl))}const Ve={test:Al,parse:Yo,createTransformer:Zo,getAnimatableNone:jl};function fn(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 $l({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=fn(l,a,e+1/3),o=fn(l,a,e),r=fn(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function zt(e,t){return n=>n>0?t:e}const H=(e,t,n)=>e+(t-e)*n,hn=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Ll=[In,je,Ne],Ol=e=>Ll.find(t=>t.test(e));function ss(e){const t=Ol(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===Ne&&(n=$l(n)),n}const os=(e,t)=>{const n=ss(e),i=ss(t);if(!n||!i)return zt(e,t);const s={...n};return o=>(s.red=hn(n.red,i.red,o),s.green=hn(n.green,i.green,o),s.blue=hn(n.blue,i.blue,o),s.alpha=H(n.alpha,i.alpha,o),je.transform(s))},kn=new Set(["none","hidden"]);function zl(e,t){return kn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Bl(e,t){return n=>H(e,t,n)}function wi(e){return typeof e=="number"?Bl:typeof e=="string"?vi(e)?zt:K.test(e)?os:Gl:Array.isArray(e)?Jo:typeof e=="object"?K.test(e)?os:Nl:zt}function Jo(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>wi(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function Nl(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=wi(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function Hl(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const Gl=(e,t)=>{const n=Ve.createTransformer(t),i=vt(e),s=vt(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?kn.has(e)&&!s.values.length||kn.has(t)&&!i.values.length?zl(e,t):Ct(Jo(Hl(i,s),s.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"),zt(e,t))};function Qo(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?H(e,t,n):wi(e)(e,t)}const Wl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>B.update(t,n),stop:()=>Te(t),now:()=>Z.isProcessing?Z.timestamp:oe.now()}},er=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Bt=2e4;function Ci(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Bt;)t+=n,i=e.next(t);return t>=Bt?1/0:t}function Ul(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Ci(i),Bt);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:de(s)}}const Kl=5;function tr(e,t,n){const i=Math.max(t-Kl,0);return Io(n-e(i),t-i)}const N={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},gn=.001;function ql({duration:e=N.duration,bounce:t=N.bounce,velocity:n=N.velocity,mass:i=N.mass}){let s,o;Je(e<=pe(N.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Ce(N.minDamping,N.maxDamping,r),e=Ce(N.minDuration,N.maxDuration,de(e)),r<1?(s=c=>{const u=c*r,d=u*e,f=u-n,h=jn(c,r),p=Math.exp(-d);return gn-f/h*p},o=c=>{const d=c*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,p=Math.exp(-d),g=jn(Math.pow(c,2),r);return(-s(c)+gn>0?-1:1)*((f-h)*p)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-gn+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Yl(s,o,a);if(e=pe(e),isNaN(l))return{stiffness:N.stiffness,damping:N.damping,duration:e};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:e}}}const Xl=12;function Yl(e,t,n){let i=n;for(let s=1;s<Xl;s++)i=i-e(i)/t(i);return i}function jn(e,t){return e*Math.sqrt(1-t*t)}const Zl=["duration","bounce"],Jl=["stiffness","damping","mass"];function rs(e,t){return t.some(n=>e[n]!==void 0)}function Ql(e){let t={velocity:N.velocity,stiffness:N.stiffness,damping:N.damping,mass:N.mass,isResolvedFromDuration:!1,...e};if(!rs(e,Jl)&&rs(e,Zl))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*Ce(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:N.mass,stiffness:s,damping:o}}else{const n=ql(e);t={...t,...n,mass:N.mass},t.isResolvedFromDuration=!0}return t}function Nt(e=N.visualDuration,t=N.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Ql({...n,velocity:-de(n.velocity||0)}),p=f||0,g=c/(2*Math.sqrt(l*u)),x=r-o,v=de(Math.sqrt(l/u)),C=Math.abs(x)<5;i||(i=C?N.restSpeed.granular:N.restSpeed.default),s||(s=C?N.restDelta.granular:N.restDelta.default);let y;if(g<1){const _=jn(v,g);y=b=>{const P=Math.exp(-g*v*b);return r-P*((p+g*v*x)/_*Math.sin(_*b)+x*Math.cos(_*b))}}else if(g===1)y=_=>r-Math.exp(-v*_)*(x+(p+v*x)*_);else{const _=v*Math.sqrt(g*g-1);y=b=>{const P=Math.exp(-g*v*b),R=Math.min(_*b,300);return r-P*((p+g*v*x)*Math.sinh(R)+_*x*Math.cosh(R))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const b=y(_);if(h)a.done=_>=d;else{let P=_===0?p:0;g<1&&(P=_===0?pe(p):tr(y,_,b));const R=Math.abs(P)<=i,F=Math.abs(r-b)<=s;a.done=R&&F}return a.value=a.done?r:b,a},toString:()=>{const _=Math.min(Ci(S),Bt),b=er(P=>S.next(_*P).value,_,30);return _+"ms "+b},toTransition:()=>{}};return S}Nt.applyToOptions=e=>{const t=Ul(e,100,Nt);return e.ease=t.ease,e.duration=pe(t.duration),e.type="keyframes",e};function $n({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*t;const x=d+g,v=r===void 0?x:r(x);v!==x&&(g=v-d);const C=R=>-g*Math.exp(-R/i),y=R=>v+C(R),S=R=>{const F=C(R),D=y(R);f.done=Math.abs(F)<=c,f.value=f.done?v:D};let _,b;const P=R=>{h(f.value)&&(_=R,b=Nt({keyframes:[f.value,p(f.value)],velocity:tr(y,R,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:R=>{let F=!1;return!b&&_===void 0&&(F=!0,S(R),P(R)),_!==void 0&&R>=_?b.next(R-_):(!F&&S(R),f)}}}function eu(e,t,n){const i=[],s=n||_e.mix||Qo,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||fe:t;a=Ct(l,a)}i.push(a)}return i}function tu(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(Se(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 r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=eu(t,i,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=pt(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ce(e[0],e[o-1],u)):c}function nu(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=pt(0,t,i);e.push(H(n,1,s))}}function iu(e){const t=[0];return nu(t,e.length-1),t}function su(e,t){return e.map(n=>n*t)}function ou(e,t){return e.map(()=>t||Ho).splice(0,e.length-1)}function He({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=vl(i)?i.map(ts):ts(i),o={done:!1,value:t[0]},r=su(n&&n.length===t.length?n:iu(t),e),a=tu(r,t,{ease:Array.isArray(s)?s:ou(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const ru=e=>e!==null;function Si(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(ru),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const au={decay:$n,inertia:$n,tween:He,keyframes:He,spring:Nt};function nr(e){typeof e.type=="string"&&(e.type=au[e.type])}class _i{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 lu=e=>e/100;class bi extends _i{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==oe.now()&&this.tick(oe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;nr(t);const{type:n=He,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||He;process.env.NODE_ENV!=="production"&&l!==He&&Se(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==He&&typeof a[0]!="number"&&(this.mixKeyframes=Ct(lu,Qo(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ci(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,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:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=i;if(d){const R=Math.min(this.currentTime,s)/a;let F=Math.floor(R),D=R%1;!D&&R>=1&&(D=1),D===1&&F--,F=Math.min(F,d+1),!!(F%2)&&(f==="reverse"?(D=1-D,h&&(D-=h/a)):f==="mirror"&&(S=r)),y=Ce(0,1,D)*a}const _=C?{done:!1,value:u[0]}:S.next(y);o&&(_.value=o(_.value));let{done:b}=_;!C&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return P&&p!==$n&&(_.value=Si(u,this.options,x,this.speed)),g&&g(_.value),P&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return de(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+de(t)}get time(){return de(this.currentTime)}set time(t){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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(oe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=de(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Wl,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(oe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function uu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const $e=e=>e*180/Math.PI,Ln=e=>{const t=$e(Math.atan2(e[1],e[0]));return On(t)},cu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ln,rotateZ:Ln,skewX:e=>$e(Math.atan(e[1])),skewY:e=>$e(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},On=e=>(e=e%360,e<0&&(e+=360),e),as=Ln,ls=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),us=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),du={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ls,scaleY:us,scale:e=>(ls(e)+us(e))/2,rotateX:e=>On($e(Math.atan2(e[6],e[5]))),rotateY:e=>On($e(Math.atan2(-e[2],e[0]))),rotateZ:as,rotate:as,skewX:e=>$e(Math.atan(e[4])),skewY:e=>$e(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function zn(e){return e.includes("scale")?1:0}function Bn(e,t){if(!e||e==="none")return zn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=du,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=cu,s=a}if(!s)return zn(t);const o=i[t],r=s[1].split(",").map(hu);return typeof o=="function"?o(r):r[o]}const fu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bn(n,t)};function hu(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),cs=e=>e===Qe||e===A,gu=new Set(["x","y","z"]),pu=et.filter(e=>!gu.has(e));function mu(e){const t=[];return pu.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Le={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})=>Bn(t,"x"),y:(e,{transform:t})=>Bn(t,"y")};Le.translateX=Le.x;Le.translateY=Le.y;const Oe=new Set;let Nn=!1,Hn=!1,Gn=!1;function ir(){if(Hn){const e=Array.from(Oe).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=mu(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Hn=!1,Nn=!1,Oe.forEach(e=>e.complete(Gn)),Oe.clear()}function sr(){Oe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hn=!0)})}function vu(){Gn=!0,sr(),ir(),Gn=!1}class Ri{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Oe.add(this),Nn||(Nn=!0,B.read(sr),B.resolveKeyframes(ir))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}uu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Oe.delete(this)}cancel(){this.state==="scheduled"&&(Oe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yu=e=>e.startsWith("--");function xu(e,t,n){yu(t)?e.style.setProperty(t,n):e.style[t]=n}const wu=di(()=>window.ScrollTimeline!==void 0),Cu={};function Su(e,t){const n=di(e);return()=>Cu[t]??n()}const or=Su(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),at=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,ds={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 rr(e,t){if(e)return typeof e=="function"?or()?er(e,t):"ease-out":Go(e)?at(e):Array.isArray(e)?e.map(n=>rr(n,t)||ds.easeOut):ds[e]}function _u(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=rr(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function ar(e){return typeof e=="function"&&"applyToOptions"in e}function bu({type:e,...t}){return ar(e)&&or()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ru extends _i{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=bu(t);this.animation=_u(n,i,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Si(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):xu(n,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return de(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+de(t)}get time(){return de(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}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&wu()?(this.animation.timeline=t,fe):n(this)}}const lr={anticipate:zo,backInOut:Oo,circInOut:No};function Mu(e){return e in lr}function Pu(e){typeof e.ease=="string"&&Mu(e.ease)&&(e.ease=lr[e.ease])}const fs=10;class Tu extends Ru{constructor(t){Pu(t),nr(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new bi({...r,autoplay:!1}),l=pe(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-fs).value,a.sample(l).value,fs),a.stop()}}const hs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ve.test(e)||e==="0")&&!e.startsWith("url("));function Vu(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 Eu(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=hs(s,t),a=hs(o,t);return Je(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Vu(e)||(n==="spring"||ar(n))&&i}function Wn(e){e.duration=0,e.type="keyframes"}const Au=new Set(["opacity","clipPath","filter","transform"]),Du=di(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Fu(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Du()&&n&&Au.has(n)&&(n!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const Iu=40;class ku extends _i{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=oe.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||Ri;this.keyframeResolver=new h(a,(p,g,x)=>this.onKeyframesResolved(p,g,f,!x),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=oe.now(),Eu(t,o,r,a)||((_e.instantAnimations||!l)&&u?.(Si(t,i,n)),t[0]=t[t.length-1],Wn(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Iu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!c&&Fu(f)?new Tu({...f,element:f.motionValue.owner.current}):new bi(f);h.finished.then(()=>this.notifyFinished()).catch(fe),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(){return this._animation||(this.keyframeResolver?.resume(),vu()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const ju=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $u(e){const t=ju.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const Lu=4;function ur(e,t,n=1){Se(n<=Lu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=$u(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return Ao(r)?parseFloat(r):r}return vi(s)?ur(s,t,n+1):s}function Mi(e,t){return e?.[t]??e?.default??e}const cr=new Set(["width","height","top","left","right","bottom",...et]),Ou={test:e=>e==="auto",parse:e=>e},dr=e=>t=>t.test(e),fr=[Qe,A,ye,Me,Vl,Tl,Ou],gs=e=>fr.find(dr(e));function zu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Fo(e):!0}const Bu=new Set(["brightness","contrast","saturate","opacity"]);function Nu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(yi)||[];if(!i)return e;const s=n.replace(i,"");let o=Bu.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const Hu=/\b([a-z-]*)\(.*?\)/gu,Un={...Ve,getAnimatableNone:e=>{const t=e.match(Hu);return t?t.map(Nu).join(" "):e}},ps={...Qe,transform:Math.round},Gu={rotate:Me,rotateX:Me,rotateY:Me,rotateZ:Me,scale:Tt,scaleX:Tt,scaleY:Tt,scaleZ:Tt,skew:Me,skewX:Me,skewY:Me,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:mt,originX:ns,originY:ns,originZ:A},Pi={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,backgroundPositionX:A,backgroundPositionY:A,...Gu,zIndex:ps,fillOpacity:mt,strokeOpacity:mt,numOctaves:ps},Wu={...Pi,color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,filter:Un,WebkitFilter:Un},hr=e=>Wu[e];function gr(e,t){let n=hr(e);return n!==Un&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Uu=new Set(["auto","none","0"]);function Ku(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Uu.has(o)&&vt(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=gr(n,s)}class qu extends Ri{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=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(),vi(c))){const u=ur(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!cr.has(i)||t.length!==2)return;const[s,o]=t,r=gs(s),a=gs(o);if(r!==a)if(cs(r)&&cs(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Le[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||zu(t[s]))&&i.push(s);i.length&&Ku(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Le[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=Le[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Xu(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const pr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mr(e){return Do(e)&&"offsetHeight"in e}const ms=30,Yu=e=>!isNaN(parseFloat(e));class Zu{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=oe.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=oe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Yu(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&hi(!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 fi);const i=this.events[t].add(n);return t==="change"?()=>{i(),B.read(()=>{this.events.change.getSize()||this.stop()})}:i}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,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.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 this.current}getPrevious(){return this.prev}getVelocity(){const t=oe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ms)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ms);return Io(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xe(e,t){return new Zu(e,t)}const{schedule:Ti}=Wo(queueMicrotask,!1),ge={x:!1,y:!1};function vr(){return ge.x||ge.y}function Ju(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function yr(e,t){const n=Xu(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function vs(e){return!(e.pointerType==="touch"||vr())}function Qu(e,t,n={}){const[i,s,o]=yr(e,n),r=a=>{if(!vs(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{vs(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return i.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}const xr=(e,t)=>t?e===t?!0:xr(e,t.parentElement):!1,Vi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ec=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tc(e){return ec.has(e.tagName)||e.tabIndex!==-1}const jt=new WeakSet;function ys(e){return t=>{t.key==="Enter"&&e(t)}}function pn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=ys(()=>{if(jt.has(n))return;pn(n,"down");const s=ys(()=>{pn(n,"up")}),o=()=>pn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function xs(e){return Vi(e)&&!vr()}function ic(e,t,n={}){const[i,s,o]=yr(e,n),r=a=>{const l=a.currentTarget;if(!xs(a))return;jt.add(l);const c=t(l,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),jt.has(l)&&jt.delete(l),xs(h)&&typeof c=="function"&&c(h,{success:p})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||xr(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),mr(a)&&(a.addEventListener("focus",c=>nc(c,s)),!tc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function wr(e){return Do(e)&&"ownerSVGElement"in e}function sc(e){return wr(e)&&e.tagName==="svg"}const Q=e=>!!(e&&e.getVelocity),oc=[...fr,K,Ve],rc=e=>oc.find(dr(e)),Ei=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ws(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ac(...e){return t=>{let n=!1;const i=e.map(s=>{const o=ws(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():ws(e[s],null)}}}}function lc(...e){return ve.useCallback(ac(...e),e)}class uc extends ve.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=mr(i)&&i.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=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function cc({children:e,isPresent:t,anchorX:n,root:i}){const s=w.useId(),o=w.useRef(null),r=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=w.useContext(Ei),l=lc(o,e?.ref);return w.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(t||!o.current||!c||!u)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const x=i??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
6
6
  [data-motion-pop-id="${s}"] {
7
7
  position: absolute !important;
8
8
  width: ${c}px !important;
@@ -10,10 +10,10 @@
10
10
  ${p}px !important;
11
11
  top: ${d}px !important;
12
12
  }
13
- `),()=>{x.contains(g)&&x.removeChild(g)}},[t]),m.jsx(rc,{isPresent:t,childRef:o,sizeRef:r,children:P.cloneElement(e,{ref:l})})}const lc=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=oi(uc),u=w.useId();let d=!0,f=w.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:h=>{c.set(h,!0);for(const p of c.values())if(!p)return;i&&i()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,i]);return o&&d&&(f={...f}),w.useMemo(()=>{c.forEach((h,p)=>c.set(p,!1))},[n]),P.useEffect(()=>{!n&&!c.size&&i&&i()},[n]),r==="popLayout"&&(e=m.jsx(ac,{isPresent:n,anchorX:a,root:l,children:e})),m.jsx(Wt.Provider,{value:f,children:e})};function uc(){return new Map}function yr(e=!0){const t=w.useContext(Wt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=w.useId();w.useEffect(()=>{if(e)return s(o)},[e]);const r=w.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,r]:[!0]}const Mt=e=>e.key||"";function ys(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const cc=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=yr(r),d=w.useMemo(()=>ys(e),[e]),f=r&&!c?[]:d.map(Mt),h=w.useRef(!0),p=w.useRef(d),g=oi(()=>new Map),[x,v]=w.useState(d),[C,y]=w.useState(d);Mo(()=>{h.current=!1,p.current=d;for(let R=0;R<C.length;R++){const T=Mt(C[R]);f.includes(T)?g.delete(T):g.get(T)!==!0&&g.set(T,!1)}},[C,f.length,f.join("-")]);const S=[];if(d!==x){let R=[...d];for(let T=0;T<C.length;T++){const b=C[T],k=Mt(b);f.includes(k)||(R.splice(T,0,b),S.push(b))}return o==="wait"&&S.length&&(R=S),y(ys(R)),v(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&C.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:_}=w.useContext(si);return m.jsx(m.Fragment,{children:C.map(R=>{const T=Mt(R),b=r&&!c?!1:d===C||f.includes(T),k=()=>{if(g.has(T))g.set(T,!0);else return;let F=!0;g.forEach(z=>{z||(F=!1)}),F&&(_?.(),y(p.current),r&&u?.(),i&&i())};return m.jsx(lc,{isPresent:b,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:l,onExitComplete:b?void 0:k,anchorX:a,children:R},T)})})},xr=w.createContext({strict:!1}),xs={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"]},qe={};for(const e in xs)qe[e]={isEnabled:t=>xs[e].some(n=>!!t[n])};function dc(e){for(const t in e)qe[t]={...qe[t],...e[t]}}const fc=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 zt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fc.has(e)}let wr=e=>!zt(e);function hc(e){typeof e=="function"&&(wr=t=>t.startsWith("on")?!zt(t):e(t))}try{hc(require("@emotion/is-prop-valid").default)}catch{}function gc(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(wr(s)||n===!0&&zt(s)||!t&&!zt(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Ut=w.createContext({});function Kt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function pt(e){return typeof e=="string"||Array.isArray(e)}const Vi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ei=["initial",...Vi];function qt(e){return Kt(e.animate)||Ei.some(t=>pt(e[t]))}function Cr(e){return!!(qt(e)||e.variants)}function pc(e,t){if(qt(e)){const{initial:n,animate:i}=e;return{initial:n===!1||pt(n)?n:void 0,animate:pt(i)?i:void 0}}return e.inherit!==!1?t:{}}function mc(e){const{initial:t,animate:n}=pc(e,w.useContext(Ut));return w.useMemo(()=>({initial:t,animate:n}),[ws(t),ws(n)])}function ws(e){return Array.isArray(e)?e.join(" "):e}const mt={};function vc(e){for(const t in e)mt[t]=e[t],gi(t)&&(mt[t].isCSSVariable=!0)}function Sr(e,{layout:t,layoutId:n}){return Je.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mt[e]||e==="opacity")}const yc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xc=Ze.length;function wc(e,t,n){let i="",s=!0;for(let o=0;o<xc;o++){const r=Ze[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=fr(a,bi[r]);if(!l){s=!1;const u=yc[r]||r;i+=`${u}(${c}) `}n&&(t[r]=c)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Ai(e,t,n){const{style:i,vars:s,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(Je.has(l)){r=!0;continue}else if(gi(l)){s[l]=c;continue}else{const u=fr(c,bi[l]);l.startsWith("origin")?(a=!0,o[l]=u):i[l]=u}}if(t.transform||(r||n?i.transform=wc(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;i.transformOrigin=`${l} ${c} ${u}`}}const Di=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _r(e,t,n){for(const i in t)!Q(t[i])&&!Sr(i,n)&&(e[i]=t[i])}function Cc({transformTemplate:e},t){return w.useMemo(()=>{const n=Di();return Ai(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Sc(e,t){const n=e.style||{},i={};return _r(i,n,e),Object.assign(i,Cc(e,t)),i}function _c(e,t){const n={},i=Sc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Rc={offset:"stroke-dashoffset",array:"stroke-dasharray"},bc={offset:"strokeDashoffset",array:"strokeDasharray"};function Pc(e,t,n=1,i=0,s=!0){e.pathLength=1;const o=s?Rc:bc;e[o.offset]=D.transform(-i);const r=D.transform(t),a=D.transform(n);e[o.array]=`${r} ${a}`}function Rr(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ai(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?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),s!==void 0&&Pc(d,s,o,r,!1)}const br=()=>({...Di(),attrs:{}}),Pr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Mc(e,t,n,i){const s=w.useMemo(()=>{const o=br();return Rr(o,t,Pr(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};_r(o,e.style,e),s.style={...o,...s.style}}return s}const Tc=["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 Fi(e){return typeof e!="string"||e.includes("-")?!1:!!(Tc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Vc(e,t,n,{latestValues:i},s,o=!1){const a=(Fi(e)?Mc:_c)(t,i,s,e),l=gc(t,typeof e=="string",o),c=e!==w.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=w.useMemo(()=>Q(u)?u.get():u,[u]);return w.createElement(e,{...c,children:d})}function Cs(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function ki(e,t,n,i){if(typeof t=="function"){const[s,o]=Cs(i);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Cs(i);t=t(n!==void 0?n:e.custom,s,o)}return t}function It(e){return Q(e)?e.get():e}function Ec({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:Ac(n,i,s,e),renderState:t()}}function Ac(e,t,n,i){const s={},o=i(e,{});for(const f in o)s[f]=It(o[f]);let{initial:r,animate:a}=e;const l=qt(e),c=Cr(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!Kt(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=ki(e,f[h]);if(p){const{transitionEnd:g,transition:x,...v}=p;for(const C in v){let y=v[C];if(Array.isArray(y)){const S=u?y.length-1:0;y=y[S]}y!==null&&(s[C]=y)}for(const C in g)s[C]=g[C]}}}return s}const Mr=e=>(t,n)=>{const i=w.useContext(Ut),s=w.useContext(Wt),o=()=>Ec(e,t,i,s);return n?o():oi(o)};function Ii(e,t,n){const{style:i}=e,s={};for(const o in i)(Q(i[o])||t.style&&Q(t.style[o])||Sr(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=i[o]);return s}const Dc=Mr({scrapeMotionValuesFromProps:Ii,createRenderState:Di});function Tr(e,t,n){const i=Ii(e,t,n);for(const s in e)if(Q(e[s])||Q(t[s])){const o=Ze.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=e[s]}return i}const Fc=Mr({scrapeMotionValuesFromProps:Tr,createRenderState:br}),kc=Symbol.for("motionComponentSymbol");function Ne(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ic(e,t,n){return w.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):Ne(n)&&(n.current=i))},[t])}const Li=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Lc="framerAppearId",Vr="data-"+Li(Lc),Er=w.createContext({});function $c(e,t,n,i,s){const{visualElement:o}=w.useContext(Ut),r=w.useContext(xr),a=w.useContext(Wt),l=w.useContext(Ti).reducedMotion,c=w.useRef(null);i=i||r.renderer,!c.current&&i&&(c.current=i(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=w.useContext(Er);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&jc(c.current,n,s,d);const f=w.useRef(!1);w.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[Vr],p=w.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Mo(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),p.current=!1),u.enteringChildren=void 0)}),u}function jc(e,t,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ar(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&Ne(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function Ar(e){if(e)return e.options.allowProjection!==!1?e.projection:Ar(e.parent)}function gn(e,{forwardMotionProps:t=!1}={},n,i){n&&dc(n);const s=Fi(e)?Fc:Dc;function o(a,l){let c;const u={...w.useContext(Ti),...a,layoutId:Oc(a)},{isStatic:d}=u,f=mc(a),h=s(a,d);if(!d&&ri){zc(u,n);const p=Bc(u);c=p.MeasureLayout,f.visualElement=$c(e,h,u,i,p.ProjectionNode)}return m.jsxs(Ut.Provider,{value:f,children:[c&&f.visualElement?m.jsx(c,{visualElement:f.visualElement,...u}):null,Vc(e,a,Ic(h,f.visualElement,l),h,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=w.forwardRef(o);return r[kc]=e,r}function Oc({layoutId:e}){const t=w.useContext(si).id;return t&&e!==void 0?t+"-"+e:e}function zc(e,t){const n=w.useContext(xr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Xe(!1,i,"lazy-strict-mode"):Se(!1,i,"lazy-strict-mode")}}function Bc(e){const{drag:t,layout:n}=qe;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Nc(e,t){if(typeof Proxy>"u")return gn;const n=new Map,i=(o,r)=>gn(o,r,e,t),s=(o,r)=>(process.env.NODE_ENV!=="production"&&di(!1,"motion() is deprecated. Use motion.create() instead."),i(o,r));return new Proxy(s,{get:(o,r)=>r==="create"?i:(n.has(r)||n.set(r,gn(r,void 0,e,t)),n.get(r))})}function Dr({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Hc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Gc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function pn(e){return e===void 0||e===1}function Wn({scale:e,scaleX:t,scaleY:n}){return!pn(e)||!pn(t)||!pn(n)}function De(e){return Wn(e)||Fr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Fr(e){return Ss(e.x)||Ss(e.y)}function Ss(e){return e&&e!=="0%"}function Bt(e,t,n){const i=e-n,s=t*i;return n+s}function _s(e,t,n,i,s){return s!==void 0&&(e=Bt(e,s,i)),Bt(e,n,i)+t}function Un(e,t=0,n=1,i,s){e.min=_s(e.min,t,n,i,s),e.max=_s(e.max,t,n,i,s)}function kr(e,{x:t,y:n}){Un(e.x,t.translate,t.scale,t.originPoint),Un(e.y,n.translate,n.scale,n.originPoint)}const Rs=.999999999999,bs=1.0000000000001;function Wc(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ge(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,kr(e,r)),i&&De(o.latestValues)&&Ge(e,o.latestValues))}t.x<bs&&t.x>Rs&&(t.x=1),t.y<bs&&t.y>Rs&&(t.y=1)}function He(e,t){e.min=e.min+t,e.max=e.max+t}function Ps(e,t,n,i,s=.5){const o=G(e.min,e.max,s);Un(e,t,n,o,i)}function Ge(e,t){Ps(e.x,t.x,t.scaleX,t.scale,t.originX),Ps(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ir(e,t){return Dr(Gc(e.getBoundingClientRect(),t))}function Uc(e,t,n){const i=Ir(e,n),{scroll:s}=t;return s&&(He(i.x,s.offset.x),He(i.y,s.offset.y)),i}const Ms=()=>({translate:0,scale:1,origin:0,originPoint:0}),We=()=>({x:Ms(),y:Ms()}),Ts=()=>({min:0,max:0}),K=()=>({x:Ts(),y:Ts()}),Kn={current:null},Lr={current:!1};function Kc(){if(Lr.current=!0,!!ri)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kn.current=e.matches;e.addEventListener("change",t),t()}else Kn.current=!1}const qc=new WeakMap;function Xc(e,t,n){for(const i in t){const s=t[i],o=n[i];if(Q(s))e.addValue(i,s);else if(Q(o))e.addValue(i,Ke(s,{owner:e}));else if(o!==s)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(i);e.addValue(i,Ke(r!==void 0?r:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Vs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Yc{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=_i,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=oe.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,N.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=qt(n),this.isVariantNode=Cr(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&&Q(h)&&h.set(l[f])}}mount(t){this.current=t,qc.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,i)=>this.bindToMotionValue(i,n)),Lr.current||Kc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kn.current,process.env.NODE_ENV!=="production"&&di(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Pe(this.notifyUpdate),Pe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Je.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&N.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),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 qe){const n=qe[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(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):K()}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 i=0;i<Vs.length;i++){const s=Vs[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,r=t[o];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=Xc(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Ke(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(To(i)||Eo(i))?i=parseFloat(i):!ic(i)&&Me.test(n)&&(i=dr(t,n)),this.setBaseTarget(t,Q(i)?i.get():i)),Q(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=ki(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Q(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ci),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Pi.render(this.render)}}class $r extends Yc{constructor(){super(...arguments),this.KeyframeResolver=Wu}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:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Q(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jr(e,{style:t,vars:n},i,s){const o=e.style;let r;for(r in t)o[r]=t[r];s?.applyProjectionStyles(o,i);for(r in n)o.setProperty(r,n[r])}function Zc(e){return window.getComputedStyle(e)}class Jc extends $r{constructor(){super(...arguments),this.type="html",this.renderInstance=jr}readValueFromInstance(t,n){if(Je.has(n))return this.projection?.isProjecting?jn(n):uu(t,n);{const i=Zc(t),s=(gi(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ir(t,n)}build(t,n,i){Ai(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Ii(t,n,i)}}const Or=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 Qc(e,t,n,i){jr(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Or.has(s)?s:Li(s),t.attrs[s])}class ed extends $r{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=K}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Je.has(n)){const i=cr(n);return i&&i.default||0}return n=Or.has(n)?n:Li(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Tr(t,n,i)}build(t,n,i){Rr(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){Qc(t,n,i,s)}mount(t){this.isSVGTag=Pr(t.tagName),super.mount(t)}}const td=(e,t)=>Fi(e)?new ed(t):new Jc(t,{allowProjection:e!==w.Fragment});function Ue(e,t,n){const i=e.getProps();return ki(i,t,n!==void 0?n:i.custom,e)}const qn=e=>Array.isArray(e);function nd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ke(n))}function id(e){return qn(e)?e[e.length-1]||0:e}function sd(e,t){const n=Ue(e,t);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){const a=id(o[r]);nd(e,r,a)}}function od(e){return!!(Q(e)&&e.add)}function Xn(e,t){const n=e.getValue("willChange");if(od(n))return n.add(t);if(!n&&_e.WillChange){const i=new _e.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function zr(e){return e.props[Vr]}const rd=e=>e!==null;function ad(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(rd),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const ld={type:"spring",stiffness:500,damping:25,restSpeed:10},ud=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),cd={type:"keyframes",duration:.8},dd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fd=(e,{keyframes:t})=>t.length>2?cd:Je.has(e)?e.startsWith("scale")?ud(t[1]):ld:dd;function hd({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const $i=(e,t,n,i={},s,o)=>r=>{const a=Ri(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;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:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};hd(a)||Object.assign(u,fd(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)&&(Hn(u),u.delay===0&&(d=!0)),(_e.instantAnimations||_e.skipAnimations)&&(d=!0,Hn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=ad(u.keyframes,a);if(f!==void 0){N.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Si(u):new Du(u)};function gd({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Br(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;i&&(o=i);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&gd(c,u))continue;const h={delay:n,...Ri(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 v=zr(e);if(v){const C=window.MotionHandoffAnimation(v,u,N);C!==null&&(h.startTime=C,g=!0)}}Xn(e,u),d.start($i(u,d,f,e.shouldReduceMotion&&ar.has(u)?{type:!1}:h,e,g));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{N.update(()=>{r&&sd(e,r)})}),l}function Nr(e,t,n,i=0,s=1){const o=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(o,r):s===1?o*i:a-o*i}function Yn(e,t,n={}){const i=Ue(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Br(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=s;return pd(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function pd(e,t,n=0,i=0,s=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Yn(l,t,{...r,delay:n+(typeof i=="function"?0:i)+Nr(e.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function md(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(o=>Yn(e,o,n));i=Promise.all(s)}else if(typeof t=="string")i=Yn(e,t,n);else{const s=typeof t=="function"?Ue(e,t,n.custom):t;i=Promise.all(Br(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Hr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const vd=Ei.length;function Gr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Gr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<vd;n++){const i=Ei[n],s=e.props[i];(pt(s)||s===!1)&&(t[i]=s)}return t}const yd=[...Vi].reverse(),xd=Vi.length;function wd(e){return t=>Promise.all(t.map(({animation:n,options:i})=>md(e,n,i)))}function Cd(e){let t=wd(e),n=Es(),i=!0;const s=l=>(c,u)=>{const d=Ue(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...p}=d;c={...c,...p,...h}}return c};function o(l){t=l(e)}function r(l){const{props:c}=e,u=Gr(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let x=0;x<xd;x++){const v=yd[x],C=n[v],y=c[v]!==void 0?c[v]:u[v],S=pt(y),_=v===l?C.isActive:null;_===!1&&(p=x);let R=y===u[v]&&y!==c[v]&&S;if(R&&i&&e.manuallyAnimateOnMount&&(R=!1),C.protectedKeys={...h},!C.isActive&&_===null||!y&&!C.prevProp||Kt(y)||typeof y=="boolean")continue;const T=Sd(C.prevProp,y);let b=T||v===l&&C.isActive&&!R&&S||x>p&&S,k=!1;const F=Array.isArray(y)?y:[y];let z=F.reduce(s(v),{});_===!1&&(z={});const{prevResolvedValues:Y={}}=C,ee={...Y,...z},ie=$=>{b=!0,f.has($)&&(k=!0,f.delete($)),C.needsAnimating[$]=!0;const U=e.getValue($);U&&(U.liveStyle=!1)};for(const $ in ee){const U=z[$],I=Y[$];if(h.hasOwnProperty($))continue;let j=!1;qn(U)&&qn(I)?j=!Hr(U,I):j=U!==I,j?U!=null?ie($):f.add($):U!==void 0&&f.has($)?ie($):C.protectedKeys[$]=!0}C.prevProp=y,C.prevResolvedValues=z,C.isActive&&(h={...h,...z}),i&&e.blockInitialAnimation&&(b=!1);const re=R&&T;b&&(!re||k)&&d.push(...F.map($=>{const U={type:v};if(typeof $=="string"&&i&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:I}=e,j=Ue(I,$);if(I.enteringChildren&&j){const{delayChildren:W}=j.transition||{};U.delay=Nr(I.enteringChildren,e,W)}}return{animation:$,options:U}}))}if(f.size){const x={};if(typeof c.initial!="boolean"){const v=Ue(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{const C=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),x[v]=C??null}),d.push({animation:x})}let g=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Es(),i=!0}}}function Sd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hr(t,e):!1}function Ae(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Es(){return{animate:Ae(!0),whileInView:Ae(),whileHover:Ae(),whileTap:Ae(),whileDrag:Ae(),whileFocus:Ae(),exit:Ae()}}class Ve{constructor(t){this.isMounted=!1,this.node=t}update(){}}class _d extends Ve{constructor(t){super(t),t.animationState||(t.animationState=Cd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kt(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(){this.node.animationState.reset(),this.unmountControls?.()}}let Rd=0;class bd extends Ve{constructor(){super(...arguments),this.id=Rd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 Pd={animation:{Feature:_d},exit:{Feature:bd}};function vt(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function St(e){return{point:{x:e.pageX,y:e.pageY}}}const Md=e=>t=>Mi(t)&&e(t,St(t));function rt(e,t,n,i){return vt(e,t,Md(n),i)}const Wr=1e-4,Td=1-Wr,Vd=1+Wr,Ur=.01,Ed=0-Ur,Ad=0+Ur;function ne(e){return e.max-e.min}function Dd(e,t,n){return Math.abs(e-t)<=n}function As(e,t,n,i=.5){e.origin=i,e.originPoint=G(t.min,t.max,e.origin),e.scale=ne(n)/ne(t),e.translate=G(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Td&&e.scale<=Vd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ed&&e.translate<=Ad||isNaN(e.translate))&&(e.translate=0)}function at(e,t,n,i){As(e.x,t.x,n.x,i?i.originX:void 0),As(e.y,t.y,n.y,i?i.originY:void 0)}function Ds(e,t,n){e.min=n.min+t.min,e.max=e.min+ne(t)}function Fd(e,t,n){Ds(e.x,t.x,n.x),Ds(e.y,t.y,n.y)}function Fs(e,t,n){e.min=t.min-n.min,e.max=e.min+ne(t)}function lt(e,t,n){Fs(e.x,t.x,n.x),Fs(e.y,t.y,n.y)}function ce(e){return[e("x"),e("y")]}const Kr=({current:e})=>e?e.ownerDocument.defaultView:null,ks=(e,t)=>Math.abs(e-t);function kd(e,t){const n=ks(e.x,t.x),i=ks(e.y,t.y);return Math.sqrt(n**2+i**2)}class qr{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:r=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=vn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=kd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:x}=Z;this.history.push({...g,timestamp:x});const{onStart:v,onMove:C}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=mn(h,this.transformPagePoint),N.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=vn(f.type==="pointercancel"?this.lastMoveEventInfo:mn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!Mi(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;const a=St(t),l=mn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Z;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,vn(l,this.history)),this.removeListeners=xt(rt(this.contextWindow,"pointermove",this.handlePointerMove),rt(this.contextWindow,"pointerup",this.handlePointerUp),rt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Pe(this.updatePoint)}}function mn(e,t){return t?{point:t(e.point)}:e}function Is(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vn({point:e},t){return{point:e,delta:Is(e,Xr(t)),offset:Is(e,Id(t)),velocity:Ld(t,.1)}}function Id(e){return e[0]}function Xr(e){return e[e.length-1]}function Ld(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=Xr(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>pe(t)));)n--;if(!i)return{x:0,y:0};const o=de(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function $d(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?G(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?G(n,e,i.max):Math.min(e,n)),e}function Ls(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 jd(e,{top:t,left:n,bottom:i,right:s}){return{x:Ls(e.x,n,s),y:Ls(e.y,t,i)}}function $s(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Od(e,t){return{x:$s(e.x,t.x),y:$s(e.y,t.y)}}function zd(e,t){let n=.5;const i=ne(e),s=ne(t);return s>i?n=ft(t.min,t.max-i,e.min):i>s&&(n=ft(e.min,e.max-s,t.min)),Ce(0,1,n)}function Bd(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 Zn=.35;function Nd(e=Zn){return e===!1?e=0:e===!0&&(e=Zn),{x:js(e,"left","right"),y:js(e,"top","bottom")}}function js(e,t,n){return{min:Os(e,t),max:Os(e,n)}}function Os(e,t){return typeof e=="number"?e:e[t]||0}const Hd=new WeakMap;class Gd{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=K(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(St(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xu(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),ce(v=>{let C=this.getAxisMotionValue(v).get()||0;if(ye.test(C)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(C=ne(S)*(parseFloat(C)/100))}}this.originPoint[v]=C}),g&&N.postRender(()=>g(d,f)),Xn(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=Wd(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>ce(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new qr(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:Kr(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&N.postRender(()=>a(i,s))}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:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Tt(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=$d(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Ne(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=jd(i.layoutBox,t):this.constraints=!1,this.elastic=Nd(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ce(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Bd(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ne(t))return!1;const i=t.current;Se(i!==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:s}=this.visualElement;if(!s||!s.layout)return!1;const o=Uc(i,s.root,this.visualElement.getTransformPagePoint());let r=Od(s.layout.layoutBox,o);if(n){const a=n(Hc(r));this.hasMutatedConstraints=!!a,a&&(r=Dr(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ce(u=>{if(!Tt(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:i?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 i=this.getAxisMotionValue(t);return Xn(this.visualElement,t),i.start($i(t,i,0,n,this.visualElement,!1))}stopAnimation(){ce(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ce(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){ce(n=>{const{drag:i}=this.getProps();if(!Tt(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];o.set(t[n]-G(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ne(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ce(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=zd({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),ce(r=>{if(!Tt(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(G(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;Hd.set(this.visualElement,this);const t=this.visualElement.current,n=rt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Ne(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),N.read(i);const r=vt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ce(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=Zn,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Tt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Wd(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ud extends Ve{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Gd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}unmount(){this.removeGroupControls(),this.removeListeners()}}const zs=e=>(t,n)=>{e&&N.postRender(()=>e(t,n))};class Kd extends Ve{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new qr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:zs(t),onStart:zs(n),onMove:i,onEnd:(o,r)=>{delete this.session,s&&N.postRender(()=>s(o,r))}}}mount(){this.removePointerDownListener=rt(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 Lt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const tt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=Bs(e,t.target.x),i=Bs(e,t.target.y);return`${n}% ${i}%`}},qd={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Me.parse(e);if(s.length>5)return i;const o=Me.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const c=G(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),o(s)}};let yn=!1;class Xd extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;vc(Yd),o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),yn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Lt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r&&(r.isPresent=o,yn=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||N.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Pi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;yn=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Yr(e){const[t,n]=yr(),i=w.useContext(si);return m.jsx(Xd,{...e,layoutGroup:i,switchLayoutGroup:w.useContext(Er),isPresent:t,safeToRemove:n})}const Yd={borderRadius:{...tt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tt,borderTopRightRadius:tt,borderBottomLeftRadius:tt,borderBottomRightRadius:tt,boxShadow:qd};function Zd(e,t,n){const i=Q(e)?e:Ke(e);return i.start($i("",i,t,n)),i.animation}const Jd=(e,t)=>e.depth-t.depth;class Qd{constructor(){this.children=[],this.isDirty=!1}add(t){ai(this.children,t),this.isDirty=!0}remove(t){li(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Jd),this.isDirty=!1,this.children.forEach(t)}}function ef(e,t){const n=oe.now(),i=({timestamp:s})=>{const o=s-n;o>=t&&(Pe(i),e(o-t))};return N.setup(i,!0),()=>Pe(i)}const Zr=["TopLeft","TopRight","BottomLeft","BottomRight"],tf=Zr.length,Ns=e=>typeof e=="string"?parseFloat(e):e,Hs=e=>typeof e=="number"||D.test(e);function nf(e,t,n,i,s,o){s?(e.opacity=G(0,n.opacity??1,sf(i)),e.opacityExit=G(t.opacity??1,0,of(i))):o&&(e.opacity=G(t.opacity??1,n.opacity??1,i));for(let r=0;r<tf;r++){const a=`border${Zr[r]}Radius`;let l=Gs(t,a),c=Gs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Hs(l)===Hs(c)?(e[a]=Math.max(G(Ns(l),Ns(c),i),0),(ye.test(c)||ye.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=G(t.rotate||0,n.rotate||0,i))}function Gs(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const sf=Jr(0,.5,jo),of=Jr(.5,.95,fe);function Jr(e,t,n){return i=>i<e?0:i>t?1:n(ft(e,t,i))}function Ws(e,t){e.min=t.min,e.max=t.max}function le(e,t){Ws(e.x,t.x),Ws(e.y,t.y)}function Us(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ks(e,t,n,i,s){return e-=t,e=Bt(e,1/n,i),s!==void 0&&(e=Bt(e,1/s,i)),e}function rf(e,t=0,n=1,i=.5,s,o=e,r=e){if(ye.test(t)&&(t=parseFloat(t),t=G(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=G(o.min,o.max,i);e===o&&(a-=t),e.min=Ks(e.min,t,n,a,s),e.max=Ks(e.max,t,n,a,s)}function qs(e,t,[n,i,s],o,r){rf(e,t[n],t[i],t[s],t.scale,o,r)}const af=["x","scaleX","originX"],lf=["y","scaleY","originY"];function Xs(e,t,n,i){qs(e.x,t,af,n?n.x:void 0,i?i.x:void 0),qs(e.y,t,lf,n?n.y:void 0,i?i.y:void 0)}function Ys(e){return e.translate===0&&e.scale===1}function Qr(e){return Ys(e.x)&&Ys(e.y)}function Zs(e,t){return e.min===t.min&&e.max===t.max}function uf(e,t){return Zs(e.x,t.x)&&Zs(e.y,t.y)}function Js(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ea(e,t){return Js(e.x,t.x)&&Js(e.y,t.y)}function Qs(e){return ne(e.x)/ne(e.y)}function eo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class cf{constructor(){this.members=[]}add(t){ai(this.members,t),t.scheduleRender()}remove(t){if(li(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(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function df(e,t,n){let i="";const s=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const xn=["","X","Y","Z"],ff=1e3;let hf=0;function wn(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function ta(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",N,!(s||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&ta(i)}function na({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=hf++,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(mf),this.nodes.forEach(wf),this.nodes.forEach(Cf),this.nodes.forEach(vf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 Qd)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new ci),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=vr(r)&&!tc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),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;N.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=ef(f,250),Lt.hasAnimatedSinceResize&&(Lt.hasAnimatedSinceResize=!1,this.nodes.forEach(io)))})}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()||Pf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),v=!this.targetLayout||!ea(this.targetLayout,h),C=!d&&f;if(this.options.layoutRoot||this.resumeFrom||C||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Ri(p,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,C)}else d||io(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Pe(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(Sf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(to);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(no);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xf),this.nodes.forEach(gf),this.nodes.forEach(pf)):this.nodes.forEach(no),this.clearAllSnapshots();const a=oe.now();Z.delta=Ce(0,1e3/60,a-Z.timestamp),Z.timestamp=a,Z.isProcessing=!0,ln.update.process(Z),ln.preRender.process(Z),ln.render.process(Z),Z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yf),this.sharedNodes.forEach(_f)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,N.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){N.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ne(this.snapshot.measuredBox.x)&&!ne(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 r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=K(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Qr(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||De(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Mf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return K();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Tf))){const{scroll:c}=this.root;c&&(He(a.x,c.offset.x),He(a.y,c.offset.y))}return a}removeElementScroll(r){const a=K();if(le(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&le(a,r),He(a.x,u.offset.x),He(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=K();le(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ge(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),De(u.latestValues)&&Ge(l,u.latestValues)}return De(this.latestValues)&&Ge(l,this.latestValues),l}removeTransform(r){const a=K();le(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!De(c.latestValues))continue;Wn(c.latestValues)&&c.updateSnapshot();const u=K(),d=c.measurePageBox();le(u,d),Xs(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return De(this.latestValues)&&Xs(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==Z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){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(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Z.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),lt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=K(),this.targetWithTransforms=K()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):le(this.target,this.layout.layoutBox),kr(this.target,this.targetDelta)):le(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),lt(this.relativeTargetOrigin,this.target,f.target),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Wn(this.parent.latestValues)||Fr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Z.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;le(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Wc(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=K());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Us(this.prevProjectionDelta.x,this.projectionDelta.x),Us(this.prevProjectionDelta.y,this.projectionDelta.y)),at(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!eo(this.projectionDelta.x,this.prevProjectionDelta.x)||!eo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=We(),this.projectionDelta=We(),this.projectionDeltaWithTransform=We()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=We();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=K(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,x=this.getStack(),v=!x||x.members.length<=1,C=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(bf));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const _=S/1e3;so(d.x,r.x,_),so(d.y,r.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Rf(this.relativeTarget,this.relativeTargetOrigin,f,_),y&&uf(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=K()),le(y,this.relativeTarget)),g&&(this.animationValues=u,nf(u,c,this.latestValues,_,C,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=N.update(()=>{Lt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ke(0)),this.currentAnimation=Zd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ff),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&ia(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||K();const d=ne(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=ne(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}le(a,l),Ge(a,u),at(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new cf),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&wn("z",r,c,this.animationValues);for(let u=0;u<xn.length;u++)wn(`rotate${xn[u]}`,r,c,this.animationValues),wn(`skew${xn[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=It(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=It(a?.pointerEvents)||""),this.hasProjected&&!De(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=df(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in mt){if(u[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:v}=mt[p],C=d==="none"?u[p]:g(u[p],c);if(x){const y=x.length;for(let S=0;S<y;S++)r[x[S]]=C}else v?this.options.visualElement.renderState.vars[p]=C:r[p]=C}this.options.layoutId&&(r.pointerEvents=c===this?It(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(to),this.root.sharedNodes.clear()}}}function gf(e){e.updateLayout()}function pf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?ce(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],f=ne(d);d.min=n[u].min,d.max=d.min+f}):ia(s,t.layoutBox,n)&&ce(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],f=ne(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const r=We();at(r,n,t.layoutBox);const a=We();o?at(a,e.applyTransform(i,!0),t.measuredBox):at(a,n,t.layoutBox);const l=!Qr(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=K();lt(h,t.layoutBox,d.layoutBox);const p=K();lt(p,n,f.layoutBox),ea(h,p)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function mf(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 vf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yf(e){e.clearSnapshot()}function to(e){e.clearMeasurements()}function no(e){e.isLayoutDirty=!1}function xf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function io(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wf(e){e.resolveTargetDelta()}function Cf(e){e.calcProjection()}function Sf(e){e.resetSkewAndRotation()}function _f(e){e.removeLeadSnapshot()}function so(e,t,n){e.translate=G(t.translate,0,n),e.scale=G(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oo(e,t,n,i){e.min=G(t.min,n.min,i),e.max=G(t.max,n.max,i)}function Rf(e,t,n,i){oo(e.x,t.x,n.x,i),oo(e.y,t.y,n.y,i)}function bf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Pf={duration:.45,ease:[.4,0,.1,1]},ro=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ao=ro("applewebkit/")&&!ro("chrome/")?Math.round:fe;function lo(e){e.min=ao(e.min),e.max=ao(e.max)}function Mf(e){lo(e.x),lo(e.y)}function ia(e,t,n){return e==="position"||e==="preserve-aspect"&&!Dd(Qs(t),Qs(n),.2)}function Tf(e){return e!==e.root&&e.scroll?.wasRoot}const Vf=na({attachResizeListener:(e,t)=>vt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cn={current:void 0},sa=na({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cn.current){const e=new Vf({});e.mount(window),e.setOptions({layoutScroll:!0}),Cn.current=e}return Cn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ef={pan:{Feature:Kd},drag:{Feature:Ud,ProjectionNode:sa,MeasureLayout:Yr}};function uo(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=i[s];o&&N.postRender(()=>o(t,St(t)))}class Af extends Ve{mount(){const{current:t}=this.node;t&&(this.unmount=Yu(t,(n,i)=>(uo(this.node,i,"Start"),s=>uo(this.node,s,"End"))))}unmount(){}}class Df 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=xt(vt(this.node.current,"focus",()=>this.onFocus()),vt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function co(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=i[s];o&&N.postRender(()=>o(t,St(t)))}class Ff extends Ve{mount(){const{current:t}=this.node;t&&(this.unmount=ec(t,(n,i)=>(co(this.node,i,"Start"),(s,{success:o})=>co(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Jn=new WeakMap,Sn=new WeakMap,kf=e=>{const t=Jn.get(e.target);t&&t(e)},If=e=>{e.forEach(kf)};function Lf({root:e,...t}){const n=e||document;Sn.has(n)||Sn.set(n,{});const i=Sn.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(If,{root:e,...t})),i[s]}function $f(e,t,n){const i=Lf(t);return Jn.set(e,n),i.observe(e),()=>{Jn.delete(e),i.unobserve(e)}}const jf={some:0,all:1};class Of extends Ve{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:jf[s]},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 $f(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(zf(t,n))&&this.startObserver()}unmount(){}}function zf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Bf={inView:{Feature:Of},tap:{Feature:Ff},focus:{Feature:Df},hover:{Feature:Af}},Nf={layout:{ProjectionNode:sa,MeasureLayout:Yr}},Hf={...Pd,...Bf,...Ef,...Nf},ji=Nc(Hf,td),Gf="_primary_13825_8",Wf="_secondary_13825_12",Uf="_tertiary_13825_16",Kf="_positive_13825_20",qf="_negative_13825_24",Xf="_warning_13825_28",Yf="_accent_13825_32",Zf="_inverse_13825_36",Jf="_text_13825_111",Qf="_regular_13825_117",eh="_medium_13825_121",th="_semibold_13825_125",nh="_bold_13825_129",Vt={primary:Gf,secondary:Wf,tertiary:Uf,positive:Kf,negative:qf,warning:Xf,accent:Yf,inverse:Zf,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:Jf,regular:Qf,medium:eh,semibold:th,bold:nh},ih=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),M.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},O=w.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:i="medium",tag:s="p",colorName:o="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:v,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:R,left:T,right:b,uppercase:k,lowercase:F,capitalize:z,overflow:Y,...ee},ie)=>{const[re,te]=w.useState(!1),$=!!c,U=()=>$&&te(!0),I=()=>$&&te(!1),j=ih({mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:v,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:R,left:T,right:b,uppercase:k,lowercase:F,capitalize:z,overflow:Y}),W=s,ve=$?M.css({opacity:re?a:1,transition:`opacity ${l}ms ease`}):"";return m.jsx(W,{ref:ie,...ee,className:M.cx(Vt.text,Vt[n],Vt[o],Vt[i],ve,t,j),style:r,onClick:c,onMouseDown:U,onMouseUp:I,onMouseLeave:I,onTouchStart:U,onTouchEnd:I,role:$?"button":void 0,tabIndex:$?0:void 0,children:e})});O.displayName="Text";const Nt=ji(O),sh="_loader_1qleq_8",oh={loader:sh},rh=({color:e="var(--text-accent)"})=>m.jsx("span",{className:M.cx(oh.loader,M.css({"--loader-color":e}))}),ah=M.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),nt={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},lh={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},uh={clear:M.css({backgroundColor:"transparent",border:"none"}),filled:M.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:M.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},ch=(e,t,n,i)=>{if(i)return M.css({cursor:"not-allowed",opacity:.7});const s={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return M.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return M.css({...s,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return M.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return M.css(s)}},dh=({disabled:e,loading:t,onClick:n,wrapperClassName:i,buttonClassName:s,buttonDisabledClassName:o,textClassName:r,children:a,variant:l="filled",backgroundColor:c,textColor:u,textFontWeight:d,borderColor:f,color:h="accent",borderRadius:p,width:g="full",size:x="md",iconLeft:v,iconRight:C,intensity:y="primary",flex:S,..._})=>{const R=w.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),T=w.useMemo(()=>c||(l==="filled"?h==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${h}-${y})`:"transparent"),[l,c,h,y]),b=w.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(h==="neutral")return"var(--text-secondary)";return`var(--text-${h})`},[y,h,l]),k=w.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(h==="neutral")return"secondary";return h},[l,h,y]),F=w.useMemo(()=>f||(l==="outline"?`var(--border-${h}-${y})`:"transparent"),[l,f,h,y]),z=w.useMemo(()=>{switch(x){case"lg":return nt.lg;case"md":case"sm":return nt.md;case"xs":return nt.sm;default:return nt.md}},[x]),Y=M.cx(ah,ch(l,h,y,e),uh[l],s,e?o:void 0,M.css({borderRadius:p?nt[p]:z,backgroundColor:T,borderColor:F,color:u,width:"100%",height:lh[x],opacity:e?.7:1})),ee=w.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return m.jsx(V,{className:M.cx(i),w:R,flex:S,relative:!0,overflow:"hidden",children:m.jsxs(ji.button,{whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:Y,disabled:e||t,onClick:n,..._,children:[t?m.jsx(rh,{color:b}):m.jsxs(m.Fragment,{children:[v,m.jsx(Nt,{style:{color:u},colorName:k,variant:ee,className:r,textOverflow:"ellipsis",overflow:"hidden",children:a}),C]}),m.jsx(yt,{})]})})},fh=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},P.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),hh=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},P.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),gh="_checkbox_asmiz_8",ph="_disabled_asmiz_15",mh="_checkbox__ripple_asmiz_15",vh="_checkbox__input_asmiz_27",yh="_checkbox__box_asmiz_35",xh="_secondary_asmiz_48",wh="_checked_asmiz_54",Ch="_error_asmiz_63",xe={checkbox:gh,disabled:ph,checkbox__ripple:mh,checkbox__input:vh,checkbox__box:yh,secondary:xh,checked:wh,error:Ch},Sh={sm:20,md:24},Oi=w.forwardRef(({checked:e,onChange:t,disabled:n,error:i,indeterminate:s,size:o="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:d,variant:f="primary",flex:h},p)=>{const[g,x]=w.useState(!1),v=e!==void 0,C=v?e:g,y=R=>{v||x(R.target.checked),t?.(R)},S=Sh[o],_=C||s;return m.jsxs("label",{className:M.cx(xe.checkbox,M.css({flex:h}),{[xe.disabled]:n}),children:[m.jsxs(V,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${S}px`,"--checkbox-size-double":`${S*2}px`},children:[m.jsx("input",{ref:p,type:"checkbox",checked:C,onChange:y,onClick:R=>R.stopPropagation(),disabled:n,name:u,required:d,className:M.cx(xe.checkbox__input,{[xe.disabled]:n})}),m.jsx("div",{className:M.cx(xe.checkbox__box,xe[f],{[xe.disabled]:n,[xe.error]:i,[xe.checked]:_}),children:_&&(s?m.jsx(hh,{width:S*.75,height:S*.75}):m.jsx(fh,{width:S*.75,height:S*.75}))})]}),(r||l)&&m.jsxs(V,{gap:4,children:[r&&m.jsx(O,{colorName:a,variant:o==="sm"?"body-2":"body-1",children:r}),l&&m.jsx(O,{variant:"body-2",colorName:c,children:l})]})]})});Oi.displayName="Checkbox";const _h=e=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("g",{opacity:.5},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),Rh="_disabled_ph9zm_20",bh="_multiline_ph9zm_24",Ph="_input_ph9zm_8",Mh="_sm_ph9zm_74",Th="_md_ph9zm_79",Vh="_error_ph9zm_84",Eh="_white_ph9zm_88",Ah="_gray_ph9zm_92",se={"input-container":"_input-container_ph9zm_8",disabled:Rh,multiline:bh,input:Ph,"input-text-size_sm":"_input-text-size_sm_ph9zm_55","input-text-size_md":"_input-text-size_md_ph9zm_59","input-text-align_left":"_input-text-align_left_ph9zm_64","input-text-align_center":"_input-text-align_center_ph9zm_67","input-text-align_right":"_input-text-align_right_ph9zm_70",sm:Mh,md:Th,error:Vh,white:Eh,gray:Ah,"clear-button":"_clear-button_ph9zm_96"};function fo(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const oa=w.forwardRef((e,t)=>{const{label:n,prompt:i,error:s,errorText:o,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:d,value:f,defaultValue:h,inputClassName:p,textAlign:g="left",...x}=e,v=e.multiline===!0,C=w.useRef(null),y=w.useRef(null),[S,_]=Ht(f!==void 0?String(f):void 0,h!==void 0?String(h):"");w.useImperativeHandle(t,()=>({focus:()=>{C.current?.focus(),y.current?.focus()},blur:()=>{C.current?.blur(),y.current?.blur()},get value(){return C.current?.value||y.current?.value}}));const R=k=>{if(_(k.target.value),v){const F=e.onChange;F?.(k)}else{const F=e.onChange;F?.(k)}};w.useEffect(()=>{v&&e.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[S,v,e.autoResize]);const T=()=>{if(_(""),!v){const F=C.current;if(F){F.value="";const z=fo(F),Y=e.onChange;Y?.(z)}return}const k=y.current;if(k){k.value="";const F=fo(k),z=e.onChange;z?.(F)}},b=()=>{if(v){const{rows:Y,autoResize:ee,onChange:ie,multiline:re,...te}=x;return m.jsx("textarea",{ref:y,rows:e.rows??3,className:M.cx(se.input,p,{[se.disabled]:d,[se[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...te,value:S,onChange:R})}const{onChange:k,multiline:F,...z}=x;return m.jsx("input",{...z,ref:C,className:M.cx(se.input,se[`input-text-size_${r}`],p,{[se.disabled]:d,[se[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:S,onChange:R})};return m.jsxs(V,{w:"full",gap:"var(--spacing-sm)",children:[n&&m.jsx(O,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),m.jsxs(V,{row:!0,alignItems:v?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:M.cx(se["input-container"],se[c],se[r],{[se.error]:s,[se.disabled]:d,[se.multiline]:v}),children:[a&&m.jsx(V,{flex:"none",children:a}),m.jsx(V,{flex:"1",children:b()}),u&&S&&!d&&m.jsx(V,{flex:"none",children:m.jsx("span",{className:se["clear-button"],onClick:T,children:m.jsx(_h,{})})}),l&&m.jsx(V,{flex:"none",children:l})]}),(i||v)&&m.jsxs(V,{row:!0,gap:10,w:"full",children:[typeof i=="string"?m.jsx(O,{variant:"caption-1",colorName:"tertiary",children:i}):i,v&&e.maxLength&&m.jsx(O,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),o&&s&&m.jsx(O,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:o})]})});oa.displayName="Input";const Dh=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Fh=e=>P.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...e},P.createElement("g",null,P.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),kh="_avatar_1oe2p_8",Ih="_avatar_primary_1oe2p_22",Lh="_avatar_secondary_1oe2p_25",$h="_avatar_negative_1oe2p_28",jh="_avatar_positive_1oe2p_31",Oh="_avatar_warning_1oe2p_34",zh="_avatar_lgSize_1oe2p_71",Bh="_avatar_mdSize_1oe2p_85",Nh="_avatar_smSize_1oe2p_99",_n={avatar:kh,avatar_primary:Ih,avatar_secondary:Lh,avatar_negative:$h,avatar_positive:jh,avatar_warning:Oh,avatar_lgSize:zh,avatar_mdSize:Bh,avatar_smSize:Nh};function Hh({attr:e,children:t,className:n,color:i="primary",size:s="md",...o}){const r="avatar";return m.jsx("div",{...e,...o,className:Fe(_n[r],n,ct(_n,r,s),Gt(_n,r,i)),children:t})}const Gh=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),P.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ho=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),P.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),P.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),Wh=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),P.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Uh=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},P.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Kh="_hint_prca1_8",qh="_md_prca1_19",Xh="_sm_prca1_24",Yh="_icon_prca1_29",Zh="_content_prca1_40",Jh="_title_prca1_46",Qh="_subtitle_prca1_50",eg="_disabled_prca1_55",tg="_warning_prca1_60",ng="_solid_prca1_60",ig="_negative_prca1_65",sg="_positive_prca1_70",og="_accent_prca1_75",rg="_neutral_prca1_80",ag="_soft_prca1_85",ue={hint:Kh,md:qh,sm:Xh,icon:Yh,content:Zh,title:Jh,subtitle:Qh,disabled:eg,warning:tg,solid:ng,negative:ig,positive:sg,accent:og,neutral:rg,soft:ag},lg={negative:m.jsx(Wh,{}),positive:m.jsx(Gh,{}),accent:m.jsx(ho,{}),warning:m.jsx(ho,{}),neutral:m.jsx(Uh,{})},ug=({title:e,subtitle:t,color:n="warning",variant:i="soft",size:s="md",icon:o,disabled:r=!1,className:a,style:l})=>{const c=o||lg[n];return m.jsxs("div",{className:Fe(ue.hint,ue[n],ue[i],ue[s],r&&ue.disabled,a),style:l,"aria-disabled":r,children:[c&&m.jsx("span",{className:Fe(ue.icon,ue[n]),children:c}),m.jsxs("div",{className:ue.content,children:[e&&m.jsx(O,{className:Fe(ue.title,ct(ue,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&m.jsx(O,{className:Fe(ue.subtitle,ct(ue,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},cg={primary:{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"},accent:{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"},warning:{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"},positive:{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"},negative:{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"}},dg={sm:28,md:32,lg:40},zi=w.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:s,avatar:o,icon:r,disabled:a,className:l},c)=>{const u=w.useRef(null),d=cg[t],f=M.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=M.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return m.jsxs(V,{ref:p=>{u.current=p,typeof c=="function"?c(p):c&&(c.current=p)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:dg[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:M.cx(f,l),children:[i&&m.jsx(yt,{}),o&&m.jsx(V,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&m.jsx(V,{children:r}),m.jsx(O,{variant:"caption-1",colorName:t,textOverflow:"ellipsis",children:e}),s&&!a&&m.jsx(O,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:"×"})]})});zi.displayName="Tag";const ra=({children:e})=>{const[t]=w.useState(()=>document.createElement("div"));return w.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(t),()=>{n&&n.contains(t)&&n.removeChild(t)}},[t]),_o.createPortal(e,t)},fg="_disabled_1evr5_40",hg="_open_1evr5_48",gg="_error_1evr5_51",pg="_hidden_1evr5_87",mg="_visible_1evr5_90",vg="_selected_1evr5_163",X={"select-container":"_select-container_1evr5_8","full-width":"_full-width_1evr5_13","select-input":"_select-input_1evr5_17","size-xs":"_size-xs_1evr5_25","size-sm":"_size-sm_1evr5_30","size-md":"_size-md_1evr5_35",disabled:fg,open:hg,"select-arrow":"_select-arrow_1evr5_48",error:gg,"select-value":"_select-value_1evr5_62","select-value_xs":"_select-value_xs_1evr5_74","select-placeholder":"_select-placeholder_1evr5_81",hidden:pg,visible:mg,"select-arrow_xs":"_select-arrow_xs_1evr5_106","select-dropdown":"_select-dropdown_1evr5_116","select-menu":"_select-menu_1evr5_126","select-menu-item":"_select-menu-item_1evr5_145","select-menu-item-first":"_select-menu-item-first_1evr5_158",selected:vg,"overflow-tooltip-container":"_overflow-tooltip-container_1evr5_167","overflow-tooltip-text":"_overflow-tooltip-text_1evr5_172","empty-block":"_empty-block_1evr5_179"};function aa({value:e,onChange:t,multiple:n=!1,returnedValue:i,renderItem:s,placeholder:o,items:r=[],fullWidth:a,size:l="md",showDefaultItem:c,disabled:u,label:d,firstItem:f,lastItem:h,observer:p,emptyText:g,onBlur:x,prompt:v,error:C,errorText:y}){const[S,_]=Ht(e,n?[]:null),R=w.useRef(null),T=w.useRef(null),[b,k]=w.useState(!1),F=w.useMemo(()=>n?S||[]:S!=null?[S]:[],[S,n]),z=w.useMemo(()=>{const I=new Map;return r.forEach(j=>{I.set(i(j),j)}),I},[r,i]),Y=bo(R,b),ee=!r.length&&!C,ie=I=>{const j=i(I);if(n){const W=F.includes(j)?F.filter(ve=>ve!==j):[...F,j];_(W),t?.(W)}else _(j),t?.(j),k(!1)},re=I=>{if(!n)return;const j=F.filter(W=>W!==I);_(j),t?.(j)},te=()=>{const I=n?[]:null;_(I),t?.(I),n||k(!1)};w.useEffect(()=>{if(!b)return;const I=j=>{const W=j.target;!R.current?.contains(W)&&!T.current?.contains(W)&&(k(!1),x?.())};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[b,x]);const $=()=>{if(!F.length)return m.jsx(O,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o??"Select..."});if(n)return m.jsx(V,{flexWrap:"wrap",row:!0,gap:10,children:F.map(W=>{const ve=z.get(W);return ve?m.jsx(zi,{size:"sm",label:s(ve),onDelete:Qe=>{Qe.stopPropagation(),re(W)}},W):null})});const I=z.get(F[0]);if(!I)return m.jsx(O,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o});const j=s(I);return typeof j=="string"?m.jsx(O,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:j}):m.jsx(m.Fragment,{children:j})},U=b&&m.jsx(ra,{children:m.jsx(ji.div,{ref:T,className:X["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...Y,position:"absolute",zIndex:1},children:m.jsxs("ul",{className:X["select-menu"],children:[c&&!n&&m.jsx(V,{className:X["select-menu-item"],role:"option",onClick:te,children:m.jsx(O,{variant:"body-2",colorName:"tertiary",children:o})}),f&&m.jsx(V,{className:M.cx(X["select-menu-item"],X["select-menu-item-first"]),children:f}),ee&&m.jsxs(V,{className:X["empty-block"],children:[m.jsx(V,{w:20,h:20,children:m.jsx(Fh,{})}),m.jsx(O,{variant:"body-2",children:g??"There is nothing yet"})]}),r.map(I=>{const j=i(I),W=F.includes(j);return m.jsxs(V,{row:!0,gap:10,alignItems:"center",className:M.cx(X["select-menu-item"],{[X.selected]:W}),role:"option",relative:!0,onClick:()=>ie(I),children:[n&&m.jsx(Oi,{size:"sm",checked:W}),typeof s(I)=="string"?m.jsx(O,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:s(I)}):s(I),m.jsx(yt,{})]},j)}),p,h&&m.jsx(V,{className:M.cx(X["select-menu-item"],X["select-menu-item-first"]),children:h})]})},"dropdown")});return m.jsxs(V,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof d=="string"?m.jsx(O,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:d}):d,m.jsxs(V,{ref:R,row:!0,gap:10,tabIndex:u?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:M.cx(X["select-input"],X[`size-${l}`],{[X.error]:C,[X.disabled]:u,[X.open]:b}),onClick:()=>!u&&k(I=>!I),onBlur:x,children:[m.jsx(V,{className:M.cx(X["select-value"]),children:$()}),m.jsx(V,{className:M.cx(X["select-arrow"],X[`select-arrow_${l}`]),children:m.jsx(Dh,{})})]}),typeof v=="string"?m.jsx(O,{variant:"caption-1",colorName:"tertiary",mt:4,children:v}):v,C&&y&&m.jsx(O,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:y}),m.jsx(cc,{initial:!1,children:U})]})}const yg=e=>P.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),xg=e=>P.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),wg="_container_e7tan_8",Cg="_disabled_e7tan_17",Sg="_reverse_e7tan_21",_g="_input_e7tan_25",Rg="_switchContainer_e7tan_35",bg="_variant_accent_e7tan_43",Pg="_variant_secondary_e7tan_47",Mg="_thumb_e7tan_51",Tg="_variant_theme_e7tan_54",Vg="_moon_e7tan_58",Eg="_fire_e7tan_61",Ag="_size_sm_e7tan_74",Dg="_size_md_e7tan_80",Fg="_size_lg_e7tan_86",he={container:wg,disabled:Cg,reverse:Sg,input:_g,switchContainer:Rg,variant_accent:bg,variant_secondary:Pg,switch:"_switch_e7tan_35",thumb:Mg,variant_theme:Tg,moon:Vg,fire:Eg,size_sm:Ag,size_md:Dg,size_lg:Fg},la=w.forwardRef(({title:e,text:t,icon:n,disabled:i,onChange:s,checked:o,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:d="auto",...f},h)=>{const[p,g]=Ht(o,r),x=w.useRef(null);w.useImperativeHandle(h,()=>({focus:()=>{x.current?.focus()},blur:()=>{x.current?.blur()},get checked(){return p??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!p;g(S),s?.(S)},isFocused:()=>document.activeElement===x.current,isDisabled:()=>i??!1,getInputElement:()=>x.current,checkValidity:()=>x.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[p,g,s,i,r]);const v=w.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),C=w.useMemo(()=>typeof e=="string"?m.jsx(O,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),y=w.useMemo(()=>typeof t=="string"?m.jsx(O,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return m.jsxs(V,{row:!0,w:d,gap:"var(--spacing-sm)",children:[m.jsxs("label",{className:M.cx(he.container,a,{[he.disabled]:i,[he.reverse]:u}),children:[m.jsxs(V,{className:M.cx(he.switchContainer,he[`size_${l}`],he[`variant_${c}`]),children:[m.jsx("input",{ref:x,type:"checkbox",checked:p,className:he.input,onChange:v,disabled:i,...f}),m.jsx("div",{className:he.switch,children:m.jsx("div",{className:he.thumb,children:c==="theme"&&m.jsxs(m.Fragment,{children:[m.jsx(xg,{className:he.moon}),m.jsx(yg,{className:he.fire})]})})})]}),m.jsxs(V,{gap:"var(--spacing-xs)",children:[C,y]})]}),n]})});la.displayName="Switch";const kg="_header_446to_8",Ig={header:kg},ua=w.forwardRef(({title:e,subtitle:t,onClose:n,w:i="full",p:s,py:o,px:r="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:c=!0,justifyContent:u="space-between",showCloseButton:d=!0},f)=>m.jsxs(V,{w:i,p:s,py:o,px:r,pt:a,pb:l,row:c,justifyContent:u,ref:f,className:Ig.header,children:[m.jsxs(V,{gap:"var(--spacing-sm)",children:[m.jsx(O,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),m.jsx(O,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),d&&m.jsx(V,{children:m.jsx(dt,{onClick:n,color:"neutral",children:m.jsx(Ro,{})})})]}));ua.displayName="ModalHeader";const Lg="_footer_1bo08_8",$g={footer:Lg},ca=w.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:i="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:o,...r},a)=>m.jsx(V,{flex:n,row:t,gap:i,p:s,className:M.cx($g.footer,o),ref:a,...r,children:e}));ca.displayName="ModalFooter";function Oe(e,t,n){let i=n.initialDeps??[],s;function o(){var r,a,l,c;let u;n.key&&((r=n.debug)!=null&&r.call(n))&&(u=Date.now());const d=e();if(!(d.length!==i.length||d.some((p,g)=>i[g]!==p)))return s;i=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),s=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const p=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,x=g/16,v=(C,y)=>{for(C=String(C);C.length<y;)C=" "+C;return C};console.info(`%c⏱ ${v(g,5)} /${v(p,5)} ms`,`
13
+ `),()=>{x.contains(g)&&x.removeChild(g)}},[t]),m.jsx(uc,{isPresent:t,childRef:o,sizeRef:r,children:ve.cloneElement(e,{ref:l})})}const dc=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=ai(fc),u=w.useId();let d=!0,f=w.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:h=>{c.set(h,!0);for(const p of c.values())if(!p)return;i&&i()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,i]);return o&&d&&(f={...f}),w.useMemo(()=>{c.forEach((h,p)=>c.set(p,!1))},[n]),ve.useEffect(()=>{!n&&!c.size&&i&&i()},[n]),r==="popLayout"&&(e=m.jsx(cc,{isPresent:n,anchorX:a,root:l,children:e})),m.jsx(qt.Provider,{value:f,children:e})};function fc(){return new Map}function Cr(e=!0){const t=w.useContext(qt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=w.useId();w.useEffect(()=>{if(e)return s(o)},[e]);const r=w.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,r]:[!0]}const Vt=e=>e.key||"";function Cs(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const hc=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=Cr(r),d=w.useMemo(()=>Cs(e),[e]),f=r&&!c?[]:d.map(Vt),h=w.useRef(!0),p=w.useRef(d),g=ai(()=>new Map),[x,v]=w.useState(d),[C,y]=w.useState(d);Eo(()=>{h.current=!1,p.current=d;for(let b=0;b<C.length;b++){const P=Vt(C[b]);f.includes(P)?g.delete(P):g.get(P)!==!0&&g.set(P,!1)}},[C,f.length,f.join("-")]);const S=[];if(d!==x){let b=[...d];for(let P=0;P<C.length;P++){const R=C[P],F=Vt(R);f.includes(F)||(b.splice(P,0,R),S.push(R))}return o==="wait"&&S.length&&(b=S),y(Cs(b)),v(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&C.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:_}=w.useContext(ri);return m.jsx(m.Fragment,{children:C.map(b=>{const P=Vt(b),R=r&&!c?!1:d===C||f.includes(P),F=()=>{if(g.has(P))g.set(P,!0);else return;let D=!0;g.forEach(L=>{L||(D=!1)}),D&&(_?.(),y(p.current),r&&u?.(),i&&i())};return m.jsx(dc,{isPresent:R,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:l,onExitComplete:R?void 0:F,anchorX:a,children:b},P)})})},Sr=w.createContext({strict:!1}),Ss={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"]},Ye={};for(const e in Ss)Ye[e]={isEnabled:t=>Ss[e].some(n=>!!t[n])};function gc(e){for(const t in e)Ye[t]={...Ye[t],...e[t]}}const pc=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 Ht(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pc.has(e)}let _r=e=>!Ht(e);function mc(e){typeof e=="function"&&(_r=t=>t.startsWith("on")?!Ht(t):e(t))}try{mc(require("@emotion/is-prop-valid").default)}catch{}function vc(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(_r(s)||n===!0&&Ht(s)||!t&&!Ht(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Xt=w.createContext({});function Yt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function yt(e){return typeof e=="string"||Array.isArray(e)}const Ai=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Di=["initial",...Ai];function Zt(e){return Yt(e.animate)||Di.some(t=>yt(e[t]))}function br(e){return!!(Zt(e)||e.variants)}function yc(e,t){if(Zt(e)){const{initial:n,animate:i}=e;return{initial:n===!1||yt(n)?n:void 0,animate:yt(i)?i:void 0}}return e.inherit!==!1?t:{}}function xc(e){const{initial:t,animate:n}=yc(e,w.useContext(Xt));return w.useMemo(()=>({initial:t,animate:n}),[_s(t),_s(n)])}function _s(e){return Array.isArray(e)?e.join(" "):e}const xt={};function wc(e){for(const t in e)xt[t]=e[t],mi(t)&&(xt[t].isCSSVariable=!0)}function Rr(e,{layout:t,layoutId:n}){return tt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!xt[e]||e==="opacity")}const Cc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Sc=et.length;function _c(e,t,n){let i="",s=!0;for(let o=0;o<Sc;o++){const r=et[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=pr(a,Pi[r]);if(!l){s=!1;const u=Cc[r]||r;i+=`${u}(${c}) `}n&&(t[r]=c)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Fi(e,t,n){const{style:i,vars:s,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(tt.has(l)){r=!0;continue}else if(mi(l)){s[l]=c;continue}else{const u=pr(c,Pi[l]);l.startsWith("origin")?(a=!0,o[l]=u):i[l]=u}}if(t.transform||(r||n?i.transform=_c(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;i.transformOrigin=`${l} ${c} ${u}`}}const Ii=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mr(e,t,n){for(const i in t)!Q(t[i])&&!Rr(i,n)&&(e[i]=t[i])}function bc({transformTemplate:e},t){return w.useMemo(()=>{const n=Ii();return Fi(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Rc(e,t){const n=e.style||{},i={};return Mr(i,n,e),Object.assign(i,bc(e,t)),i}function Mc(e,t){const n={},i=Rc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Pc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tc={offset:"strokeDashoffset",array:"strokeDasharray"};function Vc(e,t,n=1,i=0,s=!0){e.pathLength=1;const o=s?Pc:Tc;e[o.offset]=A.transform(-i);const r=A.transform(t),a=A.transform(n);e[o.array]=`${r} ${a}`}function Pr(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Fi(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?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),s!==void 0&&Vc(d,s,o,r,!1)}const Tr=()=>({...Ii(),attrs:{}}),Vr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ec(e,t,n,i){const s=w.useMemo(()=>{const o=Tr();return Pr(o,t,Vr(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Mr(o,e.style,e),s.style={...o,...s.style}}return s}const Ac=["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 ki(e){return typeof e!="string"||e.includes("-")?!1:!!(Ac.indexOf(e)>-1||/[A-Z]/u.test(e))}function Dc(e,t,n,{latestValues:i},s,o=!1){const a=(ki(e)?Ec:Mc)(t,i,s,e),l=vc(t,typeof e=="string",o),c=e!==w.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=w.useMemo(()=>Q(u)?u.get():u,[u]);return w.createElement(e,{...c,children:d})}function bs(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function ji(e,t,n,i){if(typeof t=="function"){const[s,o]=bs(i);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=bs(i);t=t(n!==void 0?n:e.custom,s,o)}return t}function $t(e){return Q(e)?e.get():e}function Fc({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:Ic(n,i,s,e),renderState:t()}}function Ic(e,t,n,i){const s={},o=i(e,{});for(const f in o)s[f]=$t(o[f]);let{initial:r,animate:a}=e;const l=Zt(e),c=br(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!Yt(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=ji(e,f[h]);if(p){const{transitionEnd:g,transition:x,...v}=p;for(const C in v){let y=v[C];if(Array.isArray(y)){const S=u?y.length-1:0;y=y[S]}y!==null&&(s[C]=y)}for(const C in g)s[C]=g[C]}}}return s}const Er=e=>(t,n)=>{const i=w.useContext(Xt),s=w.useContext(qt),o=()=>Fc(e,t,i,s);return n?o():ai(o)};function $i(e,t,n){const{style:i}=e,s={};for(const o in i)(Q(i[o])||t.style&&Q(t.style[o])||Rr(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=i[o]);return s}const kc=Er({scrapeMotionValuesFromProps:$i,createRenderState:Ii});function Ar(e,t,n){const i=$i(e,t,n);for(const s in e)if(Q(e[s])||Q(t[s])){const o=et.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=e[s]}return i}const jc=Er({scrapeMotionValuesFromProps:Ar,createRenderState:Tr}),$c=Symbol.for("motionComponentSymbol");function Ge(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Lc(e,t,n){return w.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):Ge(n)&&(n.current=i))},[t])}const Li=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Oc="framerAppearId",Dr="data-"+Li(Oc),Fr=w.createContext({});function zc(e,t,n,i,s){const{visualElement:o}=w.useContext(Xt),r=w.useContext(Sr),a=w.useContext(qt),l=w.useContext(Ei).reducedMotion,c=w.useRef(null);i=i||r.renderer,!c.current&&i&&(c.current=i(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=w.useContext(Fr);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&Bc(c.current,n,s,d);const f=w.useRef(!1);w.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[Dr],p=w.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Eo(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),p.current=!1),u.enteringChildren=void 0)}),u}function Bc(e,t,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ir(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&Ge(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function Ir(e){if(e)return e.options.allowProjection!==!1?e.projection:Ir(e.parent)}function mn(e,{forwardMotionProps:t=!1}={},n,i){n&&gc(n);const s=ki(e)?jc:kc;function o(a,l){let c;const u={...w.useContext(Ei),...a,layoutId:Nc(a)},{isStatic:d}=u,f=xc(a),h=s(a,d);if(!d&&li){Hc(u,n);const p=Gc(u);c=p.MeasureLayout,f.visualElement=zc(e,h,u,i,p.ProjectionNode)}return m.jsxs(Xt.Provider,{value:f,children:[c&&f.visualElement?m.jsx(c,{visualElement:f.visualElement,...u}):null,Dc(e,a,Lc(h,f.visualElement,l),h,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=w.forwardRef(o);return r[$c]=e,r}function Nc({layoutId:e}){const t=w.useContext(ri).id;return t&&e!==void 0?t+"-"+e:e}function Hc(e,t){const n=w.useContext(Sr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="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,i,"lazy-strict-mode"):Se(!1,i,"lazy-strict-mode")}}function Gc(e){const{drag:t,layout:n}=Ye;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Wc(e,t){if(typeof Proxy>"u")return mn;const n=new Map,i=(o,r)=>mn(o,r,e,t),s=(o,r)=>(process.env.NODE_ENV!=="production"&&hi(!1,"motion() is deprecated. Use motion.create() instead."),i(o,r));return new Proxy(s,{get:(o,r)=>r==="create"?i:(n.has(r)||n.set(r,mn(r,void 0,e,t)),n.get(r))})}function kr({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Uc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Kc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function vn(e){return e===void 0||e===1}function Kn({scale:e,scaleX:t,scaleY:n}){return!vn(e)||!vn(t)||!vn(n)}function Ie(e){return Kn(e)||jr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jr(e){return Rs(e.x)||Rs(e.y)}function Rs(e){return e&&e!=="0%"}function Gt(e,t,n){const i=e-n,s=t*i;return n+s}function Ms(e,t,n,i,s){return s!==void 0&&(e=Gt(e,s,i)),Gt(e,n,i)+t}function qn(e,t=0,n=1,i,s){e.min=Ms(e.min,t,n,i,s),e.max=Ms(e.max,t,n,i,s)}function $r(e,{x:t,y:n}){qn(e.x,t.translate,t.scale,t.originPoint),qn(e.y,n.translate,n.scale,n.originPoint)}const Ps=.999999999999,Ts=1.0000000000001;function qc(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ue(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,$r(e,r)),i&&Ie(o.latestValues)&&Ue(e,o.latestValues))}t.x<Ts&&t.x>Ps&&(t.x=1),t.y<Ts&&t.y>Ps&&(t.y=1)}function We(e,t){e.min=e.min+t,e.max=e.max+t}function Vs(e,t,n,i,s=.5){const o=H(e.min,e.max,s);qn(e,t,n,o,i)}function Ue(e,t){Vs(e.x,t.x,t.scaleX,t.scale,t.originX),Vs(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lr(e,t){return kr(Kc(e.getBoundingClientRect(),t))}function Xc(e,t,n){const i=Lr(e,n),{scroll:s}=t;return s&&(We(i.x,s.offset.x),We(i.y,s.offset.y)),i}const Es=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ke=()=>({x:Es(),y:Es()}),As=()=>({min:0,max:0}),W=()=>({x:As(),y:As()}),Xn={current:null},Or={current:!1};function Yc(){if(Or.current=!0,!!li)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xn.current=e.matches;e.addEventListener("change",t),t()}else Xn.current=!1}const Zc=new WeakMap;function Jc(e,t,n){for(const i in t){const s=t[i],o=n[i];if(Q(s))e.addValue(i,s);else if(Q(o))e.addValue(i,Xe(s,{owner:e}));else if(o!==s)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(i);e.addValue(i,Xe(r!==void 0?r:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ds=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Qc{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ri,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=oe.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,B.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Zt(n),this.isVariantNode=br(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&&Q(h)&&h.set(l[f])}}mount(t){this.current=t,Zc.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,i)=>this.bindToMotionValue(i,n)),Or.current||Yc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xn.current,process.env.NODE_ENV!=="production"&&hi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Te(this.notifyUpdate),Te(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=tt.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&B.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),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 Ye){const n=Ye[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(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):W()}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 i=0;i<Ds.length;i++){const s=Ds[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,r=t[o];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=Jc(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Xe(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Ao(i)||Fo(i))?i=parseFloat(i):!rc(i)&&Ve.test(n)&&(i=gr(t,n)),this.setBaseTarget(t,Q(i)?i.get():i)),Q(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=ji(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Q(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ti.render(this.render)}}class zr extends Qc{constructor(){super(...arguments),this.KeyframeResolver=qu}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:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Q(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Br(e,{style:t,vars:n},i,s){const o=e.style;let r;for(r in t)o[r]=t[r];s?.applyProjectionStyles(o,i);for(r in n)o.setProperty(r,n[r])}function ed(e){return window.getComputedStyle(e)}class td extends zr{constructor(){super(...arguments),this.type="html",this.renderInstance=Br}readValueFromInstance(t,n){if(tt.has(n))return this.projection?.isProjecting?zn(n):fu(t,n);{const i=ed(t),s=(mi(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lr(t,n)}build(t,n,i){Fi(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return $i(t,n,i)}}const Nr=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 nd(e,t,n,i){Br(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Nr.has(s)?s:Li(s),t.attrs[s])}class id extends zr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(tt.has(n)){const i=hr(n);return i&&i.default||0}return n=Nr.has(n)?n:Li(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Ar(t,n,i)}build(t,n,i){Pr(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){nd(t,n,i,s)}mount(t){this.isSVGTag=Vr(t.tagName),super.mount(t)}}const sd=(e,t)=>ki(e)?new id(t):new td(t,{allowProjection:e!==w.Fragment});function qe(e,t,n){const i=e.getProps();return ji(i,t,n!==void 0?n:i.custom,e)}const Yn=e=>Array.isArray(e);function od(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xe(n))}function rd(e){return Yn(e)?e[e.length-1]||0:e}function ad(e,t){const n=qe(e,t);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){const a=rd(o[r]);od(e,r,a)}}function ld(e){return!!(Q(e)&&e.add)}function Zn(e,t){const n=e.getValue("willChange");if(ld(n))return n.add(t);if(!n&&_e.WillChange){const i=new _e.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Hr(e){return e.props[Dr]}const ud=e=>e!==null;function cd(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(ud),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const dd={type:"spring",stiffness:500,damping:25,restSpeed:10},fd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),hd={type:"keyframes",duration:.8},gd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pd=(e,{keyframes:t})=>t.length>2?hd:tt.has(e)?e.startsWith("scale")?fd(t[1]):dd:gd;function md({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Oi=(e,t,n,i={},s,o)=>r=>{const a=Mi(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;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:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};md(a)||Object.assign(u,pd(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)&&(Wn(u),u.delay===0&&(d=!0)),(_e.instantAnimations||_e.skipAnimations)&&(d=!0,Wn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=cd(u.keyframes,a);if(f!==void 0){B.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new bi(u):new ku(u)};function vd({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Gr(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;i&&(o=i);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&vd(c,u))continue;const h={delay:n,...Mi(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 v=Hr(e);if(v){const C=window.MotionHandoffAnimation(v,u,B);C!==null&&(h.startTime=C,g=!0)}}Zn(e,u),d.start(Oi(u,d,f,e.shouldReduceMotion&&cr.has(u)?{type:!1}:h,e,g));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{B.update(()=>{r&&ad(e,r)})}),l}function Wr(e,t,n,i=0,s=1){const o=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(o,r):s===1?o*i:a-o*i}function Jn(e,t,n={}){const i=qe(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Gr(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=s;return yd(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function yd(e,t,n=0,i=0,s=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Jn(l,t,{...r,delay:n+(typeof i=="function"?0:i)+Wr(e.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function xd(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(o=>Jn(e,o,n));i=Promise.all(s)}else if(typeof t=="string")i=Jn(e,t,n);else{const s=typeof t=="function"?qe(e,t,n.custom):t;i=Promise.all(Gr(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Ur(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const wd=Di.length;function Kr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Kr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wd;n++){const i=Di[n],s=e.props[i];(yt(s)||s===!1)&&(t[i]=s)}return t}const Cd=[...Ai].reverse(),Sd=Ai.length;function _d(e){return t=>Promise.all(t.map(({animation:n,options:i})=>xd(e,n,i)))}function bd(e){let t=_d(e),n=Fs(),i=!0;const s=l=>(c,u)=>{const d=qe(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...p}=d;c={...c,...p,...h}}return c};function o(l){t=l(e)}function r(l){const{props:c}=e,u=Kr(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let x=0;x<Sd;x++){const v=Cd[x],C=n[v],y=c[v]!==void 0?c[v]:u[v],S=yt(y),_=v===l?C.isActive:null;_===!1&&(p=x);let b=y===u[v]&&y!==c[v]&&S;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),C.protectedKeys={...h},!C.isActive&&_===null||!y&&!C.prevProp||Yt(y)||typeof y=="boolean")continue;const P=Rd(C.prevProp,y);let R=P||v===l&&C.isActive&&!b&&S||x>p&&S,F=!1;const D=Array.isArray(y)?y:[y];let L=D.reduce(s(v),{});_===!1&&(L={});const{prevResolvedValues:q={}}=C,ee={...q,...L},ie=$=>{R=!0,f.has($)&&(F=!0,f.delete($)),C.needsAnimating[$]=!0;const G=e.getValue($);G&&(G.liveStyle=!1)};for(const $ in ee){const G=L[$],Y=q[$];if(h.hasOwnProperty($))continue;let I=!1;Yn(G)&&Yn(Y)?I=!Ur(G,Y):I=G!==Y,I?G!=null?ie($):f.add($):G!==void 0&&f.has($)?ie($):C.protectedKeys[$]=!0}C.prevProp=y,C.prevResolvedValues=L,C.isActive&&(h={...h,...L}),i&&e.blockInitialAnimation&&(R=!1);const re=b&&P;R&&(!re||F)&&d.push(...D.map($=>{const G={type:v};if(typeof $=="string"&&i&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:Y}=e,I=qe(Y,$);if(Y.enteringChildren&&I){const{delayChildren:z}=I.transition||{};G.delay=Wr(Y.enteringChildren,e,z)}}return{animation:$,options:G}}))}if(f.size){const x={};if(typeof c.initial!="boolean"){const v=qe(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{const C=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),x[v]=C??null}),d.push({animation:x})}let g=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Fs(),i=!0}}}function Rd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ur(t,e):!1}function Fe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fs(){return{animate:Fe(!0),whileInView:Fe(),whileHover:Fe(),whileTap:Fe(),whileDrag:Fe(),whileFocus:Fe(),exit:Fe()}}class Ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Md extends Ae{constructor(t){super(t),t.animationState||(t.animationState=bd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yt(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(){this.node.animationState.reset(),this.unmountControls?.()}}let Pd=0;class Td extends Ae{constructor(){super(...arguments),this.id=Pd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 Vd={animation:{Feature:Md},exit:{Feature:Td}};function wt(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function bt(e){return{point:{x:e.pageX,y:e.pageY}}}const Ed=e=>t=>Vi(t)&&e(t,bt(t));function ut(e,t,n,i){return wt(e,t,Ed(n),i)}const qr=1e-4,Ad=1-qr,Dd=1+qr,Xr=.01,Fd=0-Xr,Id=0+Xr;function ne(e){return e.max-e.min}function kd(e,t,n){return Math.abs(e-t)<=n}function Is(e,t,n,i=.5){e.origin=i,e.originPoint=H(t.min,t.max,e.origin),e.scale=ne(n)/ne(t),e.translate=H(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ad&&e.scale<=Dd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Fd&&e.translate<=Id||isNaN(e.translate))&&(e.translate=0)}function ct(e,t,n,i){Is(e.x,t.x,n.x,i?i.originX:void 0),Is(e.y,t.y,n.y,i?i.originY:void 0)}function ks(e,t,n){e.min=n.min+t.min,e.max=e.min+ne(t)}function jd(e,t,n){ks(e.x,t.x,n.x),ks(e.y,t.y,n.y)}function js(e,t,n){e.min=t.min-n.min,e.max=e.min+ne(t)}function dt(e,t,n){js(e.x,t.x,n.x),js(e.y,t.y,n.y)}function ce(e){return[e("x"),e("y")]}const Yr=({current:e})=>e?e.ownerDocument.defaultView:null,$s=(e,t)=>Math.abs(e-t);function $d(e,t){const n=$s(e.x,t.x),i=$s(e.y,t.y);return Math.sqrt(n**2+i**2)}class Zr{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:r=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=xn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=$d(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:x}=Z;this.history.push({...g,timestamp:x});const{onStart:v,onMove:C}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=yn(h,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=xn(f.type==="pointercancel"?this.lastMoveEventInfo:yn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!Vi(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;const a=bt(t),l=yn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Z;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,xn(l,this.history)),this.removeListeners=Ct(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(),Te(this.updatePoint)}}function yn(e,t){return t?{point:t(e.point)}:e}function Ls(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xn({point:e},t){return{point:e,delta:Ls(e,Jr(t)),offset:Ls(e,Ld(t)),velocity:Od(t,.1)}}function Ld(e){return e[0]}function Jr(e){return e[e.length-1]}function Od(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=Jr(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>pe(t)));)n--;if(!i)return{x:0,y:0};const o=de(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function zd(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?H(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?H(n,e,i.max):Math.min(e,n)),e}function Os(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 Bd(e,{top:t,left:n,bottom:i,right:s}){return{x:Os(e.x,n,s),y:Os(e.y,t,i)}}function zs(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Nd(e,t){return{x:zs(e.x,t.x),y:zs(e.y,t.y)}}function Hd(e,t){let n=.5;const i=ne(e),s=ne(t);return s>i?n=pt(t.min,t.max-i,e.min):i>s&&(n=pt(e.min,e.max-s,t.min)),Ce(0,1,n)}function Gd(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 Qn=.35;function Wd(e=Qn){return e===!1?e=0:e===!0&&(e=Qn),{x:Bs(e,"left","right"),y:Bs(e,"top","bottom")}}function Bs(e,t,n){return{min:Ns(e,t),max:Ns(e,n)}}function Ns(e,t){return typeof e=="number"?e:e[t]||0}const Ud=new WeakMap;class Kd{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=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(bt(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ju(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),ce(v=>{let C=this.getAxisMotionValue(v).get()||0;if(ye.test(C)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(C=ne(S)*(parseFloat(C)/100))}}this.originPoint[v]=C}),g&&B.postRender(()=>g(d,f)),Zn(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=qd(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>ce(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Zr(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:Yr(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&B.postRender(()=>a(i,s))}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:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Et(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=zd(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Ge(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Bd(i.layoutBox,t):this.constraints=!1,this.elastic=Wd(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ce(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Gd(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ge(t))return!1;const i=t.current;Se(i!==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:s}=this.visualElement;if(!s||!s.layout)return!1;const o=Xc(i,s.root,this.visualElement.getTransformPagePoint());let r=Nd(s.layout.layoutBox,o);if(n){const a=n(Uc(r));this.hasMutatedConstraints=!!a,a&&(r=kr(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ce(u=>{if(!Et(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:i?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 i=this.getAxisMotionValue(t);return Zn(this.visualElement,t),i.start(Oi(t,i,0,n,this.visualElement,!1))}stopAnimation(){ce(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ce(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){ce(n=>{const{drag:i}=this.getProps();if(!Et(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];o.set(t[n]-H(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ge(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ce(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=Hd({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),ce(r=>{if(!Et(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(H(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;Ud.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)}),i=()=>{const{dragConstraints:l}=this.getProps();Ge(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),B.read(i);const r=wt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ce(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=Qn,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Et(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qd(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Xd extends Ae{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Kd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hs=e=>(t,n)=>{e&&B.postRender(()=>e(t,n))};class Yd extends Ae{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Zr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Hs(t),onStart:Hs(n),onMove:i,onEnd:(o,r)=>{delete this.session,s&&B.postRender(()=>s(o,r))}}}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 Lt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const st={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(A.test(e))e=parseFloat(e);else return e;const n=Gs(e,t.target.x),i=Gs(e,t.target.y);return`${n}% ${i}%`}},Zd={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Ve.parse(e);if(s.length>5)return i;const o=Ve.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const c=H(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),o(s)}};let wn=!1;class Jd extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;wc(Qd),o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),wn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Lt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r&&(r.isPresent=o,wn=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||B.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ti.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;wn=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Qr(e){const[t,n]=Cr(),i=w.useContext(ri);return m.jsx(Jd,{...e,layoutGroup:i,switchLayoutGroup:w.useContext(Fr),isPresent:t,safeToRemove:n})}const Qd={borderRadius:{...st,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomLeftRadius:st,borderBottomRightRadius:st,boxShadow:Zd};function ef(e,t,n){const i=Q(e)?e:Xe(e);return i.start(Oi("",i,t,n)),i.animation}const tf=(e,t)=>e.depth-t.depth;class nf{constructor(){this.children=[],this.isDirty=!1}add(t){ui(this.children,t),this.isDirty=!0}remove(t){ci(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tf),this.isDirty=!1,this.children.forEach(t)}}function sf(e,t){const n=oe.now(),i=({timestamp:s})=>{const o=s-n;o>=t&&(Te(i),e(o-t))};return B.setup(i,!0),()=>Te(i)}const ea=["TopLeft","TopRight","BottomLeft","BottomRight"],of=ea.length,Ws=e=>typeof e=="string"?parseFloat(e):e,Us=e=>typeof e=="number"||A.test(e);function rf(e,t,n,i,s,o){s?(e.opacity=H(0,n.opacity??1,af(i)),e.opacityExit=H(t.opacity??1,0,lf(i))):o&&(e.opacity=H(t.opacity??1,n.opacity??1,i));for(let r=0;r<of;r++){const a=`border${ea[r]}Radius`;let l=Ks(t,a),c=Ks(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Us(l)===Us(c)?(e[a]=Math.max(H(Ws(l),Ws(c),i),0),(ye.test(c)||ye.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=H(t.rotate||0,n.rotate||0,i))}function Ks(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const af=ta(0,.5,Bo),lf=ta(.5,.95,fe);function ta(e,t,n){return i=>i<e?0:i>t?1:n(pt(e,t,i))}function qs(e,t){e.min=t.min,e.max=t.max}function le(e,t){qs(e.x,t.x),qs(e.y,t.y)}function Xs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ys(e,t,n,i,s){return e-=t,e=Gt(e,1/n,i),s!==void 0&&(e=Gt(e,1/s,i)),e}function uf(e,t=0,n=1,i=.5,s,o=e,r=e){if(ye.test(t)&&(t=parseFloat(t),t=H(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=H(o.min,o.max,i);e===o&&(a-=t),e.min=Ys(e.min,t,n,a,s),e.max=Ys(e.max,t,n,a,s)}function Zs(e,t,[n,i,s],o,r){uf(e,t[n],t[i],t[s],t.scale,o,r)}const cf=["x","scaleX","originX"],df=["y","scaleY","originY"];function Js(e,t,n,i){Zs(e.x,t,cf,n?n.x:void 0,i?i.x:void 0),Zs(e.y,t,df,n?n.y:void 0,i?i.y:void 0)}function Qs(e){return e.translate===0&&e.scale===1}function na(e){return Qs(e.x)&&Qs(e.y)}function eo(e,t){return e.min===t.min&&e.max===t.max}function ff(e,t){return eo(e.x,t.x)&&eo(e.y,t.y)}function to(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ia(e,t){return to(e.x,t.x)&&to(e.y,t.y)}function no(e){return ne(e.x)/ne(e.y)}function io(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hf{constructor(){this.members=[]}add(t){ui(this.members,t),t.scheduleRender()}remove(t){if(ci(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(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function gf(e,t,n){let i="";const s=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const Cn=["","X","Y","Z"],pf=1e3;let mf=0;function Sn(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function sa(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Hr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(s||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&sa(i)}function oa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=mf++,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(xf),this.nodes.forEach(_f),this.nodes.forEach(bf),this.nodes.forEach(wf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 nf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new fi),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=wr(r)&&!sc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),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;B.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=sf(f,250),Lt.hasAnimatedSinceResize&&(Lt.hasAnimatedSinceResize=!1,this.nodes.forEach(ro)))})}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()||Vf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),v=!this.targetLayout||!ia(this.targetLayout,h),C=!d&&f;if(this.options.layoutRoot||this.resumeFrom||C||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Mi(p,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,C)}else d||ro(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Te(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(Rf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sa(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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(so);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(oo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Sf),this.nodes.forEach(vf),this.nodes.forEach(yf)):this.nodes.forEach(oo),this.clearAllSnapshots();const a=oe.now();Z.delta=Ce(0,1e3/60,a-Z.timestamp),Z.timestamp=a,Z.isProcessing=!0,cn.update.process(Z),cn.preRender.process(Z),cn.render.process(Z),Z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ti.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Cf),this.sharedNodes.forEach(Mf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ne(this.snapshot.measuredBox.x)&&!ne(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 r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=W(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!na(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ie(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Ef(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return W();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Af))){const{scroll:c}=this.root;c&&(We(a.x,c.offset.x),We(a.y,c.offset.y))}return a}removeElementScroll(r){const a=W();if(le(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&le(a,r),We(a.x,u.offset.x),We(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=W();le(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ue(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ie(u.latestValues)&&Ue(l,u.latestValues)}return Ie(this.latestValues)&&Ue(l,this.latestValues),l}removeTransform(r){const a=W();le(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ie(c.latestValues))continue;Kn(c.latestValues)&&c.updateSnapshot();const u=W(),d=c.measurePageBox();le(u,d),Js(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ie(this.latestValues)&&Js(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==Z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){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(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Z.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),dt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),jd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):le(this.target,this.layout.layoutBox),$r(this.target,this.targetDelta)):le(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),dt(this.relativeTargetOrigin,this.target,f.target),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Kn(this.parent.latestValues)||jr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Z.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;le(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;qc(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=W());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Xs(this.prevProjectionDelta.x,this.projectionDelta.x),Xs(this.prevProjectionDelta.y,this.projectionDelta.y)),ct(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!io(this.projectionDelta.x,this.prevProjectionDelta.x)||!io(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ke(),this.projectionDelta=Ke(),this.projectionDeltaWithTransform=Ke()}setAnimationOrigin(r,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=W(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,x=this.getStack(),v=!x||x.members.length<=1,C=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(Tf));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const _=S/1e3;ao(d.x,r.x,_),ao(d.y,r.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pf(this.relativeTarget,this.relativeTargetOrigin,f,_),y&&ff(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=W()),le(y,this.relativeTarget)),g&&(this.animationValues=u,rf(u,c,this.latestValues,_,C,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Te(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Lt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xe(0)),this.currentAnimation=ef(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&ra(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||W();const d=ne(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=ne(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}le(a,l),Ue(a,u),ct(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new hf),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Sn("z",r,c,this.animationValues);for(let u=0;u<Cn.length;u++)Sn(`rotate${Cn[u]}`,r,c,this.animationValues),Sn(`skew${Cn[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=$t(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=$t(a?.pointerEvents)||""),this.hasProjected&&!Ie(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=gf(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in xt){if(u[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:v}=xt[p],C=d==="none"?u[p]:g(u[p],c);if(x){const y=x.length;for(let S=0;S<y;S++)r[x[S]]=C}else v?this.options.visualElement.renderState.vars[p]=C:r[p]=C}this.options.layoutId&&(r.pointerEvents=c===this?$t(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(so),this.root.sharedNodes.clear()}}}function vf(e){e.updateLayout()}function yf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?ce(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],f=ne(d);d.min=n[u].min,d.max=d.min+f}):ra(s,t.layoutBox,n)&&ce(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],f=ne(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const r=Ke();ct(r,n,t.layoutBox);const a=Ke();o?ct(a,e.applyTransform(i,!0),t.measuredBox):ct(a,n,t.layoutBox);const l=!na(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=W();dt(h,t.layoutBox,d.layoutBox);const p=W();dt(p,n,f.layoutBox),ia(h,p)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function xf(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 wf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Cf(e){e.clearSnapshot()}function so(e){e.clearMeasurements()}function oo(e){e.isLayoutDirty=!1}function Sf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ro(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _f(e){e.resolveTargetDelta()}function bf(e){e.calcProjection()}function Rf(e){e.resetSkewAndRotation()}function Mf(e){e.removeLeadSnapshot()}function ao(e,t,n){e.translate=H(t.translate,0,n),e.scale=H(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lo(e,t,n,i){e.min=H(t.min,n.min,i),e.max=H(t.max,n.max,i)}function Pf(e,t,n,i){lo(e.x,t.x,n.x,i),lo(e.y,t.y,n.y,i)}function Tf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Vf={duration:.45,ease:[.4,0,.1,1]},uo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),co=uo("applewebkit/")&&!uo("chrome/")?Math.round:fe;function fo(e){e.min=co(e.min),e.max=co(e.max)}function Ef(e){fo(e.x),fo(e.y)}function ra(e,t,n){return e==="position"||e==="preserve-aspect"&&!kd(no(t),no(n),.2)}function Af(e){return e!==e.root&&e.scroll?.wasRoot}const Df=oa({attachResizeListener:(e,t)=>wt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),_n={current:void 0},aa=oa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_n.current){const e=new Df({});e.mount(window),e.setOptions({layoutScroll:!0}),_n.current=e}return _n.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ff={pan:{Feature:Yd},drag:{Feature:Xd,ProjectionNode:aa,MeasureLayout:Qr}};function ho(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=i[s];o&&B.postRender(()=>o(t,bt(t)))}class If extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=Qu(t,(n,i)=>(ho(this.node,i,"Start"),s=>ho(this.node,s,"End"))))}unmount(){}}class kf extends Ae{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=Ct(wt(this.node.current,"focus",()=>this.onFocus()),wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function go(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=i[s];o&&B.postRender(()=>o(t,bt(t)))}class jf extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=ic(t,(n,i)=>(go(this.node,i,"Start"),(s,{success:o})=>go(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ei=new WeakMap,bn=new WeakMap,$f=e=>{const t=ei.get(e.target);t&&t(e)},Lf=e=>{e.forEach($f)};function Of({root:e,...t}){const n=e||document;bn.has(n)||bn.set(n,{});const i=bn.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(Lf,{root:e,...t})),i[s]}function zf(e,t,n){const i=Of(t);return ei.set(e,n),i.observe(e),()=>{ei.delete(e),i.unobserve(e)}}const Bf={some:0,all:1};class Nf extends Ae{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:Bf[s]},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 zf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Hf(t,n))&&this.startObserver()}unmount(){}}function Hf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Gf={inView:{Feature:Nf},tap:{Feature:jf},focus:{Feature:kf},hover:{Feature:If}},Wf={layout:{ProjectionNode:aa,MeasureLayout:Qr}},Uf={...Vd,...Gf,...Ff,...Wf},zi=Wc(Uf,sd),Kf="_primary_13825_8",qf="_secondary_13825_12",Xf="_tertiary_13825_16",Yf="_positive_13825_20",Zf="_negative_13825_24",Jf="_warning_13825_28",Qf="_accent_13825_32",eh="_inverse_13825_36",th="_text_13825_111",nh="_regular_13825_117",ih="_medium_13825_121",sh="_semibold_13825_125",oh="_bold_13825_129",At={primary:Kf,secondary:qf,tertiary:Xf,positive:Yf,negative:Zf,warning:Jf,accent:Qf,inverse:eh,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:th,regular:nh,medium:ih,semibold:sh,bold:oh},rh=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),M.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},j=w.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:i="medium",tag:s="p",colorName:o="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:v,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:P,right:R,uppercase:F,lowercase:D,capitalize:L,overflow:q,...ee},ie)=>{const[re,te]=w.useState(!1),$=!!c,G=()=>$&&te(!0),Y=()=>$&&te(!1),I=rh({mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:v,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:P,right:R,uppercase:F,lowercase:D,capitalize:L,overflow:q}),z=s,U=$?M.css({opacity:re?a:1,transition:`opacity ${l}ms ease`}):"";return m.jsx(z,{ref:ie,...ee,className:M.cx(At.text,At[n],At[o],At[i],U,t,I),style:r,onClick:c,onMouseDown:G,onMouseUp:Y,onMouseLeave:Y,onTouchStart:G,onTouchEnd:Y,role:$?"button":void 0,tabIndex:$?0:void 0,children:e})});j.displayName="Text";const Wt=zi(j),ah="_loader_1qleq_8",lh={loader:ah},uh=({color:e="var(--text-accent)"})=>m.jsx("span",{className:M.cx(lh.loader,M.css({"--loader-color":e}))}),ch=M.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),ot={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},dh={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},fh={clear:M.css({backgroundColor:"transparent",border:"none"}),filled:M.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:M.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},hh=(e,t,n,i)=>{if(i)return M.css({cursor:"not-allowed",opacity:.7});const s={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return M.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return M.css({...s,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return M.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return M.css(s)}},gh=({disabled:e,loading:t,onClick:n,wrapperClassName:i,buttonClassName:s,buttonDisabledClassName:o,textClassName:r,children:a,variant:l="filled",backgroundColor:c,textColor:u,textFontWeight:d,borderColor:f,color:h="accent",borderRadius:p,width:g="full",size:x="md",iconLeft:v,iconRight:C,intensity:y="primary",flex:S,..._})=>{const b=w.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),P=w.useMemo(()=>c||(l==="filled"?h==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${h}-${y})`:"transparent"),[l,c,h,y]),R=w.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(h==="neutral")return"var(--text-secondary)";return`var(--text-${h})`},[y,h,l]),F=w.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(h==="neutral")return"secondary";return h},[l,h,y]),D=w.useMemo(()=>f||(l==="outline"?`var(--border-${h}-${y})`:"transparent"),[l,f,h,y]),L=w.useMemo(()=>{switch(x){case"lg":return ot.lg;case"md":case"sm":return ot.md;case"xs":return ot.sm;default:return ot.md}},[x]),q=M.cx(ch,hh(l,h,y,e),fh[l],s,e?o:void 0,M.css({borderRadius:p?ot[p]:L,backgroundColor:P,borderColor:D,color:u,width:"100%",height:dh[x],opacity:e?.7:1})),ee=w.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return m.jsx(T,{className:M.cx(i),w:b,flex:S,relative:!0,overflow:"hidden",children:m.jsxs(zi.button,{whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:q,disabled:e||t,onClick:n,..._,children:[t?m.jsx(uh,{color:R}):m.jsxs(m.Fragment,{children:[v,m.jsx(Wt,{style:{color:u},colorName:F,variant:ee,className:r,textOverflow:"ellipsis",overflow:"hidden",children:a}),C]}),m.jsx(Ze,{})]})})},ph="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20d='M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41L9%2016.17z'%20fill='currentColor'%20/%3e%3c/svg%3e",mh="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20d='M19%2013H5v-2h14v2z'%20fill='currentColor'%20/%3e%3c/svg%3e",vh="_checkbox_asmiz_8",yh="_disabled_asmiz_15",xh="_checkbox__ripple_asmiz_15",wh="_checkbox__input_asmiz_27",Ch="_checkbox__box_asmiz_35",Sh="_secondary_asmiz_48",_h="_checked_asmiz_54",bh="_error_asmiz_63",xe={checkbox:vh,disabled:yh,checkbox__ripple:xh,checkbox__input:wh,checkbox__box:Ch,secondary:Sh,checked:_h,error:bh},Rh={sm:20,md:24},Bi=w.forwardRef(({checked:e,onChange:t,disabled:n,error:i,indeterminate:s,size:o="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:d,variant:f="primary",flex:h},p)=>{const[g,x]=w.useState(!1),v=e!==void 0,C=v?e:g,y=b=>{v||x(b.target.checked),t?.(b)},S=Rh[o],_=C||s;return m.jsxs("label",{className:M.cx(xe.checkbox,M.css({flex:h}),{[xe.disabled]:n}),children:[m.jsxs(T,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${S}px`,"--checkbox-size-double":`${S*2}px`},children:[m.jsx("input",{ref:p,type:"checkbox",checked:C,onChange:y,onClick:b=>b.stopPropagation(),disabled:n,name:u,required:d,className:M.cx(xe.checkbox__input,{[xe.disabled]:n})}),m.jsx("div",{className:M.cx(xe.checkbox__box,xe[f],{[xe.disabled]:n,[xe.error]:i,[xe.checked]:_}),children:_&&(s?m.jsx(mh,{width:S*.75,height:S*.75}):m.jsx(ph,{width:S*.75,height:S*.75}))})]}),(r||l)&&m.jsxs(T,{gap:4,children:[r&&m.jsx(j,{colorName:a,variant:o==="sm"?"body-2":"body-1",children:r}),l&&m.jsx(j,{variant:"body-2",colorName:c,children:l})]})]})});Bi.displayName="Checkbox";const Mh="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.0002%2017.9999C14.4185%2017.9999%2018.0002%2014.4182%2018.0002%209.99991C18.0002%205.58163%2014.4185%201.99991%2010.0002%201.99991C5.58197%201.99991%202.00024%205.58163%202.00024%209.99991C2.00024%2014.4182%205.58197%2017.9999%2010.0002%2017.9999ZM6.46514%206.46446C6.85566%206.07393%207.48883%206.07393%207.87935%206.46446L9.64712%208.23222C9.84238%208.42749%2010.159%208.42749%2010.3542%208.23222L12.122%206.46446C12.5125%206.07393%2013.1457%206.07393%2013.5362%206.46446C13.9267%206.85498%2013.9267%207.48814%2013.5362%207.87867L11.7684%209.64644C11.5732%209.8417%2011.5732%2010.1583%2011.7684%2010.3535L13.5362%2012.1213C13.9267%2012.5118%2013.9267%2013.145%2013.5362%2013.5355C13.1457%2013.926%2012.5125%2013.926%2012.122%2013.5355L10.3542%2011.7678C10.159%2011.5725%209.84238%2011.5725%209.64712%2011.7678L7.87935%2013.5355C7.48883%2013.926%206.85566%2013.926%206.46514%2013.5355C6.07462%2013.145%206.07462%2012.5118%206.46514%2012.1213L8.23291%2010.3535C8.42817%2010.1583%208.42817%209.8417%208.23291%209.64644L6.46514%207.87867C6.07462%207.48815%206.07462%206.85498%206.46514%206.46446Z'%20fill='currentColor'/%3e%3c/g%3e%3c/svg%3e",Ph="_disabled_ph9zm_20",Th="_multiline_ph9zm_24",Vh="_input_ph9zm_8",Eh="_sm_ph9zm_74",Ah="_md_ph9zm_79",Dh="_error_ph9zm_84",Fh="_white_ph9zm_88",Ih="_gray_ph9zm_92",se={"input-container":"_input-container_ph9zm_8",disabled:Ph,multiline:Th,input:Vh,"input-text-size_sm":"_input-text-size_sm_ph9zm_55","input-text-size_md":"_input-text-size_md_ph9zm_59","input-text-align_left":"_input-text-align_left_ph9zm_64","input-text-align_center":"_input-text-align_center_ph9zm_67","input-text-align_right":"_input-text-align_right_ph9zm_70",sm:Eh,md:Ah,error:Dh,white:Fh,gray:Ih,"clear-button":"_clear-button_ph9zm_96"};function po(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const la=w.forwardRef((e,t)=>{const{label:n,prompt:i,error:s,errorText:o,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:d,value:f,defaultValue:h,inputClassName:p,textAlign:g="left",...x}=e,v=e.multiline===!0,C=w.useRef(null),y=w.useRef(null),[S,_]=Ut(f!==void 0?String(f):void 0,h!==void 0?String(h):"");w.useImperativeHandle(t,()=>({focus:()=>{C.current?.focus(),y.current?.focus()},blur:()=>{C.current?.blur(),y.current?.blur()},get value(){return C.current?.value||y.current?.value}}));const b=F=>{if(_(F.target.value),v){const D=e.onChange;D?.(F)}else{const D=e.onChange;D?.(F)}};w.useEffect(()=>{v&&e.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[S,v,e.autoResize]);const P=()=>{if(_(""),!v){const D=C.current;if(D){D.value="";const L=po(D),q=e.onChange;q?.(L)}return}const F=y.current;if(F){F.value="";const D=po(F),L=e.onChange;L?.(D)}},R=()=>{if(v){const{rows:q,autoResize:ee,onChange:ie,multiline:re,...te}=x;return m.jsx("textarea",{ref:y,rows:e.rows??3,className:M.cx(se.input,p,{[se.disabled]:d,[se[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...te,value:S,onChange:b})}const{onChange:F,multiline:D,...L}=x;return m.jsx("input",{...L,ref:C,className:M.cx(se.input,se[`input-text-size_${r}`],p,{[se.disabled]:d,[se[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:S,onChange:b})};return m.jsxs(T,{w:"full",gap:"var(--spacing-sm)",children:[n&&m.jsx(j,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),m.jsxs(T,{row:!0,alignItems:v?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:M.cx(se["input-container"],se[c],se[r],{[se.error]:s,[se.disabled]:d,[se.multiline]:v}),children:[a&&m.jsx(T,{flex:"none",children:a}),m.jsx(T,{flex:"1",children:R()}),u&&S&&!d&&m.jsx(T,{flex:"none",children:m.jsx("span",{className:se["clear-button"],onClick:P,children:m.jsx(Mh,{})})}),l&&m.jsx(T,{flex:"none",children:l})]}),(i||v)&&m.jsxs(T,{row:!0,gap:10,w:"full",children:[typeof i=="string"?m.jsx(j,{variant:"caption-1",colorName:"tertiary",children:i}):i,v&&e.maxLength&&m.jsx(j,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),o&&s&&m.jsx(j,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:o})]})});la.displayName="Input";const kh="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%209L12%2015L18%209'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",jh="data:image/svg+xml,%3csvg%20fill='currentColor'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20462.035%20462.035'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845%20c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48%20c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496%20c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z%20M408.516,134.615l16.873,21.005h-16.873%20V134.615z%20M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305%20c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z%20M53.523,155.62H36.65l16.873-21.005V155.62z%20M438.498,348.69H23.54%20V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z'/%3e%3c/g%3e%3c/svg%3e",$h="_avatar_1oe2p_8",Lh="_avatar_primary_1oe2p_22",Oh="_avatar_secondary_1oe2p_25",zh="_avatar_negative_1oe2p_28",Bh="_avatar_positive_1oe2p_31",Nh="_avatar_warning_1oe2p_34",Hh="_avatar_lgSize_1oe2p_71",Gh="_avatar_mdSize_1oe2p_85",Wh="_avatar_smSize_1oe2p_99",Rn={avatar:$h,avatar_primary:Lh,avatar_secondary:Oh,avatar_negative:zh,avatar_positive:Bh,avatar_warning:Nh,avatar_lgSize:Hh,avatar_mdSize:Gh,avatar_smSize:Wh};function Uh({attr:e,children:t,className:n,color:i="primary",size:s="md",...o}){const r="avatar";return m.jsx("div",{...e,...o,className:ke(Rn[r],n,ht(Rn,r,s),Kt(Rn,r,i)),children:t})}const Kh="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20fill='currentColor'%20fill-opacity='0.15'/%3e%3cpath%20d='M16%209L10.0337%2015L8%2012.9548'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",mo="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22%2012C22%2017.5228%2017.5228%2022%2012%2022C6.47715%2022%202%2017.5228%202%2012C2%206.47715%206.47715%202%2012%202C17.5228%202%2022%206.47715%2022%2012Z'%20fill='currentColor'%20fill-opacity='0.15'/%3e%3cpath%20d='M12%206C11.4477%206%2011%206.44772%2011%207V13C11%2013.5523%2011.4477%2014%2012%2014C12.5523%2014%2013%2013.5523%2013%2013V7C13%206.44772%2012.5523%206%2012%206Z'%20fill='currentColor'/%3e%3cpath%20d='M12%2015C11.4477%2015%2011%2015.4477%2011%2016V17C11%2017.5523%2011.4477%2018%2012%2018C12.5523%2018%2013%2017.5523%2013%2017V16C13%2015.4477%2012.5523%2015%2012%2015Z'%20fill='currentColor'/%3e%3c/svg%3e",qh="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20fill='currentColor'%20fill-opacity='0.12'/%3e%3cpath%20d='M16%208L8%2016M16%2016L8%208'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e",Xh="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20color='black'%3e%3cpath%20d='M12%202V22M19.0711%204.92893L4.92893%2019.0711M22%2012H2M19.0711%2019.0711L4.92893%204.92893'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Yh="_hint_prca1_8",Zh="_md_prca1_19",Jh="_sm_prca1_24",Qh="_icon_prca1_29",eg="_content_prca1_40",tg="_title_prca1_46",ng="_subtitle_prca1_50",ig="_disabled_prca1_55",sg="_warning_prca1_60",og="_solid_prca1_60",rg="_negative_prca1_65",ag="_positive_prca1_70",lg="_accent_prca1_75",ug="_neutral_prca1_80",cg="_soft_prca1_85",ue={hint:Yh,md:Zh,sm:Jh,icon:Qh,content:eg,title:tg,subtitle:ng,disabled:ig,warning:sg,solid:og,negative:rg,positive:ag,accent:lg,neutral:ug,soft:cg},dg={negative:m.jsx(qh,{}),positive:m.jsx(Kh,{}),accent:m.jsx(mo,{}),warning:m.jsx(mo,{}),neutral:m.jsx(Xh,{})},fg=({title:e,subtitle:t,color:n="warning",variant:i="soft",size:s="md",icon:o,disabled:r=!1,className:a,style:l})=>{const c=o||dg[n];return m.jsxs("div",{className:ke(ue.hint,ue[n],ue[i],ue[s],r&&ue.disabled,a),style:l,"aria-disabled":r,children:[c&&m.jsx("span",{className:ke(ue.icon,ue[n]),children:c}),m.jsxs("div",{className:ue.content,children:[e&&m.jsx(j,{className:ke(ue.title,ht(ue,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&m.jsx(j,{className:ke(ue.subtitle,ht(ue,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},hg={primary:{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"},accent:{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"},warning:{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"},positive:{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"},negative:{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"}},gg={sm:28,md:32,lg:40},Ni=w.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:s,avatar:o,icon:r,disabled:a,className:l},c)=>{const u=w.useRef(null),d=hg[t],f=M.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=M.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return m.jsxs(T,{ref:p=>{u.current=p,typeof c=="function"?c(p):c&&(c.current=p)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:gg[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:M.cx(f,l),children:[i&&m.jsx(Ze,{}),o&&m.jsx(T,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&m.jsx(T,{children:r}),m.jsx(j,{variant:"caption-1",colorName:t,textOverflow:"ellipsis",children:e}),s&&!a&&m.jsx(j,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:"×"})]})});Ni.displayName="Tag";const ua=({children:e})=>{const[t]=w.useState(()=>document.createElement("div"));return w.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(t),()=>{n&&n.contains(t)&&n.removeChild(t)}},[t]),Mo.createPortal(e,t)},pg="_disabled_v62jt_40",mg="_open_v62jt_48",vg="_error_v62jt_51",yg="_hidden_v62jt_87",xg="_visible_v62jt_90",wg="_selected_v62jt_163",X={"select-container":"_select-container_v62jt_8","full-width":"_full-width_v62jt_13","select-input":"_select-input_v62jt_17","size-xs":"_size-xs_v62jt_25","size-sm":"_size-sm_v62jt_30","size-md":"_size-md_v62jt_35",disabled:pg,open:mg,"select-arrow":"_select-arrow_v62jt_48",error:vg,"select-value":"_select-value_v62jt_62","select-value_xs":"_select-value_xs_v62jt_74","select-placeholder":"_select-placeholder_v62jt_81",hidden:yg,visible:xg,"select-arrow_xs":"_select-arrow_xs_v62jt_106","select-dropdown":"_select-dropdown_v62jt_116","select-menu":"_select-menu_v62jt_126","select-menu-item":"_select-menu-item_v62jt_145","select-menu-item-first":"_select-menu-item-first_v62jt_158",selected:wg,"overflow-tooltip-container":"_overflow-tooltip-container_v62jt_167","overflow-tooltip-text":"_overflow-tooltip-text_v62jt_172","empty-block":"_empty-block_v62jt_179"};function ca({value:e,onChange:t,multiple:n=!1,returnedValue:i,renderItem:s,placeholder:o,items:r=[],fullWidth:a,size:l="md",showDefaultItem:c,disabled:u,label:d,firstItem:f,lastItem:h,observer:p,emptyText:g,onBlur:x,prompt:v,error:C,errorText:y}){const[S,_]=Ut(e,n?[]:null),b=w.useRef(null),P=w.useRef(null),[R,F]=w.useState(!1),D=w.useMemo(()=>n?S||[]:S!=null?[S]:[],[S,n]),L=w.useCallback(I=>i?i(I):I,[i]),q=w.useMemo(()=>{const I=new Map;return r.forEach(z=>{I.set(L(z),z)}),I},[r,L]),ee=To(b,R),ie=!r.length&&!C,re=I=>{const z=L(I);if(n){const U=D.includes(z)?D.filter(be=>be!==z):[...D,z];_(U),t?.(U)}else _(z),t?.(z),F(!1)},te=I=>{if(!n)return;const z=D.filter(U=>U!==I);_(z),t?.(z)},$=()=>{const I=n?[]:null;_(I),t?.(I),n||F(!1)};w.useEffect(()=>{if(!R)return;const I=z=>{const U=z.target;!b.current?.contains(U)&&!P.current?.contains(U)&&(F(!1),x?.())};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[R,x]);const G=()=>{if(!D.length)return m.jsx(j,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o??"Select..."});if(n)return m.jsx(T,{flexWrap:"wrap",row:!0,gap:10,children:D.map(U=>{const be=q.get(U);return be?m.jsx(Ni,{size:"sm",label:s(be),onDelete:nt=>{nt.stopPropagation(),te(U)}},U):null})});const I=q.get(D[0]);if(!I)return m.jsx(j,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o});const z=s(I);return typeof z=="string"?m.jsx(j,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:z}):m.jsx(m.Fragment,{children:z})},Y=R&&m.jsx(ua,{children:m.jsx(zi.div,{ref:P,className:X["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...ee,position:"absolute",zIndex:1},children:m.jsxs("ul",{className:X["select-menu"],children:[c&&!n&&m.jsx(T,{className:X["select-menu-item"],role:"option",onClick:$,children:m.jsx(j,{variant:"body-2",colorName:"tertiary",children:o})}),f&&m.jsx(T,{className:M.cx(X["select-menu-item"],X["select-menu-item-first"]),children:f}),ie&&m.jsxs(T,{className:X["empty-block"],children:[m.jsx(T,{w:20,h:20,children:m.jsx(jh,{})}),m.jsx(j,{variant:"body-2",children:g??"There is nothing yet"})]}),r.map(I=>{const z=L(I),U=D.includes(z);return m.jsxs(T,{row:!0,gap:10,alignItems:"center",className:M.cx(X["select-menu-item"],{[X.selected]:U}),role:"option",relative:!0,onClick:()=>re(I),children:[n&&m.jsx(Bi,{size:"sm",checked:U}),typeof s(I)=="string"?m.jsx(j,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:s(I)}):s(I),m.jsx(Ze,{})]},z)}),p,h&&m.jsx(T,{className:M.cx(X["select-menu-item"],X["select-menu-item-first"]),children:h})]})},"dropdown")});return m.jsxs(T,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof d=="string"?m.jsx(j,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:d}):d,m.jsxs(T,{ref:b,row:!0,gap:10,tabIndex:u?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:M.cx(X["select-input"],X[`size-${l}`],{[X.error]:C,[X.disabled]:u,[X.open]:R}),onClick:()=>!u&&F(I=>!I),onBlur:x,children:[m.jsx(T,{className:M.cx(X["select-value"]),children:G()}),m.jsx(T,{className:M.cx(X["select-arrow"],X[`select-arrow_${l}`]),children:m.jsx(kh,{})})]}),typeof v=="string"?m.jsx(j,{variant:"caption-1",colorName:"tertiary",mt:4,children:v}):v,C&&y&&m.jsx(j,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:y}),m.jsx(hc,{initial:!1,children:Y})]})}const Cg="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.94629%200.220237C3.78013%200.264025%203.64089%200.377624%203.56348%200.53176C3.27371%201.11189%203.05664%201.46395%202.83887%201.74953C2.61807%202.03873%202.38547%202.27579%202.03027%202.63039C1.21079%203.45057%200.799805%204.52619%200.799805%205.60012C0.799838%206.67406%201.21073%207.74968%202.03027%208.56985C3.67062%2010.2096%206.32931%2010.2095%207.96973%208.56985C8.78929%207.74968%209.20016%206.67408%209.2002%205.60012C9.15131%204.32908%208.43217%203.48543%207.94727%203.05813C7.76902%202.90106%207.40643%203.02424%207.2627%203.2134C7.24031%203.24286%207.21612%203.2739%207.18945%203.30617C6.93211%203.61754%206.56236%203.80807%206.41504%203.83156C6.38264%203.83667%206.36979%203.76513%206.2959%203.58254C5.79455%202.34427%205.78927%202.49365%205.58887%202.01125C5.48847%201.7692%205.05517%201.02727%204.92676%200.828635C4.80206%200.635591%204.64095%200.439873%204.43359%200.301292C4.29028%200.205951%204.1124%200.175957%203.94629%200.220237ZM4.75293%204.17824C5.2689%204.63997%205.60857%205.26651%205.71484%205.95071C6.10631%205.85571%206.46727%205.68318%206.78125%205.45071C6.86578%205.70826%206.89338%205.98123%206.8623%206.25051C6.83115%206.51993%206.74174%206.77966%206.60059%207.01125C6.45944%207.24281%206.27008%207.44117%206.04492%207.59231C5.81977%207.74344%205.56462%207.8443%205.29688%207.88723C5.0292%207.93013%204.75518%207.91446%204.49414%207.84133C4.23299%207.76812%203.99064%207.6383%203.78418%207.46242C3.5778%207.28657%203.41161%207.06792%203.29785%206.8218C3.18419%206.57572%203.12519%206.30771%203.125%206.03664C3.12508%205.58233%203.29054%205.14308%203.58984%204.80129C3.88917%204.4597%204.30271%204.2382%204.75293%204.17824Z'%20fill='%23FEAD34'/%3e%3c/svg%3e",Sg="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.1483%208.61509C10.3344%208.26159%209.98299%207.89856%209.58534%207.93723C9.42671%207.95265%209.25857%207.9605%209.07422%207.96035C6.36522%207.9582%204.17129%205.76427%204.16914%203.05527C4.169%202.87115%204.17682%202.70321%204.19221%202.54477C4.23082%202.14712%203.86769%201.79411%203.50976%201.97161C2.03398%202.70343%201.20002%204.02274%201.20002%205.89477C1.20002%208.60377%203.3961%2010.7998%206.1051%2010.7998C7.97571%2010.7998%209.38737%2010.06%2010.1483%208.61509Z'%20fill='white'/%3e%3c/svg%3e",_g="_container_e7tan_8",bg="_disabled_e7tan_17",Rg="_reverse_e7tan_21",Mg="_input_e7tan_25",Pg="_switchContainer_e7tan_35",Tg="_variant_accent_e7tan_43",Vg="_variant_secondary_e7tan_47",Eg="_thumb_e7tan_51",Ag="_variant_theme_e7tan_54",Dg="_moon_e7tan_58",Fg="_fire_e7tan_61",Ig="_size_sm_e7tan_74",kg="_size_md_e7tan_80",jg="_size_lg_e7tan_86",he={container:_g,disabled:bg,reverse:Rg,input:Mg,switchContainer:Pg,variant_accent:Tg,variant_secondary:Vg,switch:"_switch_e7tan_35",thumb:Eg,variant_theme:Ag,moon:Dg,fire:Fg,size_sm:Ig,size_md:kg,size_lg:jg},da=w.forwardRef(({title:e,text:t,icon:n,disabled:i,onChange:s,checked:o,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:d="auto",...f},h)=>{const[p,g]=Ut(o,r),x=w.useRef(null);w.useImperativeHandle(h,()=>({focus:()=>{x.current?.focus()},blur:()=>{x.current?.blur()},get checked(){return p??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!p;g(S),s?.(S)},isFocused:()=>document.activeElement===x.current,isDisabled:()=>i??!1,getInputElement:()=>x.current,checkValidity:()=>x.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[p,g,s,i,r]);const v=w.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),C=w.useMemo(()=>typeof e=="string"?m.jsx(j,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),y=w.useMemo(()=>typeof t=="string"?m.jsx(j,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return m.jsxs(T,{row:!0,w:d,gap:"var(--spacing-sm)",children:[m.jsxs("label",{className:M.cx(he.container,a,{[he.disabled]:i,[he.reverse]:u}),children:[m.jsxs(T,{className:M.cx(he.switchContainer,he[`size_${l}`],he[`variant_${c}`]),children:[m.jsx("input",{ref:x,type:"checkbox",checked:p,className:he.input,onChange:v,disabled:i,...f}),m.jsx("div",{className:he.switch,children:m.jsx("div",{className:he.thumb,children:c==="theme"&&m.jsxs(m.Fragment,{children:[m.jsx(Sg,{className:he.moon}),m.jsx(Cg,{className:he.fire})]})})})]}),m.jsxs(T,{gap:"var(--spacing-xs)",children:[C,y]})]}),n]})});da.displayName="Switch";const $g="_primary_svt6d_8",Lg="_secondary_svt6d_13",Og="_button_svt6d_18",Re={primary:$g,secondary:Lg,button:Og,"button-active":"_button-active_svt6d_32","icon-container":"_icon-container_svt6d_35","button-primary":"_button-primary_svt6d_47","button-secondary":"_button-secondary_svt6d_51","button-disabled":"_button-disabled_svt6d_55","full-width":"_full-width_svt6d_60"};function zg({value:e,onChange:t,options:n,variant:i="primary",fullWidth:s=!1,className:o}){return m.jsx(T,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:M.cx(Re[i],s&&Re["full-width"],o),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return m.jsxs(w.Fragment,{children:[m.jsxs("button",{type:"button",disabled:l,className:M.cx(Re.button,s&&Re["full-width"],a&&Re["button-active"],a&&Re[`button-${i}`],l&&Re["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&m.jsx(T,{alignItems:"center",justifyContent:"center",className:Re["icon-container"],children:r.icon}),r.label&&m.jsx(j,{colorName:a?"primary":"tertiary",children:r.label}),!l&&m.jsx(Ze,{color:"var(--fill-bg-overlay-primary)"})]}),c&&m.jsx(T,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}const Bg="_header_446to_8",Ng={header:Bg},fa=w.forwardRef(({title:e,subtitle:t,onClose:n,w:i="full",p:s,py:o,px:r="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:c=!0,justifyContent:u="space-between",showCloseButton:d=!0},f)=>m.jsxs(T,{w:i,p:s,py:o,px:r,pt:a,pb:l,row:c,justifyContent:u,ref:f,className:Ng.header,children:[m.jsxs(T,{gap:"var(--spacing-sm)",children:[m.jsx(j,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),m.jsx(j,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),d&&m.jsx(T,{children:m.jsx(gt,{onClick:n,color:"neutral",children:m.jsx(Po,{})})})]}));fa.displayName="ModalHeader";const Hg="_footer_1bo08_8",Gg={footer:Hg},ha=w.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:i="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:o,...r},a)=>m.jsx(T,{flex:n,row:t,gap:i,p:s,className:M.cx(Gg.footer,o),ref:a,...r,children:e}));ha.displayName="ModalFooter";function Be(e,t,n){let i=n.initialDeps??[],s;function o(){var r,a,l,c;let u;n.key&&((r=n.debug)!=null&&r.call(n))&&(u=Date.now());const d=e();if(!(d.length!==i.length||d.some((p,g)=>i[g]!==p)))return s;i=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),s=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const p=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,x=g/16,v=(C,y)=>{for(C=String(C);C.length<y;)C=" "+C;return C};console.info(`%c⏱ ${v(g,5)} /${v(p,5)} ms`,`
14
14
  font-size: .6rem;
15
15
  font-weight: bold;
16
- color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,s),s}return o.updateDeps=r=>{i=r},o}function go(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const jg=(e,t)=>Math.abs(e-t)<1.01,Og=(e,t,n)=>{let i;return function(...s){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,s),n)}},po=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},zg=e=>e,Bg=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let s=t;s<=n;s++)i.push(s);return i},Ng=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(po(n)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(po(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},mo={passive:!0},vo=typeof window>"u"?!0:"onscrollend"in window,Hg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let s=0;const o=e.options.useScrollendEvent&&vo?()=>{}:Og(i,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:d,isRtl:f}=e.options;s=d?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),t(s,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,mo);const c=e.options.useScrollendEvent&&vo;return c&&n.addEventListener("scrollend",l,mo),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},Gg=(e,t,n)=>{if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Wg=(e,{adjustments:t=0,behavior:n},i)=>{var s,o;const r=e+t;(o=(s=i.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})};class Ug{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=i())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=i())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=i())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,s])=>{typeof s>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:zg,rangeExtractor:Bg,onChange:()=>{},measureElement:Gg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var i,s;(s=(i=this.options).onChange)==null||s.call(i,this,n)},this.maybeNotify=Oe(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,i)=>{const s=new Map,o=new Map;for(let r=i-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=Oe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,s,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=Oe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=o(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),h=f?f.end+this.options.gap:i+s,p=a.get(d),g=typeof p=="number"?p:this.options.estimateSize(u),x=h+g,v=f?f.lane:u%this.options.lanes;c[u]={index:u,start:h,size:g,end:x,key:d,lane:v}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Oe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,s,o)=>this.range=n.length>0&&i>0?Kg({measurements:n,outerSize:i,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Oe(()=>{let n=null,i=null;const s=this.calculateRange();return s&&(n=s.startIndex,i=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,s,o,r)=>o===null||r===null?[]:n({startIndex:o,endIndex:r,overscan:i,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,s=n.getAttribute(i);return s?parseInt(s,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(n,i)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,r=i-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,s)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=Oe(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const s=[];for(let o=0,r=n.length;o<r;o++){const a=n[o],l=i[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return go(i[da(0,i.length-1,s=>go(i[s]).start,n)])},this.getOffsetForAlignment=(n,i,s=0)=>{const o=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=n>=r+o?"end":"start"),i==="center"?n+=(s-o)/2:i==="end"&&(n-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),r=this.getScrollOffset();if(i==="auto")if(s.end>=r+o-this.options.scrollPaddingEnd)i="end";else if(s.start<=r+this.options.scrollPaddingStart)i="start";else return[r,i];const a=i==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,s.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:i="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:i="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const r=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[d,f]=u;this._scrollToOffset(d,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(n,f);if(!p){console.warn("Failed to get offset for index:",n);return}jg(p[0],h)||l(f)})},l=c=>{this.targetWindow&&(o++,o<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,r),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(i)},this.scrollBy=(n,{behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let s;if(i.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=i[i.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&o.some(a=>a===null);){const a=i[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}s=Math.max(...o.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const da=(e,t,n,i)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<i)e=s+1;else if(o>i)t=s-1;else return s}return e>0?e-1:0};function Kg({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const s=e.length-1,o=l=>e[l].start;if(e.length<=i)return{startIndex:0,endIndex:s};let r=da(0,s,o,n),a=r;if(i===1)for(;a<s&&e[a].end<n+t;)a++;else if(i>1){const l=Array(i).fill(0);for(;a<s&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(i).fill(n+t);for(;r>=0&&c.some(u=>u>=n);){const u=e[r];c[u.lane]=u.start,r--}r=Math.max(0,r-r%i),a=Math.min(s,a+(i-1-a%i))}return{startIndex:r,endIndex:a}}const yo=typeof document<"u"?P.useLayoutEffect:P.useEffect;function qg(e){const t=P.useReducer(()=>({}),{})[1],n={...e,onChange:(s,o)=>{var r;o?_o.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,o)}},[i]=P.useState(()=>new Ug(n));return i.setOptions(n),yo(()=>i._didMount(),[]),yo(()=>i._willUpdate()),i}function Xg(e){return qg({observeElementRect:Ng,observeElementOffset:Hg,scrollToFn:Wg,...e})}const Yg="_main_pl2ip_8",xo={main:Yg},fa=w.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:i=100,virtualize:s=!1},o)=>{const r=w.useRef(null),a=w.useMemo(()=>w.Children.toArray(e),[e]),l=Xg({count:a.length,getScrollElement:()=>r.current,estimateSize:()=>i,measureElement:u=>u.getBoundingClientRect().height});return w.useImperativeHandle(o,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(u,d={})=>l.scrollToIndex(u,{behavior:"smooth",...d}),scrollToOffset:(u,d={})=>l.scrollToOffset(u,{behavior:"smooth",...d}),scrollBy:u=>{const d=l.scrollOffset||0;l.scrollToOffset(d+u,{behavior:"smooth"})},getElement:()=>r.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),w.useMemo(()=>s||a.length>50,[s,a])&&a.length>0?m.jsx(V,{ref:r,className:M.cx(xo.main,t),w:"full",row:n,p:"var(--spacing-2xl)",children:m.jsx(V,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(u=>m.jsx(V,{"data-index":u.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${u.start}px)`},children:a[u.index]},u.key))})}):m.jsx(V,{ref:r,className:M.cx(xo.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:m.jsx(V,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});fa.displayName="ModalMain";const Xt=Po;Xt.Header=ua;Xt.Main=fa;Xt.Footer=ca;/**
16
+ color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,s),s}return o.updateDeps=r=>{i=r},o}function vo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Wg=(e,t)=>Math.abs(e-t)<1.01,Ug=(e,t,n)=>{let i;return function(...s){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,s),n)}},yo=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Kg=e=>e,qg=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let s=t;s<=n;s++)i.push(s);return i},Xg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(yo(n)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(yo(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},xo={passive:!0},wo=typeof window>"u"?!0:"onscrollend"in window,Yg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let s=0;const o=e.options.useScrollendEvent&&wo?()=>{}:Ug(i,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:d,isRtl:f}=e.options;s=d?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),t(s,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,xo);const c=e.options.useScrollendEvent&&wo;return c&&n.addEventListener("scrollend",l,xo),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},Zg=(e,t,n)=>{if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Jg=(e,{adjustments:t=0,behavior:n},i)=>{var s,o;const r=e+t;(o=(s=i.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})};class Qg{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=i())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=i())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=i())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,s])=>{typeof s>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Kg,rangeExtractor:qg,onChange:()=>{},measureElement:Zg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var i,s;(s=(i=this.options).onChange)==null||s.call(i,this,n)},this.maybeNotify=Be(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,i)=>{const s=new Map,o=new Map;for(let r=i-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=Be(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,s,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=Be(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=o(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),h=f?f.end+this.options.gap:i+s,p=a.get(d),g=typeof p=="number"?p:this.options.estimateSize(u),x=h+g,v=f?f.lane:u%this.options.lanes;c[u]={index:u,start:h,size:g,end:x,key:d,lane:v}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Be(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,s,o)=>this.range=n.length>0&&i>0?ep({measurements:n,outerSize:i,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Be(()=>{let n=null,i=null;const s=this.calculateRange();return s&&(n=s.startIndex,i=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,s,o,r)=>o===null||r===null?[]:n({startIndex:o,endIndex:r,overscan:i,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,s=n.getAttribute(i);return s?parseInt(s,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(n,i)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,r=i-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,s)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=Be(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const s=[];for(let o=0,r=n.length;o<r;o++){const a=n[o],l=i[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return vo(i[ga(0,i.length-1,s=>vo(i[s]).start,n)])},this.getOffsetForAlignment=(n,i,s=0)=>{const o=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=n>=r+o?"end":"start"),i==="center"?n+=(s-o)/2:i==="end"&&(n-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),r=this.getScrollOffset();if(i==="auto")if(s.end>=r+o-this.options.scrollPaddingEnd)i="end";else if(s.start<=r+this.options.scrollPaddingStart)i="start";else return[r,i];const a=i==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,s.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:i="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:i="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const r=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[d,f]=u;this._scrollToOffset(d,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(n,f);if(!p){console.warn("Failed to get offset for index:",n);return}Wg(p[0],h)||l(f)})},l=c=>{this.targetWindow&&(o++,o<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,r),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(i)},this.scrollBy=(n,{behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let s;if(i.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=i[i.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&o.some(a=>a===null);){const a=i[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}s=Math.max(...o.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ga=(e,t,n,i)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<i)e=s+1;else if(o>i)t=s-1;else return s}return e>0?e-1:0};function ep({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const s=e.length-1,o=l=>e[l].start;if(e.length<=i)return{startIndex:0,endIndex:s};let r=ga(0,s,o,n),a=r;if(i===1)for(;a<s&&e[a].end<n+t;)a++;else if(i>1){const l=Array(i).fill(0);for(;a<s&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(i).fill(n+t);for(;r>=0&&c.some(u=>u>=n);){const u=e[r];c[u.lane]=u.start,r--}r=Math.max(0,r-r%i),a=Math.min(s,a+(i-1-a%i))}return{startIndex:r,endIndex:a}}const Co=typeof document<"u"?ve.useLayoutEffect:ve.useEffect;function tp(e){const t=ve.useReducer(()=>({}),{})[1],n={...e,onChange:(s,o)=>{var r;o?Mo.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,o)}},[i]=ve.useState(()=>new Qg(n));return i.setOptions(n),Co(()=>i._didMount(),[]),Co(()=>i._willUpdate()),i}function np(e){return tp({observeElementRect:Xg,observeElementOffset:Yg,scrollToFn:Jg,...e})}const ip="_main_pl2ip_8",So={main:ip},pa=w.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:i=100,virtualize:s=!1},o)=>{const r=w.useRef(null),a=w.useMemo(()=>w.Children.toArray(e),[e]),l=np({count:a.length,getScrollElement:()=>r.current,estimateSize:()=>i,measureElement:u=>u.getBoundingClientRect().height});return w.useImperativeHandle(o,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(u,d={})=>l.scrollToIndex(u,{behavior:"smooth",...d}),scrollToOffset:(u,d={})=>l.scrollToOffset(u,{behavior:"smooth",...d}),scrollBy:u=>{const d=l.scrollOffset||0;l.scrollToOffset(d+u,{behavior:"smooth"})},getElement:()=>r.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),w.useMemo(()=>s||a.length>50,[s,a])&&a.length>0?m.jsx(T,{ref:r,className:M.cx(So.main,t),w:"full",row:n,p:"var(--spacing-2xl)",children:m.jsx(T,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(u=>m.jsx(T,{"data-index":u.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${u.start}px)`},children:a[u.index]},u.key))})}):m.jsx(T,{ref:r,className:M.cx(So.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:m.jsx(T,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});pa.displayName="ModalMain";const Jt=Vo;Jt.Header=fa;Jt.Main=pa;Jt.Footer=ha;/**
17
17
  * table-core
18
18
  *
19
19
  * Copyright (c) TanStack
@@ -22,10 +22,10 @@
22
22
  * LICENSE.md file in the root directory of this source tree.
23
23
  *
24
24
  * @license MIT
25
- */function Zg(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function be(e,t){return typeof e=="function"?e(t):e}function ae(e,t){return n=>{t.setState(i=>({...i,[e]:be(n,i[e])}))}}function Yt(e){return e instanceof Function}function Jg(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Qg(e,t){const n=[],i=s=>{s.forEach(o=>{n.push(o);const r=t(o);r!=null&&r.length&&i(r)})};return i(e),n}function E(e,t,n){let i=[],s;return o=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(o);if(!(a.length!==i.length||a.some((u,d)=>i[d]!==u)))return s;i=a;let c;if(n.key&&n.debug&&(c=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
25
+ */function sp(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Pe(e,t){return typeof e=="function"?e(t):e}function ae(e,t){return n=>{t.setState(i=>({...i,[e]:Pe(n,i[e])}))}}function Qt(e){return e instanceof Function}function op(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function rp(e,t){const n=[],i=s=>{s.forEach(o=>{n.push(o);const r=t(o);r!=null&&r.length&&i(r)})};return i(e),n}function V(e,t,n){let i=[],s;return o=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(o);if(!(a.length!==i.length||a.some((u,d)=>i[d]!==u)))return s;i=a;let c;if(n.key&&n.debug&&(c=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
26
26
  font-size: .6rem;
27
27
  font-weight: bold;
28
- color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return s}}function A(e,t,n,i){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:i}}function ep(e,t,n,i){const s=()=>{var r;return(r=o.getValue())!=null?r:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:E(()=>[e,n,t,o],(r,a,l,c)=>({table:r,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),A(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(o,n,t,e)},{}),o}function tp(e,t,n,i){var s,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(s=(o=a.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:u=f=>f[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(c)}`,accessorFn:u,parent:i,depth:n,columnDef:a,columns:[],getFlatColumns:E(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},A(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:E(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},A(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const J="debugHeaders";function wo(e,t,n){var i;let o={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),r.push(l)};return a(o),r},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(o,e)}),o}const np={createTable:e=>{e.getHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var o,r;const a=(o=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(r=s?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],c=n.filter(d=>!(i!=null&&i.includes(d.id))&&!(s!=null&&s.includes(d.id)));return Et(t,[...a,...c,...l],e)},A(e.options,J,"getHeaderGroups")),e.getCenterHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(o=>!(i!=null&&i.includes(o.id))&&!(s!=null&&s.includes(o.id))),Et(t,n,e,"center")),A(e.options,J,"getCenterHeaderGroups")),e.getLeftHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Et(t,o,e,"left")},A(e.options,J,"getLeftHeaderGroups")),e.getRightHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Et(t,o,e,"right")},A(e.options,J,"getRightHeaderGroups")),e.getFooterGroups=E(()=>[e.getHeaderGroups()],t=>[...t].reverse(),A(e.options,J,"getFooterGroups")),e.getLeftFooterGroups=E(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),A(e.options,J,"getLeftFooterGroups")),e.getCenterFooterGroups=E(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),A(e.options,J,"getCenterFooterGroups")),e.getRightFooterGroups=E(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),A(e.options,J,"getRightFooterGroups")),e.getFlatHeaders=E(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),A(e.options,J,"getFlatHeaders")),e.getLeftFlatHeaders=E(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),A(e.options,J,"getLeftFlatHeaders")),e.getCenterFlatHeaders=E(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),A(e.options,J,"getCenterFlatHeaders")),e.getRightFlatHeaders=E(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),A(e.options,J,"getRightFlatHeaders")),e.getCenterLeafHeaders=E(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),A(e.options,J,"getCenterLeafHeaders")),e.getLeftLeafHeaders=E(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),A(e.options,J,"getLeftLeafHeaders")),e.getRightLeafHeaders=E(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),A(e.options,J,"getRightLeafHeaders")),e.getLeafHeaders=E(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,o,r,a,l,c;return[...(s=(o=t[0])==null?void 0:o.headers)!=null?s:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(c=i[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},A(e.options,J,"getLeafHeaders"))}};function Et(e,t,n,i){var s,o;let r=0;const a=function(f,h){h===void 0&&(h=1),r=Math.max(r,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const c=(f,h)=>{const p={depth:h,id:[i,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(x=>{const v=[...g].reverse()[0],C=x.column.depth===p.depth;let y,S=!1;if(C&&x.column.parent?y=x.column.parent:(y=x.column,S=!0),v&&v?.column===y)v.subHeaders.push(x);else{const _=wo(n,y,{id:[i,h,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(R=>R.column===y).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(x),g.push(_)}p.headers.push(x),x.headerGroup=p}),l.push(p),h>0&&c(g,h-1)},u=t.map((f,h)=>wo(n,f,{depth:r,index:h}));c(u,r-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,x=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],d(p.subHeaders).forEach(y=>{let{colSpan:S,rowSpan:_}=y;g+=S,v.push(_)})):g=1;const C=Math.min(...v);return x=x+C,p.colSpan=g,p.rowSpan=x,{colSpan:g,rowSpan:x}});return d((s=(o=l[0])==null?void 0:o.headers)!=null?s:[]),l}const ip=(e,t,n,i,s,o,r)=>{let a={id:t,index:i,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,i),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Qg(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:E(()=>[e.getAllLeafColumns()],l=>l.map(c=>ep(e,a,c,c.id)),A(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:E(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),A(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},sp={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ha=(e,t,n)=>{var i,s;const o=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(o))};ha.autoRemove=e=>me(e);const ga=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};ga.autoRemove=e=>me(e);const pa=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};pa.autoRemove=e=>me(e);const ma=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};ma.autoRemove=e=>me(e);const va=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});va.autoRemove=e=>me(e)||!(e!=null&&e.length);const ya=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});ya.autoRemove=e=>me(e)||!(e!=null&&e.length);const xa=(e,t,n)=>e.getValue(t)===n;xa.autoRemove=e=>me(e);const wa=(e,t,n)=>e.getValue(t)==n;wa.autoRemove=e=>me(e);const Bi=(e,t,n)=>{let[i,s]=n;const o=e.getValue(t);return o>=i&&o<=s};Bi.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(i)?-1/0:i,r=n===null||Number.isNaN(s)?1/0:s;if(o>r){const a=o;o=r,r=a}return[o,r]};Bi.autoRemove=e=>me(e)||me(e[0])&&me(e[1]);const we={includesString:ha,includesStringSensitive:ga,equalsString:pa,arrIncludes:ma,arrIncludesAll:va,arrIncludesSome:ya,equals:xa,weakEquals:wa,inNumberRange:Bi};function me(e){return e==null||e===""}const op={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:ae("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?we.includesString:typeof i=="number"?we.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?we.equals:Array.isArray(i)?we.arrIncludes:we.weakEquals},e.getFilterFn=()=>{var n,i;return Yt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:we[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),o=i?.find(u=>u.id===e.id),r=be(n,o?o.value:void 0);if(Co(s,r,e)){var a;return(a=i?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(o){var c;return(c=i?.map(u=>u.id===e.id?l:u))!=null?c:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var o;return(o=be(t,s))==null?void 0:o.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(Co(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Co(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const rp=(e,t,n)=>n.reduce((i,s)=>{const o=s.getValue(e);return i+(typeof o=="number"?o:0)},0),ap=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i>o||i===void 0&&o>=o)&&(i=o)}),i},lp=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i<o||i===void 0&&o>=o)&&(i=o)}),i},up=(e,t,n)=>{let i,s;return n.forEach(o=>{const r=o.getValue(e);r!=null&&(i===void 0?r>=r&&(i=s=r):(i>r&&(i=r),s<r&&(s=r)))}),[i,s]},cp=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let o=s.getValue(e);o!=null&&(o=+o)>=o&&(++n,i+=o)}),n)return i/n},dp=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Jg(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((o,r)=>o-r);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},fp=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),hp=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,gp=(e,t)=>t.length,Rn={sum:rp,min:ap,max:lp,extent:up,mean:cp,median:dp,unique:fp,uniqueCount:hp,count:gp},pp={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:ae("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);if(typeof i=="number")return Rn.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Rn.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return Yt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:Rn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function mp(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(o=>!t.includes(o.id));return n==="remove"?i:[...t.map(o=>e.find(r=>r.id===o)).filter(Boolean),...i]}const vp={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:ae("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=E(n=>[ut(t,n)],n=>n.findIndex(i=>i.id===e.id),A(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return((i=ut(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=ut(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=E(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let o=[];if(!(t!=null&&t.length))o=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return mp(o,n,i)},A(e.options,"debugTable","_getOrderColumnsFn"))}},bn=()=>({left:[],right:[]}),yp={getInitialState:e=>({columnPinning:bn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:ae("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var o,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(d=>!(i!=null&&i.includes(d))),right:[...((l=s?.right)!=null?l:[]).filter(d=>!(i!=null&&i.includes(d))),...i]}}if(n==="left"){var c,u;return{left:[...((c=s?.left)!=null?c:[]).filter(d=>!(i!=null&&i.includes(d))),...i],right:((u=s?.right)!=null?u:[]).filter(d=>!(i!=null&&i.includes(d)))}}return{left:((o=s?.left)!=null?o:[]).filter(d=>!(i!=null&&i.includes(d))),right:((r=s?.right)!=null?r:[]).filter(d=>!(i!=null&&i.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,o,r;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((o=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:i,right:s}=t.getState().columnPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=E(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const o=[...i??[],...s??[]];return n.filter(r=>!o.includes(r.column.id))},A(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=E(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),A(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=E(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),A(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?bn():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:bn())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,o;return!!((s=i.left)!=null&&s.length||(o=i.right)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=E(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),A(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=E(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),A(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=E(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(o=>!s.includes(o.id))},A(e.options,"debugColumns","getCenterLeafColumns"))}};function xp(e){return e||(typeof document<"u"?document:null)}const At={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Pn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),wp={getDefaultColumnDef:()=>At,getInitialState:e=>({columnSizing:{},columnSizingInfo:Pn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:ae("columnSizing",e),onColumnSizingInfoChange:ae("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:At.minSize,(i=o??e.columnDef.size)!=null?i:At.size),(s=e.columnDef.maxSize)!=null?s:At.maxSize)},e.getStart=E(n=>[n,ut(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,o)=>s+o.getSize(),0),A(t.options,"debugColumns","getStart")),e.getAfter=E(n=>[n,ut(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,o)=>s+o.getSize(),0),A(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var o;n+=(o=s.column.getSize())!=null?o:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i?.getCanResize();return o=>{if(!i||!s||(o.persist==null||o.persist(),Mn(o)&&o.touches&&o.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[i.id,i.getSize()]],l=Mn(o)?Math.round(o.touches[0].clientX):o.clientX,c={},u=(v,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(y=>{var S,_;const R=t.options.columnResizeDirection==="rtl"?-1:1,T=(C-((S=y?.startOffset)!=null?S:0))*R,b=Math.max(T/((_=y?.startSize)!=null?_:0),-.999999);return y.columnSizingStart.forEach(k=>{let[F,z]=k;c[F]=Math.round(Math.max(z+z*b,0)*100)/100}),{...y,deltaOffset:T,deltaPercentage:b}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...c})))},d=v=>u("move",v),f=v=>{u("end",v),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=xp(n),p={moveHandler:v=>d(v.clientX),upHandler:v=>{h?.removeEventListener("mousemove",p.moveHandler),h?.removeEventListener("mouseup",p.upHandler),f(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var C;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((C=v.touches[0])==null?void 0:C.clientX)}},x=Cp()?{passive:!1}:!1;Mn(o)?(h?.addEventListener("touchmove",g.moveHandler,x),h?.addEventListener("touchend",g.upHandler,x)):(h?.addEventListener("mousemove",p.moveHandler,x),h?.addEventListener("mouseup",p.upHandler,x)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Pn():(n=e.initialState.columnSizingInfo)!=null?n:Pn())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let Dt=null;function Cp(){if(typeof Dt=="boolean")return Dt;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Dt=e,Dt}function Mn(e){return e.type==="touchstart"}const Sp={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:ae("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(o=>o.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=E(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),A(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=E(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],A(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,i)=>E(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),A(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,o)=>({...s,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function ut(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const _p={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Rp={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:ae("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>we.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return Yt(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:we[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},bp={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:ae("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,o;e.setExpanded(i?{}:(s=(o=e.initialState)==null?void 0:o.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const r=o.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const o=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=i,n=(s=n)!=null?s:!o,!o&&n)return{...r,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=r;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Qn=0,ei=10,Tn=()=>({pageIndex:Qn,pageSize:ei}),Pp={getInitialState:e=>({...e,pagination:{...Tn(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:ae("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=o=>be(i,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?Tn():(s=e.initialState.pagination)!=null?s:Tn())},e.setPageIndex=i=>{e.setPagination(s=>{let o=be(i,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...s,pageIndex:o}})},e.resetPageIndex=i=>{var s,o;e.setPageIndex(i?Qn:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?s:Qn)},e.resetPageSize=i=>{var s,o;e.setPageSize(i?ei:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?s:ei)},e.setPageSize=i=>{e.setPagination(s=>{const o=Math.max(1,be(i,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/o);return{...s,pageIndex:a,pageSize:o}})},e.setPageCount=i=>e.setPagination(s=>{var o;let r=be(i,(o=e.options.pageCount)!=null?o:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=E(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((o,r)=>r)),s},A(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Vn=()=>({top:[],bottom:[]}),Mp={getInitialState:e=>({rowPinning:Vn(),...e}),getDefaultOptions:e=>({onRowPinningChange:ae("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const o=i?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=s?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...o]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=l?.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l?.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const o=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(i=o?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Vn():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Vn())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,o;return!!((s=i.top)!=null&&s.length||(o=i.bottom)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=E(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),A(e.options,"debugRows","getTopRows")),e.getBottomRows=E(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),A(e.options,"debugRows","getBottomRows")),e.getCenterRows=E(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(o=>!s.has(o.id))},A(e.options,"debugRows","getCenterRows"))}},Tp={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:ae("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(o=>{o.getCanSelect()&&(i[o.id]=!0)}):s.forEach(o=>{delete i[o.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(o=>{ti(s,o.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=E(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?En(e,n):{rows:[],flatRows:[],rowsById:{}},A(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=E(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?En(e,n):{rows:[],flatRows:[],rowsById:{}},A(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=E(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?En(e,n):{rows:[],flatRows:[],rowsById:{}},A(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(o=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return o;const a={...o};return ti(a,e.id,n,(r=i?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ni(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ni(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ni(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},ti=(e,t,n,i,s)=>{var o;const r=s.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(o=r.subRows)!=null&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>ti(e,a.id,n,i,s))};function En(e,t){const n=e.getState().rowSelection,i=[],s={},o=function(r,a){return r.map(l=>{var c;const u=Ni(l,n);if(u&&(i.push(l),s[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),u)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:i,rowsById:s}}function Ni(e,t){var n;return(n=t[e.id])!=null?n:!1}function ni(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,o=!1;return e.subRows.forEach(r=>{if(!(o&&!s)&&(r.getCanSelect()&&(Ni(r,t)?o=!0:s=!1),r.subRows&&r.subRows.length)){const a=ni(r,t);a==="all"?o=!0:(a==="some"&&(o=!0),s=!1)}}),s?"all":o?"some":!1}const ii=/([0-9]+)/gm,Vp=(e,t,n)=>Ca(Te(e.getValue(n)).toLowerCase(),Te(t.getValue(n)).toLowerCase()),Ep=(e,t,n)=>Ca(Te(e.getValue(n)),Te(t.getValue(n))),Ap=(e,t,n)=>Hi(Te(e.getValue(n)).toLowerCase(),Te(t.getValue(n)).toLowerCase()),Dp=(e,t,n)=>Hi(Te(e.getValue(n)),Te(t.getValue(n))),Fp=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},kp=(e,t,n)=>Hi(e.getValue(n),t.getValue(n));function Hi(e,t){return e===t?0:e>t?1:-1}function Te(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ca(e,t){const n=e.split(ii).filter(Boolean),i=t.split(ii).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),o=i.shift(),r=parseInt(s,10),a=parseInt(o,10),l=[r,a].sort();if(isNaN(l[0])){if(s>o)return 1;if(o>s)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-i.length}const it={alphanumeric:Vp,alphanumericCaseSensitive:Ep,text:Ap,textCaseSensitive:Dp,datetime:Fp,basic:kp},Ip={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:ae("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const o=s?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return it.datetime;if(typeof o=="string"&&(i=!0,o.split(ii).length>1))return it.alphanumeric}return i?it.text:it.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return Yt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:it[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let c=[],u,d=o?n:s==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?a?u="toggle":u="add":r!=null&&r.length&&l!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(o||s||(u="remove")),u==="add"){var f;c=[...r,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const o=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==o&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Lp=[np,Sp,vp,yp,sp,op,_p,Rp,Ip,pp,bp,Pp,Mp,Tp,wp];function $p(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...Lp,...(t=e._features)!=null?t:[]];let s={_features:i};const o=s._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=f=>s.options.mergeOptions?s.options.mergeOptions(o,f):{...o,...f};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:i,options:{...o,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const h=be(f,s.options);s.options=r(h)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,h,p)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(f,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!p&&(p=s.getCoreRowModel().rowsById[f],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return p},_getDefaultColumnDef:E(()=>[s.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,x;return(g=(x=p.renderValue())==null||x.toString==null?void 0:x.toString())!=null?g:null},...s._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},A(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:E(()=>[s._getColumnDefs()],f=>{const h=function(p,g,x){return x===void 0&&(x=0),p.map(v=>{const C=tp(s,v,x,g),y=v;return C.columns=y.columns?h(y.columns,C,x+1):[],C})};return h(f)},A(e,"debugColumns","getAllColumns")),getAllFlatColumns:E(()=>[s.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),A(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:E(()=>[s.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),A(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:E(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(g=>g.getLeafColumns());return h(p)},A(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(s,d);for(let f=0;f<s._features.length;f++){const h=s._features[f];h==null||h.createTable==null||h.createTable(s)}return s}function jp(){return e=>E(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,o,r){o===void 0&&(o=0);const a=[];for(let c=0;c<s.length;c++){const u=ip(e,e._getRowId(s[c],c,r),s[c],c,o,void 0,r?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(s[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=i(u.originalSubRows,o+1,u))}}return a};return n.rows=i(t),n},A(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Op(e){const t=[],n=i=>{var s;t.push(i),(s=i.subRows)!=null&&s.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function zp(e){return t=>E(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:s,pageIndex:o}=n;let{rows:r,flatRows:a,rowsById:l}=i;const c=s*o,u=c+s;r=r.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=Op({rows:r,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},A(t.options,"debugTable","getPaginationRowModel"))}function Bp(){return e=>E(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,s=[],o=i.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};o.forEach(l=>{const c=e.getColumn(l.id);c&&(r[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,d)=>{for(let h=0;h<o.length;h+=1){var f;const p=o[h],g=r[p.id],x=g.sortUndefined,v=(f=p?.desc)!=null?f:!1;let C=0;if(x){const y=u.getValue(p.id),S=d.getValue(p.id),_=y===void 0,R=S===void 0;if(_||R){if(x==="first")return _?-1:1;if(x==="last")return _?1:-1;C=_&&R?0:_?x:-x}}if(C===0&&(C=g.sortingFn(u,d,p.id)),C!==0)return v&&(C*=-1),g.invertSorting&&(C*=-1),C}return u.index-d.index}),c.forEach(u=>{var d;s.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},A(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
28
+ color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return s}}function E(e,t,n,i){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:i}}function ap(e,t,n,i){const s=()=>{var r;return(r=o.getValue())!=null?r:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:V(()=>[e,n,t,o],(r,a,l,c)=>({table:r,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),E(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(o,n,t,e)},{}),o}function lp(e,t,n,i){var s,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(s=(o=a.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:u=f=>f[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(c)}`,accessorFn:u,parent:i,depth:n,columnDef:a,columns:[],getFlatColumns:V(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},E(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:V(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},E(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const J="debugHeaders";function _o(e,t,n){var i;let o={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),r.push(l)};return a(o),r},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(o,e)}),o}const up={createTable:e=>{e.getHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var o,r;const a=(o=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(r=s?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],c=n.filter(d=>!(i!=null&&i.includes(d.id))&&!(s!=null&&s.includes(d.id)));return Dt(t,[...a,...c,...l],e)},E(e.options,J,"getHeaderGroups")),e.getCenterHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(o=>!(i!=null&&i.includes(o.id))&&!(s!=null&&s.includes(o.id))),Dt(t,n,e,"center")),E(e.options,J,"getCenterHeaderGroups")),e.getLeftHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Dt(t,o,e,"left")},E(e.options,J,"getLeftHeaderGroups")),e.getRightHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Dt(t,o,e,"right")},E(e.options,J,"getRightHeaderGroups")),e.getFooterGroups=V(()=>[e.getHeaderGroups()],t=>[...t].reverse(),E(e.options,J,"getFooterGroups")),e.getLeftFooterGroups=V(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),E(e.options,J,"getLeftFooterGroups")),e.getCenterFooterGroups=V(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),E(e.options,J,"getCenterFooterGroups")),e.getRightFooterGroups=V(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),E(e.options,J,"getRightFooterGroups")),e.getFlatHeaders=V(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),E(e.options,J,"getFlatHeaders")),e.getLeftFlatHeaders=V(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),E(e.options,J,"getLeftFlatHeaders")),e.getCenterFlatHeaders=V(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),E(e.options,J,"getCenterFlatHeaders")),e.getRightFlatHeaders=V(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),E(e.options,J,"getRightFlatHeaders")),e.getCenterLeafHeaders=V(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),E(e.options,J,"getCenterLeafHeaders")),e.getLeftLeafHeaders=V(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),E(e.options,J,"getLeftLeafHeaders")),e.getRightLeafHeaders=V(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),E(e.options,J,"getRightLeafHeaders")),e.getLeafHeaders=V(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,o,r,a,l,c;return[...(s=(o=t[0])==null?void 0:o.headers)!=null?s:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(c=i[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},E(e.options,J,"getLeafHeaders"))}};function Dt(e,t,n,i){var s,o;let r=0;const a=function(f,h){h===void 0&&(h=1),r=Math.max(r,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const c=(f,h)=>{const p={depth:h,id:[i,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(x=>{const v=[...g].reverse()[0],C=x.column.depth===p.depth;let y,S=!1;if(C&&x.column.parent?y=x.column.parent:(y=x.column,S=!0),v&&v?.column===y)v.subHeaders.push(x);else{const _=_o(n,y,{id:[i,h,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(b=>b.column===y).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(x),g.push(_)}p.headers.push(x),x.headerGroup=p}),l.push(p),h>0&&c(g,h-1)},u=t.map((f,h)=>_o(n,f,{depth:r,index:h}));c(u,r-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,x=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],d(p.subHeaders).forEach(y=>{let{colSpan:S,rowSpan:_}=y;g+=S,v.push(_)})):g=1;const C=Math.min(...v);return x=x+C,p.colSpan=g,p.rowSpan=x,{colSpan:g,rowSpan:x}});return d((s=(o=l[0])==null?void 0:o.headers)!=null?s:[]),l}const cp=(e,t,n,i,s,o,r)=>{let a={id:t,index:i,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,i),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>rp(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:V(()=>[e.getAllLeafColumns()],l=>l.map(c=>ap(e,a,c,c.id)),E(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:V(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),E(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},dp={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ma=(e,t,n)=>{var i,s;const o=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(o))};ma.autoRemove=e=>me(e);const va=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};va.autoRemove=e=>me(e);const ya=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};ya.autoRemove=e=>me(e);const xa=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};xa.autoRemove=e=>me(e);const wa=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});wa.autoRemove=e=>me(e)||!(e!=null&&e.length);const Ca=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});Ca.autoRemove=e=>me(e)||!(e!=null&&e.length);const Sa=(e,t,n)=>e.getValue(t)===n;Sa.autoRemove=e=>me(e);const _a=(e,t,n)=>e.getValue(t)==n;_a.autoRemove=e=>me(e);const Hi=(e,t,n)=>{let[i,s]=n;const o=e.getValue(t);return o>=i&&o<=s};Hi.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(i)?-1/0:i,r=n===null||Number.isNaN(s)?1/0:s;if(o>r){const a=o;o=r,r=a}return[o,r]};Hi.autoRemove=e=>me(e)||me(e[0])&&me(e[1]);const we={includesString:ma,includesStringSensitive:va,equalsString:ya,arrIncludes:xa,arrIncludesAll:wa,arrIncludesSome:Ca,equals:Sa,weakEquals:_a,inNumberRange:Hi};function me(e){return e==null||e===""}const fp={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:ae("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?we.includesString:typeof i=="number"?we.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?we.equals:Array.isArray(i)?we.arrIncludes:we.weakEquals},e.getFilterFn=()=>{var n,i;return Qt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:we[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),o=i?.find(u=>u.id===e.id),r=Pe(n,o?o.value:void 0);if(bo(s,r,e)){var a;return(a=i?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(o){var c;return(c=i?.map(u=>u.id===e.id?l:u))!=null?c:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var o;return(o=Pe(t,s))==null?void 0:o.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(bo(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function bo(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const hp=(e,t,n)=>n.reduce((i,s)=>{const o=s.getValue(e);return i+(typeof o=="number"?o:0)},0),gp=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i>o||i===void 0&&o>=o)&&(i=o)}),i},pp=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i<o||i===void 0&&o>=o)&&(i=o)}),i},mp=(e,t,n)=>{let i,s;return n.forEach(o=>{const r=o.getValue(e);r!=null&&(i===void 0?r>=r&&(i=s=r):(i>r&&(i=r),s<r&&(s=r)))}),[i,s]},vp=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let o=s.getValue(e);o!=null&&(o=+o)>=o&&(++n,i+=o)}),n)return i/n},yp=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!op(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((o,r)=>o-r);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},xp=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),wp=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Cp=(e,t)=>t.length,Mn={sum:hp,min:gp,max:pp,extent:mp,mean:vp,median:yp,unique:xp,uniqueCount:wp,count:Cp},Sp={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:ae("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);if(typeof i=="number")return Mn.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Mn.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return Qt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:Mn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function _p(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(o=>!t.includes(o.id));return n==="remove"?i:[...t.map(o=>e.find(r=>r.id===o)).filter(Boolean),...i]}const bp={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:ae("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=V(n=>[ft(t,n)],n=>n.findIndex(i=>i.id===e.id),E(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return((i=ft(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=ft(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=V(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let o=[];if(!(t!=null&&t.length))o=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return _p(o,n,i)},E(e.options,"debugTable","_getOrderColumnsFn"))}},Pn=()=>({left:[],right:[]}),Rp={getInitialState:e=>({columnPinning:Pn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:ae("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var o,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(d=>!(i!=null&&i.includes(d))),right:[...((l=s?.right)!=null?l:[]).filter(d=>!(i!=null&&i.includes(d))),...i]}}if(n==="left"){var c,u;return{left:[...((c=s?.left)!=null?c:[]).filter(d=>!(i!=null&&i.includes(d))),...i],right:((u=s?.right)!=null?u:[]).filter(d=>!(i!=null&&i.includes(d)))}}return{left:((o=s?.left)!=null?o:[]).filter(d=>!(i!=null&&i.includes(d))),right:((r=s?.right)!=null?r:[]).filter(d=>!(i!=null&&i.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,o,r;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((o=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:i,right:s}=t.getState().columnPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=V(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const o=[...i??[],...s??[]];return n.filter(r=>!o.includes(r.column.id))},E(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=V(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),E(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=V(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),E(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?Pn():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:Pn())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,o;return!!((s=i.left)!=null&&s.length||(o=i.right)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=V(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),E(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=V(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),E(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=V(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(o=>!s.includes(o.id))},E(e.options,"debugColumns","getCenterLeafColumns"))}};function Mp(e){return e||(typeof document<"u"?document:null)}const Ft={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Tn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Pp={getDefaultColumnDef:()=>Ft,getInitialState:e=>({columnSizing:{},columnSizingInfo:Tn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:ae("columnSizing",e),onColumnSizingInfoChange:ae("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Ft.minSize,(i=o??e.columnDef.size)!=null?i:Ft.size),(s=e.columnDef.maxSize)!=null?s:Ft.maxSize)},e.getStart=V(n=>[n,ft(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,o)=>s+o.getSize(),0),E(t.options,"debugColumns","getStart")),e.getAfter=V(n=>[n,ft(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,o)=>s+o.getSize(),0),E(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var o;n+=(o=s.column.getSize())!=null?o:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i?.getCanResize();return o=>{if(!i||!s||(o.persist==null||o.persist(),Vn(o)&&o.touches&&o.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[i.id,i.getSize()]],l=Vn(o)?Math.round(o.touches[0].clientX):o.clientX,c={},u=(v,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(y=>{var S,_;const b=t.options.columnResizeDirection==="rtl"?-1:1,P=(C-((S=y?.startOffset)!=null?S:0))*b,R=Math.max(P/((_=y?.startSize)!=null?_:0),-.999999);return y.columnSizingStart.forEach(F=>{let[D,L]=F;c[D]=Math.round(Math.max(L+L*R,0)*100)/100}),{...y,deltaOffset:P,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...c})))},d=v=>u("move",v),f=v=>{u("end",v),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=Mp(n),p={moveHandler:v=>d(v.clientX),upHandler:v=>{h?.removeEventListener("mousemove",p.moveHandler),h?.removeEventListener("mouseup",p.upHandler),f(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var C;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((C=v.touches[0])==null?void 0:C.clientX)}},x=Tp()?{passive:!1}:!1;Vn(o)?(h?.addEventListener("touchmove",g.moveHandler,x),h?.addEventListener("touchend",g.upHandler,x)):(h?.addEventListener("mousemove",p.moveHandler,x),h?.addEventListener("mouseup",p.upHandler,x)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Tn():(n=e.initialState.columnSizingInfo)!=null?n:Tn())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let It=null;function Tp(){if(typeof It=="boolean")return It;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return It=e,It}function Vn(e){return e.type==="touchstart"}const Vp={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:ae("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(o=>o.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=V(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),E(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=V(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],E(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,i)=>V(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),E(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,o)=>({...s,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function ft(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ep={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Ap={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:ae("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>we.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return Qt(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:we[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Dp={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:ae("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,o;e.setExpanded(i?{}:(s=(o=e.initialState)==null?void 0:o.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const r=o.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const o=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=i,n=(s=n)!=null?s:!o,!o&&n)return{...r,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=r;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},ti=0,ni=10,En=()=>({pageIndex:ti,pageSize:ni}),Fp={getInitialState:e=>({...e,pagination:{...En(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:ae("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=o=>Pe(i,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?En():(s=e.initialState.pagination)!=null?s:En())},e.setPageIndex=i=>{e.setPagination(s=>{let o=Pe(i,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...s,pageIndex:o}})},e.resetPageIndex=i=>{var s,o;e.setPageIndex(i?ti:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?s:ti)},e.resetPageSize=i=>{var s,o;e.setPageSize(i?ni:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?s:ni)},e.setPageSize=i=>{e.setPagination(s=>{const o=Math.max(1,Pe(i,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/o);return{...s,pageIndex:a,pageSize:o}})},e.setPageCount=i=>e.setPagination(s=>{var o;let r=Pe(i,(o=e.options.pageCount)!=null?o:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=V(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((o,r)=>r)),s},E(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},An=()=>({top:[],bottom:[]}),Ip={getInitialState:e=>({rowPinning:An(),...e}),getDefaultOptions:e=>({onRowPinningChange:ae("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const o=i?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=s?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...o]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=l?.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l?.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const o=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(i=o?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?An():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:An())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,o;return!!((s=i.top)!=null&&s.length||(o=i.bottom)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=V(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),E(e.options,"debugRows","getTopRows")),e.getBottomRows=V(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),E(e.options,"debugRows","getBottomRows")),e.getCenterRows=V(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(o=>!s.has(o.id))},E(e.options,"debugRows","getCenterRows"))}},kp={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:ae("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(o=>{o.getCanSelect()&&(i[o.id]=!0)}):s.forEach(o=>{delete i[o.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(o=>{ii(s,o.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=V(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Dn(e,n):{rows:[],flatRows:[],rowsById:{}},E(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=V(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Dn(e,n):{rows:[],flatRows:[],rowsById:{}},E(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=V(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Dn(e,n):{rows:[],flatRows:[],rowsById:{}},E(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(o=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return o;const a={...o};return ii(a,e.id,n,(r=i?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Gi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return si(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return si(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},ii=(e,t,n,i,s)=>{var o;const r=s.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(o=r.subRows)!=null&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>ii(e,a.id,n,i,s))};function Dn(e,t){const n=e.getState().rowSelection,i=[],s={},o=function(r,a){return r.map(l=>{var c;const u=Gi(l,n);if(u&&(i.push(l),s[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),u)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:i,rowsById:s}}function Gi(e,t){var n;return(n=t[e.id])!=null?n:!1}function si(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,o=!1;return e.subRows.forEach(r=>{if(!(o&&!s)&&(r.getCanSelect()&&(Gi(r,t)?o=!0:s=!1),r.subRows&&r.subRows.length)){const a=si(r,t);a==="all"?o=!0:(a==="some"&&(o=!0),s=!1)}}),s?"all":o?"some":!1}const oi=/([0-9]+)/gm,jp=(e,t,n)=>ba(Ee(e.getValue(n)).toLowerCase(),Ee(t.getValue(n)).toLowerCase()),$p=(e,t,n)=>ba(Ee(e.getValue(n)),Ee(t.getValue(n))),Lp=(e,t,n)=>Wi(Ee(e.getValue(n)).toLowerCase(),Ee(t.getValue(n)).toLowerCase()),Op=(e,t,n)=>Wi(Ee(e.getValue(n)),Ee(t.getValue(n))),zp=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},Bp=(e,t,n)=>Wi(e.getValue(n),t.getValue(n));function Wi(e,t){return e===t?0:e>t?1:-1}function Ee(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ba(e,t){const n=e.split(oi).filter(Boolean),i=t.split(oi).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),o=i.shift(),r=parseInt(s,10),a=parseInt(o,10),l=[r,a].sort();if(isNaN(l[0])){if(s>o)return 1;if(o>s)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-i.length}const rt={alphanumeric:jp,alphanumericCaseSensitive:$p,text:Lp,textCaseSensitive:Op,datetime:zp,basic:Bp},Np={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:ae("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const o=s?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return rt.datetime;if(typeof o=="string"&&(i=!0,o.split(oi).length>1))return rt.alphanumeric}return i?rt.text:rt.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return Qt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:rt[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let c=[],u,d=o?n:s==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?a?u="toggle":u="add":r!=null&&r.length&&l!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(o||s||(u="remove")),u==="add"){var f;c=[...r,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const o=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==o&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Hp=[up,Vp,bp,Rp,dp,fp,Ep,Ap,Np,Sp,Dp,Fp,Ip,kp,Pp];function Gp(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...Hp,...(t=e._features)!=null?t:[]];let s={_features:i};const o=s._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=f=>s.options.mergeOptions?s.options.mergeOptions(o,f):{...o,...f};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:i,options:{...o,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const h=Pe(f,s.options);s.options=r(h)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,h,p)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(f,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!p&&(p=s.getCoreRowModel().rowsById[f],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return p},_getDefaultColumnDef:V(()=>[s.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,x;return(g=(x=p.renderValue())==null||x.toString==null?void 0:x.toString())!=null?g:null},...s._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},E(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:V(()=>[s._getColumnDefs()],f=>{const h=function(p,g,x){return x===void 0&&(x=0),p.map(v=>{const C=lp(s,v,x,g),y=v;return C.columns=y.columns?h(y.columns,C,x+1):[],C})};return h(f)},E(e,"debugColumns","getAllColumns")),getAllFlatColumns:V(()=>[s.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),E(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:V(()=>[s.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),E(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:V(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(g=>g.getLeafColumns());return h(p)},E(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(s,d);for(let f=0;f<s._features.length;f++){const h=s._features[f];h==null||h.createTable==null||h.createTable(s)}return s}function Wp(){return e=>V(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,o,r){o===void 0&&(o=0);const a=[];for(let c=0;c<s.length;c++){const u=cp(e,e._getRowId(s[c],c,r),s[c],c,o,void 0,r?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(s[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=i(u.originalSubRows,o+1,u))}}return a};return n.rows=i(t),n},E(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Up(e){const t=[],n=i=>{var s;t.push(i),(s=i.subRows)!=null&&s.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Kp(e){return t=>V(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:s,pageIndex:o}=n;let{rows:r,flatRows:a,rowsById:l}=i;const c=s*o,u=c+s;r=r.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=Up({rows:r,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},E(t.options,"debugTable","getPaginationRowModel"))}function qp(){return e=>V(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,s=[],o=i.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};o.forEach(l=>{const c=e.getColumn(l.id);c&&(r[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,d)=>{for(let h=0;h<o.length;h+=1){var f;const p=o[h],g=r[p.id],x=g.sortUndefined,v=(f=p?.desc)!=null?f:!1;let C=0;if(x){const y=u.getValue(p.id),S=d.getValue(p.id),_=y===void 0,b=S===void 0;if(_||b){if(x==="first")return _?-1:1;if(x==="last")return _?1:-1;C=_&&b?0:_?x:-x}}if(C===0&&(C=g.sortingFn(u,d,p.id)),C!==0)return v&&(C*=-1),g.invertSorting&&(C*=-1),C}return u.index-d.index}),c.forEach(u=>{var d;s.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},E(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
29
29
  * react-table
30
30
  *
31
31
  * Copyright (c) TanStack
@@ -34,18 +34,5 @@
34
34
  * LICENSE.md file in the root directory of this source tree.
35
35
  *
36
36
  * @license MIT
37
- */function So(e,t){return e?Np(e)?P.createElement(e,t):e:null}function Np(e){return Hp(e)||typeof e=="function"||Gp(e)}function Hp(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Gp(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Wp(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=P.useState(()=>({current:$p(t)})),[i,s]=P.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...i,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const Up=e=>P.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("style",null,`
38
- @keyframes spin {
39
- from {
40
- transform: rotate(0deg);
41
- }
42
- to {
43
- transform: rotate(360deg);
44
- }
45
- }
46
- .spinner {
47
- transform-origin: center;
48
- animation: spin 1s linear infinite;
49
- }
50
- `),P.createElement("g",{className:"spinner"},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),Kp=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("g",{clipPath:"url(#clip0_2074_3858)"},P.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),P.createElement("defs",null,P.createElement("clipPath",{id:"clip0_2074_3858"},P.createElement("rect",{width:24,height:24,fill:"white"})))),qp="_table_19yhs_8",Xp={table:qp},Yp=w.forwardRef(({children:e,className:t,style:n,...i},s)=>m.jsx("td",{ref:s,className:M.cx(t),style:n,...i,children:e})),Sa=w.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:i=!1,...s},o)=>{const r=M.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:o,className:M.cx(r,t),...s,children:e})});Sa.displayName="TableBodyRow";const Zp=w.forwardRef(({children:e,className:t,style:n,justifyContent:i="flex-start",alignItems:s="flex-start",...o},r)=>{const a=M.css({justifyContent:i,alignItems:s,fontWeight:"inherit"});return m.jsx("th",{ref:r,className:M.cx(a,t),style:n,...o,children:e})}),_a=w.forwardRef(({children:e,className:t,showBorders:n=!1,...i},s)=>{const o=M.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:s,className:M.cx(o,t),...i,children:e})});_a.displayName="TableHeadRow";const Jp=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Qp=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),em=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),P.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),tm=(e,t)=>{const n=[];if(t<=10){for(let o=1;o<=t;o++)n.push(o);return n}const i=2,s=[];for(let o=Math.max(2,e+1-i);o<=Math.min(t-1,e+1+i);o++)s.push(o);return e+1-i>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+i<t-1?n.push("...",t):t>1&&n.push(t),n},nm=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:i,onPageSizeChange:s,pageSizeOptions:o=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorItem:a=l=>l.label})=>{const l=Math.ceil(n/t),c=e>0,u=e<l-1,d=()=>{c&&i(e-1)},f=()=>{u&&i(e+1)},h=g=>{s(Number(g))},p=tm(e,l);return n===0?null:m.jsxs(V,{row:!0,justifyContent:"space-between",children:[m.jsxs(V,{row:!0,gap:"var(--spacing-sm)",children:[m.jsx(dt,{onClick:d,disabled:!c,color:"neutral",size:"sm",children:m.jsx(Jp,{})}),m.jsx(V,{row:!0,gap:"var(--spacing-sm)",children:p.map(g=>m.jsx(im,{isDots:g==="...",isCurrentPage:g===e+1,disabled:g==="...",onClick:()=>i(g-1),children:g},g))}),m.jsx(dt,{color:"neutral",size:"sm",onClick:f,disabled:!u,children:m.jsx(Qp,{})})]}),r&&m.jsx(V,{children:m.jsx(aa,{value:t.toString(),size:"sm",items:o.map(g=>({value:g.toString(),label:g.toString()})),returnedValue:g=>g.value,renderItem:a,onChange:g=>h(g)})})]})},im=({children:e,isCurrentPage:t=!1,onClick:n,isDots:i=!1,disabled:s=!1})=>{const o=M.css({cursor:s?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=M.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return m.jsx(V,{className:o,onClick:s?void 0:n,children:i?m.jsx(em,{className:r}):m.jsx(O,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},sm=M.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),om=M.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--neutral-86) var(--neutral-96)"}),Ra=w.memo(({data:e,children:t,className:n,showBorders:i=!1,...s})=>{const[o,r]=w.useState(!1),[a,l]=w.useState(!1),c=w.useRef(null),u=w.useCallback(()=>{const f=c.current;if(!f)return;const{scrollLeft:h,scrollWidth:p,clientWidth:g}=f,x=p>g;r(x&&h>0),l(x&&h<p-g-1)},[]);w.useEffect(()=>{const f=c.current;if(!f)return;u();const h=new ResizeObserver(u);return h.observe(f),f.addEventListener("scroll",u),()=>{h.disconnect(),f.removeEventListener("scroll",u)}},[u,e]);const d=M.css({border:i?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:o?1:0},"&::after":{opacity:a?1:0}});return m.jsx(V,{className:M.cx(sm,d,n),...s,children:m.jsx(V,{ref:c,className:om,children:t})})});Ra.displayName="TableWrapper";const ba=w.forwardRef(({data:e,columns:t,showBorders:n=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:o=!1,enableMultiRowSelection:r=!1,sorting:a,onSortingChange:l,columnFilters:c,onColumnFiltersChange:u,columnVisibility:d,onColumnVisibilityChange:f,pagination:h,onPaginationChange:p,rowSelection:g,onRowSelectionChange:x,totalCount:v,loading:C=!1,emptyLabels:y={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:S={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:R,tableOptions:T={},onRowClick:b,getRowId:k,headCellComponent:F=Zp,bodyCellComponent:z=Yp,headRowComponent:Y=_a,bodyRowComponent:ee=Sa,onReset:ie,renderPageSizeSelectorItem:re},te)=>{const $=w.useMemo(()=>Zg(),[]),[U,I]=w.useState([]),[j,W]=w.useState([]),[ve,Qe]=w.useState({}),[Jt,Qt]=w.useState({pageIndex:0,pageSize:10}),[en,tn]=w.useState({}),_t=a??U,Rt=c??j,Wi=d??ve,Ee=h??Jt,Ui=g??en,Ma=L=>{const B=typeof L=="function"?L(_t):L;l?l(B):I(B)},Ta=L=>{const B=typeof L=="function"?L(Rt):L;u?u(B):W(B)},Va=L=>{const B=typeof L=="function"?L(Wi):L;f?f(B):Qe(B)},nn=L=>{const B=typeof L=="function"?L(Ee):L;p?p(B):Qt(B)},Ea=L=>{const B=typeof L=="function"?L(Ui):L;x?x(B):tn(B)},Aa=w.useMemo(()=>t.map(({key:L,accessor:B,...je})=>L==="accessor"?$.accessor(Ia=>Ia[B],{id:B.toString(),...je}):$[L]({id:B.toString(),...je})),[t,$]),sn=Wp({data:e,columns:Aa,state:{sorting:_t,columnFilters:Rt,columnVisibility:Wi,pagination:Ee,rowSelection:Ui},onSortingChange:Ma,onColumnFiltersChange:Ta,onColumnVisibilityChange:Va,onPaginationChange:nn,onRowSelectionChange:Ea,getCoreRowModel:jp(),getSortedRowModel:i?Bp():void 0,getPaginationRowModel:s?zp():void 0,enableRowSelection:o,enableMultiRowSelection:r,getRowId:k,manualPagination:!!v,pageCount:v?Math.ceil(v/Ee.pageSize):void 0,...T});w.useImperativeHandle(te,()=>sn);const{rows:Ki}=sn.getRowModel(),Da=(L,B)=>{b&&b(L.original,B)},Fa=M.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),ka=M.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"});return C?m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(R),children:[m.jsx(Up,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(O,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),m.jsx(O,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),m.jsx(Nt,{onClick:ie,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:S.action})]}):Ki.length?m.jsxs(V,{w:"full",gap:"var(--spacing-xl)",className:M.cx(R),children:[m.jsx(Ra,{data:e,showBorders:n,children:m.jsxs("table",{className:M.cx(Fa,Xp.table,_),children:[m.jsx("thead",{className:ka,children:sn.getHeaderGroups().map(L=>m.jsx(Y,{showBorders:n,children:L.headers.map(B=>m.jsx(F,{style:{width:B.getSize()},onClick:B.column.getToggleSortingHandler(),children:B.isPlaceholder?null:So(B.column.columnDef.header,B.getContext())},B.id))},L.id))}),m.jsx("tbody",{children:Ki.map((L,B)=>m.jsx(ee,{showBorders:n,isSelected:L.getIsSelected(),onClick:()=>Da(L,B),children:L.getVisibleCells().map(je=>m.jsx(z,{children:So(je.column.columnDef.cell,je.getContext())},je.id))},L.id))})]})}),s&&!C&&m.jsx(nm,{pageIndex:Ee.pageIndex,pageSize:Ee.pageSize,totalCount:v||e.length,renderPageSizeSelectorItem:re,onPageChange:L=>nn({...Ee,pageIndex:L}),onPageSizeChange:L=>nn({...Ee,pageSize:L,pageIndex:0})})]}):m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(R),children:[m.jsx(Kp,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(O,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:y.title}),m.jsx(O,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:y.description}),m.jsx(Nt,{onClick:ie,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:y.action})]})});ba.displayName="Table";const rm=w.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e})),Gi=w.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e}));Gi.displayName="TableHeadCellContent";const am=e=>P.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),lm=e=>P.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),um=({sortDirection:e,gap:t="5px",...n})=>m.jsxs(V,{gap:t,...n,children:[m.jsx(am,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),m.jsx(lm,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Pa=({children:e,tableProps:t,gap:n="10px",...i})=>{const s=t.column.getIsSorted();return m.jsxs(Gi,{style:{cursor:"pointer",userSelect:"none"},gap:n,...i,children:[e,m.jsx(um,{sortDirection:s})]})};Pa.displayName="TableHeadCellContentSortable";const Zt=ba;Zt.HeadCellContent=Gi;Zt.HeadCellContentSortable=Pa;Zt.BodyCellContent=rm;const cm="_themeProviderScoped_1g4uu_9",dm={themeProviderScoped:cm};function fm({className:e,children:t,theme:n}){return m.jsx("div",{className:Fe(dm.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})}exports.AnimatedText=Nt;exports.Avatar=Hh;exports.Box=V;exports.Button=dh;exports.Checkbox=Oi;exports.Hint=ug;exports.IconButton=dt;exports.Input=oa;exports.Modal=Xt;exports.Portal=ra;exports.Ripple=yt;exports.Select=aa;exports.Switch=la;exports.Table=Zt;exports.Tag=zi;exports.Text=O;exports.ThemeProviderScoped=fm;exports.getSizeClass=ct;exports.getStyleClass=Gt;exports.useControlled=Ht;exports.useDropdownPosition=bo;
37
+ */function Ro(e,t){return e?Xp(e)?ve.createElement(e,t):e:null}function Xp(e){return Yp(e)||typeof e=="function"||Zp(e)}function Yp(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Zp(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Jp(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=ve.useState(()=>({current:Gp(t)})),[i,s]=ve.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...i,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const Qp="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20@keyframes%20spin%20{%20from%20{%20transform:%20rotate(0deg);%20}%20to%20{%20transform:%20rotate(360deg);%20}%20}%20.spinner%20{%20transform-origin:%20center;%20animation:%20spin%201s%20linear%20infinite;%20}%20%3c/style%3e%3cg%20class='spinner'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.0003%206.83317C13.5692%206.83317%2011.2376%207.79894%209.51851%209.51803C7.79943%2011.2371%206.83366%2013.5687%206.83366%2015.9998C6.83366%2018.431%207.79943%2020.7626%209.51851%2022.4817C11.2376%2024.2007%2013.5692%2025.1665%2016.0003%2025.1665C18.4315%2025.1665%2020.7631%2024.2007%2022.4821%2022.4817C24.2012%2020.7626%2025.167%2018.431%2025.167%2015.9998C25.167%2013.5687%2024.2012%2011.2371%2022.4821%209.51803C20.7631%207.79894%2018.4315%206.83317%2016.0003%206.83317ZM3.16699%2015.9998C3.16699%208.91217%208.91266%203.1665%2016.0003%203.1665C23.088%203.1665%2028.8337%208.91217%2028.8337%2015.9998C28.8337%2023.0875%2023.088%2028.8332%2016.0003%2028.8332C8.91266%2028.8332%203.16699%2023.0875%203.16699%2015.9998Z'%20fill='currentColor'%20fill-opacity='0.12'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15.9997%206.83319C13.6363%206.82787%2011.3633%207.74068%209.65999%209.37907C9.30711%209.70535%208.84021%209.88001%208.35982%209.86545C7.87943%209.85089%207.42396%209.64827%207.09149%209.30122C6.75902%208.95416%206.57612%208.49043%206.58218%208.00985C6.58823%207.52928%206.78276%207.07031%207.12388%206.73174C9.50956%204.43941%2012.6912%203.16143%2015.9997%203.16652C16.4859%203.16652%2016.9522%203.35967%2017.296%203.70349C17.6398%204.04731%2017.833%204.51362%2017.833%204.99985C17.833%205.48608%2017.6398%205.9524%2017.296%206.29621C16.9522%206.64003%2016.4859%206.83319%2015.9997%206.83319Z'%20fill='currentColor'/%3e%3c/g%3e%3c/svg%3e",em="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2074_3858)'%3e%3cpath%20d='M21%2021L16.65%2016.65M19%2011C19%2015.4183%2015.4183%2019%2011%2019C6.58172%2019%203%2015.4183%203%2011C3%206.58172%206.58172%203%2011%203C15.4183%203%2019%206.58172%2019%2011Z'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2074_3858'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",tm="_table_19yhs_8",nm={table:tm},im=w.forwardRef(({children:e,className:t,style:n,...i},s)=>m.jsx("td",{ref:s,className:M.cx(t),style:n,...i,children:e})),Ra=w.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:i=!1,...s},o)=>{const r=M.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:o,className:M.cx(r,t),...s,children:e})});Ra.displayName="TableBodyRow";const sm=w.forwardRef(({children:e,className:t,style:n,justifyContent:i="flex-start",alignItems:s="flex-start",...o},r)=>{const a=M.css({justifyContent:i,alignItems:s,fontWeight:"inherit"});return m.jsx("th",{ref:r,className:M.cx(a,t),style:n,...o,children:e})}),Ma=w.forwardRef(({children:e,className:t,showBorders:n=!1,...i},s)=>{const o=M.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:s,className:M.cx(o,t),...i,children:e})});Ma.displayName="TableHeadRow";const om="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%2018L9%2012L15%206'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",rm="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2018L15%2012L9%206'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",am="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2013C12.5523%2013%2013%2012.5523%2013%2012C13%2011.4477%2012.5523%2011%2012%2011C11.4477%2011%2011%2011.4477%2011%2012C11%2012.5523%2011.4477%2013%2012%2013Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19%2013C19.5523%2013%2020%2012.5523%2020%2012C20%2011.4477%2019.5523%2011%2019%2011C18.4477%2011%2018%2011.4477%2018%2012C18%2012.5523%2018.4477%2013%2019%2013Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%2013C5.55228%2013%206%2012.5523%206%2012C6%2011.4477%205.55228%2011%205%2011C4.44772%2011%204%2011.4477%204%2012C4%2012.5523%204.44772%2013%205%2013Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",lm=(e,t)=>{const n=[];if(t<=10){for(let o=1;o<=t;o++)n.push(o);return n}const i=2,s=[];for(let o=Math.max(2,e+1-i);o<=Math.min(t-1,e+1+i);o++)s.push(o);return e+1-i>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+i<t-1?n.push("...",t):t>1&&n.push(t),n},um=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:i,onPageSizeChange:s,pageSizeOptions:o=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorItem:a=l=>l.label})=>{const l=Math.ceil(n/t),c=e>0,u=e<l-1,d=()=>{c&&i(e-1)},f=()=>{u&&i(e+1)},h=g=>{s(Number(g))},p=lm(e,l);return n===0?null:m.jsxs(T,{row:!0,justifyContent:"space-between",children:[m.jsxs(T,{row:!0,gap:"var(--spacing-sm)",children:[m.jsx(gt,{onClick:d,disabled:!c,color:"neutral",size:"sm",children:m.jsx(om,{})}),m.jsx(T,{row:!0,gap:"var(--spacing-sm)",children:p.map(g=>m.jsx(cm,{isDots:g==="...",isCurrentPage:g===e+1,disabled:g==="...",onClick:()=>i(g-1),children:g},g))}),m.jsx(gt,{color:"neutral",size:"sm",onClick:f,disabled:!u,children:m.jsx(rm,{})})]}),r&&m.jsx(T,{children:m.jsx(ca,{value:t.toString(),size:"sm",items:o.map(g=>({value:g.toString(),label:g.toString()})),returnedValue:g=>g.value,renderItem:a,onChange:g=>h(g)})})]})},cm=({children:e,isCurrentPage:t=!1,onClick:n,isDots:i=!1,disabled:s=!1})=>{const o=M.css({cursor:s?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=M.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return m.jsx(T,{className:o,onClick:s?void 0:n,children:i?m.jsx(am,{className:r}):m.jsx(j,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},dm=M.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),fm=M.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--neutral-86) var(--neutral-96)"}),Pa=w.memo(({data:e,children:t,className:n,showBorders:i=!1,...s})=>{const[o,r]=w.useState(!1),[a,l]=w.useState(!1),c=w.useRef(null),u=w.useCallback(()=>{const f=c.current;if(!f)return;const{scrollLeft:h,scrollWidth:p,clientWidth:g}=f,x=p>g;r(x&&h>0),l(x&&h<p-g-1)},[]);w.useEffect(()=>{const f=c.current;if(!f)return;u();const h=new ResizeObserver(u);return h.observe(f),f.addEventListener("scroll",u),()=>{h.disconnect(),f.removeEventListener("scroll",u)}},[u,e]);const d=M.css({border:i?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:o?1:0},"&::after":{opacity:a?1:0}});return m.jsx(T,{className:M.cx(dm,d,n),...s,children:m.jsx(T,{ref:c,className:fm,children:t})})});Pa.displayName="TableWrapper";const Ta=w.forwardRef(({data:e,columns:t,showBorders:n=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:o=!1,enableMultiRowSelection:r=!1,sorting:a,onSortingChange:l,columnFilters:c,onColumnFiltersChange:u,columnVisibility:d,onColumnVisibilityChange:f,pagination:h,onPaginationChange:p,rowSelection:g,onRowSelectionChange:x,totalCount:v,loading:C=!1,emptyLabels:y={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:S={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:b,tableOptions:P={},onRowClick:R,getRowId:F,headCellComponent:D=sm,bodyCellComponent:L=im,headRowComponent:q=Ma,bodyRowComponent:ee=Ra,onReset:ie,renderPageSizeSelectorItem:re},te)=>{const $=w.useMemo(()=>sp(),[]),[G,Y]=w.useState([]),[I,z]=w.useState([]),[U,be]=w.useState({}),[nt,tn]=w.useState({pageIndex:0,pageSize:10}),[nn,sn]=w.useState({}),Rt=a??G,Mt=c??I,qi=d??U,De=h??nt,Xi=g??nn,Ea=k=>{const O=typeof k=="function"?k(Rt):k;l?l(O):Y(O)},Aa=k=>{const O=typeof k=="function"?k(Mt):k;u?u(O):z(O)},Da=k=>{const O=typeof k=="function"?k(qi):k;f?f(O):be(O)},on=k=>{const O=typeof k=="function"?k(De):k;p?p(O):tn(O)},Fa=k=>{const O=typeof k=="function"?k(Xi):k;x?x(O):sn(O)},Ia=w.useMemo(()=>t.map(({key:k,accessor:O,...ze})=>k==="accessor"?$.accessor(La=>La[O],{id:O.toString(),...ze}):$[k]({id:O.toString(),...ze})),[t,$]),rn=Jp({data:e,columns:Ia,state:{sorting:Rt,columnFilters:Mt,columnVisibility:qi,pagination:De,rowSelection:Xi},onSortingChange:Ea,onColumnFiltersChange:Aa,onColumnVisibilityChange:Da,onPaginationChange:on,onRowSelectionChange:Fa,getCoreRowModel:Wp(),getSortedRowModel:i?qp():void 0,getPaginationRowModel:s?Kp():void 0,enableRowSelection:o,enableMultiRowSelection:r,getRowId:F,manualPagination:!!v,pageCount:v?Math.ceil(v/De.pageSize):void 0,...P});w.useImperativeHandle(te,()=>rn);const{rows:Yi}=rn.getRowModel(),ka=(k,O)=>{R&&R(k.original,O)},ja=M.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),$a=M.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"});return C?m.jsxs(T,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(Qp,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(j,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),m.jsx(j,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),m.jsx(Wt,{onClick:ie,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:S.action})]}):Yi.length?m.jsxs(T,{w:"full",gap:"var(--spacing-xl)",className:M.cx(b),children:[m.jsx(Pa,{data:e,showBorders:n,children:m.jsxs("table",{className:M.cx(ja,nm.table,_),children:[m.jsx("thead",{className:$a,children:rn.getHeaderGroups().map(k=>m.jsx(q,{showBorders:n,children:k.headers.map(O=>m.jsx(D,{style:{width:O.getSize()},onClick:O.column.getToggleSortingHandler(),children:O.isPlaceholder?null:Ro(O.column.columnDef.header,O.getContext())},O.id))},k.id))}),m.jsx("tbody",{children:Yi.map((k,O)=>m.jsx(ee,{showBorders:n,isSelected:k.getIsSelected(),onClick:()=>ka(k,O),children:k.getVisibleCells().map(ze=>m.jsx(L,{children:Ro(ze.column.columnDef.cell,ze.getContext())},ze.id))},k.id))})]})}),s&&!C&&m.jsx(um,{pageIndex:De.pageIndex,pageSize:De.pageSize,totalCount:v||e.length,renderPageSizeSelectorItem:re,onPageChange:k=>on({...De,pageIndex:k}),onPageSizeChange:k=>on({...De,pageSize:k,pageIndex:0})})]}):m.jsxs(T,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(em,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(j,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:y.title}),m.jsx(j,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:y.description}),m.jsx(Wt,{onClick:ie,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:y.action})]})});Ta.displayName="Table";const hm=w.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(T,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e})),Ui=w.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(T,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e}));Ui.displayName="TableHeadCellContent";const gm="data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.75%204.75L4.75%200.75L0.75%204.75'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",pm="data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.75%200.75L4.75%204.75L0.75%200.75'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",mm=({sortDirection:e,gap:t="5px",...n})=>m.jsxs(T,{gap:t,...n,children:[m.jsx(gm,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),m.jsx(pm,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Va=({children:e,tableProps:t,gap:n="10px",...i})=>{const s=t.column.getIsSorted();return m.jsxs(Ui,{style:{cursor:"pointer",userSelect:"none"},gap:n,...i,children:[e,m.jsx(mm,{sortDirection:s})]})};Va.displayName="TableHeadCellContentSortable";const en=Ta;en.HeadCellContent=Ui;en.HeadCellContentSortable=Va;en.BodyCellContent=hm;const vm="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2017L14%2012L9%207'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ym="_link_aolvt_8",xm="_separator_aolvt_19",wm="_nav_aolvt_23",Ot={link:ym,separator:xm,nav:wm,"nav-item":"_nav-item_aolvt_29"},Ki=({children:e,separator:t=m.jsx(vm,{className:Ot.separator})})=>{const n=w.Children.toArray(e).filter(i=>w.isValidElement(i));return m.jsx("nav",{"aria-label":"breadcrumb",className:Ot.nav,children:n.map((i,s)=>{const o=s===n.length-1;return m.jsxs(j,{tag:"span",className:Ot["nav-item"],children:[w.cloneElement(i,{active:i.props.active??o}),!o&&t]},s)})})},Cm=({children:e,href:t,active:n,className:i,activeClassName:s,activeElement:o,onClick:r})=>n?o||m.jsx(j,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:M.cx(i,s),onClick:r,children:e}):m.jsx("a",{href:t,className:M.cx(Ot.link,i),onClick:r,children:e});Ki.Item=Cm;Ki.displayName="Breadcrumbs";const Sm=Ki,_m="_themeProviderScoped_qdnii_9",bm={themeProviderScoped:_m};function Rm({className:e,children:t,theme:n}){return m.jsx("div",{className:ke(bm.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})}exports.AnimatedText=Wt;exports.Avatar=Uh;exports.Box=T;exports.Breadcrumbs=Sm;exports.Button=gh;exports.Checkbox=Bi;exports.Hint=fg;exports.IconButton=gt;exports.Input=la;exports.Modal=Jt;exports.Portal=ua;exports.Ripple=Ze;exports.SegmentControl=zg;exports.Select=ca;exports.Switch=da;exports.Table=en;exports.Tag=Ni;exports.Text=j;exports.ThemeProviderScoped=Rm;exports.getSizeClass=ht;exports.getStyleClass=Kt;exports.useControlled=Ut;exports.useDropdownPosition=To;
51
38
  //# sourceMappingURL=ui-kit.cjs.js.map